@crowdin/crowdin-api-client
Advanced tools
Comparing version 1.37.1 to 1.38.0
@@ -1,2 +0,2 @@ | ||
import { CrowdinApi, DownloadLink, PaginationOptions, ResponseList, ResponseObject, Status } from '../core'; | ||
import { CrowdinApi, DownloadLink, PaginationOptions, PatchRequest, ResponseList, ResponseObject, Status } from '../core'; | ||
/** | ||
@@ -11,2 +11,8 @@ * Translators can work with entirely untranslated project or you can pre-translate the files to ease the translations process. | ||
* @param projectId project identifier | ||
* @param options optional parameters for the request | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.pre-translations.getMany | ||
*/ | ||
listPreTranslations(projectId: number, options?: PaginationOptions): Promise<ResponseList<Status<TranslationsModel.PreTranslationStatusAttributes>>>; | ||
/** | ||
* @param projectId project identifier | ||
* @param preTranslationId pre translation identifier | ||
@@ -24,2 +30,9 @@ * @see https://developer.crowdin.com/api/v2/#tag/Translations/paths/~1projects~1{projectId}~1pre-translations~1{preTranslationId}/get | ||
* @param projectId project identifier | ||
* @param preTranslationId pre translation identifier | ||
* @param request request body | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.pre-translations.patch | ||
*/ | ||
editPreTranslation(projectId: number, preTranslationId: string, request: PatchRequest[]): Promise<ResponseObject<Status<TranslationsModel.PreTranslationStatusAttributes>>>; | ||
/** | ||
* @param projectId project identifier | ||
* @param directoryId directory identifier | ||
@@ -172,3 +185,3 @@ * @param request request body | ||
} | ||
type Method = 'tm' | 'mt'; | ||
type Method = 'tm' | 'mt' | 'ai'; | ||
type AutoApproveOption = 'all' | 'exceptAutoSubstituted' | 'perfectMatchOnly' | 'none'; | ||
@@ -175,0 +188,0 @@ type CharTransformation = 'asian' | 'european' | 'arabic' | 'cyrillic'; |
@@ -14,2 +14,11 @@ "use strict"; | ||
* @param projectId project identifier | ||
* @param options optional parameters for the request | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.pre-translations.getMany | ||
*/ | ||
listPreTranslations(projectId, options) { | ||
const url = `${this.url}/projects/${projectId}/pre-translations`; | ||
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset); | ||
} | ||
/** | ||
* @param projectId project identifier | ||
* @param preTranslationId pre translation identifier | ||
@@ -33,2 +42,12 @@ * @see https://developer.crowdin.com/api/v2/#tag/Translations/paths/~1projects~1{projectId}~1pre-translations~1{preTranslationId}/get | ||
* @param projectId project identifier | ||
* @param preTranslationId pre translation identifier | ||
* @param request request body | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.pre-translations.patch | ||
*/ | ||
editPreTranslation(projectId, preTranslationId, request) { | ||
const url = `${this.url}/projects/${projectId}/pre-translations/${preTranslationId}`; | ||
return this.patch(url, request, this.defaultConfig()); | ||
} | ||
/** | ||
* @param projectId project identifier | ||
* @param directoryId directory identifier | ||
@@ -35,0 +54,0 @@ * @param request request body |
{ | ||
"name": "@crowdin/crowdin-api-client", | ||
"version": "1.37.1", | ||
"version": "1.38.0", | ||
"description": "JavaScript library for Crowdin API", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
509211
11499