smartling-api-sdk-nodejs 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.scannerwork/report-task.txt +2 -2
- package/api/files/index.ts +5 -2
- package/api/files/params/recently-uploaded-files.ts +30 -0
- package/api/locales/dto/direction.ts +4 -0
- package/api/locales/dto/smartling-language-dto.ts +5 -2
- package/api/locales/dto/word-delimeter.ts +4 -0
- package/built/api/files/index.d.ts +2 -1
- package/built/api/files/index.js +2 -2
- package/built/api/files/index.js.map +1 -1
- package/built/api/files/params/recently-uploaded-files.d.ts +6 -0
- package/built/api/files/params/recently-uploaded-files.js +27 -0
- package/built/api/files/params/recently-uploaded-files.js.map +1 -0
- package/built/api/locales/dto/direction.d.ts +4 -0
- package/built/api/locales/dto/direction.js +9 -0
- package/built/api/locales/dto/direction.js.map +1 -0
- package/built/api/locales/dto/smartling-language-dto.d.ts +4 -2
- package/built/api/locales/dto/word-delimeter.d.ts +4 -0
- package/built/api/locales/dto/word-delimeter.js +9 -0
- package/built/api/locales/dto/word-delimeter.js.map +1 -0
- package/built/index.d.ts +2 -0
- package/built/index.js +2 -0
- package/built/index.js.map +1 -1
- package/built/package.json +1 -1
- package/index.ts +2 -0
- package/package.json +1 -1
- package/test/files.spec.ts +8 -2
|
@@ -2,5 +2,5 @@ projectKey=smartling-api-sdk-nodejs
|
|
|
2
2
|
serverUrl=https://sonar-next.connectors.stg.smartling.net
|
|
3
3
|
serverVersion=8.6.1.40680
|
|
4
4
|
dashboardUrl=https://sonar-next.connectors.stg.smartling.net/dashboard?id=smartling-api-sdk-nodejs
|
|
5
|
-
ceTaskId=
|
|
6
|
-
ceTaskUrl=https://sonar-next.connectors.stg.smartling.net/api/ce/task?id=
|
|
5
|
+
ceTaskId=AY9TuQLS7SpYu_MF-cEQ
|
|
6
|
+
ceTaskUrl=https://sonar-next.connectors.stg.smartling.net/api/ce/task?id=AY9TuQLS7SpYu_MF-cEQ
|
package/api/files/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { LastModifiedForLocale } from "./dto/last-modified-for-locale-dto";
|
|
|
10
10
|
import { UploadedFileDto } from "./dto/uploaded-file-dto";
|
|
11
11
|
import { FileStatusForProjectDto } from "./dto/file-status-for-project-dto";
|
|
12
12
|
import { DownloadFileAllTranslationsParameters } from "./params/download-file-all-translations-parameters";
|
|
13
|
+
import { RecentlyUploadedFilesParameters } from "./params/recently-uploaded-files";
|
|
13
14
|
|
|
14
15
|
export class SmartlingFilesApi extends SmartlingBaseApi {
|
|
15
16
|
constructor(smartlingApiBaseUrl: string, authApi: SmartlingAuthApi, logger: Logger) {
|
|
@@ -95,11 +96,13 @@ export class SmartlingFilesApi extends SmartlingBaseApi {
|
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
async getRecentlyUploadedFiles(
|
|
98
|
-
projectId: string
|
|
99
|
+
projectId: string,
|
|
100
|
+
params: RecentlyUploadedFilesParameters
|
|
99
101
|
): Promise<SmartlingListResponse<FileStatusForProjectDto>> {
|
|
100
102
|
return await this.makeRequest(
|
|
101
103
|
"get",
|
|
102
|
-
`${this.entrypoint}/${projectId}/files/list
|
|
104
|
+
`${this.entrypoint}/${projectId}/files/list`,
|
|
105
|
+
params.export()
|
|
103
106
|
);
|
|
104
107
|
}
|
|
105
108
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SmartlingException } from "../../exception";
|
|
2
|
+
import { BaseParameters } from "../../parameters/index";
|
|
3
|
+
|
|
4
|
+
export class RecentlyUploadedFilesParameters extends BaseParameters {
|
|
5
|
+
setUriMask(uriMask: string): RecentlyUploadedFilesParameters {
|
|
6
|
+
this.set("uriMask", uriMask);
|
|
7
|
+
|
|
8
|
+
return this;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
setLimit(limit: number): RecentlyUploadedFilesParameters {
|
|
12
|
+
if (limit > 0) {
|
|
13
|
+
this.set("limit", limit);
|
|
14
|
+
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
throw new SmartlingException("Limit must be > 0");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
setOffset(offset: number): RecentlyUploadedFilesParameters {
|
|
22
|
+
if (offset >= 0) {
|
|
23
|
+
this.set("offset", offset);
|
|
24
|
+
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
throw new SmartlingException("Offset must be >= 0");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { Direction } from "./direction";
|
|
2
|
+
import { WordDelimiter } from "./word-delimeter";
|
|
3
|
+
|
|
1
4
|
interface SmartlingLanguageDto {
|
|
2
5
|
description: string;
|
|
3
|
-
direction:
|
|
6
|
+
direction: Direction;
|
|
4
7
|
languageId: string;
|
|
5
|
-
wordDelimiter:
|
|
8
|
+
wordDelimiter: WordDelimiter;
|
|
6
9
|
}
|
|
7
10
|
|
|
8
11
|
export { SmartlingLanguageDto };
|
|
@@ -10,6 +10,7 @@ import { LastModifiedForLocale } from "./dto/last-modified-for-locale-dto";
|
|
|
10
10
|
import { UploadedFileDto } from "./dto/uploaded-file-dto";
|
|
11
11
|
import { FileStatusForProjectDto } from "./dto/file-status-for-project-dto";
|
|
12
12
|
import { DownloadFileAllTranslationsParameters } from "./params/download-file-all-translations-parameters";
|
|
13
|
+
import { RecentlyUploadedFilesParameters } from "./params/recently-uploaded-files";
|
|
13
14
|
export declare class SmartlingFilesApi extends SmartlingBaseApi {
|
|
14
15
|
constructor(smartlingApiBaseUrl: string, authApi: SmartlingAuthApi, logger: Logger);
|
|
15
16
|
getStatusForAllLocales(projectId: string, fileUri: string): Promise<FileStatusForAllLocalesDto>;
|
|
@@ -18,6 +19,6 @@ export declare class SmartlingFilesApi extends SmartlingBaseApi {
|
|
|
18
19
|
downloadFileAllTranslations(projectId: string, fileUri: string, params: DownloadFileAllTranslationsParameters): Promise<string>;
|
|
19
20
|
deleteFile(projectId: string, fileUri: string): Promise<boolean>;
|
|
20
21
|
uploadFile(projectId: string, parameters: UploadFileParameters): Promise<UploadedFileDto>;
|
|
21
|
-
getRecentlyUploadedFiles(projectId: string): Promise<SmartlingListResponse<FileStatusForProjectDto>>;
|
|
22
|
+
getRecentlyUploadedFiles(projectId: string, params: RecentlyUploadedFilesParameters): Promise<SmartlingListResponse<FileStatusForProjectDto>>;
|
|
22
23
|
static fixContentTypeHeaderCase(form: FormData): Record<string, unknown>;
|
|
23
24
|
}
|
package/built/api/files/index.js
CHANGED
|
@@ -58,9 +58,9 @@ class SmartlingFilesApi extends index_1.SmartlingBaseApi {
|
|
|
58
58
|
return yield this.makeRequest("post", `${this.entrypoint}/${projectId}/file`, formData, false, SmartlingFilesApi.fixContentTypeHeaderCase(formData));
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
getRecentlyUploadedFiles(projectId) {
|
|
61
|
+
getRecentlyUploadedFiles(projectId, params) {
|
|
62
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
return yield this.makeRequest("get", `${this.entrypoint}/${projectId}/files/list
|
|
63
|
+
return yield this.makeRequest("get", `${this.entrypoint}/${projectId}/files/list`, params.export());
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
static fixContentTypeHeaderCase(form) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/files/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAAiC;AACjC,yCAAiD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/files/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAAiC;AACjC,yCAAiD;AAajD,MAAa,iBAAkB,SAAQ,wBAAgB;IACnD,YAAY,mBAA2B,EAAE,OAAyB,EAAE,MAAc;QAC9E,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,OAAO,CAA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extends BaseParameters {
|
|
3
|
+
setUriMask(uriMask: string): RecentlyUploadedFilesParameters;
|
|
4
|
+
setLimit(limit: number): RecentlyUploadedFilesParameters;
|
|
5
|
+
setOffset(offset: number): RecentlyUploadedFilesParameters;
|
|
6
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecentlyUploadedFilesParameters = void 0;
|
|
4
|
+
const exception_1 = require("../../exception");
|
|
5
|
+
const index_1 = require("../../parameters/index");
|
|
6
|
+
class RecentlyUploadedFilesParameters extends index_1.BaseParameters {
|
|
7
|
+
setUriMask(uriMask) {
|
|
8
|
+
this.set("uriMask", uriMask);
|
|
9
|
+
return this;
|
|
10
|
+
}
|
|
11
|
+
setLimit(limit) {
|
|
12
|
+
if (limit > 0) {
|
|
13
|
+
this.set("limit", limit);
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
throw new exception_1.SmartlingException("Limit must be > 0");
|
|
17
|
+
}
|
|
18
|
+
setOffset(offset) {
|
|
19
|
+
if (offset >= 0) {
|
|
20
|
+
this.set("offset", offset);
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
throw new exception_1.SmartlingException("Offset must be >= 0");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.RecentlyUploadedFilesParameters = RecentlyUploadedFilesParameters;
|
|
27
|
+
//# sourceMappingURL=recently-uploaded-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recently-uploaded-files.js","sourceRoot":"","sources":["../../../../api/files/params/recently-uploaded-files.ts"],"names":[],"mappings":";;;AAAA,+CAAqD;AACrD,kDAAwD;AAExD,MAAa,+BAAgC,SAAQ,sBAAc;IAC/D,UAAU,CAAC,OAAe;QACtB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAE7B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ,CAAC,KAAa;QAClB,IAAI,KAAK,GAAG,CAAC,EAAE;YACX,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAEzB,OAAO,IAAI,CAAC;SACf;QAED,MAAM,IAAI,8BAAkB,CAAC,mBAAmB,CAAC,CAAC;IACtD,CAAC;IAED,SAAS,CAAC,MAAc;QACpB,IAAI,MAAM,IAAI,CAAC,EAAE;YACb,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAE3B,OAAO,IAAI,CAAC;SACf;QAED,MAAM,IAAI,8BAAkB,CAAC,qBAAqB,CAAC,CAAC;IACxD,CAAC;CACJ;AA1BD,0EA0BC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Direction = void 0;
|
|
4
|
+
var Direction;
|
|
5
|
+
(function (Direction) {
|
|
6
|
+
Direction["LTR"] = "LTR";
|
|
7
|
+
Direction["RTL"] = "RTL";
|
|
8
|
+
})(Direction = exports.Direction || (exports.Direction = {}));
|
|
9
|
+
//# sourceMappingURL=direction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direction.js","sourceRoot":"","sources":["../../../../api/locales/dto/direction.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAGX;AAHD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,wBAAW,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Direction } from "./direction";
|
|
2
|
+
import { WordDelimiter } from "./word-delimeter";
|
|
1
3
|
interface SmartlingLanguageDto {
|
|
2
4
|
description: string;
|
|
3
|
-
direction:
|
|
5
|
+
direction: Direction;
|
|
4
6
|
languageId: string;
|
|
5
|
-
wordDelimiter:
|
|
7
|
+
wordDelimiter: WordDelimiter;
|
|
6
8
|
}
|
|
7
9
|
export { SmartlingLanguageDto };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WordDelimiter = void 0;
|
|
4
|
+
var WordDelimiter;
|
|
5
|
+
(function (WordDelimiter) {
|
|
6
|
+
WordDelimiter["SPACE"] = "SPACE";
|
|
7
|
+
WordDelimiter["CHARACTER"] = "CHARACTER";
|
|
8
|
+
})(WordDelimiter = exports.WordDelimiter || (exports.WordDelimiter = {}));
|
|
9
|
+
//# sourceMappingURL=word-delimeter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"word-delimeter.js","sourceRoot":"","sources":["../../../../api/locales/dto/word-delimeter.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,wCAAuB,CAAA;AAC3B,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
|
package/built/index.d.ts
CHANGED
|
@@ -99,5 +99,7 @@ export * from "./api/jobs/params/authorize-job-parameters";
|
|
|
99
99
|
export * from "./api/locales/dto/country-dto";
|
|
100
100
|
export * from "./api/locales/dto/smartling-language-dto";
|
|
101
101
|
export * from "./api/locales/dto/smartling-locale-dto";
|
|
102
|
+
export * from "./api/locales/dto/direction";
|
|
103
|
+
export * from "./api/locales/dto/word-delimeter";
|
|
102
104
|
export * from "./api/locales/params/get-locales-parameters";
|
|
103
105
|
export * from "./api/locales/index";
|
package/built/index.js
CHANGED
|
@@ -115,6 +115,8 @@ __exportStar(require("./api/jobs/params/authorize-job-parameters"), exports);
|
|
|
115
115
|
__exportStar(require("./api/locales/dto/country-dto"), exports);
|
|
116
116
|
__exportStar(require("./api/locales/dto/smartling-language-dto"), exports);
|
|
117
117
|
__exportStar(require("./api/locales/dto/smartling-locale-dto"), exports);
|
|
118
|
+
__exportStar(require("./api/locales/dto/direction"), exports);
|
|
119
|
+
__exportStar(require("./api/locales/dto/word-delimeter"), exports);
|
|
118
120
|
__exportStar(require("./api/locales/params/get-locales-parameters"), exports);
|
|
119
121
|
__exportStar(require("./api/locales/index"), exports);
|
|
120
122
|
//# sourceMappingURL=index.js.map
|
package/built/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,kEAAgD;AAChD,mDAAiC;AACjC,sDAAoC;AACpC,sDAAoC;AACpC,wEAAsD;AACtD,6EAA2D;AAC3D,gEAA8C;AAC9C,4EAA0D;AAC1D,uEAAqD;AACrD,0FAAwE;AACxE,oEAAkD;AAClD,iFAA+D;AAC/D,kFAAgE;AAChE,uEAAqD;AACrD,sEAAoD;AACpD,wDAAsC;AACtC,gEAA8C;AAC9C,4FAA0E;AAC1E,2FAAyE;AACzE,oEAAkD;AAClD,oFAAkE;AAClE,qFAAmE;AACnE,uFAAqE;AACrE,4FAA0E;AAC1E,2EAAyD;AACzD,uEAAqD;AACrD,8EAA4D;AAC5D,4FAA0E;AAC1E,qFAAmE;AACnE,oDAAkC;AAClC,8EAA4D;AAC5D,oEAAkD;AAClD,+DAA6C;AAC7C,4EAA0D;AAC1D,kFAAgE;AAChE,kFAAgE;AAChE,+EAA6D;AAC7D,oEAAkD;AAClD,qEAAmD;AACnD,0DAAwC;AACxC,kEAAgD;AAChD,uEAAqD;AACrD,yEAAuD;AACvD,yEAAuD;AACvD,4EAA0D;AAC1D,mFAAiE;AACjE,wFAAsE;AACtE,2FAAyE;AACzE,wFAAsE;AACtE,0FAAwE;AACxE,wEAAsD;AACtD,wEAAsD;AACtD,mFAAiE;AACjE,6EAA2D;AAC3D,mDAAiC;AACjC,8DAA4C;AAC5C,kFAAgE;AAChE,kEAAgD;AAChD,mEAAiD;AACjD,sEAAoD;AACpD,iEAA+C;AAC/C,y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AgE;AAChE,+EAA6D;AAC7D,oEAAkD;AAClD,qEAAmD;AACnD,0DAAwC;AACxC,kEAAgD;AAChD,uEAAqD;AACrD,yEAAuD;AACvD,yEAAuD;AACvD,4EAA0D;AAC1D,mFAAiE;AACjE,wFAAsE;AACtE,2FAAyE;AACzE,wFAAsE;AACtE,0FAAwE;AACxE,wEAAsD;AACtD,wEAAsD;AACtD,mFAAiE;AACjE,6EAA2D;AAC3D,mDAAiC;AACjC,8DAA4C;AAC5C,kFAAgE;AAChE,kEAAgD;AAChD,mEAAiD;AACjD,sEAAoD;AACpD,iEAA+C;AAC/C,yDAAuC;AACvC,iEAA+C;AAC/C,mFAAiE;AACjE,uFAAqE;AACrE,kEAAgD;AAChD,mEAAiD;AACjD,yEAAuD;AACvD,kEAAgD;AAChD,oEAAkD;AAClD,0EAAwD;AACxD,6EAA2D;AAC3D,4EAA0D;AAC1D,+DAA6C;AAC7C,8EAA4D;AAC5D,yEAAuD;AACvD,2EAAyD;AACzD,0EAAwD;AACxD,yEAAuD;AACvD,2EAAyD;AACzD,0EAAwD;AACxD,yDAAuC;AACvC,yDAAuC;AACvC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,8DAA4C;AAC5C,+EAA6D;AAC7D,mGAAiF;AACjF,sDAAoC;AACpC,sEAAoD;AACpD,0EAAwD;AACxD,uFAAqE;AACrE,+CAA6B;AAC7B,wEAAsD;AACtD,+FAA6E;AAC7E,6EAA2D;AAC3D,gEAA8C;AAC9C,2EAAyD;AACzD,yEAAuD;AACvD,8DAA4C;AAC5C,mEAAiD;AACjD,8EAA4D;AAC5D,sDAAoC"}
|
package/built/package.json
CHANGED
package/index.ts
CHANGED
|
@@ -99,5 +99,7 @@ export * from "./api/jobs/params/authorize-job-parameters";
|
|
|
99
99
|
export * from "./api/locales/dto/country-dto";
|
|
100
100
|
export * from "./api/locales/dto/smartling-language-dto";
|
|
101
101
|
export * from "./api/locales/dto/smartling-locale-dto";
|
|
102
|
+
export * from "./api/locales/dto/direction";
|
|
103
|
+
export * from "./api/locales/dto/word-delimeter";
|
|
102
104
|
export * from "./api/locales/params/get-locales-parameters";
|
|
103
105
|
export * from "./api/locales/index";
|
package/package.json
CHANGED
package/test/files.spec.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { SmartlingAuthApi } from "../api/auth/index";
|
|
|
10
10
|
import { FileType } from "../api/files/params/file-type";
|
|
11
11
|
import { streamToString } from "./stream-to-string";
|
|
12
12
|
import { DownloadFileAllTranslationsParameters } from "../api/files/params/download-file-all-translations-parameters";
|
|
13
|
+
import { RecentlyUploadedFilesParameters } from "../api/files/params/recently-uploaded-files";
|
|
13
14
|
|
|
14
15
|
describe("SmartlingFilesApi class tests.", () => {
|
|
15
16
|
const projectId = "testProjectId";
|
|
@@ -58,12 +59,17 @@ describe("SmartlingFilesApi class tests.", () => {
|
|
|
58
59
|
});
|
|
59
60
|
|
|
60
61
|
it("Get recently uploaded files for project", async () => {
|
|
61
|
-
|
|
62
|
+
const params = new RecentlyUploadedFilesParameters()
|
|
63
|
+
.setOffset(0)
|
|
64
|
+
.setLimit(99)
|
|
65
|
+
.setUriMask("TEST");
|
|
66
|
+
|
|
67
|
+
await filesApi.getRecentlyUploadedFiles(projectId, params);
|
|
62
68
|
|
|
63
69
|
sinon.assert.calledOnce(filesApiFetchStub);
|
|
64
70
|
sinon.assert.calledWithExactly(
|
|
65
71
|
filesApiFetchStub,
|
|
66
|
-
`https://test.com/files-api/v2/projects/${projectId}/files/list`,
|
|
72
|
+
`https://test.com/files-api/v2/projects/${projectId}/files/list?offset=0&limit=99&uriMask=TEST`,
|
|
67
73
|
{
|
|
68
74
|
headers: {
|
|
69
75
|
Authorization: "test_token_type test_access_token",
|