Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@crowdin/crowdin-api-client

Package Overview
Dependencies
Maintainers
0
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crowdin/crowdin-api-client - npm Package Compare versions

Comparing version 1.40.0 to 1.41.0

174

out/ai/index.d.ts
import { CrowdinApi, DownloadLink, PaginationOptions, PatchRequest, PlainObject, ResponseList, ResponseObject, Status } from '../core';
export declare class Ai extends CrowdinApi {
/**
* @param options request options
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.prompts.custom.placeholders.getMany
*/
listAiOrganizationCustomPlaceholders(options?: PaginationOptions): Promise<ResponseList<AiModel.CustomPlaceholder>>;
/**
* @param request request body
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.settings.custom-placeholders.post
*/
addAiOrganizationCustomPlaceholder(request: AiModel.AddCustomPlaceholderRequest): Promise<ResponseObject<AiModel.CustomPlaceholder>>;
/**
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.settings.custom-placeholders.get
*/
getAiOrganizationCustomPlaceholder(aiCustomPlaceholderId: number): Promise<ResponseObject<AiModel.CustomPlaceholder>>;
/**
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.settings.custom-placeholders.delete
*/
deleteAiOrganizationCustomPlaceholder(aiCustomPlaceholderId: number): Promise<void>;
/**
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @param request request body
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.settings.custom-placeholders.patch
*/
editAiOrganizationCustomPlaceholder(aiCustomPlaceholderId: number, request: PatchRequest[]): Promise<ResponseObject<AiModel.CustomPlaceholder>>;
/**
* @param aiPromptId ai prompt identifier

@@ -17,2 +43,14 @@ * @param request request body

* @param aiPromptId ai prompt identifier
* @param jobIdentifier job identifier
* @param options request options
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.events.getMany
*/
listAiOrganizationPromptFineTuningEvents(aiPromptId: number, jobIdentifier: string, options?: PaginationOptions): Promise<ResponseList<AiModel.PromptFineTuningEvent>>;
/**
* @param options request options
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.getMany
*/
listAiOrganizationPromptFineTuningJobs(options?: AiModel.ListPromptFineTuningJobsOptions): Promise<ResponseList<Status<AiModel.FineTuningJob>>>;
/**
* @param aiPromptId ai prompt identifier
* @param request request body

@@ -156,2 +194,33 @@ * @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.post

* @param userId user identifier
* @param options request options
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompt.custom.placeholders.getMany
*/
listAiUserCustomPlaceholders(userId: number, options?: PaginationOptions): Promise<ResponseList<AiModel.CustomPlaceholder>>;
/**
* @param userId user identifier
* @param request request body
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.users.ai.settings.custom-placeholders.post
*/
addAiUserCustomPlaceholder(userId: number, request: AiModel.AddCustomPlaceholderRequest): Promise<ResponseObject<AiModel.CustomPlaceholder>>;
/**
* @param userId user identifier
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.users.ai.settings.custom-placeholders.get
*/
getAiUserCustomPlaceholder(userId: number, aiCustomPlaceholderId: number): Promise<ResponseObject<AiModel.CustomPlaceholder>>;
/**
* @param userId user identifier
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.users.ai.settings.custom-placeholders.delete
*/
deleteAiUserCustomPlaceholder(userId: number, aiCustomPlaceholderId: number): Promise<void>;
/**
* @param userId user identifier
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @param request request body
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.users.ai.settings.custom-placeholders.patch
*/
editAiUserCustomPlaceholder(userId: number, aiCustomPlaceholderId: number, request: PatchRequest[]): Promise<ResponseObject<AiModel.CustomPlaceholder>>;
/**
* @param userId user identifier
* @param aiPromptId ai prompt identifier

@@ -172,2 +241,16 @@ * @param request request body

* @param aiPromptId ai prompt identifier
* @param jobIdentifier job identifier
* @param options request options
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.events.getMany
*/
listAiUserPromptFineTuningEvents(userId: number, aiPromptId: number, jobIdentifier: string, options?: PaginationOptions): Promise<ResponseList<AiModel.PromptFineTuningEvent>>;
/**
* @param userId user identifier
* @param options request options
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.getMany
*/
listAiUserPromptFineTuningJobs(userId: number, options?: AiModel.ListPromptFineTuningJobsOptions): Promise<ResponseList<Status<AiModel.FineTuningJob>>>;
/**
* @param userId user identifier
* @param aiPromptId ai prompt identifier
* @param request request body

@@ -335,4 +418,18 @@ * @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.post

export declare namespace AiModel {
interface CustomPlaceholder {
id: number;
description: string;
placeholder: string;
value: string;
createdAt: string;
updatedAt: string;
}
interface AddCustomPlaceholderRequest {
description: string;
placeholder: string;
value: string;
}
interface FineTuningDataset {
projectIds: number[];
tmIds: number[];
purpose: 'training' | 'validation';

@@ -346,3 +443,4 @@ dateFrom: string;

interface GenerateFineTuningDataset {
projectIds: number[];
projectIds?: number[];
tmIds?: number[];
purpose?: 'training' | 'validation';

@@ -367,2 +465,3 @@ dateFrom?: string;

dryRun: boolean;
aiPromptId: number;
hyperparameters: {

@@ -375,6 +474,26 @@ batchSize: number;

validationOptions: Omit<GenerateFineTuningDataset, 'purpose'>;
baseModel: string;
fineTunedModel: string;
trainedTokensCount: number;
trainingDatasetUrl: string;
validationDatasetUrl: string;
metadata: PlainObject;
}
interface PromptFineTuningEvent {
id: string;
type: string;
message: string;
data: {
step: number;
totalSteps: number;
trainingLoss: number;
validationLoss: number;
fullValidationLoss: number;
};
createdAt: string;
}
interface ListPromptFineTuningJobsOptions extends PaginationOptions {
statuses: string;
orderBy: string;
}
interface ListAiPromptsOptions extends PaginationOptions {

@@ -392,3 +511,3 @@ projectId?: number;

enabledProjectIds: number[];
config: AiModel.AiPromptConfigBasicPreTranslate | AiModel.AiPromptConfigBasicAssistAction | AiModel.AiPromptConfigAdvanced | AiModel.AiPromptConfigExternal;
config: AiModel.AiPromptConfigBasicPreTranslate | AiModel.AiPromptConfigBasicAssistAction | AiModel.AiPromptConfigBasicAligmentAction | AiModel.AiPromptConfigAdvanced | AiModel.AiPromptConfigExternal;
promptPreview: string;

@@ -405,8 +524,21 @@ isFineTuningAvailable: boolean;

mode: 'basic';
/**
* @deprecated
*/
companyDescription?: string;
/**
* @deprecated
*/
projectDescription?: string;
/**
* @deprecated
*/
audienceDescription?: string;
customPlaceholders?: string[];
otherLanguageTranslations?: AiModel.AiPromptConfigBasicOtherLanguageTranslations;
glossaryTerms?: boolean;
tmSuggestions?: boolean;
/**
* @deprecated
*/
fileContent?: boolean;

@@ -416,7 +548,17 @@ fileContext?: boolean;

publicProjectDescription?: boolean;
siblingsStrings?: boolean;
}
interface AiPromptConfigBasicAssistAction {
mode: 'basic';
/**
* @deprecated
*/
companyDescription?: string;
/**
* @deprecated
*/
projectDescription?: string;
/**
* @deprecated
*/
audienceDescription?: string;

@@ -432,2 +574,7 @@ otherLanguageTranslations?: AiModel.AiPromptConfigBasicOtherLanguageTranslations;

}
interface AiPromptConfigBasicAligmentAction {
mode: 'basic';
customPlaceholders?: string[];
publicProjectDescription?: boolean;
}
interface AiPromptConfigAdvanced {

@@ -452,3 +599,3 @@ mode: 'advanced';

enabledProjectIds?: number[];
config: AiModel.AiPromptConfigBasicPreTranslate | AiModel.AiPromptConfigBasicAssistAction | AiModel.AiPromptConfigAdvanced | AiPromptConfigExternal;
config: AiModel.AiPromptConfigBasicPreTranslate | AiModel.AiPromptConfigBasicAssistAction | AiModel.AiPromptConfigBasicAligmentAction | AiModel.AiPromptConfigAdvanced | AiPromptConfigExternal;
}

