@aws-sdk/client-translate 3.118.1 → 3.127.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/CHANGELOG.md +31 -0
- package/dist-cjs/Translate.js +15 -0
- package/dist-cjs/commands/ListLanguagesCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +48 -2
- package/dist-cjs/pagination/ListLanguagesPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +267 -194
- package/dist-es/Translate.js +15 -0
- package/dist-es/commands/ListLanguagesCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +39 -0
- package/dist-es/pagination/ListLanguagesPaginator.js +75 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +254 -167
- package/dist-types/Translate.d.ts +15 -8
- package/dist-types/TranslateClient.d.ts +3 -2
- package/dist-types/commands/ImportTerminologyCommand.d.ts +8 -8
- package/dist-types/commands/ListLanguagesCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +144 -32
- package/dist-types/pagination/ListLanguagesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +3 -0
- package/dist-types/ts3.4/Translate.d.ts +5 -0
- package/dist-types/ts3.4/TranslateClient.d.ts +3 -2
- package/dist-types/ts3.4/commands/ListLanguagesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +58 -0
- package/dist-types/ts3.4/pagination/ListLanguagesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +3 -0
- package/package.json +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-translate
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
|
|
20
|
+
* **clients:** update client endpoints as of 2022-06-30 ([fe6a05a](https://github.com/aws/aws-sdk-js-v3/commit/fe6a05a556d9b3245a681b064898dcd7ee6ea4a1))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# [3.120.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.119.0...v3.120.0) (2022-06-29)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **client-translate:** Added ListLanguages API which can be used to list the languages supported by Translate. ([4ec076d](https://github.com/aws/aws-sdk-js-v3/commit/4ec076d3339948f276cb96ea9bfef6200a18793b))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
6
37
|
## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
|
|
7
38
|
|
|
8
39
|
**Note:** Version bump only for package @aws-sdk/client-translate
|
package/dist-cjs/Translate.js
CHANGED
|
@@ -8,6 +8,7 @@ const DescribeTextTranslationJobCommand_1 = require("./commands/DescribeTextTran
|
|
|
8
8
|
const GetParallelDataCommand_1 = require("./commands/GetParallelDataCommand");
|
|
9
9
|
const GetTerminologyCommand_1 = require("./commands/GetTerminologyCommand");
|
|
10
10
|
const ImportTerminologyCommand_1 = require("./commands/ImportTerminologyCommand");
|
|
11
|
+
const ListLanguagesCommand_1 = require("./commands/ListLanguagesCommand");
|
|
11
12
|
const ListParallelDataCommand_1 = require("./commands/ListParallelDataCommand");
|
|
12
13
|
const ListTerminologiesCommand_1 = require("./commands/ListTerminologiesCommand");
|
|
13
14
|
const ListTextTranslationJobsCommand_1 = require("./commands/ListTextTranslationJobsCommand");
|
|
@@ -115,6 +116,20 @@ class Translate extends TranslateClient_1.TranslateClient {
|
|
|
115
116
|
return this.send(command, optionsOrCb);
|
|
116
117
|
}
|
|
117
118
|
}
|
|
119
|
+
listLanguages(args, optionsOrCb, cb) {
|
|
120
|
+
const command = new ListLanguagesCommand_1.ListLanguagesCommand(args);
|
|
121
|
+
if (typeof optionsOrCb === "function") {
|
|
122
|
+
this.send(command, optionsOrCb);
|
|
123
|
+
}
|
|
124
|
+
else if (typeof cb === "function") {
|
|
125
|
+
if (typeof optionsOrCb !== "object")
|
|
126
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
127
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return this.send(command, optionsOrCb);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
118
133
|
listParallelData(args, optionsOrCb, cb) {
|
|
119
134
|
const command = new ListParallelDataCommand_1.ListParallelDataCommand(args);
|
|
120
135
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListLanguagesCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
+
class ListLanguagesCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "TranslateClient";
|
|
18
|
+
const commandName = "ListLanguagesCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.ListLanguagesRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.ListLanguagesResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_json1_1_1.serializeAws_json1_1ListLanguagesCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_json1_1_1.deserializeAws_json1_1ListLanguagesCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ListLanguagesCommand = ListLanguagesCommand;
|
|
@@ -8,6 +8,7 @@ tslib_1.__exportStar(require("./DescribeTextTranslationJobCommand"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./GetParallelDataCommand"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./GetTerminologyCommand"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./ImportTerminologyCommand"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./ListLanguagesCommand"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./ListParallelDataCommand"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./ListTerminologiesCommand"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./ListTextTranslationJobsCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.UpdateParallelDataResponse = exports.UpdateParallelDataRequest = exports.TranslateTextResponse = exports.TranslateTextRequest = exports.TextSizeLimitExceededException = exports.ServiceUnavailableException = exports.DetectedLanguageLowConfidenceException = exports.StopTextTranslationJobResponse = exports.StopTextTranslationJobRequest = exports.UnsupportedLanguagePairException = exports.StartTextTranslationJobResponse = exports.StartTextTranslationJobRequest = exports.ListTextTranslationJobsResponse = exports.ListTextTranslationJobsRequest = void 0;
|
|
3
|
+
exports.ListParallelDataRequest = exports.UnsupportedDisplayLanguageCodeException = exports.ListLanguagesResponse = exports.Language = exports.ListLanguagesRequest = exports.DisplayLanguageCode = exports.ImportTerminologyResponse = exports.ImportTerminologyRequest = exports.TerminologyData = exports.MergeStrategy = exports.GetTerminologyResponse = exports.TerminologyProperties = exports.Directionality = exports.TerminologyDataLocation = exports.GetTerminologyRequest = exports.TerminologyDataFormat = exports.GetParallelDataResponse = exports.ParallelDataProperties = exports.ParallelDataDataLocation = exports.GetParallelDataRequest = exports.DescribeTextTranslationJobResponse = exports.TextTranslationJobProperties = exports.TranslationSettings = exports.Profanity = exports.Formality = exports.OutputDataConfig = exports.JobStatus = exports.JobDetails = exports.InputDataConfig = exports.DescribeTextTranslationJobRequest = exports.DeleteTerminologyRequest = exports.ResourceNotFoundException = exports.DeleteParallelDataResponse = exports.DeleteParallelDataRequest = exports.ConcurrentModificationException = exports.TooManyRequestsException = exports.LimitExceededException = exports.InvalidRequestException = exports.InvalidParameterValueException = exports.InternalServerException = exports.CreateParallelDataResponse = exports.ParallelDataStatus = exports.CreateParallelDataRequest = exports.ParallelDataConfig = exports.ParallelDataFormat = exports.EncryptionKey = exports.EncryptionKeyType = exports.ConflictException = exports.AppliedTerminology = exports.Term = void 0;
|
|
4
|
+
exports.UpdateParallelDataResponse = exports.UpdateParallelDataRequest = exports.TranslateTextResponse = exports.TranslateTextRequest = exports.TextSizeLimitExceededException = exports.ServiceUnavailableException = exports.DetectedLanguageLowConfidenceException = exports.StopTextTranslationJobResponse = exports.StopTextTranslationJobRequest = exports.UnsupportedLanguagePairException = exports.StartTextTranslationJobResponse = exports.StartTextTranslationJobRequest = exports.ListTextTranslationJobsResponse = exports.ListTextTranslationJobsRequest = exports.TextTranslationJobFilter = exports.InvalidFilterException = exports.ListTerminologiesResponse = exports.ListTerminologiesRequest = exports.ListParallelDataResponse = void 0;
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const TranslateServiceException_1 = require("./TranslateServiceException");
|
|
7
7
|
var Term;
|
|
@@ -332,6 +332,52 @@ var ImportTerminologyResponse;
|
|
|
332
332
|
...obj,
|
|
333
333
|
});
|
|
334
334
|
})(ImportTerminologyResponse = exports.ImportTerminologyResponse || (exports.ImportTerminologyResponse = {}));
|
|
335
|
+
var DisplayLanguageCode;
|
|
336
|
+
(function (DisplayLanguageCode) {
|
|
337
|
+
DisplayLanguageCode["DE"] = "de";
|
|
338
|
+
DisplayLanguageCode["EN"] = "en";
|
|
339
|
+
DisplayLanguageCode["ES"] = "es";
|
|
340
|
+
DisplayLanguageCode["FR"] = "fr";
|
|
341
|
+
DisplayLanguageCode["IT"] = "it";
|
|
342
|
+
DisplayLanguageCode["JA"] = "ja";
|
|
343
|
+
DisplayLanguageCode["KO"] = "ko";
|
|
344
|
+
DisplayLanguageCode["PT"] = "pt";
|
|
345
|
+
DisplayLanguageCode["ZH"] = "zh";
|
|
346
|
+
DisplayLanguageCode["ZH_TW"] = "zh-TW";
|
|
347
|
+
})(DisplayLanguageCode = exports.DisplayLanguageCode || (exports.DisplayLanguageCode = {}));
|
|
348
|
+
var ListLanguagesRequest;
|
|
349
|
+
(function (ListLanguagesRequest) {
|
|
350
|
+
ListLanguagesRequest.filterSensitiveLog = (obj) => ({
|
|
351
|
+
...obj,
|
|
352
|
+
});
|
|
353
|
+
})(ListLanguagesRequest = exports.ListLanguagesRequest || (exports.ListLanguagesRequest = {}));
|
|
354
|
+
var Language;
|
|
355
|
+
(function (Language) {
|
|
356
|
+
Language.filterSensitiveLog = (obj) => ({
|
|
357
|
+
...obj,
|
|
358
|
+
});
|
|
359
|
+
})(Language = exports.Language || (exports.Language = {}));
|
|
360
|
+
var ListLanguagesResponse;
|
|
361
|
+
(function (ListLanguagesResponse) {
|
|
362
|
+
ListLanguagesResponse.filterSensitiveLog = (obj) => ({
|
|
363
|
+
...obj,
|
|
364
|
+
});
|
|
365
|
+
})(ListLanguagesResponse = exports.ListLanguagesResponse || (exports.ListLanguagesResponse = {}));
|
|
366
|
+
class UnsupportedDisplayLanguageCodeException extends TranslateServiceException_1.TranslateServiceException {
|
|
367
|
+
constructor(opts) {
|
|
368
|
+
super({
|
|
369
|
+
name: "UnsupportedDisplayLanguageCodeException",
|
|
370
|
+
$fault: "client",
|
|
371
|
+
...opts,
|
|
372
|
+
});
|
|
373
|
+
this.name = "UnsupportedDisplayLanguageCodeException";
|
|
374
|
+
this.$fault = "client";
|
|
375
|
+
Object.setPrototypeOf(this, UnsupportedDisplayLanguageCodeException.prototype);
|
|
376
|
+
this.Message = opts.Message;
|
|
377
|
+
this.DisplayLanguageCode = opts.DisplayLanguageCode;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
exports.UnsupportedDisplayLanguageCodeException = UnsupportedDisplayLanguageCodeException;
|
|
335
381
|
var ListParallelDataRequest;
|
|
336
382
|
(function (ListParallelDataRequest) {
|
|
337
383
|
ListParallelDataRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListLanguages = void 0;
|
|
4
|
+
const ListLanguagesCommand_1 = require("../commands/ListLanguagesCommand");
|
|
5
|
+
const Translate_1 = require("../Translate");
|
|
6
|
+
const TranslateClient_1 = require("../TranslateClient");
|
|
7
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.send(new ListLanguagesCommand_1.ListLanguagesCommand(input), ...args);
|
|
9
|
+
};
|
|
10
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
+
return await client.listLanguages(input, ...args);
|
|
12
|
+
};
|
|
13
|
+
async function* paginateListLanguages(config, input, ...additionalArguments) {
|
|
14
|
+
let token = config.startingToken || undefined;
|
|
15
|
+
let hasNext = true;
|
|
16
|
+
let page;
|
|
17
|
+
while (hasNext) {
|
|
18
|
+
input.NextToken = token;
|
|
19
|
+
input["MaxResults"] = config.pageSize;
|
|
20
|
+
if (config.client instanceof Translate_1.Translate) {
|
|
21
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else if (config.client instanceof TranslateClient_1.TranslateClient) {
|
|
24
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
throw new Error("Invalid client, expected Translate | TranslateClient");
|
|
28
|
+
}
|
|
29
|
+
yield page;
|
|
30
|
+
const prevToken = token;
|
|
31
|
+
token = page.NextToken;
|
|
32
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
exports.paginateListLanguages = paginateListLanguages;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./ListLanguagesPaginator"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./ListParallelDataPaginator"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./ListTerminologiesPaginator"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./ListTextTranslationJobsPaginator"), exports);
|