@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.
Files changed (110) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/Translate.js +2 -0
  3. package/dist-cjs/TranslateClient.js +2 -1
  4. package/dist-cjs/commands/CreateParallelDataCommand.js +2 -1
  5. package/dist-cjs/commands/DeleteParallelDataCommand.js +2 -1
  6. package/dist-cjs/commands/DeleteTerminologyCommand.js +2 -1
  7. package/dist-cjs/commands/DescribeTextTranslationJobCommand.js +2 -1
  8. package/dist-cjs/commands/GetParallelDataCommand.js +2 -1
  9. package/dist-cjs/commands/GetTerminologyCommand.js +2 -1
  10. package/dist-cjs/commands/ImportTerminologyCommand.js +2 -1
  11. package/dist-cjs/commands/ListLanguagesCommand.js +2 -1
  12. package/dist-cjs/commands/ListParallelDataCommand.js +2 -1
  13. package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -1
  14. package/dist-cjs/commands/ListTerminologiesCommand.js +2 -1
  15. package/dist-cjs/commands/ListTextTranslationJobsCommand.js +2 -1
  16. package/dist-cjs/commands/StartTextTranslationJobCommand.js +2 -1
  17. package/dist-cjs/commands/StopTextTranslationJobCommand.js +2 -1
  18. package/dist-cjs/commands/TagResourceCommand.js +2 -1
  19. package/dist-cjs/commands/TranslateDocumentCommand.js +47 -0
  20. package/dist-cjs/commands/TranslateTextCommand.js +2 -1
  21. package/dist-cjs/commands/UntagResourceCommand.js +2 -1
  22. package/dist-cjs/commands/UpdateParallelDataCommand.js +2 -1
  23. package/dist-cjs/commands/index.js +1 -0
  24. package/dist-cjs/endpoint/ruleset.js +3 -3
  25. package/dist-cjs/index.js +2 -2
  26. package/dist-cjs/models/TranslateServiceException.js +2 -1
  27. package/dist-cjs/models/models_0.js +35 -15
  28. package/dist-cjs/protocols/Aws_json1_1.js +88 -1
  29. package/dist-es/Translate.js +2 -0
  30. package/dist-es/TranslateClient.js +1 -0
  31. package/dist-es/commands/CreateParallelDataCommand.js +1 -0
  32. package/dist-es/commands/DeleteParallelDataCommand.js +1 -0
  33. package/dist-es/commands/DeleteTerminologyCommand.js +1 -0
  34. package/dist-es/commands/DescribeTextTranslationJobCommand.js +1 -0
  35. package/dist-es/commands/GetParallelDataCommand.js +1 -0
  36. package/dist-es/commands/GetTerminologyCommand.js +1 -0
  37. package/dist-es/commands/ImportTerminologyCommand.js +1 -0
  38. package/dist-es/commands/ListLanguagesCommand.js +1 -0
  39. package/dist-es/commands/ListParallelDataCommand.js +1 -0
  40. package/dist-es/commands/ListTagsForResourceCommand.js +1 -0
  41. package/dist-es/commands/ListTerminologiesCommand.js +1 -0
  42. package/dist-es/commands/ListTextTranslationJobsCommand.js +1 -0
  43. package/dist-es/commands/StartTextTranslationJobCommand.js +1 -0
  44. package/dist-es/commands/StopTextTranslationJobCommand.js +1 -0
  45. package/dist-es/commands/TagResourceCommand.js +1 -0
  46. package/dist-es/commands/TranslateDocumentCommand.js +43 -0
  47. package/dist-es/commands/TranslateTextCommand.js +1 -0
  48. package/dist-es/commands/UntagResourceCommand.js +1 -0
  49. package/dist-es/commands/UpdateParallelDataCommand.js +1 -0
  50. package/dist-es/commands/index.js +1 -0
  51. package/dist-es/endpoint/ruleset.js +3 -3
  52. package/dist-es/index.js +2 -2
  53. package/dist-es/models/TranslateServiceException.js +1 -0
  54. package/dist-es/models/models_0.js +29 -13
  55. package/dist-es/protocols/Aws_json1_1.js +85 -0
  56. package/dist-types/Translate.d.ts +7 -0
  57. package/dist-types/TranslateClient.d.ts +6 -5
  58. package/dist-types/commands/CreateParallelDataCommand.d.ts +4 -0
  59. package/dist-types/commands/DeleteParallelDataCommand.d.ts +4 -0
  60. package/dist-types/commands/DeleteTerminologyCommand.d.ts +4 -0
  61. package/dist-types/commands/DescribeTextTranslationJobCommand.d.ts +4 -0
  62. package/dist-types/commands/GetParallelDataCommand.d.ts +4 -0
  63. package/dist-types/commands/GetTerminologyCommand.d.ts +4 -0
  64. package/dist-types/commands/ImportTerminologyCommand.d.ts +4 -0
  65. package/dist-types/commands/ListLanguagesCommand.d.ts +4 -0
  66. package/dist-types/commands/ListParallelDataCommand.d.ts +4 -0
  67. package/dist-types/commands/ListTagsForResourceCommand.d.ts +4 -0
  68. package/dist-types/commands/ListTerminologiesCommand.d.ts +4 -0
  69. package/dist-types/commands/ListTextTranslationJobsCommand.d.ts +4 -0
  70. package/dist-types/commands/StartTextTranslationJobCommand.d.ts +5 -1
  71. package/dist-types/commands/StopTextTranslationJobCommand.d.ts +4 -0
  72. package/dist-types/commands/TagResourceCommand.d.ts +4 -0
  73. package/dist-types/commands/TranslateDocumentCommand.d.ts +144 -0
  74. package/dist-types/commands/TranslateTextCommand.d.ts +5 -1
  75. package/dist-types/commands/UntagResourceCommand.d.ts +4 -0
  76. package/dist-types/commands/UpdateParallelDataCommand.d.ts +4 -0
  77. package/dist-types/commands/index.d.ts +1 -0
  78. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  79. package/dist-types/index.d.ts +7 -2
  80. package/dist-types/models/TranslateServiceException.d.ts +1 -0
  81. package/dist-types/models/models_0.d.ts +147 -26
  82. package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
  83. package/dist-types/ts3.4/Translate.d.ts +17 -0
  84. package/dist-types/ts3.4/TranslateClient.d.ts +9 -3
  85. package/dist-types/ts3.4/commands/CreateParallelDataCommand.d.ts +1 -0
  86. package/dist-types/ts3.4/commands/DeleteParallelDataCommand.d.ts +1 -0
  87. package/dist-types/ts3.4/commands/DeleteTerminologyCommand.d.ts +1 -0
  88. package/dist-types/ts3.4/commands/DescribeTextTranslationJobCommand.d.ts +1 -0
  89. package/dist-types/ts3.4/commands/GetParallelDataCommand.d.ts +1 -0
  90. package/dist-types/ts3.4/commands/GetTerminologyCommand.d.ts +1 -0
  91. package/dist-types/ts3.4/commands/ImportTerminologyCommand.d.ts +1 -0
  92. package/dist-types/ts3.4/commands/ListLanguagesCommand.d.ts +1 -0
  93. package/dist-types/ts3.4/commands/ListParallelDataCommand.d.ts +1 -0
  94. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +1 -0
  95. package/dist-types/ts3.4/commands/ListTerminologiesCommand.d.ts +1 -0
  96. package/dist-types/ts3.4/commands/ListTextTranslationJobsCommand.d.ts +1 -0
  97. package/dist-types/ts3.4/commands/StartTextTranslationJobCommand.d.ts +1 -0
  98. package/dist-types/ts3.4/commands/StopTextTranslationJobCommand.d.ts +1 -0
  99. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -0
  100. package/dist-types/ts3.4/commands/TranslateDocumentCommand.d.ts +39 -0
  101. package/dist-types/ts3.4/commands/TranslateTextCommand.d.ts +1 -0
  102. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +1 -0
  103. package/dist-types/ts3.4/commands/UpdateParallelDataCommand.d.ts +1 -0
  104. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  105. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  106. package/dist-types/ts3.4/index.d.ts +2 -2
  107. package/dist-types/ts3.4/models/TranslateServiceException.d.ts +1 -0
  108. package/dist-types/ts3.4/models/models_0.d.ts +39 -8
  109. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
  110. package/package.json +28 -28
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { ListParallelDataRequest, ListParallelDataResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { ListTerminologiesRequest, ListTerminologiesResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { ListTextTranslationJobsRequest, ListTextTranslationJobsResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { StartTextTranslationJobRequest, StartTextTranslationJobResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -101,7 +105,7 @@ export interface StartTextTranslationJobCommandOutput extends StartTextTranslati
101
105
  *
102
106
  * @throws {@link UnsupportedLanguagePairException} (client fault)
103
107
  * <p>Amazon Translate does not support translation from the language of the source text into the requested
104
- * target language. For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/how-to-error-msg.html">Error messages</a>. </p>
108
+ * target language. For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>. </p>
105
109
  *
106
110
  * @throws {@link TranslateServiceException}
107
111
  * <p>Base exception class for all service exceptions from Translate service.</p>
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { StopTextTranslationJobRequest, StopTextTranslationJobResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { TagResourceRequest, TagResourceResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -0,0 +1,144 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { TranslateDocumentRequest, TranslateDocumentResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link TranslateDocumentCommand}.
14
+ */
15
+ export interface TranslateDocumentCommandInput extends TranslateDocumentRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link TranslateDocumentCommand}.
21
+ */
22
+ export interface TranslateDocumentCommandOutput extends TranslateDocumentResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Translates the input document from the source language to the target language.
27
+ * This synchronous operation supports plain text or HTML for the input document.
28
+ *
29
+ * <code>TranslateDocument</code> supports translations from English to any supported language,
30
+ * and from any supported language to English. Therefore, specify either the source language code
31
+ * or the target language code as “en” (English).
32
+ * </p>
33
+ * <p>
34
+ * <code>TranslateDocument</code> does not support language auto-detection. </p>
35
+ * <p> If you set the <code>Formality</code> parameter, the request will fail if the target language does
36
+ * not support formality. For a list of target languages that support formality, see
37
+ * <a href="https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html">Setting formality</a>.
38
+ * </p>
39
+ * @example
40
+ * Use a bare-bones client and the command you need to make an API call.
41
+ * ```javascript
42
+ * import { TranslateClient, TranslateDocumentCommand } from "@aws-sdk/client-translate"; // ES Modules import
43
+ * // const { TranslateClient, TranslateDocumentCommand } = require("@aws-sdk/client-translate"); // CommonJS import
44
+ * const client = new TranslateClient(config);
45
+ * const input = { // TranslateDocumentRequest
46
+ * Document: { // Document
47
+ * Content: "BLOB_VALUE", // required
48
+ * ContentType: "STRING_VALUE", // required
49
+ * },
50
+ * TerminologyNames: [ // ResourceNameList
51
+ * "STRING_VALUE",
52
+ * ],
53
+ * SourceLanguageCode: "STRING_VALUE", // required
54
+ * TargetLanguageCode: "STRING_VALUE", // required
55
+ * Settings: { // TranslationSettings
56
+ * Formality: "FORMAL" || "INFORMAL",
57
+ * Profanity: "MASK",
58
+ * },
59
+ * };
60
+ * const command = new TranslateDocumentCommand(input);
61
+ * const response = await client.send(command);
62
+ * // { // TranslateDocumentResponse
63
+ * // TranslatedDocument: { // TranslatedDocument
64
+ * // Content: "BLOB_VALUE", // required
65
+ * // },
66
+ * // SourceLanguageCode: "STRING_VALUE", // required
67
+ * // TargetLanguageCode: "STRING_VALUE", // required
68
+ * // AppliedTerminologies: [ // AppliedTerminologyList
69
+ * // { // AppliedTerminology
70
+ * // Name: "STRING_VALUE",
71
+ * // Terms: [ // TermList
72
+ * // { // Term
73
+ * // SourceText: "STRING_VALUE",
74
+ * // TargetText: "STRING_VALUE",
75
+ * // },
76
+ * // ],
77
+ * // },
78
+ * // ],
79
+ * // AppliedSettings: { // TranslationSettings
80
+ * // Formality: "FORMAL" || "INFORMAL",
81
+ * // Profanity: "MASK",
82
+ * // },
83
+ * // };
84
+ *
85
+ * ```
86
+ *
87
+ * @param TranslateDocumentCommandInput - {@link TranslateDocumentCommandInput}
88
+ * @returns {@link TranslateDocumentCommandOutput}
89
+ * @see {@link TranslateDocumentCommandInput} for command's `input` shape.
90
+ * @see {@link TranslateDocumentCommandOutput} for command's `response` shape.
91
+ * @see {@link TranslateClientResolvedConfig | config} for TranslateClient's `config` shape.
92
+ *
93
+ * @throws {@link InternalServerException} (server fault)
94
+ * <p>An internal server error occurred. Retry your request.</p>
95
+ *
96
+ * @throws {@link InvalidRequestException} (client fault)
97
+ * <p> The request that you made is not valid. Check your request to determine why it's not
98
+ * valid and then retry the request. </p>
99
+ *
100
+ * @throws {@link LimitExceededException} (client fault)
101
+ * <p>The specified limit has been exceeded. Review your request and retry it with a quantity
102
+ * below the stated limit.</p>
103
+ *
104
+ * @throws {@link ResourceNotFoundException} (client fault)
105
+ * <p>The resource you are looking for has not been found. Review the resource you're looking
106
+ * for and see if a different resource will accomplish your needs before retrying the revised
107
+ * request.</p>
108
+ *
109
+ * @throws {@link ServiceUnavailableException} (server fault)
110
+ * <p>The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your
111
+ * request.</p>
112
+ *
113
+ * @throws {@link TooManyRequestsException} (client fault)
114
+ * <p> You have made too many requests within a short period of time. Wait for a short time and
115
+ * then try your request again.</p>
116
+ *
117
+ * @throws {@link UnsupportedLanguagePairException} (client fault)
118
+ * <p>Amazon Translate does not support translation from the language of the source text into the requested
119
+ * target language. For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>. </p>
120
+ *
121
+ * @throws {@link TranslateServiceException}
122
+ * <p>Base exception class for all service exceptions from Translate service.</p>
123
+ *
124
+ */
125
+ export declare class TranslateDocumentCommand extends $Command<TranslateDocumentCommandInput, TranslateDocumentCommandOutput, TranslateClientResolvedConfig> {
126
+ readonly input: TranslateDocumentCommandInput;
127
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
128
+ /**
129
+ * @public
130
+ */
131
+ constructor(input: TranslateDocumentCommandInput);
132
+ /**
133
+ * @internal
134
+ */
135
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TranslateClientResolvedConfig, options?: __HttpHandlerOptions): Handler<TranslateDocumentCommandInput, TranslateDocumentCommandOutput>;
136
+ /**
137
+ * @internal
138
+ */
139
+ private serialize;
140
+ /**
141
+ * @internal
142
+ */
143
+ private deserialize;
144
+ }
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { TranslateTextRequest, TranslateTextResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -102,7 +106,7 @@ export interface TranslateTextCommandOutput extends TranslateTextResponse, __Met
102
106
  *
103
107
  * @throws {@link UnsupportedLanguagePairException} (client fault)
104
108
  * <p>Amazon Translate does not support translation from the language of the source text into the requested
105
- * target language. For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/how-to-error-msg.html">Error messages</a>. </p>
109
+ * target language. For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>. </p>
106
110
  *
107
111
  * @throws {@link TranslateServiceException}
108
112
  * <p>Base exception class for all service exceptions from Translate service.</p>
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -3,6 +3,10 @@ import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
4
  import { UpdateParallelDataRequest, UpdateParallelDataResponse } from "../models/models_0";
5
5
  import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
6
10
  /**
7
11
  * @public
8
12
  *
@@ -13,6 +13,7 @@ export * from "./ListTextTranslationJobsCommand";
13
13
  export * from "./StartTextTranslationJobCommand";
14
14
  export * from "./StopTextTranslationJobCommand";
15
15
  export * from "./TagResourceCommand";
16
+ export * from "./TranslateDocumentCommand";
16
17
  export * from "./TranslateTextCommand";
17
18
  export * from "./UntagResourceCommand";
18
19
  export * from "./UpdateParallelDataCommand";
@@ -13,7 +13,7 @@ export declare const resolveClientEndpointParameters: <T>(options: T & ClientInp
13
13
  defaultSigningName: string;
14
14
  };
15
15
  export interface EndpointParameters extends __EndpointParameters {
16
- Region: string;
16
+ Region?: string;
17
17
  UseDualStack?: boolean;
18
18
  UseFIPS?: boolean;
19
19
  Endpoint?: string;
@@ -1,6 +1,11 @@
1
- export * from "./Translate";
1
+ /**
2
+ * <p>Provides translation of the input content from the source language to the target language.</p>
3
+ *
4
+ * @packageDocumentation
5
+ */
2
6
  export * from "./TranslateClient";
7
+ export * from "./Translate";
3
8
  export * from "./commands";
4
- export * from "./models";
5
9
  export * from "./pagination";
10
+ export * from "./models";
6
11
  export { TranslateServiceException } from "./models/TranslateServiceException";
@@ -1,4 +1,5 @@
1
1
  import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+ export { __ServiceException, __ServiceExceptionOptions };
2
3
  /**
3
4
  * @public
4
5
  *
@@ -463,8 +463,8 @@ export declare const Profanity: {
463
463
  export type Profanity = (typeof Profanity)[keyof typeof Profanity];
464
464
  /**
465
465
  * @public
466
- * <p>Optional settings that configure the translation output. Use these settings for
467
- * real time translations and asynchronous translation jobs.</p>
466
+ * <p>Settings to configure your translation output, including the option to set the formality
467
+ * level of the output text and the option to mask profane words and phrases.</p>
468
468
  */
469
469
  export interface TranslationSettings {
470
470
  /**
@@ -565,7 +565,7 @@ export interface TextTranslationJobProperties {
565
565
  */
566
566
  DataAccessRoleArn?: string;
567
567
  /**
568
- * <p>Settings that configure the translation output.</p>
568
+ * <p>Settings that modify the translation output.</p>
569
569
  */
570
570
  Settings?: TranslationSettings;
571
571
  }
@@ -1378,7 +1378,7 @@ export interface StartTextTranslationJobResponse {
1378
1378
  /**
1379
1379
  * @public
1380
1380
  * <p>Amazon Translate does not support translation from the language of the source text into the requested
1381
- * target language. For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/how-to-error-msg.html">Error messages</a>. </p>
1381
+ * target language. For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>. </p>
1382
1382
  */
1383
1383
  export declare class UnsupportedLanguagePairException extends __BaseException {
1384
1384
  readonly name: "UnsupportedLanguagePairException";
@@ -1440,6 +1440,122 @@ export interface TagResourceRequest {
1440
1440
  */
1441
1441
  export interface TagResourceResponse {
1442
1442
  }
1443
+ /**
1444
+ * @public
1445
+ * <p>The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your
1446
+ * request.</p>
1447
+ */
1448
+ export declare class ServiceUnavailableException extends __BaseException {
1449
+ readonly name: "ServiceUnavailableException";
1450
+ readonly $fault: "server";
1451
+ Message?: string;
1452
+ /**
1453
+ * @internal
1454
+ */
1455
+ constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
1456
+ }
1457
+ /**
1458
+ * @public
1459
+ * <p>The content and content type of a document.</p>
1460
+ */
1461
+ export interface Document {
1462
+ /**
1463
+ * <p>The <code>Content</code>field type is Binary large object (blob).
1464
+ * This object contains the document content converted into base64-encoded binary data.
1465
+ * If you use one of the AWS SDKs, the SDK performs the
1466
+ * Base64-encoding on this field before sending the request.
1467
+ * </p>
1468
+ */
1469
+ Content: Uint8Array | undefined;
1470
+ /**
1471
+ * <p>Describes the format of the document. You can specify one of the following:</p>
1472
+ * <ul>
1473
+ * <li>
1474
+ * <p>text/html - The input data consists of HTML content.
1475
+ * Amazon Translate translates only the text in the HTML element.</p>
1476
+ * </li>
1477
+ * <li>
1478
+ * <p>text/plain - The input data consists of unformatted text.
1479
+ * Amazon Translate translates every character in the content. </p>
1480
+ * </li>
1481
+ * </ul>
1482
+ */
1483
+ ContentType: string | undefined;
1484
+ }
1485
+ /**
1486
+ * @public
1487
+ */
1488
+ export interface TranslateDocumentRequest {
1489
+ /**
1490
+ * <p>The content and content type for the document to be translated. The document size must not exceed 100 KB.</p>
1491
+ */
1492
+ Document: Document | undefined;
1493
+ /**
1494
+ * <p>The name of a terminology list file to add to the translation job. This file
1495
+ * provides source terms and the desired translation for each term.
1496
+ * A terminology list can contain a maximum of 256 terms.
1497
+ * You can use one custom terminology resource in your translation request.</p>
1498
+ * <p>Use the <a>ListTerminologies</a> operation
1499
+ * to get the available terminology lists.</p>
1500
+ * <p>For more information about custom terminology lists, see <a href="https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html">Custom terminology</a>.</p>
1501
+ */
1502
+ TerminologyNames?: string[];
1503
+ /**
1504
+ * <p>The language code for the language of the source text. Do not use <code>auto</code>, because
1505
+ * <code>TranslateDocument</code> does not support language auto-detection.
1506
+ * For a list of supported language codes, see
1507
+ * <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
1508
+ */
1509
+ SourceLanguageCode: string | undefined;
1510
+ /**
1511
+ * <p>The language code requested for the translated document.
1512
+ * For a list of supported language codes, see
1513
+ * <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
1514
+ */
1515
+ TargetLanguageCode: string | undefined;
1516
+ /**
1517
+ * <p>Settings to configure your translation output, including the option to set the formality
1518
+ * level of the output text and the option to mask profane words and phrases.</p>
1519
+ */
1520
+ Settings?: TranslationSettings;
1521
+ }
1522
+ /**
1523
+ * @public
1524
+ * <p>The translated content.</p>
1525
+ */
1526
+ export interface TranslatedDocument {
1527
+ /**
1528
+ * <p>The document containing the translated content.</p>
1529
+ */
1530
+ Content: Uint8Array | undefined;
1531
+ }
1532
+ /**
1533
+ * @public
1534
+ */
1535
+ export interface TranslateDocumentResponse {
1536
+ /**
1537
+ * <p>The document containing the translated content. The document format matches the source document format.</p>
1538
+ */
1539
+ TranslatedDocument: TranslatedDocument | undefined;
1540
+ /**
1541
+ * <p>The language code of the source document.</p>
1542
+ */
1543
+ SourceLanguageCode: string | undefined;
1544
+ /**
1545
+ * <p>The language code of the translated document. </p>
1546
+ */
1547
+ TargetLanguageCode: string | undefined;
1548
+ /**
1549
+ * <p>The names of the custom terminologies applied to the input text by Amazon Translate to produce the
1550
+ * translated text document.</p>
1551
+ */
1552
+ AppliedTerminologies?: AppliedTerminology[];
1553
+ /**
1554
+ * <p>Settings to configure your translation output, including the option to set the formality
1555
+ * level of the output text and the option to mask profane words and phrases.</p>
1556
+ */
1557
+ AppliedSettings?: TranslationSettings;
1558
+ }
1443
1559
  /**
1444
1560
  * @public
1445
1561
  * <p>The confidence that Amazon Comprehend accurately detected the source language is low. If a
@@ -1460,20 +1576,6 @@ export declare class DetectedLanguageLowConfidenceException extends __BaseExcept
1460
1576
  */
1461
1577
  constructor(opts: __ExceptionOptionType<DetectedLanguageLowConfidenceException, __BaseException>);
1462
1578
  }
1463
- /**
1464
- * @public
1465
- * <p>The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your
1466
- * request.</p>
1467
- */
1468
- export declare class ServiceUnavailableException extends __BaseException {
1469
- readonly name: "ServiceUnavailableException";
1470
- readonly $fault: "server";
1471
- Message?: string;
1472
- /**
1473
- * @internal
1474
- */
1475
- constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
1476
- }
1477
1579
  /**
1478
1580
  * @public
1479
1581
  * <p> The size of the text you submitted exceeds the size limit. Reduce the size of the text or
@@ -1498,14 +1600,17 @@ export interface TranslateTextRequest {
1498
1600
  */
1499
1601
  Text: string | undefined;
1500
1602
  /**
1501
- * <p>The name of the terminology list file to be used in the TranslateText request. You can use
1502
- * 1 terminology list at most in a <code>TranslateText</code> request. Terminology lists can
1503
- * contain a maximum of 256 terms.</p>
1603
+ * <p>The name of a terminology list file to add to the translation job. This file
1604
+ * provides source terms and the desired translation for each term.
1605
+ * A terminology list can contain a maximum of 256 terms.
1606
+ * You can use one custom terminology resource in your translation request.</p>
1607
+ * <p>Use the <a>ListTerminologies</a> operation
1608
+ * to get the available terminology lists.</p>
1609
+ * <p>For more information about custom terminology lists, see <a href="https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html">Custom terminology</a>.</p>
1504
1610
  */
1505
1611
  TerminologyNames?: string[];
1506
1612
  /**
1507
- * <p>The language code for the language of the source text. The language must be a language
1508
- * supported by Amazon Translate. For a list of language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
1613
+ * <p>The language code for the language of the source text. For a list of language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
1509
1614
  * <p>To have Amazon Translate determine the source language of your text, you can specify
1510
1615
  * <code>auto</code> in the <code>SourceLanguageCode</code> field. If you specify
1511
1616
  * <code>auto</code>, Amazon Translate will call <a href="https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html">Amazon
@@ -1517,8 +1622,8 @@ export interface TranslateTextRequest {
1517
1622
  */
1518
1623
  SourceLanguageCode: string | undefined;
1519
1624
  /**
1520
- * <p>The language code requested for the language of the target text. The language must be a
1521
- * language supported by Amazon Translate.</p>
1625
+ * <p>The language code requested for the language of the target text.
1626
+ * For a list of language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
1522
1627
  */
1523
1628
  TargetLanguageCode: string | undefined;
1524
1629
  /**
@@ -1549,7 +1654,7 @@ export interface TranslateTextResponse {
1549
1654
  */
1550
1655
  AppliedTerminologies?: AppliedTerminology[];
1551
1656
  /**
1552
- * <p>Settings that configure the translation output.</p>
1657
+ * <p>Optional settings that modify the translation output.</p>
1553
1658
  */
1554
1659
  AppliedSettings?: TranslationSettings;
1555
1660
  }
@@ -1628,3 +1733,19 @@ export declare const TerminologyDataFilterSensitiveLog: (obj: TerminologyData) =
1628
1733
  * @internal
1629
1734
  */
1630
1735
  export declare const ImportTerminologyRequestFilterSensitiveLog: (obj: ImportTerminologyRequest) => any;
1736
+ /**
1737
+ * @internal
1738
+ */
1739
+ export declare const DocumentFilterSensitiveLog: (obj: Document) => any;
1740
+ /**
1741
+ * @internal
1742
+ */
1743
+ export declare const TranslateDocumentRequestFilterSensitiveLog: (obj: TranslateDocumentRequest) => any;
1744
+ /**
1745
+ * @internal
1746
+ */
1747
+ export declare const TranslatedDocumentFilterSensitiveLog: (obj: TranslatedDocument) => any;
1748
+ /**
1749
+ * @internal
1750
+ */
1751
+ export declare const TranslateDocumentResponseFilterSensitiveLog: (obj: TranslateDocumentResponse) => any;
@@ -15,6 +15,7 @@ import { ListTextTranslationJobsCommandInput, ListTextTranslationJobsCommandOutp
15
15
  import { StartTextTranslationJobCommandInput, StartTextTranslationJobCommandOutput } from "../commands/StartTextTranslationJobCommand";
16
16
  import { StopTextTranslationJobCommandInput, StopTextTranslationJobCommandOutput } from "../commands/StopTextTranslationJobCommand";
17
17
  import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
18
+ import { TranslateDocumentCommandInput, TranslateDocumentCommandOutput } from "../commands/TranslateDocumentCommand";
18
19
  import { TranslateTextCommandInput, TranslateTextCommandOutput } from "../commands/TranslateTextCommand";
19
20
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
20
21
  import { UpdateParallelDataCommandInput, UpdateParallelDataCommandOutput } from "../commands/UpdateParallelDataCommand";
@@ -78,6 +79,10 @@ export declare const se_StopTextTranslationJobCommand: (input: StopTextTranslati
78
79
  * serializeAws_json1_1TagResourceCommand
79
80
  */
80
81
  export declare const se_TagResourceCommand: (input: TagResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
82
+ /**
83
+ * serializeAws_json1_1TranslateDocumentCommand
84
+ */
85
+ export declare const se_TranslateDocumentCommand: (input: TranslateDocumentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
81
86
  /**
82
87
  * serializeAws_json1_1TranslateTextCommand
83
88
  */
@@ -150,6 +155,10 @@ export declare const de_StopTextTranslationJobCommand: (output: __HttpResponse,
150
155
  * deserializeAws_json1_1TagResourceCommand
151
156
  */
152
157
  export declare const de_TagResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<TagResourceCommandOutput>;
158
+ /**
159
+ * deserializeAws_json1_1TranslateDocumentCommand
160
+ */
161
+ export declare const de_TranslateDocumentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<TranslateDocumentCommandOutput>;
153
162
  /**
154
163
  * deserializeAws_json1_1TranslateTextCommand
155
164
  */
@@ -59,6 +59,10 @@ import {
59
59
  TagResourceCommandInput,
60
60
  TagResourceCommandOutput,
61
61
  } from "./commands/TagResourceCommand";
62
+ import {
63
+ TranslateDocumentCommandInput,
64
+ TranslateDocumentCommandOutput,
65
+ } from "./commands/TranslateDocumentCommand";
62
66
  import {
63
67
  TranslateTextCommandInput,
64
68
  TranslateTextCommandOutput,
@@ -268,6 +272,19 @@ export interface Translate {
268
272
  options: __HttpHandlerOptions,
269
273
  cb: (err: any, data?: TagResourceCommandOutput) => void
270
274
  ): void;
275
+ translateDocument(
276
+ args: TranslateDocumentCommandInput,
277
+ options?: __HttpHandlerOptions
278
+ ): Promise<TranslateDocumentCommandOutput>;
279
+ translateDocument(
280
+ args: TranslateDocumentCommandInput,
281
+ cb: (err: any, data?: TranslateDocumentCommandOutput) => void
282
+ ): void;
283
+ translateDocument(
284
+ args: TranslateDocumentCommandInput,
285
+ options: __HttpHandlerOptions,
286
+ cb: (err: any, data?: TranslateDocumentCommandOutput) => void
287
+ ): void;
271
288
  translateText(
272
289
  args: TranslateTextCommandInput,
273
290
  options?: __HttpHandlerOptions