@@ -474,4 +621,5 @@ interface GenerateAiPromptCompletionRequest {

projectId: number;
targetLanguageId: string;
stringIds: number[];
sourceLanguageId?: string;
targetLanguageId?: string;
stringIds?: number[];
overridePromptValues?: OverridePromptValues;

@@ -481,4 +629,5 @@ }

projectId: number;
targetLanguageId: string;
stringIds: number[];
sourceLanguageId?: string;
targetLanguageId?: string;
stringIds?: number[];
overridePromptValues?: OverridePromptValues;

@@ -488,4 +637,5 @@ }

projectId: number;
targetLanguageId: string;
stringIds: number[];
sourceLanguageId?: string;
targetLanguageId?: string;
stringIds?: number[];
filteredStringsIds?: number[];

@@ -496,5 +646,7 @@ overridePromptValues?: OverridePromptValues;

projectId: number;
targetLanguageId: string;
stringIds: number[];
sourceLanguageId?: string;
targetLanguageId?: string;
stringIds?: number[];
overridePromptValues?: OverridePromptValues;
customInstruction?: string;
}

@@ -501,0 +653,0 @@ interface OverridePromptValues {

@@ -7,2 +7,43 @@ "use strict";

/**
* @param options request options
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.prompts.custom.placeholders.getMany
*/
listAiOrganizationCustomPlaceholders(options) {
const url = `${this.url}/ai/settings/custom-placeholders`;
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}
/**
* @param request request body
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.settings.custom-placeholders.post
*/
addAiOrganizationCustomPlaceholder(request) {
const url = `${this.url}/ai/settings/custom-placeholders`;
return this.post(url, request, this.defaultConfig());
}
/**
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.settings.custom-placeholders.get
*/
getAiOrganizationCustomPlaceholder(aiCustomPlaceholderId) {
const url = `${this.url}/ai/settings/custom-placeholders/${aiCustomPlaceholderId}`;
return this.get(url, this.defaultConfig());
}
/**
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.settings.custom-placeholders.delete
*/
deleteAiOrganizationCustomPlaceholder(aiCustomPlaceholderId) {
const url = `${this.url}/ai/settings/custom-placeholders/${aiCustomPlaceholderId}`;
return this.delete(url, this.defaultConfig());
}
/**
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @param request request body
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.settings.custom-placeholders.patch
*/
editAiOrganizationCustomPlaceholder(aiCustomPlaceholderId, request) {
const url = `${this.url}/ai/settings/custom-placeholders/${aiCustomPlaceholderId}`;
return this.patch(url, request, this.defaultConfig());
}
/**
* @param aiPromptId ai prompt identifier

@@ -27,2 +68,22 @@ * @param request request body

* @param aiPromptId ai prompt identifier
* @param jobIdentifier job identifier
* @param options request options
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.events.getMany
*/
listAiOrganizationPromptFineTuningEvents(aiPromptId, jobIdentifier, options) {
const url = `${this.url}/ai/prompts/${aiPromptId}/fine-tuning/jobs/${jobIdentifier}/events`;
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}
/**
* @param options request options
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.getMany
*/
listAiOrganizationPromptFineTuningJobs(options) {
let url = `${this.url}/ai/prompts/fine-tuning/jobs`;
url = this.addQueryParam(url, 'statuses', options === null || options === void 0 ? void 0 : options.statuses);
url = this.addQueryParam(url, 'orderBy', options === null || options === void 0 ? void 0 : options.orderBy);
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}
/**
* @param aiPromptId ai prompt identifier
* @param request request body

@@ -188,6 +249,4 @@ * @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.post

listAiOrganizationProviderModels(aiProviderId, options) {
let url = `${this.url}/ai/providers/${aiProviderId}/models`;
url = this.addQueryParam(url, 'limit', options === null || options === void 0 ? void 0 : options.limit);
url = this.addQueryParam(url, 'offset', options === null || options === void 0 ? void 0 : options.offset);
return this.getList(url);
const url = `${this.url}/ai/providers/${aiProviderId}/models`;
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}

@@ -245,2 +304,48 @@ /**

* @param userId user identifier
* @param options request options
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompt.custom.placeholders.getMany
*/
listAiUserCustomPlaceholders(userId, options) {
const url = `${this.url}/users/${userId}/ai/settings/custom-placeholders`;
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}
/**
* @param userId user identifier
* @param request request body
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.users.ai.settings.custom-placeholders.post
*/
addAiUserCustomPlaceholder(userId, request) {
const url = `${this.url}/users/${userId}/ai/settings/custom-placeholders`;
return this.post(url, request, this.defaultConfig());
}
/**
* @param userId user identifier
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.users.ai.settings.custom-placeholders.get
*/
getAiUserCustomPlaceholder(userId, aiCustomPlaceholderId) {
const url = `${this.url}/users/${userId}/ai/settings/custom-placeholders/${aiCustomPlaceholderId}`;
return this.get(url, this.defaultConfig());
}
/**
* @param userId user identifier
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.users.ai.settings.custom-placeholders.delete
*/
deleteAiUserCustomPlaceholder(userId, aiCustomPlaceholderId) {
const url = `${this.url}/users/${userId}/ai/settings/custom-placeholders/${aiCustomPlaceholderId}`;
return this.delete(url, this.defaultConfig());
}
/**
* @param userId user identifier
* @param aiCustomPlaceholderId ai custom placeholder identifier
* @param request request body
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.users.ai.settings.custom-placeholders.patch
*/
editAiUserCustomPlaceholder(userId, aiCustomPlaceholderId, request) {
const url = `${this.url}/users/${userId}/ai/settings/custom-placeholders/${aiCustomPlaceholderId}`;
return this.patch(url, request, this.defaultConfig());
}
/**
* @param userId user identifier
* @param aiPromptId ai prompt identifier

@@ -267,2 +372,24 @@ * @param request request body

* @param aiPromptId ai prompt identifier
* @param jobIdentifier job identifier
* @param options request options
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.events.getMany
*/
listAiUserPromptFineTuningEvents(userId, aiPromptId, jobIdentifier, options) {
const url = `${this.url}/users/${userId}/ai/prompts/${aiPromptId}/fine-tuning/jobs/${jobIdentifier}/events`;
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}
/**
* @param userId user identifier
* @param options request options
* @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.getMany
*/
listAiUserPromptFineTuningJobs(userId, options) {
let url = `${this.url}/users/${userId}/ai/prompts/fine-tuning/jobs`;
url = this.addQueryParam(url, 'statuses', options === null || options === void 0 ? void 0 : options.statuses);
url = this.addQueryParam(url, 'orderBy', options === null || options === void 0 ? void 0 : options.orderBy);
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}
/**
* @param userId user identifier
* @param aiPromptId ai prompt identifier
* @param request request body

@@ -269,0 +396,0 @@ * @see https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.post

@@ -93,2 +93,3 @@ import { CrowdinApi, DownloadLink, PaginationOptions, PatchRequest, ResponseList, ResponseObject, Status } from '../core';

includeProjectSourceLanguage?: boolean;
includeInContextPseudoLanguage?: boolean;
labelIds?: number[];

@@ -95,0 +96,0 @@ excludeLabelIds?: number[];

2

out/fields/index.d.ts

@@ -33,3 +33,3 @@ import { CrowdinApi, PaginationOptions, PatchRequest, ResponseList, ResponseObject } from '../core';

type Type = 'checkbox' | 'radiobuttons' | 'date' | 'datetime' | 'number' | 'labels' | 'select' | 'multiselect' | 'text' | 'textarea' | 'url';
type Place = 'projectCreateModal' | 'projectHeader' | 'projectDetails' | 'projectCrowdsourceDetails' | 'projectSettings' | 'projectTaskEditCreate' | 'projectTaskDetails' | 'fileDetails' | 'fileSettings' | 'userEditModal' | 'userDetails' | 'userPopover' | 'stringEditModal' | 'stringDetails' | 'translationUnderContent';
type Place = 'projectCreateModal' | 'projectHeader' | 'projectDetails' | 'projectCrowdsourceDetails' | 'projectSettings' | 'projectTaskEditCreate' | 'projectTaskDetails' | 'projectTaskBoardCard' | 'fileDetails' | 'fileSettings' | 'userEditModal' | 'userDetails' | 'userPopover' | 'stringEditModal' | 'stringDetails' | 'translationUnderContent';
interface Location {

@@ -36,0 +36,0 @@ place: Place;

@@ -178,3 +178,3 @@ import { BooleanInt, CrowdinApi, DownloadLink, PaginationOptions, PatchRequest, ResponseList, ResponseObject } from '../core';

id: number;
type?: Type;
type: Type;
userId: number;

@@ -197,4 +197,2 @@ sourceLanguageId: string;

savingsReportSettingsTemplateId: number;
defaultTmId?: number;
defaultGlossaryId?: number;
cname: string;

@@ -205,4 +203,7 @@ groupId: number;

externalType: string;
externalProjectId: number;
externalOrganizationId: number;
workflowId: number;
hasCrowdsourcing: boolean;
publicUrl: string;
}

@@ -233,3 +234,7 @@ interface CreateProjectRequest {

languageMapping?: LanguageMapping;
/**
* @deprecated
*/
glossaryAccess?: boolean;
glossaryAccessOption?: GlossaryAccessOption;
normalizePlaceholder?: boolean;

@@ -241,11 +246,12 @@ notificationSettings?: NotificationSettings;

assistActionAiPromptId?: number;
editorSuggestionAiPromptId?: number;
savingsReportSettingsTemplateId?: number;
defaultTmId?: number;
defaultGlossaryId?: number;
inContext?: boolean;
inContextProcessHiddenStrings?: boolean;
inContextPseudoLanguageId?: string;
saveMetaInfoInSource?: boolean;
type?: BooleanInt;
skipUntranslatedFiles?: boolean;
inContext?: boolean;
inContextProcessHiddenStrings?: boolean;
inContextPseudoLanguageId?: string;
tmContextType?: TmContextType;

@@ -267,2 +273,3 @@ }

