smartling-api-sdk-nodejs 2.5.0 → 2.6.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/file-translations/dto/fts-uploaded-file-dto.ts +5 -0
- package/api/file-translations/index.ts +4 -4
- package/api/file-translations/params/{upload-file-parameters.ts → fts-upload-file-parameters.ts} +4 -4
- package/built/api/file-translations/dto/fts-uploaded-file-dto.d.ts +4 -0
- package/built/api/file-translations/dto/{uploaded-file-dto.js → fts-uploaded-file-dto.js} +1 -1
- package/built/api/file-translations/dto/fts-uploaded-file-dto.js.map +1 -0
- package/built/api/file-translations/index.d.ts +3 -3
- package/built/api/file-translations/index.js.map +1 -1
- package/built/api/file-translations/params/fts-upload-file-parameters.d.ts +8 -0
- package/built/api/file-translations/params/{upload-file-parameters.js → fts-upload-file-parameters.js} +4 -4
- package/built/api/file-translations/params/fts-upload-file-parameters.js.map +1 -0
- package/built/index.d.ts +13 -0
- package/built/index.js +13 -0
- package/built/index.js.map +1 -1
- package/built/package.json +1 -1
- package/index.ts +13 -0
- package/package.json +1 -1
- package/test/file-translations.spec.ts +3 -3
- package/api/file-translations/dto/uploaded-file-dto.ts +0 -5
- package/built/api/file-translations/dto/uploaded-file-dto.d.ts +0 -4
- package/built/api/file-translations/dto/uploaded-file-dto.js.map +0 -1
- package/built/api/file-translations/params/upload-file-parameters.d.ts +0 -8
- package/built/api/file-translations/params/upload-file-parameters.js.map +0 -1
|
@@ -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=AYyITSNeRe7rJHsZ61oT
|
|
6
|
+
ceTaskUrl=https://sonar-next.connectors.stg.smartling.net/api/ce/task?id=AYyITSNeRe7rJHsZ61oT
|
|
@@ -2,8 +2,8 @@ import FormData from "form-data";
|
|
|
2
2
|
import { SmartlingBaseApi } from "../base";
|
|
3
3
|
import { SmartlingAuthApi } from "../auth";
|
|
4
4
|
import { Logger } from "../logger";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { FtsUploadedFileDto } from "./dto/fts-uploaded-file-dto";
|
|
6
|
+
import { FtsUploadFileParameters } from "./params/fts-upload-file-parameters";
|
|
7
7
|
import { TranslationDto } from "./dto/translation-dto";
|
|
8
8
|
import { TranslateFileParameters } from "./params/translate-file-parameters";
|
|
9
9
|
import { TranslationStatusDto } from "./dto/translation-status-dto";
|
|
@@ -18,8 +18,8 @@ export class SmartlingFileTranslationsApi extends SmartlingBaseApi {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async uploadFile(
|
|
21
|
-
accountUid: string, parameters:
|
|
22
|
-
): Promise<
|
|
21
|
+
accountUid: string, parameters: FtsUploadFileParameters
|
|
22
|
+
): Promise<FtsUploadedFileDto> {
|
|
23
23
|
const formData = new FormData();
|
|
24
24
|
const exported = parameters.export();
|
|
25
25
|
|
package/api/file-translations/params/{upload-file-parameters.ts → fts-upload-file-parameters.ts}
RENAMED
|
@@ -3,26 +3,26 @@ import string2fileStream from "string-to-file-stream";
|
|
|
3
3
|
import { BaseParameters } from "../../parameters";
|
|
4
4
|
import { FileType } from "../../files/params/file-type";
|
|
5
5
|
|
|
6
|
-
export class
|
|
6
|
+
export class FtsUploadFileParameters extends BaseParameters {
|
|
7
7
|
constructor(parameters: Record<string, unknown> = {}) {
|
|
8
8
|
super(parameters);
|
|
9
9
|
|
|
10
10
|
this.set("request", {});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
setFileFromLocalFilePath(filePath: string):
|
|
13
|
+
setFileFromLocalFilePath(filePath: string): FtsUploadFileParameters {
|
|
14
14
|
this.set("file", fs.createReadStream(
|
|
15
15
|
fs.realpathSync(filePath)
|
|
16
16
|
));
|
|
17
17
|
return this;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
setFileContent(fileContent: string):
|
|
20
|
+
setFileContent(fileContent: string): FtsUploadFileParameters {
|
|
21
21
|
this.set("file", string2fileStream(fileContent));
|
|
22
22
|
return this;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
setFileType(fileType: FileType):
|
|
25
|
+
setFileType(fileType: FileType): FtsUploadFileParameters {
|
|
26
26
|
this.parameters.request.fileType = fileType.toUpperCase();
|
|
27
27
|
return this;
|
|
28
28
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fts-uploaded-file-dto.js","sourceRoot":"","sources":["../../../../api/file-translations/dto/fts-uploaded-file-dto.ts"],"names":[],"mappings":""}
|
|
@@ -2,8 +2,8 @@ import FormData from "form-data";
|
|
|
2
2
|
import { SmartlingBaseApi } from "../base";
|
|
3
3
|
import { SmartlingAuthApi } from "../auth";
|
|
4
4
|
import { Logger } from "../logger";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { FtsUploadedFileDto } from "./dto/fts-uploaded-file-dto";
|
|
6
|
+
import { FtsUploadFileParameters } from "./params/fts-upload-file-parameters";
|
|
7
7
|
import { TranslationDto } from "./dto/translation-dto";
|
|
8
8
|
import { TranslateFileParameters } from "./params/translate-file-parameters";
|
|
9
9
|
import { TranslationStatusDto } from "./dto/translation-status-dto";
|
|
@@ -11,7 +11,7 @@ import { LanguageDetectionDto } from "./dto/language-detection-dto";
|
|
|
11
11
|
import { LanguageDetectionStatusDto } from "./dto/language-detection-status-dto";
|
|
12
12
|
export declare class SmartlingFileTranslationsApi extends SmartlingBaseApi {
|
|
13
13
|
constructor(smartlingApiBaseUrl: string, authApi: SmartlingAuthApi, logger: Logger);
|
|
14
|
-
uploadFile(accountUid: string, parameters:
|
|
14
|
+
uploadFile(accountUid: string, parameters: FtsUploadFileParameters): Promise<FtsUploadedFileDto>;
|
|
15
15
|
translateFile(accountUid: string, fileUid: string, params: TranslateFileParameters): Promise<TranslationDto>;
|
|
16
16
|
getTranslationProgress(accountUid: string, fileUid: string, mtUid: string): Promise<TranslationStatusDto>;
|
|
17
17
|
downloadTranslatedFile(accountUid: string, fileUid: string, mtUid: string, localeId: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/file-translations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAAiC;AACjC,kCAA2C;AAW3C,MAAa,4BAA6B,SAAQ,uBAAgB;IAC9D,YAAY,mBAA2B,EAAE,OAAyB,EAAE,MAAc;QAC9E,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,GAAG,mBAAmB,oCAAoC,CAAC;IACjF,CAAC;IAEK,UAAU,CACZ,UAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/file-translations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAAiC;AACjC,kCAA2C;AAW3C,MAAa,4BAA6B,SAAQ,uBAAgB;IAC9D,YAAY,mBAA2B,EAAE,OAAyB,EAAE,MAAc;QAC9E,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,GAAG,mBAAmB,oCAAoC,CAAC;IACjF,CAAC;IAEK,UAAU,CACZ,UAAkB,EAAE,UAAmC;;YAEvD,MAAM,QAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAC;YAChC,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;YAErC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CA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AuB,EACpF,IAAI,EACJ,IAAI,CACP,CAAC;QACN,CAAC;KAAA;IAEK,qBAAqB,CACvB,UAAkB,EAAE,OAAe,EAAE,KAAa;;YAElD,MAAM,IAAI,CAAC,WAAW,CAClB,MAAM,EACN,GAAG,IAAI,CAAC,UAAU,IAAI,UAAU,UAAU,OAAO,OAAO,KAAK,SAAS,CACzE,CAAC;QACN,CAAC;KAAA;IAEK,kBAAkB,CAAC,UAAkB,EAAE,OAAe;;YACxD,OAAO,MAAM,IAAI,CAAC,WAAW,CACzB,MAAM,EACN,GAAG,IAAI,CAAC,UAAU,IAAI,UAAU,UAAU,OAAO,qBAAqB,CACzE,CAAC;QACN,CAAC;KAAA;IAEK,4BAA4B,CAC9B,UAAkB,EAAE,OAAe,EAAE,oBAA4B;;YAEjE,OAAO,MAAM,IAAI,CAAC,WAAW,CACzB,KAAK,EACL,GAAG,IAAI,CAAC,UAAU,IAAI,UAAU,UAAU,OAAO,uBAAuB,oBAAoB,SAAS,CACxG,CAAC;QACN,CAAC;KAAA;IAED,MAAM,CAAC,wBAAwB,CAAC,IAAc;QAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAElC,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;QAElD,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC;QAC/B,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AArGD,oEAqGC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseParameters } from "../../parameters";
|
|
2
|
+
import { FileType } from "../../files/params/file-type";
|
|
3
|
+
export declare class FtsUploadFileParameters extends BaseParameters {
|
|
4
|
+
constructor(parameters?: Record<string, unknown>);
|
|
5
|
+
setFileFromLocalFilePath(filePath: string): FtsUploadFileParameters;
|
|
6
|
+
setFileContent(fileContent: string): FtsUploadFileParameters;
|
|
7
|
+
setFileType(fileType: FileType): FtsUploadFileParameters;
|
|
8
|
+
}
|
|
@@ -26,11 +26,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.FtsUploadFileParameters = void 0;
|
|
30
30
|
const fs = __importStar(require("fs"));
|
|
31
31
|
const string_to_file_stream_1 = __importDefault(require("string-to-file-stream"));
|
|
32
32
|
const parameters_1 = require("../../parameters");
|
|
33
|
-
class
|
|
33
|
+
class FtsUploadFileParameters extends parameters_1.BaseParameters {
|
|
34
34
|
constructor(parameters = {}) {
|
|
35
35
|
super(parameters);
|
|
36
36
|
this.set("request", {});
|
|
@@ -48,5 +48,5 @@ class UploadFileParameters extends parameters_1.BaseParameters {
|
|
|
48
48
|
return this;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
exports.
|
|
52
|
-
//# sourceMappingURL=upload-file-parameters.js.map
|
|
51
|
+
exports.FtsUploadFileParameters = FtsUploadFileParameters;
|
|
52
|
+
//# sourceMappingURL=fts-upload-file-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fts-upload-file-parameters.js","sourceRoot":"","sources":["../../../../api/file-translations/params/fts-upload-file-parameters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,kFAAsD;AACtD,iDAAkD;AAGlD,MAAa,uBAAwB,SAAQ,2BAAc;IACvD,YAAY,aAAsC,EAAE;QAChD,KAAK,CAAC,UAAU,CAAC,CAAC;QAElB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,wBAAwB,CAAC,QAAgB;QACrC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAChC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAC5B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,cAAc,CAAC,WAAmB;QAC9B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAA,+BAAiB,EAAC,WAAW,CAAC,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,QAAkB;QAC1B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QAC1D,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAvBD,0DAuBC"}
|
package/built/index.d.ts
CHANGED
|
@@ -15,6 +15,19 @@ export * from "./api/context/params/create-bindings-parameters";
|
|
|
15
15
|
export * from "./api/context/params/list-parameters";
|
|
16
16
|
export * from "./api/context/context-http-response";
|
|
17
17
|
export * from "./api/exception/index";
|
|
18
|
+
export * from "./api/file-translations/index";
|
|
19
|
+
export * from "./api/file-translations/params/fts-upload-file-parameters";
|
|
20
|
+
export * from "./api/file-translations/params/translate-file-parameters";
|
|
21
|
+
export * from "./api/file-translations/dto/error";
|
|
22
|
+
export * from "./api/file-translations/dto/fts-uploaded-file-dto";
|
|
23
|
+
export * from "./api/file-translations/dto/language-detection-dto";
|
|
24
|
+
export * from "./api/file-translations/dto/language-detection-state";
|
|
25
|
+
export * from "./api/file-translations/dto/language-detection-status-dto";
|
|
26
|
+
export * from "./api/file-translations/dto/language-dto";
|
|
27
|
+
export * from "./api/file-translations/dto/mt-state";
|
|
28
|
+
export * from "./api/file-translations/dto/translation-dto";
|
|
29
|
+
export * from "./api/file-translations/dto/translation-locale-status-dto";
|
|
30
|
+
export * from "./api/file-translations/dto/translation-status-dto";
|
|
18
31
|
export * from "./api/files/index";
|
|
19
32
|
export * from "./api/files/params/download-file-parameters";
|
|
20
33
|
export * from "./api/files/params/retrieval-type";
|
package/built/index.js
CHANGED
|
@@ -31,6 +31,19 @@ __exportStar(require("./api/context/params/create-bindings-parameters"), exports
|
|
|
31
31
|
__exportStar(require("./api/context/params/list-parameters"), exports);
|
|
32
32
|
__exportStar(require("./api/context/context-http-response"), exports);
|
|
33
33
|
__exportStar(require("./api/exception/index"), exports);
|
|
34
|
+
__exportStar(require("./api/file-translations/index"), exports);
|
|
35
|
+
__exportStar(require("./api/file-translations/params/fts-upload-file-parameters"), exports);
|
|
36
|
+
__exportStar(require("./api/file-translations/params/translate-file-parameters"), exports);
|
|
37
|
+
__exportStar(require("./api/file-translations/dto/error"), exports);
|
|
38
|
+
__exportStar(require("./api/file-translations/dto/fts-uploaded-file-dto"), exports);
|
|
39
|
+
__exportStar(require("./api/file-translations/dto/language-detection-dto"), exports);
|
|
40
|
+
__exportStar(require("./api/file-translations/dto/language-detection-state"), exports);
|
|
41
|
+
__exportStar(require("./api/file-translations/dto/language-detection-status-dto"), exports);
|
|
42
|
+
__exportStar(require("./api/file-translations/dto/language-dto"), exports);
|
|
43
|
+
__exportStar(require("./api/file-translations/dto/mt-state"), exports);
|
|
44
|
+
__exportStar(require("./api/file-translations/dto/translation-dto"), exports);
|
|
45
|
+
__exportStar(require("./api/file-translations/dto/translation-locale-status-dto"), exports);
|
|
46
|
+
__exportStar(require("./api/file-translations/dto/translation-status-dto"), exports);
|
|
34
47
|
__exportStar(require("./api/files/index"), exports);
|
|
35
48
|
__exportStar(require("./api/files/params/download-file-parameters"), exports);
|
|
36
49
|
__exportStar(require("./api/files/params/retrieval-type"), exports);
|
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,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,yDAAuC;AACvC,iEAA+C;AAC/C,mFAAiE;AACjE,uFAAqE;AACrE,kEAAgD;AAChD,mEAAiD;AACjD,yEAAuD;AACvD,kEAAgD;AAChD,0EAAwD;AACxD,6EAA2D;AAC3D,4EAA0D;AAC1D,+DAA6C;AAC7C,8EAA4D;AAC5D,yEAAuD;AACvD,2EAAyD;AACzD,0EAAwD;AACxD,yEAAuD;AACvD,2EAAyD;AACzD,yDAAuC;AACvC,yDAAuC;AACvC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,sDAAoC;AACpC,sEAAoD;AACpD,0EAAwD;AACxD,uFAAqE;AACrE,+CAA6B;AAC7B,wEAAsD;AACtD,+FAA6E;AAC7E,6EAA2D"}
|
|
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,k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 export * from "./api/context/params/create-bindings-parameters";
|
|
|
15
15
|
export * from "./api/context/params/list-parameters";
|
|
16
16
|
export * from "./api/context/context-http-response";
|
|
17
17
|
export * from "./api/exception/index";
|
|
18
|
+
export * from "./api/file-translations/index";
|
|
19
|
+
export * from "./api/file-translations/params/fts-upload-file-parameters";
|
|
20
|
+
export * from "./api/file-translations/params/translate-file-parameters";
|
|
21
|
+
export * from "./api/file-translations/dto/error";
|
|
22
|
+
export * from "./api/file-translations/dto/fts-uploaded-file-dto";
|
|
23
|
+
export * from "./api/file-translations/dto/language-detection-dto";
|
|
24
|
+
export * from "./api/file-translations/dto/language-detection-state";
|
|
25
|
+
export * from "./api/file-translations/dto/language-detection-status-dto";
|
|
26
|
+
export * from "./api/file-translations/dto/language-dto";
|
|
27
|
+
export * from "./api/file-translations/dto/mt-state";
|
|
28
|
+
export * from "./api/file-translations/dto/translation-dto";
|
|
29
|
+
export * from "./api/file-translations/dto/translation-locale-status-dto";
|
|
30
|
+
export * from "./api/file-translations/dto/translation-status-dto";
|
|
18
31
|
export * from "./api/files/index";
|
|
19
32
|
export * from "./api/files/params/download-file-parameters";
|
|
20
33
|
export * from "./api/files/params/retrieval-type";
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import sinon from "sinon";
|
|
|
5
5
|
import { loggerMock, authMock, responseMock } from "./mock";
|
|
6
6
|
import { SmartlingFileTranslationsApi } from "../api/file-translations";
|
|
7
7
|
import { SmartlingAuthApi } from "../api/auth";
|
|
8
|
-
import {
|
|
8
|
+
import { FtsUploadFileParameters } from "../api/file-translations/params/fts-upload-file-parameters";
|
|
9
9
|
import { FileType } from "../api/files/params/file-type";
|
|
10
10
|
import { streamToString } from "./stream-to-string";
|
|
11
11
|
import { TranslateFileParameters } from "../api/file-translations/params/translate-file-parameters";
|
|
@@ -47,7 +47,7 @@ describe("SmartlingFileTranslationsApi class tests.", () => {
|
|
|
47
47
|
|
|
48
48
|
describe("Methods", () => {
|
|
49
49
|
it("Upload file: from disk", async () => {
|
|
50
|
-
const params = new
|
|
50
|
+
const params = new FtsUploadFileParameters();
|
|
51
51
|
|
|
52
52
|
params
|
|
53
53
|
.setFileType(FileType.XML)
|
|
@@ -96,7 +96,7 @@ describe("SmartlingFileTranslationsApi class tests.", () => {
|
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
it("Upload file: as string", async () => {
|
|
99
|
-
const params = new
|
|
99
|
+
const params = new FtsUploadFileParameters();
|
|
100
100
|
|
|
101
101
|
const testFileContent = fs.readFileSync(
|
|
102
102
|
fs.realpathSync("./test/data/file.xml"),
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uploaded-file-dto.js","sourceRoot":"","sources":["../../../../api/file-translations/dto/uploaded-file-dto.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BaseParameters } from "../../parameters";
|
|
2
|
-
import { FileType } from "../../files/params/file-type";
|
|
3
|
-
export declare class UploadFileParameters extends BaseParameters {
|
|
4
|
-
constructor(parameters?: Record<string, unknown>);
|
|
5
|
-
setFileFromLocalFilePath(filePath: string): UploadFileParameters;
|
|
6
|
-
setFileContent(fileContent: string): UploadFileParameters;
|
|
7
|
-
setFileType(fileType: FileType): UploadFileParameters;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-file-parameters.js","sourceRoot":"","sources":["../../../../api/file-translations/params/upload-file-parameters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,kFAAsD;AACtD,iDAAkD;AAGlD,MAAa,oBAAqB,SAAQ,2BAAc;IACpD,YAAY,aAAsC,EAAE;QAChD,KAAK,CAAC,UAAU,CAAC,CAAC;QAElB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,wBAAwB,CAAC,QAAgB;QACrC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAChC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAC5B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,cAAc,CAAC,WAAmB;QAC9B,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAA,+BAAiB,EAAC,WAAW,CAAC,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,QAAkB;QAC1B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QAC1D,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAvBD,oDAuBC"}
|