@crowdin/crowdin-api-client
Advanced tools
Comparing version 1.25.1 to 1.26.0
@@ -0,1 +1,2 @@ | ||
import { Applications } from './applications'; | ||
import { Bundles } from './bundles'; | ||
@@ -29,2 +30,3 @@ import { ClientConfig, Credentials, CrowdinApi } from './core'; | ||
import { Workflows } from './workflows'; | ||
export * from './applications'; | ||
export * from './bundles'; | ||
@@ -62,2 +64,3 @@ export * from './core'; | ||
export default class Client extends CrowdinApi { | ||
readonly applicationsApi: Applications; | ||
readonly sourceFilesApi: SourceFiles; | ||
@@ -64,0 +67,0 @@ readonly glossariesApi: Glossaries; |
@@ -17,2 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const applications_1 = require("./applications"); | ||
const bundles_1 = require("./bundles"); | ||
@@ -46,2 +47,3 @@ const core_1 = require("./core"); | ||
const workflows_1 = require("./workflows"); | ||
__exportStar(require("./applications"), exports); | ||
__exportStar(require("./bundles"), exports); | ||
@@ -81,2 +83,3 @@ __exportStar(require("./core"), exports); | ||
super(credentials, config); | ||
this.applicationsApi = new applications_1.Applications(credentials, config); | ||
this.sourceFilesApi = new sourceFiles_1.SourceFiles(credentials, config); | ||
@@ -83,0 +86,0 @@ this.glossariesApi = new glossaries_1.Glossaries(credentials, config); |
@@ -243,2 +243,3 @@ import { CrowdinApi, DownloadLink, PaginationOptions, PatchRequest, ResponseList, ResponseObject } from '../core'; | ||
exportPattern: string; | ||
path: string; | ||
priority: Priority; | ||
@@ -245,0 +246,0 @@ createdAt: string; |
@@ -20,6 +20,8 @@ import { BooleanInt, CrowdinApi, PaginationOptions, ResponseList, ResponseObject } from '../core'; | ||
* @param fileId file identifier | ||
* @param labelIds label Identifiers | ||
* @param excludeLabelIds exclude label Identifiers | ||
* @deprecated optional parameters should be passed through an object | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.approvals.getMany | ||
*/ | ||
listTranslationApprovals(projectId: number, stringId?: number, languageId?: string, translationId?: number, limit?: number, offset?: number, fileId?: number): Promise<ResponseList<StringTranslationsModel.Approval>>; | ||
listTranslationApprovals(projectId: number, stringId?: number, languageId?: string, translationId?: number, limit?: number, offset?: number, fileId?: number, labelIds?: string, excludeLabelIds?: string): Promise<ResponseList<StringTranslationsModel.Approval>>; | ||
/** | ||
@@ -131,2 +133,4 @@ * @param projectId project identifier | ||
* @param translationId translation identifier | ||
* @param labelIds label Identifiers | ||
* @param excludeLabelIds exclude label Identifiers | ||
* @param limit maximum number of items to retrieve (default 25) | ||
@@ -137,3 +141,3 @@ * @param offset starting offset in the collection (default 0) | ||
*/ | ||
listTranslationVotes(projectId: number, stringId?: number, languageId?: string, translationId?: number, limit?: number, offset?: number): Promise<ResponseList<StringTranslationsModel.Vote>>; | ||
listTranslationVotes(projectId: number, stringId?: number, languageId?: string, translationId?: number, labelIds?: string, excludeLabelIds?: string, limit?: number, offset?: number): Promise<ResponseList<StringTranslationsModel.Vote>>; | ||
/** | ||
@@ -164,2 +168,4 @@ * @param projectId project identifier | ||
fileId?: number; | ||
labelIds?: string; | ||
excludeLabelIds?: string; | ||
} | ||
@@ -249,2 +255,4 @@ interface Approval { | ||
translationId?: number; | ||
labelIds?: string; | ||
excludeLabelIds?: string; | ||
} | ||
@@ -251,0 +259,0 @@ interface Vote { |
@@ -9,3 +9,3 @@ "use strict"; | ||
class StringTranslations extends core_1.CrowdinApi { | ||
listTranslationApprovals(projectId, options, deprecatedLanguageId, deprecatedTranslationId, deprecatedLimit, deprecatedOffset, deprecatedFileId) { | ||
listTranslationApprovals(projectId, options, deprecatedLanguageId, deprecatedTranslationId, deprecatedLimit, deprecatedOffset, deprecatedFileId, deprecatedLabelIds, deprecatedExcludeLabelIds) { | ||
let url = `${this.url}/projects/${projectId}/approvals`; | ||
@@ -20,2 +20,4 @@ if ((0, core_1.isOptionalNumber)(options, '1' in arguments)) { | ||
fileId: deprecatedFileId, | ||
labelIds: deprecatedLabelIds, | ||
excludeLabelIds: deprecatedExcludeLabelIds, | ||
}; | ||
@@ -27,2 +29,4 @@ } | ||
url = this.addQueryParam(url, 'fileId', options.fileId); | ||
url = this.addQueryParam(url, 'labelIds', options.labelIds); | ||
url = this.addQueryParam(url, 'excludeLabelIds', options.excludeLabelIds); | ||
return this.getList(url, options.limit, options.offset); | ||
@@ -148,3 +152,3 @@ } | ||
} | ||
listTranslationVotes(projectId, options, deprecatedLanguageId, deprecatedTranslationId, deprecatedLimit, deprecatedOffset) { | ||
listTranslationVotes(projectId, options, deprecatedLanguageId, deprecatedTranslationId, deprecatedLabelIds, deprecatedExcludeLabelIds, deprecatedLimit, deprecatedOffset) { | ||
let url = `${this.url}/projects/${projectId}/votes`; | ||
@@ -156,2 +160,4 @@ if ((0, core_1.isOptionalNumber)(options, '1' in arguments)) { | ||
translationId: deprecatedTranslationId, | ||
labelIds: deprecatedLabelIds, | ||
excludeLabelIds: deprecatedExcludeLabelIds, | ||
limit: deprecatedLimit, | ||
@@ -164,2 +170,4 @@ offset: deprecatedOffset, | ||
url = this.addQueryParam(url, 'translationId', options.translationId); | ||
url = this.addQueryParam(url, 'labelIds', options.labelIds); | ||
url = this.addQueryParam(url, 'excludeLabelIds', options.excludeLabelIds); | ||
return this.getList(url, options.limit, options.offset); | ||
@@ -166,0 +174,0 @@ } |
{ | ||
"name": "@crowdin/crowdin-api-client", | ||
"version": "1.25.1", | ||
"version": "1.26.0", | ||
"description": "JavaScript library for Crowdin API", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
@@ -5,3 +5,3 @@ <p align="center"> | ||
<source media="(prefers-color-scheme: light)" srcset="https://support.crowdin.com/assets/logos/symbol/png/crowdin-symbol-cDark.png"> | ||
<img width="150" height="150" width=""src="[https://support.crowdin.com/assets/logos/symbol/png/crowdin-symbol-cDark.png](https://crowdin.com)"> | ||
<img width="150" height="150" src="https://support.crowdin.com/assets/logos/symbol/png/crowdin-symbol-cDark.png"> | ||
</picture> | ||
@@ -8,0 +8,0 @@ </p> |
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
392028
73
8965