taskBasedAccessControl?: boolean;
taskReviewerIds?: number[];
autoSubstitution?: boolean;

@@ -284,18 +291,23 @@ showTmSuggestionsDialects?: boolean;

languageMapping?: LanguageMapping;
/**
* @deprecated
*/
glossaryAccess?: boolean;
glossaryAccessOption?: GlossaryAccessOption;
notificationSettings?: NotificationSettings;
savingsReportSettingsTemplateId?: number;
assistActionAiPromptId?: number;
editorSuggestionAiPromptId?: number;
alignmentActionAiPromptId?: number;
defaultTmId?: number;
defaultGlossaryId?: number;
languages?: string[];
mtId?: number;
assistActionAiPromptId?: number;
inContext?: boolean;
inContextProcessHiddenStrings?: boolean;
inContextPseudoLanguageId?: string;
saveMetaInfoInSource?: boolean;
type?: BooleanInt;
skipUntranslatedFiles?: boolean;
inContext?: boolean;
inContextProcessHiddenStrings?: boolean;
inContextPseudoLanguageId?: string;
tmContextType?: TmContextType;
}
type GlossaryAccessOption = 'readOnly' | 'fullAccess' | 'manageDrafts';
interface ProjectSettings extends Project {

@@ -305,2 +317,3 @@ translateDuplicates: TranslateDuplicates;

glossaryAccess: boolean;
glossaryAccessOption: GlossaryAccessOption;
isMtAllowed: boolean;

@@ -367,4 +380,3 @@ taskBasedAccessControl: boolean;

assistActionAiPromptId: number;
saveMetaInfoInSource: boolean;
skipUntranslatedFiles: boolean;
editorSuggestionAiPromptId: number;
inContext: boolean;

@@ -374,4 +386,7 @@ inContextProcessHiddenStrings: string;

inContextPseudoLanguage: LanguagesModel.Language;
saveMetaInfoInSource: boolean;
skipUntranslatedFiles: boolean;
tmContextType: TmContextType;
clientOrganizationId: number;
taskReviewerIds: number[];
exportWithMinApprovalsCount: number;

@@ -381,3 +396,5 @@ exportStringsThatPassedWorkflow: boolean;

customQaCheckIds: number[];
externalQaCheckIds: number[];
delayedWorkflowStart: boolean;
alignmentActionAiPromptId: number;
}

