@aws-sdk/client-translate 3.337.0 → 3.341.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/README.md +8 -0
- package/dist-cjs/Translate.js +2 -0
- package/dist-cjs/TranslateClient.js +2 -1
- package/dist-cjs/commands/CreateParallelDataCommand.js +2 -1
- package/dist-cjs/commands/DeleteParallelDataCommand.js +2 -1
- package/dist-cjs/commands/DeleteTerminologyCommand.js +2 -1
- package/dist-cjs/commands/DescribeTextTranslationJobCommand.js +2 -1
- package/dist-cjs/commands/GetParallelDataCommand.js +2 -1
- package/dist-cjs/commands/GetTerminologyCommand.js +2 -1
- package/dist-cjs/commands/ImportTerminologyCommand.js +2 -1
- package/dist-cjs/commands/ListLanguagesCommand.js +2 -1
- package/dist-cjs/commands/ListParallelDataCommand.js +2 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -1
- package/dist-cjs/commands/ListTerminologiesCommand.js +2 -1
- package/dist-cjs/commands/ListTextTranslationJobsCommand.js +2 -1
- package/dist-cjs/commands/StartTextTranslationJobCommand.js +2 -1
- package/dist-cjs/commands/StopTextTranslationJobCommand.js +2 -1
- package/dist-cjs/commands/TagResourceCommand.js +2 -1
- package/dist-cjs/commands/TranslateDocumentCommand.js +47 -0
- package/dist-cjs/commands/TranslateTextCommand.js +2 -1
- package/dist-cjs/commands/UntagResourceCommand.js +2 -1
- package/dist-cjs/commands/UpdateParallelDataCommand.js +2 -1
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/index.js +2 -2
- package/dist-cjs/models/TranslateServiceException.js +2 -1
- package/dist-cjs/models/models_0.js +35 -15
- package/dist-cjs/protocols/Aws_json1_1.js +88 -1
- package/dist-es/Translate.js +2 -0
- package/dist-es/TranslateClient.js +1 -0
- package/dist-es/commands/CreateParallelDataCommand.js +1 -0
- package/dist-es/commands/DeleteParallelDataCommand.js +1 -0
- package/dist-es/commands/DeleteTerminologyCommand.js +1 -0
- package/dist-es/commands/DescribeTextTranslationJobCommand.js +1 -0
- package/dist-es/commands/GetParallelDataCommand.js +1 -0
- package/dist-es/commands/GetTerminologyCommand.js +1 -0
- package/dist-es/commands/ImportTerminologyCommand.js +1 -0
- package/dist-es/commands/ListLanguagesCommand.js +1 -0
- package/dist-es/commands/ListParallelDataCommand.js +1 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +1 -0
- package/dist-es/commands/ListTerminologiesCommand.js +1 -0
- package/dist-es/commands/ListTextTranslationJobsCommand.js +1 -0
- package/dist-es/commands/StartTextTranslationJobCommand.js +1 -0
- package/dist-es/commands/StopTextTranslationJobCommand.js +1 -0
- package/dist-es/commands/TagResourceCommand.js +1 -0
- package/dist-es/commands/TranslateDocumentCommand.js +43 -0
- package/dist-es/commands/TranslateTextCommand.js +1 -0
- package/dist-es/commands/UntagResourceCommand.js +1 -0
- package/dist-es/commands/UpdateParallelDataCommand.js +1 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/index.js +2 -2
- package/dist-es/models/TranslateServiceException.js +1 -0
- package/dist-es/models/models_0.js +29 -13
- package/dist-es/protocols/Aws_json1_1.js +85 -0
- package/dist-types/Translate.d.ts +7 -0
- package/dist-types/TranslateClient.d.ts +6 -5
- package/dist-types/commands/CreateParallelDataCommand.d.ts +4 -0
- package/dist-types/commands/DeleteParallelDataCommand.d.ts +4 -0
- package/dist-types/commands/DeleteTerminologyCommand.d.ts +4 -0
- package/dist-types/commands/DescribeTextTranslationJobCommand.d.ts +4 -0
- package/dist-types/commands/GetParallelDataCommand.d.ts +4 -0
- package/dist-types/commands/GetTerminologyCommand.d.ts +4 -0
- package/dist-types/commands/ImportTerminologyCommand.d.ts +4 -0
- package/dist-types/commands/ListLanguagesCommand.d.ts +4 -0
- package/dist-types/commands/ListParallelDataCommand.d.ts +4 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +4 -0
- package/dist-types/commands/ListTerminologiesCommand.d.ts +4 -0
- package/dist-types/commands/ListTextTranslationJobsCommand.d.ts +4 -0
- package/dist-types/commands/StartTextTranslationJobCommand.d.ts +5 -1
- package/dist-types/commands/StopTextTranslationJobCommand.d.ts +4 -0
- package/dist-types/commands/TagResourceCommand.d.ts +4 -0
- package/dist-types/commands/TranslateDocumentCommand.d.ts +144 -0
- package/dist-types/commands/TranslateTextCommand.d.ts +5 -1
- package/dist-types/commands/UntagResourceCommand.d.ts +4 -0
- package/dist-types/commands/UpdateParallelDataCommand.d.ts +4 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/index.d.ts +7 -2
- package/dist-types/models/TranslateServiceException.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +147 -26
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/Translate.d.ts +17 -0
- package/dist-types/ts3.4/TranslateClient.d.ts +9 -3
- package/dist-types/ts3.4/commands/CreateParallelDataCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/DeleteParallelDataCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/DeleteTerminologyCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/DescribeTextTranslationJobCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/GetParallelDataCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/GetTerminologyCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/ImportTerminologyCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/ListLanguagesCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/ListParallelDataCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/ListTerminologiesCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/ListTextTranslationJobsCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/StartTextTranslationJobCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/StopTextTranslationJobCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/TranslateDocumentCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/TranslateTextCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/UpdateParallelDataCommand.d.ts +1 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/index.d.ts +2 -2
- package/dist-types/ts3.4/models/TranslateServiceException.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +39 -8
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +28 -28
package/README.md
CHANGED
|
@@ -322,6 +322,14 @@ TagResource
|
|
|
322
322
|
|
|
323
323
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-translate/classes/tagresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-translate/interfaces/tagresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-translate/interfaces/tagresourcecommandoutput.html)
|
|
324
324
|
|
|
325
|
+
</details>
|
|
326
|
+
<details>
|
|
327
|
+
<summary>
|
|
328
|
+
TranslateDocument
|
|
329
|
+
</summary>
|
|
330
|
+
|
|
331
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-translate/classes/translatedocumentcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-translate/interfaces/translatedocumentcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-translate/interfaces/translatedocumentcommandoutput.html)
|
|
332
|
+
|
|
325
333
|
</details>
|
|
326
334
|
<details>
|
|
327
335
|
<summary>
|
package/dist-cjs/Translate.js
CHANGED
|
@@ -17,6 +17,7 @@ const ListTextTranslationJobsCommand_1 = require("./commands/ListTextTranslation
|
|
|
17
17
|
const StartTextTranslationJobCommand_1 = require("./commands/StartTextTranslationJobCommand");
|
|
18
18
|
const StopTextTranslationJobCommand_1 = require("./commands/StopTextTranslationJobCommand");
|
|
19
19
|
const TagResourceCommand_1 = require("./commands/TagResourceCommand");
|
|
20
|
+
const TranslateDocumentCommand_1 = require("./commands/TranslateDocumentCommand");
|
|
20
21
|
const TranslateTextCommand_1 = require("./commands/TranslateTextCommand");
|
|
21
22
|
const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
|
|
22
23
|
const UpdateParallelDataCommand_1 = require("./commands/UpdateParallelDataCommand");
|
|
@@ -37,6 +38,7 @@ const commands = {
|
|
|
37
38
|
StartTextTranslationJobCommand: StartTextTranslationJobCommand_1.StartTextTranslationJobCommand,
|
|
38
39
|
StopTextTranslationJobCommand: StopTextTranslationJobCommand_1.StopTextTranslationJobCommand,
|
|
39
40
|
TagResourceCommand: TagResourceCommand_1.TagResourceCommand,
|
|
41
|
+
TranslateDocumentCommand: TranslateDocumentCommand_1.TranslateDocumentCommand,
|
|
40
42
|
TranslateTextCommand: TranslateTextCommand_1.TranslateTextCommand,
|
|
41
43
|
UntagResourceCommand: UntagResourceCommand_1.UntagResourceCommand,
|
|
42
44
|
UpdateParallelDataCommand: UpdateParallelDataCommand_1.UpdateParallelDataCommand,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TranslateClient = void 0;
|
|
3
|
+
exports.TranslateClient = exports.__Client = void 0;
|
|
4
4
|
const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
5
5
|
const middleware_content_length_1 = require("@aws-sdk/middleware-content-length");
|
|
6
6
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
@@ -11,6 +11,7 @@ const middleware_retry_1 = require("@aws-sdk/middleware-retry");
|
|
|
11
11
|
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
12
12
|
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
|
13
13
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
14
|
+
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
|
14
15
|
const EndpointParameters_1 = require("./endpoint/EndpointParameters");
|
|
15
16
|
const runtimeConfig_1 = require("./runtimeConfig");
|
|
16
17
|
class TranslateClient extends smithy_client_1.Client {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateParallelDataCommand = void 0;
|
|
3
|
+
exports.CreateParallelDataCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class CreateParallelDataCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteParallelDataCommand = void 0;
|
|
3
|
+
exports.DeleteParallelDataCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class DeleteParallelDataCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteTerminologyCommand = void 0;
|
|
3
|
+
exports.DeleteTerminologyCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class DeleteTerminologyCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DescribeTextTranslationJobCommand = void 0;
|
|
3
|
+
exports.DescribeTextTranslationJobCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class DescribeTextTranslationJobCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetParallelDataCommand = void 0;
|
|
3
|
+
exports.GetParallelDataCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class GetParallelDataCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetTerminologyCommand = void 0;
|
|
3
|
+
exports.GetTerminologyCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class GetTerminologyCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImportTerminologyCommand = void 0;
|
|
3
|
+
exports.ImportTerminologyCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const models_0_1 = require("../models/models_0");
|
|
8
9
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
9
10
|
class ImportTerminologyCommand extends smithy_client_1.Command {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListLanguagesCommand = void 0;
|
|
3
|
+
exports.ListLanguagesCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class ListLanguagesCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListParallelDataCommand = void 0;
|
|
3
|
+
exports.ListParallelDataCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class ListParallelDataCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListTagsForResourceCommand = void 0;
|
|
3
|
+
exports.ListTagsForResourceCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class ListTagsForResourceCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListTerminologiesCommand = void 0;
|
|
3
|
+
exports.ListTerminologiesCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class ListTerminologiesCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListTextTranslationJobsCommand = void 0;
|
|
3
|
+
exports.ListTextTranslationJobsCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class ListTextTranslationJobsCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StartTextTranslationJobCommand = void 0;
|
|
3
|
+
exports.StartTextTranslationJobCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class StartTextTranslationJobCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StopTextTranslationJobCommand = void 0;
|
|
3
|
+
exports.StopTextTranslationJobCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class StopTextTranslationJobCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TagResourceCommand = void 0;
|
|
3
|
+
exports.TagResourceCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class TagResourceCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TranslateDocumentCommand = exports.$Command = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
const models_0_1 = require("../models/models_0");
|
|
9
|
+
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
10
|
+
class TranslateDocumentCommand extends smithy_client_1.Command {
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
constructor(input) {
|
|
20
|
+
super();
|
|
21
|
+
this.input = input;
|
|
22
|
+
}
|
|
23
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
24
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
25
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, TranslateDocumentCommand.getEndpointParameterInstructions()));
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const { logger } = configuration;
|
|
28
|
+
const clientName = "TranslateClient";
|
|
29
|
+
const commandName = "TranslateDocumentCommand";
|
|
30
|
+
const handlerExecutionContext = {
|
|
31
|
+
logger,
|
|
32
|
+
clientName,
|
|
33
|
+
commandName,
|
|
34
|
+
inputFilterSensitiveLog: models_0_1.TranslateDocumentRequestFilterSensitiveLog,
|
|
35
|
+
outputFilterSensitiveLog: models_0_1.TranslateDocumentResponseFilterSensitiveLog,
|
|
36
|
+
};
|
|
37
|
+
const { requestHandler } = configuration;
|
|
38
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
39
|
+
}
|
|
40
|
+
serialize(input, context) {
|
|
41
|
+
return (0, Aws_json1_1_1.se_TranslateDocumentCommand)(input, context);
|
|
42
|
+
}
|
|
43
|
+
deserialize(output, context) {
|
|
44
|
+
return (0, Aws_json1_1_1.de_TranslateDocumentCommand)(output, context);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.TranslateDocumentCommand = TranslateDocumentCommand;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TranslateTextCommand = void 0;
|
|
3
|
+
exports.TranslateTextCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class TranslateTextCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UntagResourceCommand = void 0;
|
|
3
|
+
exports.UntagResourceCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class UntagResourceCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateParallelDataCommand = void 0;
|
|
3
|
+
exports.UpdateParallelDataCommand = exports.$Command = void 0;
|
|
4
4
|
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
5
|
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
7
8
|
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
9
|
class UpdateParallelDataCommand extends smithy_client_1.Command {
|
|
9
10
|
static getEndpointParameterInstructions() {
|
|
@@ -16,6 +16,7 @@ tslib_1.__exportStar(require("./ListTextTranslationJobsCommand"), exports);
|
|
|
16
16
|
tslib_1.__exportStar(require("./StartTextTranslationJobCommand"), exports);
|
|
17
17
|
tslib_1.__exportStar(require("./StopTextTranslationJobCommand"), exports);
|
|
18
18
|
tslib_1.__exportStar(require("./TagResourceCommand"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./TranslateDocumentCommand"), exports);
|
|
19
20
|
tslib_1.__exportStar(require("./TranslateTextCommand"), exports);
|
|
20
21
|
tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
|
|
21
22
|
tslib_1.__exportStar(require("./UpdateParallelDataCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ruleSet = void 0;
|
|
4
|
-
const q = "
|
|
5
|
-
const a =
|
|
6
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
4
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
5
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
6
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://translate-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://translate-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://translate.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://translate.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
7
7
|
exports.ruleSet = _data;
|
package/dist-cjs/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TranslateServiceException = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
tslib_1.__exportStar(require("./Translate"), exports);
|
|
6
5
|
tslib_1.__exportStar(require("./TranslateClient"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./Translate"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./commands"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./models"), exports);
|
|
9
8
|
tslib_1.__exportStar(require("./pagination"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./models"), exports);
|
|
10
10
|
var TranslateServiceException_1 = require("./models/TranslateServiceException");
|
|
11
11
|
Object.defineProperty(exports, "TranslateServiceException", { enumerable: true, get: function () { return TranslateServiceException_1.TranslateServiceException; } });
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TranslateServiceException = void 0;
|
|
3
|
+
exports.TranslateServiceException = exports.__ServiceException = void 0;
|
|
4
4
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
5
6
|
class TranslateServiceException extends smithy_client_1.ServiceException {
|
|
6
7
|
constructor(options) {
|
|
7
8
|
super(options);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImportTerminologyRequestFilterSensitiveLog = exports.TerminologyDataFilterSensitiveLog = exports.TextSizeLimitExceededException = exports.
|
|
3
|
+
exports.TranslateDocumentResponseFilterSensitiveLog = exports.TranslatedDocumentFilterSensitiveLog = exports.TranslateDocumentRequestFilterSensitiveLog = exports.DocumentFilterSensitiveLog = exports.ImportTerminologyRequestFilterSensitiveLog = exports.TerminologyDataFilterSensitiveLog = exports.TextSizeLimitExceededException = exports.DetectedLanguageLowConfidenceException = exports.ServiceUnavailableException = exports.UnsupportedLanguagePairException = exports.InvalidFilterException = exports.UnsupportedDisplayLanguageCodeException = exports.DisplayLanguageCode = exports.MergeStrategy = exports.Directionality = exports.TerminologyDataFormat = exports.Profanity = exports.Formality = exports.JobStatus = exports.ResourceNotFoundException = exports.TooManyTagsException = exports.TooManyRequestsException = exports.LimitExceededException = exports.InvalidRequestException = exports.InvalidParameterValueException = exports.InternalServerException = exports.ParallelDataStatus = exports.ParallelDataFormat = exports.EncryptionKeyType = exports.ConflictException = exports.ConcurrentModificationException = void 0;
|
|
4
4
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
5
|
const TranslateServiceException_1 = require("./TranslateServiceException");
|
|
6
6
|
class ConcurrentModificationException extends TranslateServiceException_1.TranslateServiceException {
|
|
@@ -229,6 +229,20 @@ class UnsupportedLanguagePairException extends TranslateServiceException_1.Trans
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
exports.UnsupportedLanguagePairException = UnsupportedLanguagePairException;
|
|
232
|
+
class ServiceUnavailableException extends TranslateServiceException_1.TranslateServiceException {
|
|
233
|
+
constructor(opts) {
|
|
234
|
+
super({
|
|
235
|
+
name: "ServiceUnavailableException",
|
|
236
|
+
$fault: "server",
|
|
237
|
+
...opts,
|
|
238
|
+
});
|
|
239
|
+
this.name = "ServiceUnavailableException";
|
|
240
|
+
this.$fault = "server";
|
|
241
|
+
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
242
|
+
this.Message = opts.Message;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
exports.ServiceUnavailableException = ServiceUnavailableException;
|
|
232
246
|
class DetectedLanguageLowConfidenceException extends TranslateServiceException_1.TranslateServiceException {
|
|
233
247
|
constructor(opts) {
|
|
234
248
|
super({
|
|
@@ -244,20 +258,6 @@ class DetectedLanguageLowConfidenceException extends TranslateServiceException_1
|
|
|
244
258
|
}
|
|
245
259
|
}
|
|
246
260
|
exports.DetectedLanguageLowConfidenceException = DetectedLanguageLowConfidenceException;
|
|
247
|
-
class ServiceUnavailableException extends TranslateServiceException_1.TranslateServiceException {
|
|
248
|
-
constructor(opts) {
|
|
249
|
-
super({
|
|
250
|
-
name: "ServiceUnavailableException",
|
|
251
|
-
$fault: "server",
|
|
252
|
-
...opts,
|
|
253
|
-
});
|
|
254
|
-
this.name = "ServiceUnavailableException";
|
|
255
|
-
this.$fault = "server";
|
|
256
|
-
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
257
|
-
this.Message = opts.Message;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
exports.ServiceUnavailableException = ServiceUnavailableException;
|
|
261
261
|
class TextSizeLimitExceededException extends TranslateServiceException_1.TranslateServiceException {
|
|
262
262
|
constructor(opts) {
|
|
263
263
|
super({
|
|
@@ -282,3 +282,23 @@ const ImportTerminologyRequestFilterSensitiveLog = (obj) => ({
|
|
|
282
282
|
...(obj.TerminologyData && { TerminologyData: (0, exports.TerminologyDataFilterSensitiveLog)(obj.TerminologyData) }),
|
|
283
283
|
});
|
|
284
284
|
exports.ImportTerminologyRequestFilterSensitiveLog = ImportTerminologyRequestFilterSensitiveLog;
|
|
285
|
+
const DocumentFilterSensitiveLog = (obj) => ({
|
|
286
|
+
...obj,
|
|
287
|
+
...(obj.Content && { Content: smithy_client_1.SENSITIVE_STRING }),
|
|
288
|
+
});
|
|
289
|
+
exports.DocumentFilterSensitiveLog = DocumentFilterSensitiveLog;
|
|
290
|
+
const TranslateDocumentRequestFilterSensitiveLog = (obj) => ({
|
|
291
|
+
...obj,
|
|
292
|
+
...(obj.Document && { Document: (0, exports.DocumentFilterSensitiveLog)(obj.Document) }),
|
|
293
|
+
});
|
|
294
|
+
exports.TranslateDocumentRequestFilterSensitiveLog = TranslateDocumentRequestFilterSensitiveLog;
|
|
295
|
+
const TranslatedDocumentFilterSensitiveLog = (obj) => ({
|
|
296
|
+
...obj,
|
|
297
|
+
...(obj.Content && { Content: smithy_client_1.SENSITIVE_STRING }),
|
|
298
|
+
});
|
|
299
|
+
exports.TranslatedDocumentFilterSensitiveLog = TranslatedDocumentFilterSensitiveLog;
|
|
300
|
+
const TranslateDocumentResponseFilterSensitiveLog = (obj) => ({
|
|
301
|
+
...obj,
|
|
302
|
+
...(obj.TranslatedDocument && { TranslatedDocument: (0, exports.TranslatedDocumentFilterSensitiveLog)(obj.TranslatedDocument) }),
|
|
303
|
+
});
|
|
304
|
+
exports.TranslateDocumentResponseFilterSensitiveLog = TranslateDocumentResponseFilterSensitiveLog;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateParallelDataCommand = exports.de_UntagResourceCommand = exports.de_TranslateTextCommand = exports.de_TagResourceCommand = exports.de_StopTextTranslationJobCommand = exports.de_StartTextTranslationJobCommand = exports.de_ListTextTranslationJobsCommand = exports.de_ListTerminologiesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListParallelDataCommand = exports.de_ListLanguagesCommand = exports.de_ImportTerminologyCommand = exports.de_GetTerminologyCommand = exports.de_GetParallelDataCommand = exports.de_DescribeTextTranslationJobCommand = exports.de_DeleteTerminologyCommand = exports.de_DeleteParallelDataCommand = exports.de_CreateParallelDataCommand = exports.se_UpdateParallelDataCommand = exports.se_UntagResourceCommand = exports.se_TranslateTextCommand = exports.se_TagResourceCommand = exports.se_StopTextTranslationJobCommand = exports.se_StartTextTranslationJobCommand = exports.se_ListTextTranslationJobsCommand = exports.se_ListTerminologiesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListParallelDataCommand = exports.se_ListLanguagesCommand = exports.se_ImportTerminologyCommand = exports.se_GetTerminologyCommand = exports.se_GetParallelDataCommand = exports.se_DescribeTextTranslationJobCommand = exports.se_DeleteTerminologyCommand = exports.se_DeleteParallelDataCommand = exports.se_CreateParallelDataCommand = void 0;
|
|
3
|
+
exports.de_UpdateParallelDataCommand = exports.de_UntagResourceCommand = exports.de_TranslateTextCommand = exports.de_TranslateDocumentCommand = exports.de_TagResourceCommand = exports.de_StopTextTranslationJobCommand = exports.de_StartTextTranslationJobCommand = exports.de_ListTextTranslationJobsCommand = exports.de_ListTerminologiesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListParallelDataCommand = exports.de_ListLanguagesCommand = exports.de_ImportTerminologyCommand = exports.de_GetTerminologyCommand = exports.de_GetParallelDataCommand = exports.de_DescribeTextTranslationJobCommand = exports.de_DeleteTerminologyCommand = exports.de_DeleteParallelDataCommand = exports.de_CreateParallelDataCommand = exports.se_UpdateParallelDataCommand = exports.se_UntagResourceCommand = exports.se_TranslateTextCommand = exports.se_TranslateDocumentCommand = exports.se_TagResourceCommand = exports.se_StopTextTranslationJobCommand = exports.se_StartTextTranslationJobCommand = exports.se_ListTextTranslationJobsCommand = exports.se_ListTerminologiesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListParallelDataCommand = exports.se_ListLanguagesCommand = exports.se_ImportTerminologyCommand = exports.se_GetTerminologyCommand = exports.se_GetParallelDataCommand = exports.se_DescribeTextTranslationJobCommand = exports.se_DeleteTerminologyCommand = exports.se_DeleteParallelDataCommand = exports.se_CreateParallelDataCommand = void 0;
|
|
4
4
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
5
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
@@ -111,6 +111,13 @@ const se_TagResourceCommand = async (input, context) => {
|
|
|
111
111
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
112
|
};
|
|
113
113
|
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
114
|
+
const se_TranslateDocumentCommand = async (input, context) => {
|
|
115
|
+
const headers = sharedHeaders("TranslateDocument");
|
|
116
|
+
let body;
|
|
117
|
+
body = JSON.stringify(se_TranslateDocumentRequest(input, context));
|
|
118
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
119
|
+
};
|
|
120
|
+
exports.se_TranslateDocumentCommand = se_TranslateDocumentCommand;
|
|
114
121
|
const se_TranslateTextCommand = async (input, context) => {
|
|
115
122
|
const headers = sharedHeaders("TranslateText");
|
|
116
123
|
let body;
|
|
@@ -771,6 +778,57 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
771
778
|
});
|
|
772
779
|
}
|
|
773
780
|
};
|
|
781
|
+
const de_TranslateDocumentCommand = async (output, context) => {
|
|
782
|
+
if (output.statusCode >= 300) {
|
|
783
|
+
return de_TranslateDocumentCommandError(output, context);
|
|
784
|
+
}
|
|
785
|
+
const data = await parseBody(output.body, context);
|
|
786
|
+
let contents = {};
|
|
787
|
+
contents = de_TranslateDocumentResponse(data, context);
|
|
788
|
+
const response = {
|
|
789
|
+
$metadata: deserializeMetadata(output),
|
|
790
|
+
...contents,
|
|
791
|
+
};
|
|
792
|
+
return response;
|
|
793
|
+
};
|
|
794
|
+
exports.de_TranslateDocumentCommand = de_TranslateDocumentCommand;
|
|
795
|
+
const de_TranslateDocumentCommandError = async (output, context) => {
|
|
796
|
+
const parsedOutput = {
|
|
797
|
+
...output,
|
|
798
|
+
body: await parseErrorBody(output.body, context),
|
|
799
|
+
};
|
|
800
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
801
|
+
switch (errorCode) {
|
|
802
|
+
case "InternalServerException":
|
|
803
|
+
case "com.amazonaws.translate#InternalServerException":
|
|
804
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
805
|
+
case "InvalidRequestException":
|
|
806
|
+
case "com.amazonaws.translate#InvalidRequestException":
|
|
807
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
808
|
+
case "LimitExceededException":
|
|
809
|
+
case "com.amazonaws.translate#LimitExceededException":
|
|
810
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
811
|
+
case "ResourceNotFoundException":
|
|
812
|
+
case "com.amazonaws.translate#ResourceNotFoundException":
|
|
813
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
814
|
+
case "ServiceUnavailableException":
|
|
815
|
+
case "com.amazonaws.translate#ServiceUnavailableException":
|
|
816
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
817
|
+
case "TooManyRequestsException":
|
|
818
|
+
case "com.amazonaws.translate#TooManyRequestsException":
|
|
819
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
820
|
+
case "UnsupportedLanguagePairException":
|
|
821
|
+
case "com.amazonaws.translate#UnsupportedLanguagePairException":
|
|
822
|
+
throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context);
|
|
823
|
+
default:
|
|
824
|
+
const parsedBody = parsedOutput.body;
|
|
825
|
+
return throwDefaultError({
|
|
826
|
+
output,
|
|
827
|
+
parsedBody,
|
|
828
|
+
errorCode,
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
};
|
|
774
832
|
const de_TranslateTextCommand = async (output, context) => {
|
|
775
833
|
if (output.statusCode >= 300) {
|
|
776
834
|
return de_TranslateTextCommandError(output, context);
|
|
@@ -1066,6 +1124,12 @@ const se_CreateParallelDataRequest = (input, context) => {
|
|
|
1066
1124
|
Tags: smithy_client_1._json,
|
|
1067
1125
|
});
|
|
1068
1126
|
};
|
|
1127
|
+
const se_Document = (input, context) => {
|
|
1128
|
+
return (0, smithy_client_1.take)(input, {
|
|
1129
|
+
Content: context.base64Encoder,
|
|
1130
|
+
ContentType: [],
|
|
1131
|
+
});
|
|
1132
|
+
};
|
|
1069
1133
|
const se_ImportTerminologyRequest = (input, context) => {
|
|
1070
1134
|
return (0, smithy_client_1.take)(input, {
|
|
1071
1135
|
Description: [],
|
|
@@ -1112,6 +1176,15 @@ const se_TextTranslationJobFilter = (input, context) => {
|
|
|
1112
1176
|
SubmittedBeforeTime: (_) => Math.round(_.getTime() / 1000),
|
|
1113
1177
|
});
|
|
1114
1178
|
};
|
|
1179
|
+
const se_TranslateDocumentRequest = (input, context) => {
|
|
1180
|
+
return (0, smithy_client_1.take)(input, {
|
|
1181
|
+
Document: (_) => se_Document(_, context),
|
|
1182
|
+
Settings: smithy_client_1._json,
|
|
1183
|
+
SourceLanguageCode: [],
|
|
1184
|
+
TargetLanguageCode: [],
|
|
1185
|
+
TerminologyNames: smithy_client_1._json,
|
|
1186
|
+
});
|
|
1187
|
+
};
|
|
1115
1188
|
const se_UpdateParallelDataRequest = (input, context) => {
|
|
1116
1189
|
return (0, smithy_client_1.take)(input, {
|
|
1117
1190
|
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
@@ -1246,6 +1319,20 @@ const de_TextTranslationJobPropertiesList = (output, context) => {
|
|
|
1246
1319
|
});
|
|
1247
1320
|
return retVal;
|
|
1248
1321
|
};
|
|
1322
|
+
const de_TranslatedDocument = (output, context) => {
|
|
1323
|
+
return (0, smithy_client_1.take)(output, {
|
|
1324
|
+
Content: context.base64Decoder,
|
|
1325
|
+
});
|
|
1326
|
+
};
|
|
1327
|
+
const de_TranslateDocumentResponse = (output, context) => {
|
|
1328
|
+
return (0, smithy_client_1.take)(output, {
|
|
1329
|
+
AppliedSettings: smithy_client_1._json,
|
|
1330
|
+
AppliedTerminologies: smithy_client_1._json,
|
|
1331
|
+
SourceLanguageCode: smithy_client_1.expectString,
|
|
1332
|
+
TargetLanguageCode: smithy_client_1.expectString,
|
|
1333
|
+
TranslatedDocument: (_) => de_TranslatedDocument(_, context),
|
|
1334
|
+
});
|
|
1335
|
+
};
|
|
1249
1336
|
const de_UpdateParallelDataResponse = (output, context) => {
|
|
1250
1337
|
return (0, smithy_client_1.take)(output, {
|
|
1251
1338
|
LatestUpdateAttemptAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
package/dist-es/Translate.js
CHANGED
|
@@ -14,6 +14,7 @@ import { ListTextTranslationJobsCommand, } from "./commands/ListTextTranslationJ
|
|
|
14
14
|
import { StartTextTranslationJobCommand, } from "./commands/StartTextTranslationJobCommand";
|
|
15
15
|
import { StopTextTranslationJobCommand, } from "./commands/StopTextTranslationJobCommand";
|
|
16
16
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
17
|
+
import { TranslateDocumentCommand, } from "./commands/TranslateDocumentCommand";
|
|
17
18
|
import { TranslateTextCommand, } from "./commands/TranslateTextCommand";
|
|
18
19
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
19
20
|
import { UpdateParallelDataCommand, } from "./commands/UpdateParallelDataCommand";
|
|
@@ -34,6 +35,7 @@ const commands = {
|
|
|
34
35
|
StartTextTranslationJobCommand,
|
|
35
36
|
StopTextTranslationJobCommand,
|
|
36
37
|
TagResourceCommand,
|
|
38
|
+
TranslateDocumentCommand,
|
|
37
39
|
TranslateTextCommand,
|
|
38
40
|
UntagResourceCommand,
|
|
39
41
|
UpdateParallelDataCommand,
|