@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.
Files changed (33) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist-cjs/Translate.js +15 -0
  3. package/dist-cjs/commands/ListLanguagesCommand.js +36 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +48 -2
  6. package/dist-cjs/pagination/ListLanguagesPaginator.js +36 -0
  7. package/dist-cjs/pagination/index.js +1 -0
  8. package/dist-cjs/protocols/Aws_json1_1.js +267 -194
  9. package/dist-es/Translate.js +15 -0
  10. package/dist-es/commands/ListLanguagesCommand.js +39 -0
  11. package/dist-es/commands/index.js +1 -0
  12. package/dist-es/models/models_0.js +39 -0
  13. package/dist-es/pagination/ListLanguagesPaginator.js +75 -0
  14. package/dist-es/pagination/index.js +1 -0
  15. package/dist-es/protocols/Aws_json1_1.js +254 -167
  16. package/dist-types/Translate.d.ts +15 -8
  17. package/dist-types/TranslateClient.d.ts +3 -2
  18. package/dist-types/commands/ImportTerminologyCommand.d.ts +8 -8
  19. package/dist-types/commands/ListLanguagesCommand.d.ts +35 -0
  20. package/dist-types/commands/index.d.ts +1 -0
  21. package/dist-types/models/models_0.d.ts +144 -32
  22. package/dist-types/pagination/ListLanguagesPaginator.d.ts +4 -0
  23. package/dist-types/pagination/index.d.ts +1 -0
  24. package/dist-types/protocols/Aws_json1_1.d.ts +3 -0
  25. package/dist-types/ts3.4/Translate.d.ts +5 -0
  26. package/dist-types/ts3.4/TranslateClient.d.ts +3 -2
  27. package/dist-types/ts3.4/commands/ListLanguagesCommand.d.ts +17 -0
  28. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  29. package/dist-types/ts3.4/models/models_0.d.ts +58 -0
  30. package/dist-types/ts3.4/pagination/ListLanguagesPaginator.d.ts +4 -0
  31. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  32. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +3 -0
  33. package/package.json +26 -26
@@ -6,6 +6,7 @@ import { DescribeTextTranslationJobCommandInput, DescribeTextTranslationJobComma
6
6
  import { GetParallelDataCommandInput, GetParallelDataCommandOutput } from "./commands/GetParallelDataCommand";
7
7
  import { GetTerminologyCommandInput, GetTerminologyCommandOutput } from "./commands/GetTerminologyCommand";
8
8
  import { ImportTerminologyCommandInput, ImportTerminologyCommandOutput } from "./commands/ImportTerminologyCommand";
9
+ import { ListLanguagesCommandInput, ListLanguagesCommandOutput } from "./commands/ListLanguagesCommand";
9
10
  import { ListParallelDataCommandInput, ListParallelDataCommandOutput } from "./commands/ListParallelDataCommand";
10
11
  import { ListTerminologiesCommandInput, ListTerminologiesCommandOutput } from "./commands/ListTerminologiesCommand";
11
12
  import { ListTextTranslationJobsCommandInput, ListTextTranslationJobsCommandOutput } from "./commands/ListTextTranslationJobsCommand";
@@ -60,18 +61,24 @@ export declare class Translate extends TranslateClient {
60
61
  getTerminology(args: GetTerminologyCommandInput, cb: (err: any, data?: GetTerminologyCommandOutput) => void): void;
61
62
  getTerminology(args: GetTerminologyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetTerminologyCommandOutput) => void): void;
62
63
  /**
63
- * <p>Creates or updates a custom terminology, depending on whether or not one already exists
64
- * for the given terminology name. Importing a terminology with the same name as an existing one
65
- * will merge the terminologies based on the chosen merge strategy. Currently, the only supported
66
- * merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing
67
- * terminology of the same name.</p>
68
- * <p>If you import a terminology that overwrites an existing one, the new terminology take up
69
- * to 10 minutes to fully propagate and be available for use in a translation due to cache
70
- * policies with the DataPlane service that performs the translations.</p>
64
+ * <p>Creates or updates a custom terminology, depending on whether one already exists for the
65
+ * given terminology name. Importing a terminology with the same name as an existing one will
66
+ * merge the terminologies based on the chosen merge strategy. The only supported merge strategy
67
+ * is OVERWRITE, where the imported terminology overwrites the existing terminology of the same
68
+ * name.</p>
69
+ * <p>If you import a terminology that overwrites an existing one, the new terminology takes up
70
+ * to 10 minutes to fully propagate. After that, translations have access to the new
71
+ * terminology.</p>
71
72
  */
72
73
  importTerminology(args: ImportTerminologyCommandInput, options?: __HttpHandlerOptions): Promise<ImportTerminologyCommandOutput>;
73
74
  importTerminology(args: ImportTerminologyCommandInput, cb: (err: any, data?: ImportTerminologyCommandOutput) => void): void;
74
75
  importTerminology(args: ImportTerminologyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ImportTerminologyCommandOutput) => void): void;
76
+ /**
77
+ * <p>Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.</p>
78
+ */
79
+ listLanguages(args: ListLanguagesCommandInput, options?: __HttpHandlerOptions): Promise<ListLanguagesCommandOutput>;
80
+ listLanguages(args: ListLanguagesCommandInput, cb: (err: any, data?: ListLanguagesCommandOutput) => void): void;
81
+ listLanguages(args: ListLanguagesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListLanguagesCommandOutput) => void): void;
75
82
  /**
76
83
  * <p>Provides a list of your parallel data resources in Amazon Translate.</p>
77
84
  */