@@ -514,3 +531,11 @@ enum Type {

languages?: string[];
/**
* @deprecated
*/
assignees?: number[];
config?: {
assignees: {
[key: string]: number[];
};
};
}

@@ -545,8 +570,17 @@ interface WorkflowTemplateStepConfigVendor {

convertPlaceholders?: boolean;
convertLineBreaks?: boolean;
useCdataForStringsWithTags?: boolean;
}
interface MacOSXStringsExporterSettings {
convertPlaceholders?: boolean;
convertLineBreaks?: boolean;
}
interface XliffStringsExporterSettings {
convertPlaceholders?: boolean;
languagePairMapping?: {
[key: string]: {
sourceLanguageId: string;
};
};
copySourceToEmptyTarget?: boolean;
exportTranslatorsComment?: boolean;
}

@@ -553,0 +587,0 @@ interface AddProjectStringsExporterSettingsRequest {

@@ -103,3 +103,29 @@ import { CrowdinApi, DownloadLink, PaginationOptions, PatchRequest, ResponseList, ResponseObject, Status } from '../core';

/**
* @param options optional parameters for the request
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.getMany
*/
listOrganizationReportSettingsTemplates(options?: ReportsModel.ListOrganizationReportSettingsParams): Promise<ResponseList<ReportsModel.OrganizationReportSettings>>;
/**
* @param request request body
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.post
*/
addOrganizationReportSettingsTemplate(request: ReportsModel.AddOrganizationReportSettingsRequest): Promise<ResponseObject<ReportsModel.OrganizationReportSettings>>;
/**
* @param reportSettingsTemplateId report settings template identifier
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.get
*/
getOrganizationReportSettingsTemplate(reportSettingsTemplateId: number): Promise<ResponseObject<ReportsModel.OrganizationReportSettings>>;
/**
* @param reportSettingsTemplateId report settings template identifier
* @param request request body
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.patch
*/
editOrganizationReportSettingsTemplate(reportSettingsTemplateId: number, request: PatchRequest[]): Promise<ResponseObject<ReportsModel.OrganizationReportSettings>>;
/**
* @param reportSettingsTemplateId report settings template identifier
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.delete
*/
deleteOrganizationReportSettingsTemplate(reportSettingsTemplateId: number): Promise<void>;
/**
* @param request request body
* @see https://support.crowdin.com/enterprise/api/#operation/api.reports.post

@@ -147,3 +173,3 @@ */

*/
addReportSettingsTemplate(projectId: number, request: Omit<ReportsModel.ReportSettings, 'id' | 'createdAt' | 'updatedAt'>): Promise<ResponseObject<ReportsModel.ReportSettings>>;
addReportSettingsTemplate(projectId: number, request: ReportsModel.AddReportSettingsRequest): Promise<ResponseObject<ReportsModel.ReportSettings>>;
/**

@@ -168,2 +194,33 @@ * @param projectId project identifier

deleteReportSettingsTemplate(projectId: number, reportSettingsTemplateId: number): Promise<void>;
/**
* @param userId user identifier
* @param options optional parameters for the request
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.getMany
*/
listUserReportSettingsTemplates(userId: number, options?: PaginationOptions): Promise<ResponseList<ReportsModel.UserReportSettings>>;
/**
* @param userId user identifier
* @param request request body
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.post
*/
addUserReportSettingsTemplate(userId: number, request: ReportsModel.AddUserReportSettingsRequest): Promise<ResponseObject<ReportsModel.UserReportSettings>>;
/**
* @param userId user identifier
* @param reportSettingsTemplateId report settings template identifier
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.get
*/
getUserReportSettingsTemplate(userId: number, reportSettingsTemplateId: number): Promise<ResponseObject<ReportsModel.UserReportSettings>>;
/**
* @param userId user identifier
* @param reportSettingsTemplateId report settings template identifier
* @param request request body
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.patch
*/
editUserReportSettingsTemplate(userId: number, reportSettingsTemplateId: number, request: PatchRequest[]): Promise<ResponseObject<ReportsModel.UserReportSettings>>;
/**
* @param userId user identifier
* @param reportSettingsTemplateId report settings template identifier
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.delete
*/
deleteUserReportSettingsTemplate(userId: number, reportSettingsTemplateId: number): Promise<void>;
}

