@crowdin/crowdin-api-client
Advanced tools
Comparing version 1.12.0 to 1.12.1
@@ -15,4 +15,5 @@ import { BooleanInt, CrowdinApi, PatchRequest, ResponseList, ResponseObject } from '../core'; | ||
* @param branchId filter by branch identifier | ||
* @param directoryId filter by directory identifier | ||
*/ | ||
listProjectStrings(projectId: number, fileId?: number, limit?: number, offset?: number, filter?: string, denormalizePlaceholders?: BooleanInt, labelIds?: string, scope?: SourceStringsModel.Scope, croql?: string, branchId?: number): Promise<ResponseList<SourceStringsModel.String>>; | ||
listProjectStrings(projectId: number, fileId?: number, limit?: number, offset?: number, filter?: string, denormalizePlaceholders?: BooleanInt, labelIds?: string, scope?: SourceStringsModel.Scope, croql?: string, branchId?: number, directoryId?: number): Promise<ResponseList<SourceStringsModel.String>>; | ||
/** | ||
@@ -51,2 +52,3 @@ * @param projectId project identifier | ||
branchId?: number; | ||
directoryId?: number; | ||
} | ||
@@ -53,0 +55,0 @@ interface String { |
@@ -6,3 +6,3 @@ "use strict"; | ||
class SourceStrings extends core_1.CrowdinApi { | ||
listProjectStrings(projectId, fileIdOrRequest, limit, offset, filter, denormalizePlaceholders, labelIds, scope, croql, branchId) { | ||
listProjectStrings(projectId, fileIdOrRequest, limit, offset, filter, denormalizePlaceholders, labelIds, scope, croql, branchId, directoryId) { | ||
let url = `${this.url}/projects/${projectId}/strings`; | ||
@@ -24,2 +24,3 @@ let request; | ||
branchId, | ||
directoryId, | ||
}; | ||
@@ -34,2 +35,3 @@ } | ||
url = this.addQueryParam(url, 'branchId', request.branchId); | ||
url = this.addQueryParam(url, 'directoryId', request.directoryId); | ||
return this.getList(url, request.limit, request.offset); | ||
@@ -36,0 +38,0 @@ } |
{ | ||
"name": "@crowdin/crowdin-api-client", | ||
"version": "1.12.0", | ||
"version": "1.12.1", | ||
"description": "JavaScript library for Crowdin API v2.", | ||
@@ -15,2 +15,3 @@ "main": "out/index.js", | ||
"scripts": { | ||
"prepare": "husky install", | ||
"test": "jest --config jestconfig.json", | ||
@@ -29,3 +30,3 @@ "build": "tsc -p ./", | ||
"@types/node": "^12.0.10", | ||
"@types/jest": "^26.0.0", | ||
"@types/jest": "^27.0.0", | ||
"@types/nock": "^10.0.3", | ||
@@ -37,9 +38,9 @@ "@typescript-eslint/eslint-plugin": "^2.3.1", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"husky": ">=1", | ||
"jest": "^26.4.0", | ||
"jest-circus": "^26.4.0", | ||
"husky": "^7.0.0", | ||
"jest": "^27.0.0", | ||
"jest-circus": "^27.0.0", | ||
"lint-staged": ">=8", | ||
"nock": "^10.0.6", | ||
"prettier": "^1.18.2", | ||
"ts-jest": "^26.4.0", | ||
"ts-jest": "^27.0.0", | ||
"typescript": "^4.1.2", | ||
@@ -51,7 +52,2 @@ "jest-junit": "^12.0.0" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged && npm run test" | ||
} | ||
}, | ||
"lint-staged": { | ||
@@ -58,0 +54,0 @@ "*.js": [ |
271316
6816