@@ -13,6 +13,7 @@ import { DescribeTextTranslationJobCommandInput, DescribeTextTranslationJobComma
13
13
  import { GetParallelDataCommandInput, GetParallelDataCommandOutput } from "./commands/GetParallelDataCommand";
14
14
  import { GetTerminologyCommandInput, GetTerminologyCommandOutput } from "./commands/GetTerminologyCommand";
15
15
  import { ImportTerminologyCommandInput, ImportTerminologyCommandOutput } from "./commands/ImportTerminologyCommand";
16
+ import { ListLanguagesCommandInput, ListLanguagesCommandOutput } from "./commands/ListLanguagesCommand";
16
17
  import { ListParallelDataCommandInput, ListParallelDataCommandOutput } from "./commands/ListParallelDataCommand";
17
18
  import { ListTerminologiesCommandInput, ListTerminologiesCommandOutput } from "./commands/ListTerminologiesCommand";
18
19
  import { ListTextTranslationJobsCommandInput, ListTextTranslationJobsCommandOutput } from "./commands/ListTextTranslationJobsCommand";
@@ -20,8 +21,8 @@ import { StartTextTranslationJobCommandInput, StartTextTranslationJobCommandOutp
20
21
  import { StopTextTranslationJobCommandInput, StopTextTranslationJobCommandOutput } from "./commands/StopTextTranslationJobCommand";
21
22
  import { TranslateTextCommandInput, TranslateTextCommandOutput } from "./commands/TranslateTextCommand";
22
23
  import { UpdateParallelDataCommandInput, UpdateParallelDataCommandOutput } from "./commands/UpdateParallelDataCommand";
23
- export declare type ServiceInputTypes = CreateParallelDataCommandInput | DeleteParallelDataCommandInput | DeleteTerminologyCommandInput | DescribeTextTranslationJobCommandInput | GetParallelDataCommandInput | GetTerminologyCommandInput | ImportTerminologyCommandInput | ListParallelDataCommandInput | ListTerminologiesCommandInput | ListTextTranslationJobsCommandInput | StartTextTranslationJobCommandInput | StopTextTranslationJobCommandInput | TranslateTextCommandInput | UpdateParallelDataCommandInput;
24
- export declare type ServiceOutputTypes = CreateParallelDataCommandOutput | DeleteParallelDataCommandOutput | DeleteTerminologyCommandOutput | DescribeTextTranslationJobCommandOutput | GetParallelDataCommandOutput | GetTerminologyCommandOutput | ImportTerminologyCommandOutput | ListParallelDataCommandOutput | ListTerminologiesCommandOutput | ListTextTranslationJobsCommandOutput | StartTextTranslationJobCommandOutput | StopTextTranslationJobCommandOutput | TranslateTextCommandOutput | UpdateParallelDataCommandOutput;
24
+ export declare type ServiceInputTypes = CreateParallelDataCommandInput | DeleteParallelDataCommandInput | DeleteTerminologyCommandInput | DescribeTextTranslationJobCommandInput | GetParallelDataCommandInput | GetTerminologyCommandInput | ImportTerminologyCommandInput | ListLanguagesCommandInput | ListParallelDataCommandInput | ListTerminologiesCommandInput | ListTextTranslationJobsCommandInput | StartTextTranslationJobCommandInput | StopTextTranslationJobCommandInput | TranslateTextCommandInput | UpdateParallelDataCommandInput;
25
+ export declare type ServiceOutputTypes = CreateParallelDataCommandOutput | DeleteParallelDataCommandOutput | DeleteTerminologyCommandOutput | DescribeTextTranslationJobCommandOutput | GetParallelDataCommandOutput | GetTerminologyCommandOutput | ImportTerminologyCommandOutput | ListLanguagesCommandOutput | ListParallelDataCommandOutput | ListTerminologiesCommandOutput | ListTextTranslationJobsCommandOutput | StartTextTranslationJobCommandOutput | StopTextTranslationJobCommandOutput | TranslateTextCommandOutput | UpdateParallelDataCommandOutput;
25
26
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
26
27
  /**
27
28
  * The HTTP handler to use. Fetch in browser and Https in Nodejs.
@@ -7,14 +7,14 @@ export interface ImportTerminologyCommandInput extends ImportTerminologyRequest
7
7
  export interface ImportTerminologyCommandOutput extends ImportTerminologyResponse, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>Creates or updates a custom terminology, depending on whether or not one already exists
11
- * for the given terminology name. Importing a terminology with the same name as an existing one
12
- * will merge the terminologies based on the chosen merge strategy. Currently, the only supported
13
- * merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing
14
- * terminology of the same name.</p>
15
- * <p>If you import a terminology that overwrites an existing one, the new terminology take up
16
- * to 10 minutes to fully propagate and be available for use in a translation due to cache
17
- * policies with the DataPlane service that performs the translations.</p>
10
+ * <p>Creates or updates a custom terminology, depending on whether one already exists for the
11
+ * given terminology name. Importing a terminology with the same name as an existing one will
12
+ * merge the terminologies based on the chosen merge strategy. The only supported merge strategy
13
+ * is OVERWRITE, where the imported terminology overwrites the existing terminology of the same
14
+ * name.</p>
15
+ * <p>If you import a terminology that overwrites an existing one, the new terminology takes up
16
+ * to 10 minutes to fully propagate. After that, translations have access to the new
17
+ * terminology.</p>
18
18
  * @example
19
19
  * Use a bare-bones client and the command you need to make an API call.
20
20
  * ```javascript
@@ -0,0 +1,35 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { ListLanguagesRequest, ListLanguagesResponse } from "../models/models_0";
4
+ import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
5
+ export interface ListLanguagesCommandInput extends ListLanguagesRequest {
6
+ }
7
+ export interface ListLanguagesCommandOutput extends ListLanguagesResponse, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.</p>
11
+ * @example
12
+ * Use a bare-bones client and the command you need to make an API call.
13
+ * ```javascript
14
+ * import { TranslateClient, ListLanguagesCommand } from "@aws-sdk/client-translate"; // ES Modules import
15
+ * // const { TranslateClient, ListLanguagesCommand } = require("@aws-sdk/client-translate"); // CommonJS import
16
+ * const client = new TranslateClient(config);
17
+ * const command = new ListLanguagesCommand(input);
18
+ * const response = await client.send(command);
19
+ * ```
20
+ *
21
+ * @see {@link ListLanguagesCommandInput} for command's `input` shape.
22
+ * @see {@link ListLanguagesCommandOutput} for command's `response` shape.
23
+ * @see {@link TranslateClientResolvedConfig | config} for TranslateClient's `config` shape.
24
+ *
25
+ */
26
+ export declare class ListLanguagesCommand extends $Command<ListLanguagesCommandInput, ListLanguagesCommandOutput, TranslateClientResolvedConfig> {
27
+ readonly input: ListLanguagesCommandInput;
28
+ constructor(input: ListLanguagesCommandInput);
29
+ /**
30
+ * @internal
31
+ */
32
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TranslateClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListLanguagesCommandInput, ListLanguagesCommandOutput>;
33
+ private serialize;
34
+ private deserialize;
35
+ }
@@ -5,6 +5,7 @@ export * from "./DescribeTextTranslationJobCommand";
5
5
  export * from "./GetParallelDataCommand";
6
6
  export * from "./GetTerminologyCommand";
7
7
  export * from "./ImportTerminologyCommand";
8
+ export * from "./ListLanguagesCommand";
8
9
  export * from "./ListParallelDataCommand";
9
10
  export * from "./ListTerminologiesCommand";
10
11
  export * from "./ListTextTranslationJobsCommand";
@@ -170,8 +170,8 @@ export declare class InternalServerException extends __BaseException {
170
170
  constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
171
171
  }
172
172
  /**
173
- * <p>The value of the parameter is invalid. Review the value of the parameter you are using to
174
- * correct it, and then retry your operation.</p>
173
+ * <p>The value of the parameter is not valid. Review the value of the parameter you are using
174
+ * to correct it, and then retry your operation.</p>
175
175
  */
176
176
  export declare class InvalidParameterValueException extends __BaseException {
177
177
  readonly name: "InvalidParameterValueException";
@@ -183,8 +183,8 @@ export declare class InvalidParameterValueException extends __BaseException {
183
183
  constructor(opts: __ExceptionOptionType<InvalidParameterValueException, __BaseException>);
184
184
  }
185
185
  /**
186
- * <p> The request that you made is invalid. Check your request to determine why it's invalid
187
- * and then retry the request. </p>
186
+ * <p> The request that you made is not valid. Check your request to determine why it's not
187
+ * valid and then retry the request. </p>
188
188
  */
189
189
  export declare class InvalidRequestException extends __BaseException {
190
190
  readonly name: "InvalidRequestException";
@@ -306,8 +306,15 @@ export declare namespace DescribeTextTranslationJobRequest {
306
306
  */
307
307
  export interface InputDataConfig {
308
308
  /**
309
- * <p>The URI of the AWS S3 folder that contains the input file. The folder must be in the
310
- * same Region as the API endpoint you are calling.</p>
309
+ * <p>The URI of the AWS S3 folder that contains the input files. Amazon Translate translates all the
310
+ * files in the folder. The folder must be in the same Region as the API endpoint you are
311
+ * calling.</p>
312
+ * <note>
313
+ * <p>The URI can also point to a single input document, or it can provide the prefix for a collection of
314
+ * input documents. For example. if you use the URI <code>S3://bucketName/prefix</code> and the
315
+ * prefix is a single file, Amazon Translate uses that files as input. If more than one file begins with the
316
+ * prefix, Amazon Translate uses all of them as input.</p>
317
+ * </note>
311
318
  */
312
319
  S3Uri: string | undefined;
313
320
  /**
@@ -426,6 +433,18 @@ export declare enum Profanity {
426
433
  * <p>Settings that configure the translation output.</p>
427
434
  */
428
435
  export interface TranslationSettings {
436
+ /**
437
+ * <p>You can optionally specify the desired level of
438
+ * formality for real-time translations to supported target languages. The formality
439
+ * setting controls the level of formal language usage (also known as <a href="https://en.wikipedia.org/wiki/Register_(sociolinguistics)">register</a>) in the
440
+ * translation output. You can set the value to informal or formal. If you don't specify a value for
441
+ * formality, or if the target language doesn't support formality, the translation will
442
+ * ignore the formality setting.</p>
443
+ * <p>Note that asynchronous translation jobs don't support formality. If you provide a value
444
+ * for formality, the <code>StartTextTranslationJob</code> API throws an exception (InvalidRequestException).</p>
445
+ * <p>For target languages that support formality, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is.html">Supported
446
+ * Languages and Language Codes in the Amazon Translate Developer Guide</a>.</p>
447
+ */
429
448
  Formality?: Formality | string;
430
449
  /**
431
450
  * <p>Enable the profanity setting if you want Amazon Translate to mask profane words and
@@ -433,8 +452,8 @@ export interface TranslationSettings {
433
452
  * <p>To mask profane words and phrases, Amazon Translate replaces them with the grawlix string
434
453
  * “?$#@$“. This 5-character sequence is used for each profane word or phrase, regardless of the
435
454
  * length or number of words.</p>
436
- * <p>Amazon Translate does not detect profanity in all of its supported languages. For
437
- * languages that support profanity detection, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is.html#what-is-languages">Supported
455
+ * <p>Amazon Translate doesn't detect profanity in all of its supported languages. For languages
456
+ * that support profanity detection, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is.html">Supported
438
457
  * Languages and Language Codes in the Amazon Translate Developer Guide</a>.</p>
439
458
  */
440
459
  Profanity?: Profanity | string;
@@ -559,7 +578,7 @@ export interface ParallelDataDataLocation {
559
578
  RepositoryType: string | undefined;
560
579
  /**
561
580
  * <p>The Amazon S3 location of the parallel data input file. The location is returned as a
562
- * presigned URL to that has a 30 minute expiration.</p>
581
+ * presigned URL to that has a 30-minute expiration.</p>
563
582
  *
564
583
  * <important>
565
584
  * <p>Amazon Translate doesn't scan all input files for the risk of CSV injection
@@ -672,8 +691,8 @@ export interface GetParallelDataResponse {
672
691
  ParallelDataProperties?: ParallelDataProperties;
673
692
  /**
674
693
  * <p>The Amazon S3 location of the most recent parallel data input file that was successfully
675
- * imported into Amazon Translate. The location is returned as a presigned URL that has a 30
676
- * minute expiration.</p>
694
+ * imported into Amazon Translate. The location is returned as a presigned URL that has a
695
+ * 30-minute expiration.</p>
677
696
  *
678
697
  * <important>
679
698
  * <p>Amazon Translate doesn't scan all input files for the risk of CSV injection
@@ -689,14 +708,14 @@ export interface GetParallelDataResponse {
689
708
  /**
690
709
  * <p>The Amazon S3 location of a file that provides any errors or warnings that were produced
691
710
  * by your input file. This file was created when Amazon Translate attempted to create a parallel
692
- * data resource. The location is returned as a presigned URL to that has a 30 minute
711
+ * data resource. The location is returned as a presigned URL to that has a 30-minute
693
712
  * expiration.</p>
694
713
  */
695
714
  AuxiliaryDataLocation?: ParallelDataDataLocation;
696
715
  /**
697
716
  * <p>The Amazon S3 location of a file that provides any errors or warnings that were produced
698
717
  * by your input file. This file was created when Amazon Translate attempted to update a parallel
699
- * data resource. The location is returned as a presigned URL to that has a 30 minute
718
+ * data resource. The location is returned as a presigned URL to that has a 30-minute
700
719
  * expiration.</p>
701
720
  */
702
721
  LatestUpdateAttemptAuxiliaryDataLocation?: ParallelDataDataLocation;
@@ -719,11 +738,11 @@ export interface GetTerminologyRequest {
719
738
  Name: string | undefined;
720
739
  /**
721
740
  * <p>The data format of the custom terminology being retrieved.</p>
722
- * <p>If you don't specify this parameter, Amazon Translate returns a file that has the same
723
- * format as the file that was imported to create the terminology. </p>
741
+ * <p>If you don't specify this parameter, Amazon Translate returns a file with the same format
742
+ * as the file that was imported to create the terminology. </p>
724
743
  * <p>If you specify this parameter when you retrieve a multi-directional terminology resource,
725
- * you must specify the same format as that of the input file that was imported to create it.
726
- * Otherwise, Amazon Translate throws an error.</p>
744
+ * you must specify the same format as the input file that was imported to create it. Otherwise,
745
+ * Amazon Translate throws an error.</p>
727
746
  */
728
747
  TerminologyDataFormat?: TerminologyDataFormat | string;
729
748
  }
@@ -744,7 +763,7 @@ export interface TerminologyDataLocation {
744
763
  /**
745
764
  * <p>The Amazon S3 location of the most recent custom terminology input file that was
746
765
  * successfully imported into Amazon Translate. The location is returned as a presigned URL that
747
- * has a 30 minute expiration.</p>
766
+ * has a 30-minute expiration .</p>
748
767
  *
749
768
  * <important>
750
769
  * <p>Amazon Translate doesn't scan all input files for the risk of CSV injection
@@ -858,7 +877,7 @@ export interface GetTerminologyResponse {
858
877
  /**
859
878
  * <p>The Amazon S3 location of the most recent custom terminology input file that was
860
879
  * successfully imported into Amazon Translate. The location is returned as a presigned URL that
861
- * has a 30 minute expiration.</p>
880
+ * has a 30-minute expiration.</p>
862
881
  *
863
882
  * <important>
864
883
  * <p>Amazon Translate doesn't scan all input files for the risk of CSV injection
@@ -874,7 +893,7 @@ export interface GetTerminologyResponse {
874
893
  /**
875
894
  * <p>The Amazon S3 location of a file that provides any errors or warnings that were produced
876
895
  * by your input file. This file was created when Amazon Translate attempted to create a
877
- * terminology resource. The location is returned as a presigned URL to that has a 30 minute
896
+ * terminology resource. The location is returned as a presigned URL to that has a 30-minute
878
897
  * expiration.</p>
879
898
  */
880
899
  AuxiliaryDataLocation?: TerminologyDataLocation;
@@ -889,7 +908,8 @@ export declare enum MergeStrategy {
889
908
  OVERWRITE = "OVERWRITE"
890
909
  }
891
910
  /**
892
- * <p>The data associated with the custom terminology.</p>
911
+ * <p>The data associated with the custom terminology. For information about the custom terminology file, see <a href="https://docs.aws.amazon.com/translate/latest/dg/creating-custom-terminology.html">
912
+ * Creating a Custom Terminology</a>.</p>
893
913
  */
894
914
  export interface TerminologyData {
895
915
  /**
@@ -915,9 +935,9 @@ export interface TerminologyData {
915
935
  * <dd>
916
936
  * <p>Any language in the terminology resource can be the source language or a target
917
937
  * language. A single multi-directional terminology resource can be used for jobs that
918
- * translate different language pairs. For example, if the terminology contains terms in
919
- * English and Spanish, then it can be used for jobs that translate English to Spanish and
920
- * jobs that translate Spanish to English.</p>
938
+ * translate different language pairs. For example, if the terminology contains English and
939
+ * Spanish terms, it can be used for jobs that translate English to Spanish and Spanish to
940
+ * English.</p>
921
941
  * </dd>
922
942
  * </dl>
923
943
  * <p>When you create a custom terminology resource without specifying the directionality, it
@@ -980,6 +1000,95 @@ export declare namespace ImportTerminologyResponse {
980
1000
  */
981
1001
  const filterSensitiveLog: (obj: ImportTerminologyResponse) => any;
982
1002
  }
1003
+ export declare enum DisplayLanguageCode {
1004
+ DE = "de",
1005
+ EN = "en",
1006
+ ES = "es",
1007
+ FR = "fr",
1008
+ IT = "it",
1009
+ JA = "ja",
1010
+ KO = "ko",
1011
+ PT = "pt",
1012
+ ZH = "zh",
1013
+ ZH_TW = "zh-TW"
1014
+ }
1015
+ export interface ListLanguagesRequest {
1016
+ /**
1017
+ * <p>The language code for the language to use to display the language names in the response.
1018
+ * The language code is <code>en</code> by default. </p>
1019
+ */
1020
+ DisplayLanguageCode?: DisplayLanguageCode | string;
1021
+ /**
1022
+ * <p>Include the NextToken value to fetch the next group of supported languages. </p>
1023
+ */
1024
+ NextToken?: string;
1025
+ /**
1026
+ * <p>The maximum number of results to return in each response.</p>
1027
+ */
1028
+ MaxResults?: number;
1029
+ }
1030
+ export declare namespace ListLanguagesRequest {
1031
+ /**
1032
+ * @internal
1033
+ */
1034
+ const filterSensitiveLog: (obj: ListLanguagesRequest) => any;
1035
+ }
1036
+ /**
1037
+ * <p>A supported language.</p>
1038
+ */
1039
+ export interface Language {
1040
+ /**
1041
+ * <p>Language name of the supported language.</p>
1042
+ */
1043
+ LanguageName: string | undefined;
1044
+ /**
1045
+ * <p>Language code for the supported language.</p>
1046
+ */
1047
+ LanguageCode: string | undefined;
1048
+ }
1049
+ export declare namespace Language {
1050
+ /**
1051
+ * @internal
1052
+ */
1053
+ const filterSensitiveLog: (obj: Language) => any;
1054
+ }
1055
+ export interface ListLanguagesResponse {
1056
+ /**
1057
+ * <p>The list of supported languages.</p>
1058
+ */
1059
+ Languages?: Language[];
1060
+ /**
1061
+ * <p>The language code passed in with the request.</p>
1062
+ */
1063
+ DisplayLanguageCode?: DisplayLanguageCode | string;
1064
+ /**
1065
+ * <p> If the response does not include all remaining results, use the NextToken
1066
+ * in the next request to fetch the next group of supported languages.</p>
1067
+ */
1068
+ NextToken?: string;
1069
+ }
1070
+ export declare namespace ListLanguagesResponse {
1071
+ /**
1072
+ * @internal
1073
+ */
1074
+ const filterSensitiveLog: (obj: ListLanguagesResponse) => any;
1075
+ }
1076
+ /**
1077
+ * <p>Requested display language code is not supported.</p>
1078
+ */
1079
+ export declare class UnsupportedDisplayLanguageCodeException extends __BaseException {
1080
+ readonly name: "UnsupportedDisplayLanguageCodeException";
1081
+ readonly $fault: "client";
1082
+ Message?: string;
1083
+ /**
1084
+ * <p>Language code passed in with the request.</p>
1085
+ */
1086
+ DisplayLanguageCode?: string;
1087
+ /**
1088
+ * @internal
1089
+ */
1090
+ constructor(opts: __ExceptionOptionType<UnsupportedDisplayLanguageCodeException, __BaseException>);
1091
+ }
983
1092
  export interface ListParallelDataRequest {
984
1093
  /**
985
1094
  * <p>A string that specifies the next page of results to return in a paginated response.</p>
@@ -1048,7 +1157,7 @@ export declare namespace ListTerminologiesResponse {
1048
1157
  const filterSensitiveLog: (obj: ListTerminologiesResponse) => any;
1049
1158
  }
1050
1159
  /**
1051
- * <p>The filter specified for the operation is invalid. Specify a different filter.</p>
1160
+ * <p>The filter specified for the operation is not valid. Specify a different filter.</p>
1052
1161
  */
1053
1162
  export declare class InvalidFilterException extends __BaseException {
1054
1163
  readonly name: "InvalidFilterException";
@@ -1135,8 +1244,7 @@ export interface StartTextTranslationJobRequest {
1135
1244
  */
1136
1245
  JobName?: string;
1137
1246
  /**
1138
- * <p>Specifies the format and S3 location of the input documents for the translation
1139
- * job.</p>
1247
+ * <p>Specifies the format and location of the input documents for the translation job.</p>
1140
1248
  */
1141
1249
  InputDataConfig: InputDataConfig | undefined;
1142
1250
  /**
@@ -1181,13 +1289,13 @@ export interface StartTextTranslationJobRequest {
1181
1289
  */
1182
1290
  ParallelDataNames?: string[];
1183
1291
  /**
1184
- * <p>A unique identifier for the request. This token is auto-generated when using the Amazon Translate
1292
+ * <p>A unique identifier for the request. This token is generated for you when using the Amazon Translate
1185
1293
  * SDK.</p>
1186
1294
  */
1187
1295
  ClientToken?: string;
1188
1296
  /**
1189
1297
  * <p>Settings to configure your translation output, including the option to mask profane words
1190
- * and phrases.</p>
1298
+ * and phrases. <code>StartTextTranslationJob</code> does not support the formality setting.</p>
1191
1299
  */
1192
1300
  Settings?: TranslationSettings;
1193
1301
  }
@@ -1318,7 +1426,7 @@ export declare class DetectedLanguageLowConfidenceException extends __BaseExcept
1318
1426
  constructor(opts: __ExceptionOptionType<DetectedLanguageLowConfidenceException, __BaseException>);
1319
1427
  }
1320
1428
  /**
1321
- * <p>The Amazon Translate service is temporarily unavailable. Please wait a bit and then retry your
1429
+ * <p>The Amazon Translate service is temporarily unavailable. Wait a bit and then retry your
1322
1430
  * request.</p>
1323
1431
  */
1324
1432
  export declare class ServiceUnavailableException extends __BaseException {
@@ -1362,6 +1470,10 @@ export interface TranslateTextRequest {
1362
1470
  * <code>auto</code> in the <code>SourceLanguageCode</code> field. If you specify
1363
1471
  * <code>auto</code>, Amazon Translate will call <a href="https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html">Amazon
1364
1472
  * Comprehend</a> to determine the source language.</p>
1473
+ * <note>
1474
+ * <p>If you specify <code>auto</code>, you must send the <code>TranslateText</code> request in a region that supports
1475
+ * Amazon Comprehend. Otherwise, the request returns an error indicating that autodetect is not supported. </p>
1476
+ * </note>
1365
1477
  */
1366
1478
  SourceLanguageCode: string | undefined;
1367
1479
  /**
@@ -1370,8 +1482,8 @@ export interface TranslateTextRequest {
1370
1482
  */
1371
1483
  TargetLanguageCode: string | undefined;
1372
1484
  /**
1373
- * <p>Settings to configure your translation output, including the option to mask profane words
1374
- * and phrases.</p>
1485
+ * <p>Settings to configure your translation output, including the option to set the formality
1486
+ * level of the output text and the option to mask profane words and phrases.</p>
1375
1487
  */
1376
1488
  Settings?: TranslationSettings;
1377
1489
  }
@@ -0,0 +1,4 @@
1
+ import { Paginator } from "@aws-sdk/types";
2
+ import { ListLanguagesCommandInput, ListLanguagesCommandOutput } from "../commands/ListLanguagesCommand";
3
+ import { TranslatePaginationConfiguration } from "./Interfaces";
4
+ export declare function paginateListLanguages(config: TranslatePaginationConfiguration, input: ListLanguagesCommandInput, ...additionalArguments: any): Paginator<ListLanguagesCommandOutput>;
@@ -1,4 +1,5 @@
1
1
  export * from "./Interfaces";
2
+ export * from "./ListLanguagesPaginator";
2
3
  export * from "./ListParallelDataPaginator";
3
4
  export * from "./ListTerminologiesPaginator";
4
5
  export * from "./ListTextTranslationJobsPaginator";
@@ -7,6 +7,7 @@ import { DescribeTextTranslationJobCommandInput, DescribeTextTranslationJobComma
7
7
  import { GetParallelDataCommandInput, GetParallelDataCommandOutput } from "../commands/GetParallelDataCommand";
8
8
  import { GetTerminologyCommandInput, GetTerminologyCommandOutput } from "../commands/GetTerminologyCommand";
9
9
  import { ImportTerminologyCommandInput, ImportTerminologyCommandOutput } from "../commands/ImportTerminologyCommand";
10
+ import { ListLanguagesCommandInput, ListLanguagesCommandOutput } from "../commands/ListLanguagesCommand";
10
11
  import { ListParallelDataCommandInput, ListParallelDataCommandOutput } from "../commands/ListParallelDataCommand";
11
12
  import { ListTerminologiesCommandInput, ListTerminologiesCommandOutput } from "../commands/ListTerminologiesCommand";
12
13
  import { ListTextTranslationJobsCommandInput, ListTextTranslationJobsCommandOutput } from "../commands/ListTextTranslationJobsCommand";
@@ -21,6 +22,7 @@ export declare const serializeAws_json1_1DescribeTextTranslationJobCommand: (inp
21
22
  export declare const serializeAws_json1_1GetParallelDataCommand: (input: GetParallelDataCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
22
23
  export declare const serializeAws_json1_1GetTerminologyCommand: (input: GetTerminologyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
23
24
  export declare const serializeAws_json1_1ImportTerminologyCommand: (input: ImportTerminologyCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
25
+ export declare const serializeAws_json1_1ListLanguagesCommand: (input: ListLanguagesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
24
26
  export declare const serializeAws_json1_1ListParallelDataCommand: (input: ListParallelDataCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
25
27
  export declare const serializeAws_json1_1ListTerminologiesCommand: (input: ListTerminologiesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
26
28
  export declare const serializeAws_json1_1ListTextTranslationJobsCommand: (input: ListTextTranslationJobsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
@@ -35,6 +37,7 @@ export declare const deserializeAws_json1_1DescribeTextTranslationJobCommand: (o
35
37
  export declare const deserializeAws_json1_1GetParallelDataCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetParallelDataCommandOutput>;
36
38
  export declare const deserializeAws_json1_1GetTerminologyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetTerminologyCommandOutput>;
37
39
  export declare const deserializeAws_json1_1ImportTerminologyCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ImportTerminologyCommandOutput>;
40
+ export declare const deserializeAws_json1_1ListLanguagesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListLanguagesCommandOutput>;
38
41
  export declare const deserializeAws_json1_1ListParallelDataCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListParallelDataCommandOutput>;
39
42
  export declare const deserializeAws_json1_1ListTerminologiesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTerminologiesCommandOutput>;
40
43
  export declare const deserializeAws_json1_1ListTextTranslationJobsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTextTranslationJobsCommandOutput>;
@@ -6,6 +6,7 @@ import { DescribeTextTranslationJobCommandInput, DescribeTextTranslationJobComma
6
6
  import { GetParallelDataCommandInput, GetParallelDataCommandOutput } from "./commands/GetParallelDataCommand";
7
7
  import { GetTerminologyCommandInput, GetTerminologyCommandOutput } from "./commands/GetTerminologyCommand";
8
8
  import { ImportTerminologyCommandInput, ImportTerminologyCommandOutput } from "./commands/ImportTerminologyCommand";
9
+ import { ListLanguagesCommandInput, ListLanguagesCommandOutput } from "./commands/ListLanguagesCommand";
9
10
  import { ListParallelDataCommandInput, ListParallelDataCommandOutput } from "./commands/ListParallelDataCommand";
10
11
  import { ListTerminologiesCommandInput, ListTerminologiesCommandOutput } from "./commands/ListTerminologiesCommand";
11
12
  import { ListTextTranslationJobsCommandInput, ListTextTranslationJobsCommandOutput } from "./commands/ListTextTranslationJobsCommand";
@@ -45,6 +46,10 @@ export declare class Translate extends TranslateClient {
45
46
  importTerminology(args: ImportTerminologyCommandInput, cb: (err: any, data?: ImportTerminologyCommandOutput) => void): void;
46
47
  importTerminology(args: ImportTerminologyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ImportTerminologyCommandOutput) => void): void;
47
48
 
49
+ listLanguages(args: ListLanguagesCommandInput, options?: __HttpHandlerOptions): Promise<ListLanguagesCommandOutput>;
50
+ listLanguages(args: ListLanguagesCommandInput, cb: (err: any, data?: ListLanguagesCommandOutput) => void): void;
51
+ listLanguages(args: ListLanguagesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListLanguagesCommandOutput) => void): void;
52
+
48
53
  listParallelData(args: ListParallelDataCommandInput, options?: __HttpHandlerOptions): Promise<ListParallelDataCommandOutput>;
49
54
  listParallelData(args: ListParallelDataCommandInput, cb: (err: any, data?: ListParallelDataCommandOutput) => void): void;
50
55
  listParallelData(args: ListParallelDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListParallelDataCommandOutput) => void): void;
@@ -13,6 +13,7 @@ import { DescribeTextTranslationJobCommandInput, DescribeTextTranslationJobComma
13
13
  import { GetParallelDataCommandInput, GetParallelDataCommandOutput } from "./commands/GetParallelDataCommand";
14
14
  import { GetTerminologyCommandInput, GetTerminologyCommandOutput } from "./commands/GetTerminologyCommand";
15
15
  import { ImportTerminologyCommandInput, ImportTerminologyCommandOutput } from "./commands/ImportTerminologyCommand";
16
+ import { ListLanguagesCommandInput, ListLanguagesCommandOutput } from "./commands/ListLanguagesCommand";
16
17
  import { ListParallelDataCommandInput, ListParallelDataCommandOutput } from "./commands/ListParallelDataCommand";
17
18
  import { ListTerminologiesCommandInput, ListTerminologiesCommandOutput } from "./commands/ListTerminologiesCommand";
18
19
  import { ListTextTranslationJobsCommandInput, ListTextTranslationJobsCommandOutput } from "./commands/ListTextTranslationJobsCommand";
@@ -20,8 +21,8 @@ import { StartTextTranslationJobCommandInput, StartTextTranslationJobCommandOutp
20
21
  import { StopTextTranslationJobCommandInput, StopTextTranslationJobCommandOutput } from "./commands/StopTextTranslationJobCommand";
21
22
  import { TranslateTextCommandInput, TranslateTextCommandOutput } from "./commands/TranslateTextCommand";
22
23
  import { UpdateParallelDataCommandInput, UpdateParallelDataCommandOutput } from "./commands/UpdateParallelDataCommand";
23
- export declare type ServiceInputTypes = CreateParallelDataCommandInput | DeleteParallelDataCommandInput | DeleteTerminologyCommandInput | DescribeTextTranslationJobCommandInput | GetParallelDataCommandInput | GetTerminologyCommandInput | ImportTerminologyCommandInput | ListParallelDataCommandInput | ListTerminologiesCommandInput | ListTextTranslationJobsCommandInput | StartTextTranslationJobCommandInput | StopTextTranslationJobCommandInput | TranslateTextCommandInput | UpdateParallelDataCommandInput;
24
- export declare type ServiceOutputTypes = CreateParallelDataCommandOutput | DeleteParallelDataCommandOutput | DeleteTerminologyCommandOutput | DescribeTextTranslationJobCommandOutput | GetParallelDataCommandOutput | GetTerminologyCommandOutput | ImportTerminologyCommandOutput | ListParallelDataCommandOutput | ListTerminologiesCommandOutput | ListTextTranslationJobsCommandOutput | StartTextTranslationJobCommandOutput | StopTextTranslationJobCommandOutput | TranslateTextCommandOutput | UpdateParallelDataCommandOutput;
24
+ export declare type ServiceInputTypes = CreateParallelDataCommandInput | DeleteParallelDataCommandInput | DeleteTerminologyCommandInput | DescribeTextTranslationJobCommandInput | GetParallelDataCommandInput | GetTerminologyCommandInput | ImportTerminologyCommandInput | ListLanguagesCommandInput | ListParallelDataCommandInput | ListTerminologiesCommandInput | ListTextTranslationJobsCommandInput | StartTextTranslationJobCommandInput | StopTextTranslationJobCommandInput | TranslateTextCommandInput | UpdateParallelDataCommandInput;
25
+ export declare type ServiceOutputTypes = CreateParallelDataCommandOutput | DeleteParallelDataCommandOutput | DeleteTerminologyCommandOutput | DescribeTextTranslationJobCommandOutput | GetParallelDataCommandOutput | GetTerminologyCommandOutput | ImportTerminologyCommandOutput | ListLanguagesCommandOutput | ListParallelDataCommandOutput | ListTerminologiesCommandOutput | ListTextTranslationJobsCommandOutput | StartTextTranslationJobCommandOutput | StopTextTranslationJobCommandOutput | TranslateTextCommandOutput | UpdateParallelDataCommandOutput;
25
26
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
26
27
 
27
28
  requestHandler?: __HttpHandler;
@@ -0,0 +1,17 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { ListLanguagesRequest, ListLanguagesResponse } from "../models/models_0";
4
+ import { ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig } from "../TranslateClient";
5
+ export interface ListLanguagesCommandInput extends ListLanguagesRequest {
6
+ }
7
+ export interface ListLanguagesCommandOutput extends ListLanguagesResponse, __MetadataBearer {
8
+ }
9
+
10
+ export declare class ListLanguagesCommand extends $Command<ListLanguagesCommandInput, ListLanguagesCommandOutput, TranslateClientResolvedConfig> {
11
+ readonly input: ListLanguagesCommandInput;
12
+ constructor(input: ListLanguagesCommandInput);
13
+
14
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TranslateClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ListLanguagesCommandInput, ListLanguagesCommandOutput>;
15
+ private serialize;
16
+ private deserialize;
17
+ }
@@ -5,6 +5,7 @@ export * from "./DescribeTextTranslationJobCommand";
5
5
  export * from "./GetParallelDataCommand";
6
6
  export * from "./GetTerminologyCommand";
7
7
  export * from "./ImportTerminologyCommand";
8
+ export * from "./ListLanguagesCommand";
8
9
  export * from "./ListParallelDataCommand";
9
10
  export * from "./ListTerminologiesCommand";
10
11
  export * from "./ListTextTranslationJobsCommand";