@aws-sdk/client-translate 3.39.0 → 3.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/dist-cjs/endpoints.js +118 -17
- package/dist-cjs/models/models_0.js +18 -2
- package/dist-cjs/protocols/Aws_json1_1.js +47 -0
- package/dist-cjs/runtimeConfig.browser.js +6 -3
- package/dist-cjs/runtimeConfig.js +5 -3
- package/dist-es/endpoints.js +118 -17
- package/dist-es/models/models_0.js +14 -0
- package/dist-es/protocols/Aws_json1_1.js +77 -36
- package/dist-es/runtimeConfig.browser.js +3 -2
- package/dist-es/runtimeConfig.js +3 -3
- package/dist-types/Translate.d.ts +4 -4
- package/dist-types/TranslateClient.d.ts +8 -0
- package/dist-types/commands/CreateParallelDataCommand.d.ts +4 -4
- package/dist-types/commands/DeleteParallelDataCommand.d.ts +1 -1
- package/dist-types/commands/DeleteTerminologyCommand.d.ts +1 -1
- package/dist-types/commands/DescribeTextTranslationJobCommand.d.ts +2 -2
- package/dist-types/commands/GetParallelDataCommand.d.ts +1 -1
- package/dist-types/commands/GetTerminologyCommand.d.ts +1 -1
- package/dist-types/commands/ImportTerminologyCommand.d.ts +1 -1
- package/dist-types/commands/ListParallelDataCommand.d.ts +1 -1
- package/dist-types/commands/ListTerminologiesCommand.d.ts +1 -1
- package/dist-types/commands/ListTextTranslationJobsCommand.d.ts +1 -1
- package/dist-types/commands/StartTextTranslationJobCommand.d.ts +1 -1
- package/dist-types/commands/StopTextTranslationJobCommand.d.ts +1 -1
- package/dist-types/commands/TranslateTextCommand.d.ts +1 -1
- package/dist-types/commands/UpdateParallelDataCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +203 -23
- package/dist-types/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/runtimeConfig.d.ts +2 -0
- package/dist-types/runtimeConfig.native.d.ts +2 -0
- package/dist-types/ts3.4/TranslateClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +43 -2
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
- package/package.json +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** update clients as of 11/28/2021 ([#3072](https://github.com/aws/aws-sdk-js-v3/issues/3072)) ([2ad1622](https://github.com/aws/aws-sdk-js-v3/commit/2ad1622ba8586b926fe508055211803bb29e3976))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @aws-sdk/client-translate
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.41.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.40.1...v3.41.0) (2021-11-11)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* **clients:** update clients as of 2021/11/11 ([#3015](https://github.com/aws/aws-sdk-js-v3/issues/3015)) ([3d82c4e](https://github.com/aws/aws-sdk-js-v3/commit/3d82c4e3c4d174533f46ce35495cf5cffabdb35a))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# [3.40.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.39.0...v3.40.0) (2021-11-05)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* **clients:** populate variants in endpoints hashes ([#2974](https://github.com/aws/aws-sdk-js-v3/issues/2974)) ([0dd68ef](https://github.com/aws/aws-sdk-js-v3/commit/0dd68ef8b04ea0e96e43b05a9a10221e433fdf86))
|
|
42
|
+
* **clients:** update clients as of 2021/11/05 ([#2994](https://github.com/aws/aws-sdk-js-v3/issues/2994)) ([f5ecc31](https://github.com/aws/aws-sdk-js-v3/commit/f5ecc3147035a1f3d2d74cfed147999927ea8256))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
6
48
|
# [3.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
|
|
7
49
|
|
|
8
50
|
**Note:** Version bump only for package @aws-sdk/client-translate
|
package/dist-cjs/endpoints.js
CHANGED
|
@@ -3,21 +3,53 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.defaultRegionInfoProvider = void 0;
|
|
4
4
|
const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
5
5
|
const regionHash = {
|
|
6
|
-
"us-east-1
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"us-east-1": {
|
|
7
|
+
variants: [
|
|
8
|
+
{
|
|
9
|
+
hostname: "translate.us-east-1.amazonaws.com",
|
|
10
|
+
tags: [],
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
hostname: "translate-fips.us-east-1.amazonaws.com",
|
|
14
|
+
tags: ["fips"],
|
|
15
|
+
},
|
|
16
|
+
],
|
|
9
17
|
},
|
|
10
|
-
"us-east-2
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
"us-east-2": {
|
|
19
|
+
variants: [
|
|
20
|
+
{
|
|
21
|
+
hostname: "translate.us-east-2.amazonaws.com",
|
|
22
|
+
tags: [],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
hostname: "translate-fips.us-east-2.amazonaws.com",
|
|
26
|
+
tags: ["fips"],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
13
29
|
},
|
|
14
|
-
"us-gov-west-1
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
"us-gov-west-1": {
|
|
31
|
+
variants: [
|
|
32
|
+
{
|
|
33
|
+
hostname: "translate.us-gov-west-1.amazonaws.com",
|
|
34
|
+
tags: [],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
hostname: "translate-fips.us-gov-west-1.amazonaws.com",
|
|
38
|
+
tags: ["fips"],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
17
41
|
},
|
|
18
|
-
"us-west-2
|
|
19
|
-
|
|
20
|
-
|
|
42
|
+
"us-west-2": {
|
|
43
|
+
variants: [
|
|
44
|
+
{
|
|
45
|
+
hostname: "translate.us-west-2.amazonaws.com",
|
|
46
|
+
tags: [],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
hostname: "translate-fips.us-west-2.amazonaws.com",
|
|
50
|
+
tags: ["fips"],
|
|
51
|
+
},
|
|
52
|
+
],
|
|
21
53
|
},
|
|
22
54
|
};
|
|
23
55
|
const partitionHash = {
|
|
@@ -49,27 +81,96 @@ const partitionHash = {
|
|
|
49
81
|
"us-west-2-fips",
|
|
50
82
|
],
|
|
51
83
|
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
|
|
52
|
-
|
|
84
|
+
variants: [
|
|
85
|
+
{
|
|
86
|
+
hostname: "translate.{region}.amazonaws.com",
|
|
87
|
+
tags: [],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
hostname: "translate-fips.{region}.amazonaws.com",
|
|
91
|
+
tags: ["fips"],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
hostname: "translate-fips.{region}.api.aws",
|
|
95
|
+
tags: ["dualstack", "fips"],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
hostname: "translate.{region}.api.aws",
|
|
99
|
+
tags: ["dualstack"],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
53
102
|
},
|
|
54
103
|
"aws-cn": {
|
|
55
104
|
regions: ["cn-north-1", "cn-northwest-1"],
|
|
56
105
|
regionRegex: "^cn\\-\\w+\\-\\d+$",
|
|
57
|
-
|
|
106
|
+
variants: [
|
|
107
|
+
{
|
|
108
|
+
hostname: "translate.{region}.amazonaws.com.cn",
|
|
109
|
+
tags: [],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
hostname: "translate-fips.{region}.amazonaws.com.cn",
|
|
113
|
+
tags: ["fips"],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
hostname: "translate-fips.{region}.api.amazonwebservices.com.cn",
|
|
117
|
+
tags: ["dualstack", "fips"],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
hostname: "translate.{region}.api.amazonwebservices.com.cn",
|
|
121
|
+
tags: ["dualstack"],
|
|
122
|
+
},
|
|
123
|
+
],
|
|
58
124
|
},
|
|
59
125
|
"aws-iso": {
|
|
60
126
|
regions: ["us-iso-east-1", "us-iso-west-1"],
|
|
61
127
|
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
|
62
|
-
|
|
128
|
+
variants: [
|
|
129
|
+
{
|
|
130
|
+
hostname: "translate.{region}.c2s.ic.gov",
|
|
131
|
+
tags: [],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
hostname: "translate-fips.{region}.c2s.ic.gov",
|
|
135
|
+
tags: ["fips"],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
63
138
|
},
|
|
64
139
|
"aws-iso-b": {
|
|
65
140
|
regions: ["us-isob-east-1"],
|
|
66
141
|
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
|
67
|
-
|
|
142
|
+
variants: [
|
|
143
|
+
{
|
|
144
|
+
hostname: "translate.{region}.sc2s.sgov.gov",
|
|
145
|
+
tags: [],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
hostname: "translate-fips.{region}.sc2s.sgov.gov",
|
|
149
|
+
tags: ["fips"],
|
|
150
|
+
},
|
|
151
|
+
],
|
|
68
152
|
},
|
|
69
153
|
"aws-us-gov": {
|
|
70
154
|
regions: ["us-gov-east-1", "us-gov-west-1", "us-gov-west-1-fips"],
|
|
71
155
|
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
|
72
|
-
|
|
156
|
+
variants: [
|
|
157
|
+
{
|
|
158
|
+
hostname: "translate.{region}.amazonaws.com",
|
|
159
|
+
tags: [],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
hostname: "translate-fips.{region}.amazonaws.com",
|
|
163
|
+
tags: ["fips"],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
hostname: "translate-fips.{region}.api.aws",
|
|
167
|
+
tags: ["dualstack", "fips"],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
hostname: "translate.{region}.api.aws",
|
|
171
|
+
tags: ["dualstack"],
|
|
172
|
+
},
|
|
173
|
+
],
|
|
73
174
|
},
|
|
74
175
|
};
|
|
75
176
|
const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.UpdateParallelDataResponse = exports.UpdateParallelDataRequest = exports.TranslateTextResponse = exports.TranslateTextRequest = exports.TextSizeLimitExceededException = exports.ServiceUnavailableException = exports.DetectedLanguageLowConfidenceException = exports.StopTextTranslationJobResponse = exports.StopTextTranslationJobRequest = exports.UnsupportedLanguagePairException = void 0;
|
|
3
|
+
exports.ListTextTranslationJobsRequest = exports.TextTranslationJobFilter = exports.InvalidFilterException = exports.ListTerminologiesResponse = exports.ListTerminologiesRequest = exports.ListParallelDataResponse = exports.ListParallelDataRequest = exports.ImportTerminologyResponse = exports.ImportTerminologyRequest = exports.TerminologyData = exports.MergeStrategy = exports.GetTerminologyResponse = exports.TerminologyProperties = exports.Directionality = exports.TerminologyDataLocation = exports.GetTerminologyRequest = exports.TerminologyDataFormat = exports.GetParallelDataResponse = exports.ParallelDataProperties = exports.ParallelDataDataLocation = exports.GetParallelDataRequest = exports.DescribeTextTranslationJobResponse = exports.TextTranslationJobProperties = exports.TranslationSettings = exports.Profanity = exports.OutputDataConfig = exports.JobStatus = exports.JobDetails = exports.InputDataConfig = exports.DescribeTextTranslationJobRequest = exports.DeleteTerminologyRequest = exports.ResourceNotFoundException = exports.DeleteParallelDataResponse = exports.DeleteParallelDataRequest = exports.ConcurrentModificationException = exports.TooManyRequestsException = exports.LimitExceededException = exports.InvalidRequestException = exports.InvalidParameterValueException = exports.InternalServerException = exports.CreateParallelDataResponse = exports.ParallelDataStatus = exports.CreateParallelDataRequest = exports.ParallelDataConfig = exports.ParallelDataFormat = exports.EncryptionKey = exports.EncryptionKeyType = exports.ConflictException = exports.AppliedTerminology = exports.Term = void 0;
|
|
4
|
+
exports.UpdateParallelDataResponse = exports.UpdateParallelDataRequest = exports.TranslateTextResponse = exports.TranslateTextRequest = exports.TextSizeLimitExceededException = exports.ServiceUnavailableException = exports.DetectedLanguageLowConfidenceException = exports.StopTextTranslationJobResponse = exports.StopTextTranslationJobRequest = exports.UnsupportedLanguagePairException = exports.StartTextTranslationJobResponse = exports.StartTextTranslationJobRequest = exports.ListTextTranslationJobsResponse = void 0;
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
var Term;
|
|
7
7
|
(function (Term) {
|
|
@@ -157,6 +157,16 @@ var OutputDataConfig;
|
|
|
157
157
|
...obj,
|
|
158
158
|
});
|
|
159
159
|
})(OutputDataConfig = exports.OutputDataConfig || (exports.OutputDataConfig = {}));
|
|
160
|
+
var Profanity;
|
|
161
|
+
(function (Profanity) {
|
|
162
|
+
Profanity["MASK"] = "MASK";
|
|
163
|
+
})(Profanity = exports.Profanity || (exports.Profanity = {}));
|
|
164
|
+
var TranslationSettings;
|
|
165
|
+
(function (TranslationSettings) {
|
|
166
|
+
TranslationSettings.filterSensitiveLog = (obj) => ({
|
|
167
|
+
...obj,
|
|
168
|
+
});
|
|
169
|
+
})(TranslationSettings = exports.TranslationSettings || (exports.TranslationSettings = {}));
|
|
160
170
|
var TextTranslationJobProperties;
|
|
161
171
|
(function (TextTranslationJobProperties) {
|
|
162
172
|
TextTranslationJobProperties.filterSensitiveLog = (obj) => ({
|
|
@@ -197,6 +207,7 @@ var TerminologyDataFormat;
|
|
|
197
207
|
(function (TerminologyDataFormat) {
|
|
198
208
|
TerminologyDataFormat["CSV"] = "CSV";
|
|
199
209
|
TerminologyDataFormat["TMX"] = "TMX";
|
|
210
|
+
TerminologyDataFormat["TSV"] = "TSV";
|
|
200
211
|
})(TerminologyDataFormat = exports.TerminologyDataFormat || (exports.TerminologyDataFormat = {}));
|
|
201
212
|
var GetTerminologyRequest;
|
|
202
213
|
(function (GetTerminologyRequest) {
|
|
@@ -210,6 +221,11 @@ var TerminologyDataLocation;
|
|
|
210
221
|
...obj,
|
|
211
222
|
});
|
|
212
223
|
})(TerminologyDataLocation = exports.TerminologyDataLocation || (exports.TerminologyDataLocation = {}));
|
|
224
|
+
var Directionality;
|
|
225
|
+
(function (Directionality) {
|
|
226
|
+
Directionality["MULTI"] = "MULTI";
|
|
227
|
+
Directionality["UNI"] = "UNI";
|
|
228
|
+
})(Directionality = exports.Directionality || (exports.Directionality = {}));
|
|
213
229
|
var TerminologyProperties;
|
|
214
230
|
(function (TerminologyProperties) {
|
|
215
231
|
TerminologyProperties.filterSensitiveLog = (obj) => ({
|
|
@@ -874,6 +874,14 @@ const deserializeAws_json1_1StartTextTranslationJobCommandError = async (output,
|
|
|
874
874
|
$metadata: deserializeMetadata(output),
|
|
875
875
|
};
|
|
876
876
|
break;
|
|
877
|
+
case "InvalidParameterValueException":
|
|
878
|
+
case "com.amazonaws.translate#InvalidParameterValueException":
|
|
879
|
+
response = {
|
|
880
|
+
...(await deserializeAws_json1_1InvalidParameterValueExceptionResponse(parsedOutput, context)),
|
|
881
|
+
name: errorCode,
|
|
882
|
+
$metadata: deserializeMetadata(output),
|
|
883
|
+
};
|
|
884
|
+
break;
|
|
877
885
|
case "InvalidRequestException":
|
|
878
886
|
case "com.amazonaws.translate#InvalidRequestException":
|
|
879
887
|
response = {
|
|
@@ -1426,6 +1434,10 @@ const serializeAws_json1_1ListTextTranslationJobsRequest = (input, context) => {
|
|
|
1426
1434
|
};
|
|
1427
1435
|
const serializeAws_json1_1OutputDataConfig = (input, context) => {
|
|
1428
1436
|
return {
|
|
1437
|
+
...(input.EncryptionKey !== undefined &&
|
|
1438
|
+
input.EncryptionKey !== null && {
|
|
1439
|
+
EncryptionKey: serializeAws_json1_1EncryptionKey(input.EncryptionKey, context),
|
|
1440
|
+
}),
|
|
1429
1441
|
...(input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }),
|
|
1430
1442
|
};
|
|
1431
1443
|
};
|
|
@@ -1464,6 +1476,8 @@ const serializeAws_json1_1StartTextTranslationJobRequest = (input, context) => {
|
|
|
1464
1476
|
input.ParallelDataNames !== null && {
|
|
1465
1477
|
ParallelDataNames: serializeAws_json1_1ResourceNameList(input.ParallelDataNames, context),
|
|
1466
1478
|
}),
|
|
1479
|
+
...(input.Settings !== undefined &&
|
|
1480
|
+
input.Settings !== null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) }),
|
|
1467
1481
|
...(input.SourceLanguageCode !== undefined &&
|
|
1468
1482
|
input.SourceLanguageCode !== null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1469
1483
|
...(input.TargetLanguageCodes !== undefined &&
|
|
@@ -1493,6 +1507,8 @@ const serializeAws_json1_1TargetLanguageCodeStringList = (input, context) => {
|
|
|
1493
1507
|
};
|
|
1494
1508
|
const serializeAws_json1_1TerminologyData = (input, context) => {
|
|
1495
1509
|
return {
|
|
1510
|
+
...(input.Directionality !== undefined &&
|
|
1511
|
+
input.Directionality !== null && { Directionality: input.Directionality }),
|
|
1496
1512
|
...(input.File !== undefined && input.File !== null && { File: context.base64Encoder(input.File) }),
|
|
1497
1513
|
...(input.Format !== undefined && input.Format !== null && { Format: input.Format }),
|
|
1498
1514
|
};
|
|
@@ -1513,6 +1529,8 @@ const serializeAws_json1_1TextTranslationJobFilter = (input, context) => {
|
|
|
1513
1529
|
};
|
|
1514
1530
|
const serializeAws_json1_1TranslateTextRequest = (input, context) => {
|
|
1515
1531
|
return {
|
|
1532
|
+
...(input.Settings !== undefined &&
|
|
1533
|
+
input.Settings !== null && { Settings: serializeAws_json1_1TranslationSettings(input.Settings, context) }),
|
|
1516
1534
|
...(input.SourceLanguageCode !== undefined &&
|
|
1517
1535
|
input.SourceLanguageCode !== null && { SourceLanguageCode: input.SourceLanguageCode }),
|
|
1518
1536
|
...(input.TargetLanguageCode !== undefined &&
|
|
@@ -1524,6 +1542,11 @@ const serializeAws_json1_1TranslateTextRequest = (input, context) => {
|
|
|
1524
1542
|
...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
|
|
1525
1543
|
};
|
|
1526
1544
|
};
|
|
1545
|
+
const serializeAws_json1_1TranslationSettings = (input, context) => {
|
|
1546
|
+
return {
|
|
1547
|
+
...(input.Profanity !== undefined && input.Profanity !== null && { Profanity: input.Profanity }),
|
|
1548
|
+
};
|
|
1549
|
+
};
|
|
1527
1550
|
const serializeAws_json1_1UpdateParallelDataRequest = (input, context) => {
|
|
1528
1551
|
var _a;
|
|
1529
1552
|
return {
|
|
@@ -1614,6 +1637,9 @@ const deserializeAws_json1_1GetParallelDataResponse = (output, context) => {
|
|
|
1614
1637
|
};
|
|
1615
1638
|
const deserializeAws_json1_1GetTerminologyResponse = (output, context) => {
|
|
1616
1639
|
return {
|
|
1640
|
+
AuxiliaryDataLocation: output.AuxiliaryDataLocation !== undefined && output.AuxiliaryDataLocation !== null
|
|
1641
|
+
? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
1642
|
+
: undefined,
|
|
1617
1643
|
TerminologyDataLocation: output.TerminologyDataLocation !== undefined && output.TerminologyDataLocation !== null
|
|
1618
1644
|
? deserializeAws_json1_1TerminologyDataLocation(output.TerminologyDataLocation, context)
|
|
1619
1645
|
: undefined,
|
|
@@ -1624,6 +1650,9 @@ const deserializeAws_json1_1GetTerminologyResponse = (output, context) => {
|
|
|
1624
1650
|
};
|
|
1625
1651
|
const deserializeAws_json1_1ImportTerminologyResponse = (output, context) => {
|
|
1626
1652
|
return {
|
|
1653
|
+
AuxiliaryDataLocation: output.AuxiliaryDataLocation !== undefined && output.AuxiliaryDataLocation !== null
|
|
1654
|
+
? deserializeAws_json1_1TerminologyDataLocation(output.AuxiliaryDataLocation, context)
|
|
1655
|
+
: undefined,
|
|
1627
1656
|
TerminologyProperties: output.TerminologyProperties !== undefined && output.TerminologyProperties !== null
|
|
1628
1657
|
? deserializeAws_json1_1TerminologyProperties(output.TerminologyProperties, context)
|
|
1629
1658
|
: undefined,
|
|
@@ -1703,6 +1732,9 @@ const deserializeAws_json1_1ListTextTranslationJobsResponse = (output, context)
|
|
|
1703
1732
|
};
|
|
1704
1733
|
const deserializeAws_json1_1OutputDataConfig = (output, context) => {
|
|
1705
1734
|
return {
|
|
1735
|
+
EncryptionKey: output.EncryptionKey !== undefined && output.EncryptionKey !== null
|
|
1736
|
+
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1737
|
+
: undefined,
|
|
1706
1738
|
S3Uri: smithy_client_1.expectString(output.S3Uri),
|
|
1707
1739
|
};
|
|
1708
1740
|
};
|
|
@@ -1822,14 +1854,18 @@ const deserializeAws_json1_1TerminologyProperties = (output, context) => {
|
|
|
1822
1854
|
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.CreatedAt)))
|
|
1823
1855
|
: undefined,
|
|
1824
1856
|
Description: smithy_client_1.expectString(output.Description),
|
|
1857
|
+
Directionality: smithy_client_1.expectString(output.Directionality),
|
|
1825
1858
|
EncryptionKey: output.EncryptionKey !== undefined && output.EncryptionKey !== null
|
|
1826
1859
|
? deserializeAws_json1_1EncryptionKey(output.EncryptionKey, context)
|
|
1827
1860
|
: undefined,
|
|
1861
|
+
Format: smithy_client_1.expectString(output.Format),
|
|
1828
1862
|
LastUpdatedAt: output.LastUpdatedAt !== undefined && output.LastUpdatedAt !== null
|
|
1829
1863
|
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.LastUpdatedAt)))
|
|
1830
1864
|
: undefined,
|
|
1865
|
+
Message: smithy_client_1.expectString(output.Message),
|
|
1831
1866
|
Name: smithy_client_1.expectString(output.Name),
|
|
1832
1867
|
SizeBytes: smithy_client_1.expectInt32(output.SizeBytes),
|
|
1868
|
+
SkippedTermCount: smithy_client_1.expectInt32(output.SkippedTermCount),
|
|
1833
1869
|
SourceLanguageCode: smithy_client_1.expectString(output.SourceLanguageCode),
|
|
1834
1870
|
TargetLanguageCodes: output.TargetLanguageCodes !== undefined && output.TargetLanguageCodes !== null
|
|
1835
1871
|
? deserializeAws_json1_1LanguageCodeStringList(output.TargetLanguageCodes, context)
|
|
@@ -1884,6 +1920,9 @@ const deserializeAws_json1_1TextTranslationJobProperties = (output, context) =>
|
|
|
1884
1920
|
ParallelDataNames: output.ParallelDataNames !== undefined && output.ParallelDataNames !== null
|
|
1885
1921
|
? deserializeAws_json1_1ResourceNameList(output.ParallelDataNames, context)
|
|
1886
1922
|
: undefined,
|
|
1923
|
+
Settings: output.Settings !== undefined && output.Settings !== null
|
|
1924
|
+
? deserializeAws_json1_1TranslationSettings(output.Settings, context)
|
|
1925
|
+
: undefined,
|
|
1887
1926
|
SourceLanguageCode: smithy_client_1.expectString(output.SourceLanguageCode),
|
|
1888
1927
|
SubmittedTime: output.SubmittedTime !== undefined && output.SubmittedTime !== null
|
|
1889
1928
|
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.SubmittedTime)))
|
|
@@ -1913,6 +1952,9 @@ const deserializeAws_json1_1TooManyRequestsException = (output, context) => {
|
|
|
1913
1952
|
};
|
|
1914
1953
|
const deserializeAws_json1_1TranslateTextResponse = (output, context) => {
|
|
1915
1954
|
return {
|
|
1955
|
+
AppliedSettings: output.AppliedSettings !== undefined && output.AppliedSettings !== null
|
|
1956
|
+
? deserializeAws_json1_1TranslationSettings(output.AppliedSettings, context)
|
|
1957
|
+
: undefined,
|
|
1916
1958
|
AppliedTerminologies: output.AppliedTerminologies !== undefined && output.AppliedTerminologies !== null
|
|
1917
1959
|
? deserializeAws_json1_1AppliedTerminologyList(output.AppliedTerminologies, context)
|
|
1918
1960
|
: undefined,
|
|
@@ -1921,6 +1963,11 @@ const deserializeAws_json1_1TranslateTextResponse = (output, context) => {
|
|
|
1921
1963
|
TranslatedText: smithy_client_1.expectString(output.TranslatedText),
|
|
1922
1964
|
};
|
|
1923
1965
|
};
|
|
1966
|
+
const deserializeAws_json1_1TranslationSettings = (output, context) => {
|
|
1967
|
+
return {
|
|
1968
|
+
Profanity: smithy_client_1.expectString(output.Profanity),
|
|
1969
|
+
};
|
|
1970
|
+
};
|
|
1924
1971
|
const deserializeAws_json1_1UnsupportedLanguagePairException = (output, context) => {
|
|
1925
1972
|
return {
|
|
1926
1973
|
Message: smithy_client_1.expectString(output.Message),
|
|
@@ -4,6 +4,7 @@ exports.getRuntimeConfig = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
6
|
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
+
const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
7
8
|
const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
|
|
8
9
|
const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
|
|
9
10
|
const middleware_retry_1 = require("@aws-sdk/middleware-retry");
|
|
@@ -13,7 +14,7 @@ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
|
13
14
|
const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
|
|
14
15
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
15
16
|
const getRuntimeConfig = (config) => {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
18
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
18
19
|
return {
|
|
19
20
|
...clientSharedValues,
|
|
@@ -30,8 +31,10 @@ const getRuntimeConfig = (config) => {
|
|
|
30
31
|
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() => Promise.resolve(middleware_retry_1.DEFAULT_RETRY_MODE)),
|
|
31
32
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
|
|
32
33
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
35
|
+
useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
36
|
+
utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.fromUtf8,
|
|
37
|
+
utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.toUtf8,
|
|
35
38
|
};
|
|
36
39
|
};
|
|
37
40
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -17,7 +17,7 @@ const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
|
|
|
17
17
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
18
18
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
19
19
|
const getRuntimeConfig = (config) => {
|
|
20
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
21
21
|
smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
|
|
22
22
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
23
23
|
return {
|
|
@@ -35,8 +35,10 @@ const getRuntimeConfig = (config) => {
|
|
|
35
35
|
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
|
|
36
36
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
|
|
37
37
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
39
|
+
useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
40
|
+
utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
|
|
41
|
+
utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
|
|
40
42
|
};
|
|
41
43
|
};
|
|
42
44
|
exports.getRuntimeConfig = getRuntimeConfig;
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,21 +1,53 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
3
3
|
var regionHash = {
|
|
4
|
-
"us-east-1
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
"us-east-1": {
|
|
5
|
+
variants: [
|
|
6
|
+
{
|
|
7
|
+
hostname: "translate.us-east-1.amazonaws.com",
|
|
8
|
+
tags: [],
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
hostname: "translate-fips.us-east-1.amazonaws.com",
|
|
12
|
+
tags: ["fips"],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
7
15
|
},
|
|
8
|
-
"us-east-2
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
"us-east-2": {
|
|
17
|
+
variants: [
|
|
18
|
+
{
|
|
19
|
+
hostname: "translate.us-east-2.amazonaws.com",
|
|
20
|
+
tags: [],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
hostname: "translate-fips.us-east-2.amazonaws.com",
|
|
24
|
+
tags: ["fips"],
|
|
25
|
+
},
|
|
26
|
+
],
|
|
11
27
|
},
|
|
12
|
-
"us-gov-west-1
|
|
13
|
-
|
|
14
|
-
|
|
28
|
+
"us-gov-west-1": {
|
|
29
|
+
variants: [
|
|
30
|
+
{
|
|
31
|
+
hostname: "translate.us-gov-west-1.amazonaws.com",
|
|
32
|
+
tags: [],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
hostname: "translate-fips.us-gov-west-1.amazonaws.com",
|
|
36
|
+
tags: ["fips"],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
15
39
|
},
|
|
16
|
-
"us-west-2
|
|
17
|
-
|
|
18
|
-
|
|
40
|
+
"us-west-2": {
|
|
41
|
+
variants: [
|
|
42
|
+
{
|
|
43
|
+
hostname: "translate.us-west-2.amazonaws.com",
|
|
44
|
+
tags: [],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
hostname: "translate-fips.us-west-2.amazonaws.com",
|
|
48
|
+
tags: ["fips"],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
19
51
|
},
|
|
20
52
|
};
|
|
21
53
|
var partitionHash = {
|
|
@@ -47,27 +79,96 @@ var partitionHash = {
|
|
|
47
79
|
"us-west-2-fips",
|
|
48
80
|
],
|
|
49
81
|
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
|
|
50
|
-
|
|
82
|
+
variants: [
|
|
83
|
+
{
|
|
84
|
+
hostname: "translate.{region}.amazonaws.com",
|
|
85
|
+
tags: [],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
hostname: "translate-fips.{region}.amazonaws.com",
|
|
89
|
+
tags: ["fips"],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
hostname: "translate-fips.{region}.api.aws",
|
|
93
|
+
tags: ["dualstack", "fips"],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
hostname: "translate.{region}.api.aws",
|
|
97
|
+
tags: ["dualstack"],
|
|
98
|
+
},
|
|
99
|
+
],
|
|
51
100
|
},
|
|
52
101
|
"aws-cn": {
|
|
53
102
|
regions: ["cn-north-1", "cn-northwest-1"],
|
|
54
103
|
regionRegex: "^cn\\-\\w+\\-\\d+$",
|
|
55
|
-
|
|
104
|
+
variants: [
|
|
105
|
+
{
|
|
106
|
+
hostname: "translate.{region}.amazonaws.com.cn",
|
|
107
|
+
tags: [],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
hostname: "translate-fips.{region}.amazonaws.com.cn",
|
|
111
|
+
tags: ["fips"],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
hostname: "translate-fips.{region}.api.amazonwebservices.com.cn",
|
|
115
|
+
tags: ["dualstack", "fips"],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
hostname: "translate.{region}.api.amazonwebservices.com.cn",
|
|
119
|
+
tags: ["dualstack"],
|
|
120
|
+
},
|
|
121
|
+
],
|
|
56
122
|
},
|
|
57
123
|
"aws-iso": {
|
|
58
124
|
regions: ["us-iso-east-1", "us-iso-west-1"],
|
|
59
125
|
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
|
60
|
-
|
|
126
|
+
variants: [
|
|
127
|
+
{
|
|
128
|
+
hostname: "translate.{region}.c2s.ic.gov",
|
|
129
|
+
tags: [],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
hostname: "translate-fips.{region}.c2s.ic.gov",
|
|
133
|
+
tags: ["fips"],
|
|
134
|
+
},
|
|
135
|
+
],
|
|
61
136
|
},
|
|
62
137
|
"aws-iso-b": {
|
|
63
138
|
regions: ["us-isob-east-1"],
|
|
64
139
|
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
|
65
|
-
|
|
140
|
+
variants: [
|
|
141
|
+
{
|
|
142
|
+
hostname: "translate.{region}.sc2s.sgov.gov",
|
|
143
|
+
tags: [],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
hostname: "translate-fips.{region}.sc2s.sgov.gov",
|
|
147
|
+
tags: ["fips"],
|
|
148
|
+
},
|
|
149
|
+
],
|
|
66
150
|
},
|
|
67
151
|
"aws-us-gov": {
|
|
68
152
|
regions: ["us-gov-east-1", "us-gov-west-1", "us-gov-west-1-fips"],
|
|
69
153
|
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
|
70
|
-
|
|
154
|
+
variants: [
|
|
155
|
+
{
|
|
156
|
+
hostname: "translate.{region}.amazonaws.com",
|
|
157
|
+
tags: [],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
hostname: "translate-fips.{region}.amazonaws.com",
|
|
161
|
+
tags: ["fips"],
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
hostname: "translate-fips.{region}.api.aws",
|
|
165
|
+
tags: ["dualstack", "fips"],
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
hostname: "translate.{region}.api.aws",
|
|
169
|
+
tags: ["dualstack"],
|
|
170
|
+
},
|
|
171
|
+
],
|
|
71
172
|
},
|
|
72
173
|
};
|
|
73
174
|
export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -112,6 +112,14 @@ export var OutputDataConfig;
|
|
|
112
112
|
(function (OutputDataConfig) {
|
|
113
113
|
OutputDataConfig.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
114
114
|
})(OutputDataConfig || (OutputDataConfig = {}));
|
|
115
|
+
export var Profanity;
|
|
116
|
+
(function (Profanity) {
|
|
117
|
+
Profanity["MASK"] = "MASK";
|
|
118
|
+
})(Profanity || (Profanity = {}));
|
|
119
|
+
export var TranslationSettings;
|
|
120
|
+
(function (TranslationSettings) {
|
|
121
|
+
TranslationSettings.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
122
|
+
})(TranslationSettings || (TranslationSettings = {}));
|
|
115
123
|
export var TextTranslationJobProperties;
|
|
116
124
|
(function (TextTranslationJobProperties) {
|
|
117
125
|
TextTranslationJobProperties.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -140,6 +148,7 @@ export var TerminologyDataFormat;
|
|
|
140
148
|
(function (TerminologyDataFormat) {
|
|
141
149
|
TerminologyDataFormat["CSV"] = "CSV";
|
|
142
150
|
TerminologyDataFormat["TMX"] = "TMX";
|
|
151
|
+
TerminologyDataFormat["TSV"] = "TSV";
|
|
143
152
|
})(TerminologyDataFormat || (TerminologyDataFormat = {}));
|
|
144
153
|
export var GetTerminologyRequest;
|
|
145
154
|
(function (GetTerminologyRequest) {
|
|
@@ -149,6 +158,11 @@ export var TerminologyDataLocation;
|
|
|
149
158
|
(function (TerminologyDataLocation) {
|
|
150
159
|
TerminologyDataLocation.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
151
160
|
})(TerminologyDataLocation || (TerminologyDataLocation = {}));
|
|
161
|
+
export var Directionality;
|
|
162
|
+
(function (Directionality) {
|
|
163
|
+
Directionality["MULTI"] = "MULTI";
|
|
164
|
+
Directionality["UNI"] = "UNI";
|
|
165
|
+
})(Directionality || (Directionality = {}));
|
|
152
166
|
export var TerminologyProperties;
|
|
153
167
|
(function (TerminologyProperties) {
|
|
154
168
|
TerminologyProperties.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|