@@ -173,3 +230,3 @@ export declare namespace ReportsModel {

id: number;
scopeType: number;
scopeType: string;
scopeId: number;

@@ -210,2 +267,3 @@ userId: number;

excludeApprovalsForEditedTranslations?: boolean;
preTranslatedStringsCategorizationAdjustment?: boolean;
groupBy?: GroupBy;

@@ -269,13 +327,56 @@ dateFrom?: string;

}
type ReportSchema = CostEstimationPostEndingSchema | CostEstimationPostEndingSchemaByTask | TranslationCostsPostEndingSchema | TranslationCostsPostEndingSchemaByTask | TopMembersSchema | ContributionRawDataSchema | PreTranslateEfficiencySchema;
interface GenerateReportRequest {
name: 'top-members' | 'contribution-raw-data' | 'costs-estimation-pe' | 'translation-costs-pe' | 'pre-translate-efficiency';
schema: ReportSchema;
type GenerateReportRequest = PreTranslateAccuracy | TranslateAccuracy | CostEstimationPostEnding | TranslationCostsPostEnding | TopMembers | ContributionRawData;
type ReportSchema = Pick<GenerateReportRequest, 'schema'>;
interface PreTranslateAccuracy {
name: 'pre-translate-efficiency' | 'pre-translate-accuracy';
schema: PreTranslateAccuracySchema | PreTranslateAccuracySchemaByTask;
}
interface TranslateAccuracy {
name: 'translator-accuracy';
schema: TranslateAccuracySchema;
}
interface CostEstimationPostEnding {
name: 'costs-estimation-pe';
schema: CostEstimationPostEndingSchema | CostEstimationPostEndingSchemaByTask;
}
interface TranslationCostsPostEnding {
name: 'translation-costs-pe';
schema: TranslationCostsPostEndingSchema | TranslationCostsPostEndingSchemaByTask;
}
interface TopMembers {
name: 'top-members';
schema: TopMembersSchema;
}
interface ContributionRawData {
name: 'contribution-raw-data';
schema: ContributionRawDataSchema | ContributionRawDataSchemaByTask;
}
interface ReportStatusAttributes<S> {
format: Format;
reportName: string;
projectIds?: number[];
schema: S;
}
interface PreTranslateAccuracySchema {
unit?: Unit;
format?: Format;
postEditingCategories?: string[];
languageId?: string;
dateFrom?: string;
dateTo?: string;
}
interface PreTranslateAccuracySchemaByTask {
unit?: Unit;
format?: Format;
postEditingCategories?: string[];
taskId?: number;
}
interface TranslateAccuracySchema {
unit?: Unit;
format?: Format;
postEditingCategories?: string[];
languageId?: string;
userIds?: number[];
dateFrom?: string;
dateTo?: string;
}
interface CostEstimationPostEndingSchema {

@@ -320,2 +421,3 @@ unit?: Unit;

excludeApprovalsForEditedTranslations?: boolean;
preTranslatedStringsCategorizationAdjustment?: boolean;
}

@@ -384,2 +486,6 @@ interface TranslationCostsPostEndingSchema {

}
interface ListOrganizationReportSettingsParams extends PaginationOptions {
projectId?: number;
groupId?: number;
}
interface ReportSettings {

@@ -392,5 +498,24 @@ id: number;

isPublic: boolean;
isGlobal: boolean;
createdAt: string;
updatedAt: string;
}
interface AddReportSettingsRequest {
name: string;
currency: Currency;
unit: Unit;
config: ReportSettinsConfig;
isPublic?: boolean;
isGlobal?: boolean;
}
type UserReportSettings = Omit<ReportSettings, 'isPublic' | 'isGlobal'>;
type AddUserReportSettingsRequest = Omit<AddReportSettingsRequest, 'isPublic' | 'isGlobal'>;
type OrganizationReportSettings = Omit<ReportSettings, 'isGlobal'> & {
projectId: number;
groupId: number;
};
type AddOrganizationReportSettingsRequest = Omit<AddReportSettingsRequest, 'isGlobal'> & {
projectId?: number;
groupId?: number;
};
interface ReportSettinsConfig {

@@ -419,10 +544,14 @@ baseRates: BaseRate;

}[];
mtMatch?: {
mtMatch: {
matchType: Mode;
price: number;
}[];
suggestionMatch?: {
suggestionMatch: {
matchType: Mode;
price: number;
}[];
aiMatch?: {
matchType: Mode;
price: number;
}[];
}

@@ -429,0 +558,0 @@ type Mode = 'no_match' | 'tm_match' | 'approval' | '99-95' | '94-90' | '89-80' | 'perfect' | '100';

@@ -151,3 +151,46 @@ "use strict";

/**
* @param options optional parameters for the request
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.getMany
*/
listOrganizationReportSettingsTemplates(options) {
let url = `${this.url}/reports/settings-templates`;
url = this.addQueryParam(url, 'projectId', options === null || options === void 0 ? void 0 : options.projectId);
url = this.addQueryParam(url, 'groupId', options === null || options === void 0 ? void 0 : options.groupId);
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}
/**
* @param request request body
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.post
*/
addOrganizationReportSettingsTemplate(request) {
const url = `${this.url}/reports/settings-templates`;
return this.post(url, request, this.defaultConfig());
}
/**
* @param reportSettingsTemplateId report settings template identifier
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.get
*/
getOrganizationReportSettingsTemplate(reportSettingsTemplateId) {
const url = `${this.url}/reports/settings-templates/${reportSettingsTemplateId}`;
return this.get(url, this.defaultConfig());
}
/**
* @param reportSettingsTemplateId report settings template identifier
* @param request request body
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.patch
*/
editOrganizationReportSettingsTemplate(reportSettingsTemplateId, request) {
const url = `${this.url}/reports/settings-templates/${reportSettingsTemplateId}`;
return this.patch(url, request, this.defaultConfig());
}
/**
* @param reportSettingsTemplateId report settings template identifier
* @see https://support.crowdin.com/developer/enterprise/api/v2/#tag/Reports/operation/api.reports.settings-templates.delete
*/
deleteOrganizationReportSettingsTemplate(reportSettingsTemplateId) {
const url = `${this.url}/reports/settings-templates/${reportSettingsTemplateId}`;
return this.delete(url, this.defaultConfig());
}
/**
* @param request request body
* @see https://support.crowdin.com/enterprise/api/#operation/api.reports.post

@@ -248,3 +291,49 @@ */

}
/**
* @param userId user identifier
* @param options optional parameters for the request
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.getMany
*/
listUserReportSettingsTemplates(userId, options) {
const url = `${this.url}/users/${userId}/reports/settings-templates`;
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset);
}
/**
* @param userId user identifier
* @param request request body
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.post
*/
addUserReportSettingsTemplate(userId, request) {
const url = `${this.url}/users/${userId}/reports/settings-templates`;
return this.post(url, request, this.defaultConfig());
}
/**
* @param userId user identifier
* @param reportSettingsTemplateId report settings template identifier
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.get
*/
getUserReportSettingsTemplate(userId, reportSettingsTemplateId) {
const url = `${this.url}/users/${userId}/reports/settings-templates/${reportSettingsTemplateId}`;
return this.get(url, this.defaultConfig());
}
/**
* @param userId user identifier
* @param reportSettingsTemplateId report settings template identifier
* @param request request body
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.patch
*/
editUserReportSettingsTemplate(userId, reportSettingsTemplateId, request) {
const url = `${this.url}/users/${userId}/reports/settings-templates/${reportSettingsTemplateId}`;
return this.patch(url, request, this.defaultConfig());
}
/**
* @param userId user identifier
* @param reportSettingsTemplateId report settings template identifier
* @see https://support.crowdin.com/developer/api/v2/#tag/Reports/operation/api.users.reports.settings-templates.delete
*/
deleteUserReportSettingsTemplate(userId, reportSettingsTemplateId) {
const url = `${this.url}/users/${userId}/reports/settings-templates/${reportSettingsTemplateId}`;
return this.delete(url, this.defaultConfig());
}
}
exports.Reports = Reports;
{
"name": "@crowdin/crowdin-api-client",
"version": "1.40.0",
"version": "1.41.0",
"description": "JavaScript library for Crowdin API",

@@ -5,0 +5,0 @@ "main": "out/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc