@aws-sdk/client-translate 3.315.0 → 3.316.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/dist-cjs/Translate.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Translate = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
4
5
|
const CreateParallelDataCommand_1 = require("./commands/CreateParallelDataCommand");
|
|
5
6
|
const DeleteParallelDataCommand_1 = require("./commands/DeleteParallelDataCommand");
|
|
6
7
|
const DeleteTerminologyCommand_1 = require("./commands/DeleteTerminologyCommand");
|
|
@@ -20,258 +21,27 @@ const TranslateTextCommand_1 = require("./commands/TranslateTextCommand");
|
|
|
20
21
|
const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
|
|
21
22
|
const UpdateParallelDataCommand_1 = require("./commands/UpdateParallelDataCommand");
|
|
22
23
|
const TranslateClient_1 = require("./TranslateClient");
|
|
24
|
+
const commands = {
|
|
25
|
+
CreateParallelDataCommand: CreateParallelDataCommand_1.CreateParallelDataCommand,
|
|
26
|
+
DeleteParallelDataCommand: DeleteParallelDataCommand_1.DeleteParallelDataCommand,
|
|
27
|
+
DeleteTerminologyCommand: DeleteTerminologyCommand_1.DeleteTerminologyCommand,
|
|
28
|
+
DescribeTextTranslationJobCommand: DescribeTextTranslationJobCommand_1.DescribeTextTranslationJobCommand,
|
|
29
|
+
GetParallelDataCommand: GetParallelDataCommand_1.GetParallelDataCommand,
|
|
30
|
+
GetTerminologyCommand: GetTerminologyCommand_1.GetTerminologyCommand,
|
|
31
|
+
ImportTerminologyCommand: ImportTerminologyCommand_1.ImportTerminologyCommand,
|
|
32
|
+
ListLanguagesCommand: ListLanguagesCommand_1.ListLanguagesCommand,
|
|
33
|
+
ListParallelDataCommand: ListParallelDataCommand_1.ListParallelDataCommand,
|
|
34
|
+
ListTagsForResourceCommand: ListTagsForResourceCommand_1.ListTagsForResourceCommand,
|
|
35
|
+
ListTerminologiesCommand: ListTerminologiesCommand_1.ListTerminologiesCommand,
|
|
36
|
+
ListTextTranslationJobsCommand: ListTextTranslationJobsCommand_1.ListTextTranslationJobsCommand,
|
|
37
|
+
StartTextTranslationJobCommand: StartTextTranslationJobCommand_1.StartTextTranslationJobCommand,
|
|
38
|
+
StopTextTranslationJobCommand: StopTextTranslationJobCommand_1.StopTextTranslationJobCommand,
|
|
39
|
+
TagResourceCommand: TagResourceCommand_1.TagResourceCommand,
|
|
40
|
+
TranslateTextCommand: TranslateTextCommand_1.TranslateTextCommand,
|
|
41
|
+
UntagResourceCommand: UntagResourceCommand_1.UntagResourceCommand,
|
|
42
|
+
UpdateParallelDataCommand: UpdateParallelDataCommand_1.UpdateParallelDataCommand,
|
|
43
|
+
};
|
|
23
44
|
class Translate extends TranslateClient_1.TranslateClient {
|
|
24
|
-
createParallelData(args, optionsOrCb, cb) {
|
|
25
|
-
const command = new CreateParallelDataCommand_1.CreateParallelDataCommand(args);
|
|
26
|
-
if (typeof optionsOrCb === "function") {
|
|
27
|
-
this.send(command, optionsOrCb);
|
|
28
|
-
}
|
|
29
|
-
else if (typeof cb === "function") {
|
|
30
|
-
if (typeof optionsOrCb !== "object")
|
|
31
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
32
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return this.send(command, optionsOrCb);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
deleteParallelData(args, optionsOrCb, cb) {
|
|
39
|
-
const command = new DeleteParallelDataCommand_1.DeleteParallelDataCommand(args);
|
|
40
|
-
if (typeof optionsOrCb === "function") {
|
|
41
|
-
this.send(command, optionsOrCb);
|
|
42
|
-
}
|
|
43
|
-
else if (typeof cb === "function") {
|
|
44
|
-
if (typeof optionsOrCb !== "object")
|
|
45
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
46
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return this.send(command, optionsOrCb);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
deleteTerminology(args, optionsOrCb, cb) {
|
|
53
|
-
const command = new DeleteTerminologyCommand_1.DeleteTerminologyCommand(args);
|
|
54
|
-
if (typeof optionsOrCb === "function") {
|
|
55
|
-
this.send(command, optionsOrCb);
|
|
56
|
-
}
|
|
57
|
-
else if (typeof cb === "function") {
|
|
58
|
-
if (typeof optionsOrCb !== "object")
|
|
59
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
60
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return this.send(command, optionsOrCb);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
describeTextTranslationJob(args, optionsOrCb, cb) {
|
|
67
|
-
const command = new DescribeTextTranslationJobCommand_1.DescribeTextTranslationJobCommand(args);
|
|
68
|
-
if (typeof optionsOrCb === "function") {
|
|
69
|
-
this.send(command, optionsOrCb);
|
|
70
|
-
}
|
|
71
|
-
else if (typeof cb === "function") {
|
|
72
|
-
if (typeof optionsOrCb !== "object")
|
|
73
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
74
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
return this.send(command, optionsOrCb);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
getParallelData(args, optionsOrCb, cb) {
|
|
81
|
-
const command = new GetParallelDataCommand_1.GetParallelDataCommand(args);
|
|
82
|
-
if (typeof optionsOrCb === "function") {
|
|
83
|
-
this.send(command, optionsOrCb);
|
|
84
|
-
}
|
|
85
|
-
else if (typeof cb === "function") {
|
|
86
|
-
if (typeof optionsOrCb !== "object")
|
|
87
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
88
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
return this.send(command, optionsOrCb);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
getTerminology(args, optionsOrCb, cb) {
|
|
95
|
-
const command = new GetTerminologyCommand_1.GetTerminologyCommand(args);
|
|
96
|
-
if (typeof optionsOrCb === "function") {
|
|
97
|
-
this.send(command, optionsOrCb);
|
|
98
|
-
}
|
|
99
|
-
else if (typeof cb === "function") {
|
|
100
|
-
if (typeof optionsOrCb !== "object")
|
|
101
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
102
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
return this.send(command, optionsOrCb);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
importTerminology(args, optionsOrCb, cb) {
|
|
109
|
-
const command = new ImportTerminologyCommand_1.ImportTerminologyCommand(args);
|
|
110
|
-
if (typeof optionsOrCb === "function") {
|
|
111
|
-
this.send(command, optionsOrCb);
|
|
112
|
-
}
|
|
113
|
-
else if (typeof cb === "function") {
|
|
114
|
-
if (typeof optionsOrCb !== "object")
|
|
115
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
116
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
return this.send(command, optionsOrCb);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
listLanguages(args, optionsOrCb, cb) {
|
|
123
|
-
const command = new ListLanguagesCommand_1.ListLanguagesCommand(args);
|
|
124
|
-
if (typeof optionsOrCb === "function") {
|
|
125
|
-
this.send(command, optionsOrCb);
|
|
126
|
-
}
|
|
127
|
-
else if (typeof cb === "function") {
|
|
128
|
-
if (typeof optionsOrCb !== "object")
|
|
129
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
130
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
return this.send(command, optionsOrCb);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
listParallelData(args, optionsOrCb, cb) {
|
|
137
|
-
const command = new ListParallelDataCommand_1.ListParallelDataCommand(args);
|
|
138
|
-
if (typeof optionsOrCb === "function") {
|
|
139
|
-
this.send(command, optionsOrCb);
|
|
140
|
-
}
|
|
141
|
-
else if (typeof cb === "function") {
|
|
142
|
-
if (typeof optionsOrCb !== "object")
|
|
143
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
144
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
return this.send(command, optionsOrCb);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
listTagsForResource(args, optionsOrCb, cb) {
|
|
151
|
-
const command = new ListTagsForResourceCommand_1.ListTagsForResourceCommand(args);
|
|
152
|
-
if (typeof optionsOrCb === "function") {
|
|
153
|
-
this.send(command, optionsOrCb);
|
|
154
|
-
}
|
|
155
|
-
else if (typeof cb === "function") {
|
|
156
|
-
if (typeof optionsOrCb !== "object")
|
|
157
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
158
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
return this.send(command, optionsOrCb);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
listTerminologies(args, optionsOrCb, cb) {
|
|
165
|
-
const command = new ListTerminologiesCommand_1.ListTerminologiesCommand(args);
|
|
166
|
-
if (typeof optionsOrCb === "function") {
|
|
167
|
-
this.send(command, optionsOrCb);
|
|
168
|
-
}
|
|
169
|
-
else if (typeof cb === "function") {
|
|
170
|
-
if (typeof optionsOrCb !== "object")
|
|
171
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
172
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
return this.send(command, optionsOrCb);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
listTextTranslationJobs(args, optionsOrCb, cb) {
|
|
179
|
-
const command = new ListTextTranslationJobsCommand_1.ListTextTranslationJobsCommand(args);
|
|
180
|
-
if (typeof optionsOrCb === "function") {
|
|
181
|
-
this.send(command, optionsOrCb);
|
|
182
|
-
}
|
|
183
|
-
else if (typeof cb === "function") {
|
|
184
|
-
if (typeof optionsOrCb !== "object")
|
|
185
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
186
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
return this.send(command, optionsOrCb);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
startTextTranslationJob(args, optionsOrCb, cb) {
|
|
193
|
-
const command = new StartTextTranslationJobCommand_1.StartTextTranslationJobCommand(args);
|
|
194
|
-
if (typeof optionsOrCb === "function") {
|
|
195
|
-
this.send(command, optionsOrCb);
|
|
196
|
-
}
|
|
197
|
-
else if (typeof cb === "function") {
|
|
198
|
-
if (typeof optionsOrCb !== "object")
|
|
199
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
200
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
return this.send(command, optionsOrCb);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
stopTextTranslationJob(args, optionsOrCb, cb) {
|
|
207
|
-
const command = new StopTextTranslationJobCommand_1.StopTextTranslationJobCommand(args);
|
|
208
|
-
if (typeof optionsOrCb === "function") {
|
|
209
|
-
this.send(command, optionsOrCb);
|
|
210
|
-
}
|
|
211
|
-
else if (typeof cb === "function") {
|
|
212
|
-
if (typeof optionsOrCb !== "object")
|
|
213
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
214
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
return this.send(command, optionsOrCb);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
tagResource(args, optionsOrCb, cb) {
|
|
221
|
-
const command = new TagResourceCommand_1.TagResourceCommand(args);
|
|
222
|
-
if (typeof optionsOrCb === "function") {
|
|
223
|
-
this.send(command, optionsOrCb);
|
|
224
|
-
}
|
|
225
|
-
else if (typeof cb === "function") {
|
|
226
|
-
if (typeof optionsOrCb !== "object")
|
|
227
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
228
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
return this.send(command, optionsOrCb);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
translateText(args, optionsOrCb, cb) {
|
|
235
|
-
const command = new TranslateTextCommand_1.TranslateTextCommand(args);
|
|
236
|
-
if (typeof optionsOrCb === "function") {
|
|
237
|
-
this.send(command, optionsOrCb);
|
|
238
|
-
}
|
|
239
|
-
else if (typeof cb === "function") {
|
|
240
|
-
if (typeof optionsOrCb !== "object")
|
|
241
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
242
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
return this.send(command, optionsOrCb);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
untagResource(args, optionsOrCb, cb) {
|
|
249
|
-
const command = new UntagResourceCommand_1.UntagResourceCommand(args);
|
|
250
|
-
if (typeof optionsOrCb === "function") {
|
|
251
|
-
this.send(command, optionsOrCb);
|
|
252
|
-
}
|
|
253
|
-
else if (typeof cb === "function") {
|
|
254
|
-
if (typeof optionsOrCb !== "object")
|
|
255
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
256
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
return this.send(command, optionsOrCb);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
updateParallelData(args, optionsOrCb, cb) {
|
|
263
|
-
const command = new UpdateParallelDataCommand_1.UpdateParallelDataCommand(args);
|
|
264
|
-
if (typeof optionsOrCb === "function") {
|
|
265
|
-
this.send(command, optionsOrCb);
|
|
266
|
-
}
|
|
267
|
-
else if (typeof cb === "function") {
|
|
268
|
-
if (typeof optionsOrCb !== "object")
|
|
269
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
270
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
271
|
-
}
|
|
272
|
-
else {
|
|
273
|
-
return this.send(command, optionsOrCb);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
45
|
}
|
|
277
46
|
exports.Translate = Translate;
|
|
47
|
+
(0, smithy_client_1.createAggregatedClient)(commands, Translate);
|
|
@@ -1058,7 +1058,7 @@ const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) =>
|
|
|
1058
1058
|
};
|
|
1059
1059
|
const se_CreateParallelDataRequest = (input, context) => {
|
|
1060
1060
|
return (0, smithy_client_1.take)(input, {
|
|
1061
|
-
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
1061
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1062
1062
|
Description: [],
|
|
1063
1063
|
EncryptionKey: smithy_client_1._json,
|
|
1064
1064
|
Name: [],
|
|
@@ -1085,7 +1085,7 @@ const se_ListTextTranslationJobsRequest = (input, context) => {
|
|
|
1085
1085
|
};
|
|
1086
1086
|
const se_StartTextTranslationJobRequest = (input, context) => {
|
|
1087
1087
|
return (0, smithy_client_1.take)(input, {
|
|
1088
|
-
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
1088
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1089
1089
|
DataAccessRoleArn: [],
|
|
1090
1090
|
InputDataConfig: smithy_client_1._json,
|
|
1091
1091
|
JobName: [],
|
|
@@ -1114,7 +1114,7 @@ const se_TextTranslationJobFilter = (input, context) => {
|
|
|
1114
1114
|
};
|
|
1115
1115
|
const se_UpdateParallelDataRequest = (input, context) => {
|
|
1116
1116
|
return (0, smithy_client_1.take)(input, {
|
|
1117
|
-
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
1117
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
1118
1118
|
Description: [],
|
|
1119
1119
|
Name: [],
|
|
1120
1120
|
ParallelDataConfig: smithy_client_1._json,
|
package/dist-es/Translate.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { CreateParallelDataCommand, } from "./commands/CreateParallelDataCommand";
|
|
2
3
|
import { DeleteParallelDataCommand, } from "./commands/DeleteParallelDataCommand";
|
|
3
4
|
import { DeleteTerminologyCommand, } from "./commands/DeleteTerminologyCommand";
|
|
@@ -17,257 +18,26 @@ import { TranslateTextCommand, } from "./commands/TranslateTextCommand";
|
|
|
17
18
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
18
19
|
import { UpdateParallelDataCommand, } from "./commands/UpdateParallelDataCommand";
|
|
19
20
|
import { TranslateClient } from "./TranslateClient";
|
|
21
|
+
const commands = {
|
|
22
|
+
CreateParallelDataCommand,
|
|
23
|
+
DeleteParallelDataCommand,
|
|
24
|
+
DeleteTerminologyCommand,
|
|
25
|
+
DescribeTextTranslationJobCommand,
|
|
26
|
+
GetParallelDataCommand,
|
|
27
|
+
GetTerminologyCommand,
|
|
28
|
+
ImportTerminologyCommand,
|
|
29
|
+
ListLanguagesCommand,
|
|
30
|
+
ListParallelDataCommand,
|
|
31
|
+
ListTagsForResourceCommand,
|
|
32
|
+
ListTerminologiesCommand,
|
|
33
|
+
ListTextTranslationJobsCommand,
|
|
34
|
+
StartTextTranslationJobCommand,
|
|
35
|
+
StopTextTranslationJobCommand,
|
|
36
|
+
TagResourceCommand,
|
|
37
|
+
TranslateTextCommand,
|
|
38
|
+
UntagResourceCommand,
|
|
39
|
+
UpdateParallelDataCommand,
|
|
40
|
+
};
|
|
20
41
|
export class Translate extends TranslateClient {
|
|
21
|
-
createParallelData(args, optionsOrCb, cb) {
|
|
22
|
-
const command = new CreateParallelDataCommand(args);
|
|
23
|
-
if (typeof optionsOrCb === "function") {
|
|
24
|
-
this.send(command, optionsOrCb);
|
|
25
|
-
}
|
|
26
|
-
else if (typeof cb === "function") {
|
|
27
|
-
if (typeof optionsOrCb !== "object")
|
|
28
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
29
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return this.send(command, optionsOrCb);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
deleteParallelData(args, optionsOrCb, cb) {
|
|
36
|
-
const command = new DeleteParallelDataCommand(args);
|
|
37
|
-
if (typeof optionsOrCb === "function") {
|
|
38
|
-
this.send(command, optionsOrCb);
|
|
39
|
-
}
|
|
40
|
-
else if (typeof cb === "function") {
|
|
41
|
-
if (typeof optionsOrCb !== "object")
|
|
42
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
43
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
return this.send(command, optionsOrCb);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
deleteTerminology(args, optionsOrCb, cb) {
|
|
50
|
-
const command = new DeleteTerminologyCommand(args);
|
|
51
|
-
if (typeof optionsOrCb === "function") {
|
|
52
|
-
this.send(command, optionsOrCb);
|
|
53
|
-
}
|
|
54
|
-
else if (typeof cb === "function") {
|
|
55
|
-
if (typeof optionsOrCb !== "object")
|
|
56
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
57
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
return this.send(command, optionsOrCb);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
describeTextTranslationJob(args, optionsOrCb, cb) {
|
|
64
|
-
const command = new DescribeTextTranslationJobCommand(args);
|
|
65
|
-
if (typeof optionsOrCb === "function") {
|
|
66
|
-
this.send(command, optionsOrCb);
|
|
67
|
-
}
|
|
68
|
-
else if (typeof cb === "function") {
|
|
69
|
-
if (typeof optionsOrCb !== "object")
|
|
70
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
71
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
return this.send(command, optionsOrCb);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
getParallelData(args, optionsOrCb, cb) {
|
|
78
|
-
const command = new GetParallelDataCommand(args);
|
|
79
|
-
if (typeof optionsOrCb === "function") {
|
|
80
|
-
this.send(command, optionsOrCb);
|
|
81
|
-
}
|
|
82
|
-
else if (typeof cb === "function") {
|
|
83
|
-
if (typeof optionsOrCb !== "object")
|
|
84
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
85
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
return this.send(command, optionsOrCb);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
getTerminology(args, optionsOrCb, cb) {
|
|
92
|
-
const command = new GetTerminologyCommand(args);
|
|
93
|
-
if (typeof optionsOrCb === "function") {
|
|
94
|
-
this.send(command, optionsOrCb);
|
|
95
|
-
}
|
|
96
|
-
else if (typeof cb === "function") {
|
|
97
|
-
if (typeof optionsOrCb !== "object")
|
|
98
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
99
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
return this.send(command, optionsOrCb);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
importTerminology(args, optionsOrCb, cb) {
|
|
106
|
-
const command = new ImportTerminologyCommand(args);
|
|
107
|
-
if (typeof optionsOrCb === "function") {
|
|
108
|
-
this.send(command, optionsOrCb);
|
|
109
|
-
}
|
|
110
|
-
else if (typeof cb === "function") {
|
|
111
|
-
if (typeof optionsOrCb !== "object")
|
|
112
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
113
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
return this.send(command, optionsOrCb);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
listLanguages(args, optionsOrCb, cb) {
|
|
120
|
-
const command = new ListLanguagesCommand(args);
|
|
121
|
-
if (typeof optionsOrCb === "function") {
|
|
122
|
-
this.send(command, optionsOrCb);
|
|
123
|
-
}
|
|
124
|
-
else if (typeof cb === "function") {
|
|
125
|
-
if (typeof optionsOrCb !== "object")
|
|
126
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
127
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
return this.send(command, optionsOrCb);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
listParallelData(args, optionsOrCb, cb) {
|
|
134
|
-
const command = new ListParallelDataCommand(args);
|
|
135
|
-
if (typeof optionsOrCb === "function") {
|
|
136
|
-
this.send(command, optionsOrCb);
|
|
137
|
-
}
|
|
138
|
-
else if (typeof cb === "function") {
|
|
139
|
-
if (typeof optionsOrCb !== "object")
|
|
140
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
141
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
return this.send(command, optionsOrCb);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
listTagsForResource(args, optionsOrCb, cb) {
|
|
148
|
-
const command = new ListTagsForResourceCommand(args);
|
|
149
|
-
if (typeof optionsOrCb === "function") {
|
|
150
|
-
this.send(command, optionsOrCb);
|
|
151
|
-
}
|
|
152
|
-
else if (typeof cb === "function") {
|
|
153
|
-
if (typeof optionsOrCb !== "object")
|
|
154
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
155
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
return this.send(command, optionsOrCb);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
listTerminologies(args, optionsOrCb, cb) {
|
|
162
|
-
const command = new ListTerminologiesCommand(args);
|
|
163
|
-
if (typeof optionsOrCb === "function") {
|
|
164
|
-
this.send(command, optionsOrCb);
|
|
165
|
-
}
|
|
166
|
-
else if (typeof cb === "function") {
|
|
167
|
-
if (typeof optionsOrCb !== "object")
|
|
168
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
169
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
return this.send(command, optionsOrCb);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
listTextTranslationJobs(args, optionsOrCb, cb) {
|
|
176
|
-
const command = new ListTextTranslationJobsCommand(args);
|
|
177
|
-
if (typeof optionsOrCb === "function") {
|
|
178
|
-
this.send(command, optionsOrCb);
|
|
179
|
-
}
|
|
180
|
-
else if (typeof cb === "function") {
|
|
181
|
-
if (typeof optionsOrCb !== "object")
|
|
182
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
183
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
return this.send(command, optionsOrCb);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
startTextTranslationJob(args, optionsOrCb, cb) {
|
|
190
|
-
const command = new StartTextTranslationJobCommand(args);
|
|
191
|
-
if (typeof optionsOrCb === "function") {
|
|
192
|
-
this.send(command, optionsOrCb);
|
|
193
|
-
}
|
|
194
|
-
else if (typeof cb === "function") {
|
|
195
|
-
if (typeof optionsOrCb !== "object")
|
|
196
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
197
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
return this.send(command, optionsOrCb);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
stopTextTranslationJob(args, optionsOrCb, cb) {
|
|
204
|
-
const command = new StopTextTranslationJobCommand(args);
|
|
205
|
-
if (typeof optionsOrCb === "function") {
|
|
206
|
-
this.send(command, optionsOrCb);
|
|
207
|
-
}
|
|
208
|
-
else if (typeof cb === "function") {
|
|
209
|
-
if (typeof optionsOrCb !== "object")
|
|
210
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
211
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
return this.send(command, optionsOrCb);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
tagResource(args, optionsOrCb, cb) {
|
|
218
|
-
const command = new TagResourceCommand(args);
|
|
219
|
-
if (typeof optionsOrCb === "function") {
|
|
220
|
-
this.send(command, optionsOrCb);
|
|
221
|
-
}
|
|
222
|
-
else if (typeof cb === "function") {
|
|
223
|
-
if (typeof optionsOrCb !== "object")
|
|
224
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
225
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
return this.send(command, optionsOrCb);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
translateText(args, optionsOrCb, cb) {
|
|
232
|
-
const command = new TranslateTextCommand(args);
|
|
233
|
-
if (typeof optionsOrCb === "function") {
|
|
234
|
-
this.send(command, optionsOrCb);
|
|
235
|
-
}
|
|
236
|
-
else if (typeof cb === "function") {
|
|
237
|
-
if (typeof optionsOrCb !== "object")
|
|
238
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
239
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
return this.send(command, optionsOrCb);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
untagResource(args, optionsOrCb, cb) {
|
|
246
|
-
const command = new UntagResourceCommand(args);
|
|
247
|
-
if (typeof optionsOrCb === "function") {
|
|
248
|
-
this.send(command, optionsOrCb);
|
|
249
|
-
}
|
|
250
|
-
else if (typeof cb === "function") {
|
|
251
|
-
if (typeof optionsOrCb !== "object")
|
|
252
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
253
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
return this.send(command, optionsOrCb);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
updateParallelData(args, optionsOrCb, cb) {
|
|
260
|
-
const command = new UpdateParallelDataCommand(args);
|
|
261
|
-
if (typeof optionsOrCb === "function") {
|
|
262
|
-
this.send(command, optionsOrCb);
|
|
263
|
-
}
|
|
264
|
-
else if (typeof cb === "function") {
|
|
265
|
-
if (typeof optionsOrCb !== "object")
|
|
266
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
267
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
268
|
-
}
|
|
269
|
-
else {
|
|
270
|
-
return this.send(command, optionsOrCb);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
42
|
}
|
|
43
|
+
createAggregatedClient(commands, Translate);
|
|
@@ -1019,7 +1019,7 @@ const de_UnsupportedLanguagePairExceptionRes = async (parsedOutput, context) =>
|
|
|
1019
1019
|
};
|
|
1020
1020
|
const se_CreateParallelDataRequest = (input, context) => {
|
|
1021
1021
|
return take(input, {
|
|
1022
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
1022
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
1023
1023
|
Description: [],
|
|
1024
1024
|
EncryptionKey: _json,
|
|
1025
1025
|
Name: [],
|
|
@@ -1046,7 +1046,7 @@ const se_ListTextTranslationJobsRequest = (input, context) => {
|
|
|
1046
1046
|
};
|
|
1047
1047
|
const se_StartTextTranslationJobRequest = (input, context) => {
|
|
1048
1048
|
return take(input, {
|
|
1049
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
1049
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
1050
1050
|
DataAccessRoleArn: [],
|
|
1051
1051
|
InputDataConfig: _json,
|
|
1052
1052
|
JobName: [],
|
|
@@ -1075,7 +1075,7 @@ const se_TextTranslationJobFilter = (input, context) => {
|
|
|
1075
1075
|
};
|
|
1076
1076
|
const se_UpdateParallelDataRequest = (input, context) => {
|
|
1077
1077
|
return take(input, {
|
|
1078
|
-
ClientToken: (_) => _ ?? generateIdempotencyToken(),
|
|
1078
|
+
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
1079
1079
|
Description: [],
|
|
1080
1080
|
Name: [],
|
|
1081
1081
|
ParallelDataConfig: _json,
|
|
@@ -18,169 +18,119 @@ import { TranslateTextCommandInput, TranslateTextCommandOutput } from "./command
|
|
|
18
18
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
19
19
|
import { UpdateParallelDataCommandInput, UpdateParallelDataCommandOutput } from "./commands/UpdateParallelDataCommand";
|
|
20
20
|
import { TranslateClient } from "./TranslateClient";
|
|
21
|
-
|
|
22
|
-
* @public
|
|
23
|
-
* <p>Provides translation of the input content from the source language to the target language.</p>
|
|
24
|
-
*/
|
|
25
|
-
export declare class Translate extends TranslateClient {
|
|
21
|
+
export interface Translate {
|
|
26
22
|
/**
|
|
27
|
-
* @
|
|
28
|
-
* <p>Creates a parallel data resource in Amazon Translate by importing an input file from
|
|
29
|
-
* Amazon S3. Parallel data files contain examples that show how you want segments of text to be
|
|
30
|
-
* translated. By adding parallel data, you can influence the style, tone, and word choice in
|
|
31
|
-
* your translation output.</p>
|
|
23
|
+
* @see {@link CreateParallelDataCommand}
|
|
32
24
|
*/
|
|
33
25
|
createParallelData(args: CreateParallelDataCommandInput, options?: __HttpHandlerOptions): Promise<CreateParallelDataCommandOutput>;
|
|
34
26
|
createParallelData(args: CreateParallelDataCommandInput, cb: (err: any, data?: CreateParallelDataCommandOutput) => void): void;
|
|
35
27
|
createParallelData(args: CreateParallelDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateParallelDataCommandOutput) => void): void;
|
|
36
28
|
/**
|
|
37
|
-
* @
|
|
38
|
-
* <p>Deletes a parallel data resource in Amazon Translate.</p>
|
|
29
|
+
* @see {@link DeleteParallelDataCommand}
|
|
39
30
|
*/
|
|
40
31
|
deleteParallelData(args: DeleteParallelDataCommandInput, options?: __HttpHandlerOptions): Promise<DeleteParallelDataCommandOutput>;
|
|
41
32
|
deleteParallelData(args: DeleteParallelDataCommandInput, cb: (err: any, data?: DeleteParallelDataCommandOutput) => void): void;
|
|
42
33
|
deleteParallelData(args: DeleteParallelDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteParallelDataCommandOutput) => void): void;
|
|
43
34
|
/**
|
|
44
|
-
* @
|
|
45
|
-
* <p>A synchronous action that deletes a custom terminology.</p>
|
|
35
|
+
* @see {@link DeleteTerminologyCommand}
|
|
46
36
|
*/
|
|
47
37
|
deleteTerminology(args: DeleteTerminologyCommandInput, options?: __HttpHandlerOptions): Promise<DeleteTerminologyCommandOutput>;
|
|
48
38
|
deleteTerminology(args: DeleteTerminologyCommandInput, cb: (err: any, data?: DeleteTerminologyCommandOutput) => void): void;
|
|
49
39
|
deleteTerminology(args: DeleteTerminologyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteTerminologyCommandOutput) => void): void;
|
|
50
40
|
/**
|
|
51
|
-
* @
|
|
52
|
-
* <p>Gets the properties associated with an asynchronous batch translation job including name,
|
|
53
|
-
* ID, status, source and target languages, input/output S3 buckets, and so on.</p>
|
|
41
|
+
* @see {@link DescribeTextTranslationJobCommand}
|
|
54
42
|
*/
|
|
55
43
|
describeTextTranslationJob(args: DescribeTextTranslationJobCommandInput, options?: __HttpHandlerOptions): Promise<DescribeTextTranslationJobCommandOutput>;
|
|
56
44
|
describeTextTranslationJob(args: DescribeTextTranslationJobCommandInput, cb: (err: any, data?: DescribeTextTranslationJobCommandOutput) => void): void;
|
|
57
45
|
describeTextTranslationJob(args: DescribeTextTranslationJobCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeTextTranslationJobCommandOutput) => void): void;
|
|
58
46
|
/**
|
|
59
|
-
* @
|
|
60
|
-
* <p>Provides information about a parallel data resource.</p>
|
|
47
|
+
* @see {@link GetParallelDataCommand}
|
|
61
48
|
*/
|
|
62
49
|
getParallelData(args: GetParallelDataCommandInput, options?: __HttpHandlerOptions): Promise<GetParallelDataCommandOutput>;
|
|
63
50
|
getParallelData(args: GetParallelDataCommandInput, cb: (err: any, data?: GetParallelDataCommandOutput) => void): void;
|
|
64
51
|
getParallelData(args: GetParallelDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetParallelDataCommandOutput) => void): void;
|
|
65
52
|
/**
|
|
66
|
-
* @
|
|
67
|
-
* <p>Retrieves a custom terminology.</p>
|
|
53
|
+
* @see {@link GetTerminologyCommand}
|
|
68
54
|
*/
|
|
69
55
|
getTerminology(args: GetTerminologyCommandInput, options?: __HttpHandlerOptions): Promise<GetTerminologyCommandOutput>;
|
|
70
56
|
getTerminology(args: GetTerminologyCommandInput, cb: (err: any, data?: GetTerminologyCommandOutput) => void): void;
|
|
71
57
|
getTerminology(args: GetTerminologyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetTerminologyCommandOutput) => void): void;
|
|
72
58
|
/**
|
|
73
|
-
* @
|
|
74
|
-
* <p>Creates or updates a custom terminology, depending on whether one already exists for the
|
|
75
|
-
* given terminology name. Importing a terminology with the same name as an existing one will
|
|
76
|
-
* merge the terminologies based on the chosen merge strategy. The only supported merge strategy
|
|
77
|
-
* is OVERWRITE, where the imported terminology overwrites the existing terminology of the same
|
|
78
|
-
* name.</p>
|
|
79
|
-
* <p>If you import a terminology that overwrites an existing one, the new terminology takes up
|
|
80
|
-
* to 10 minutes to fully propagate. After that, translations have access to the new
|
|
81
|
-
* terminology.</p>
|
|
59
|
+
* @see {@link ImportTerminologyCommand}
|
|
82
60
|
*/
|
|
83
61
|
importTerminology(args: ImportTerminologyCommandInput, options?: __HttpHandlerOptions): Promise<ImportTerminologyCommandOutput>;
|
|
84
62
|
importTerminology(args: ImportTerminologyCommandInput, cb: (err: any, data?: ImportTerminologyCommandOutput) => void): void;
|
|
85
63
|
importTerminology(args: ImportTerminologyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ImportTerminologyCommandOutput) => void): void;
|
|
86
64
|
/**
|
|
87
|
-
* @
|
|
88
|
-
* <p>Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.</p>
|
|
65
|
+
* @see {@link ListLanguagesCommand}
|
|
89
66
|
*/
|
|
90
67
|
listLanguages(args: ListLanguagesCommandInput, options?: __HttpHandlerOptions): Promise<ListLanguagesCommandOutput>;
|
|
91
68
|
listLanguages(args: ListLanguagesCommandInput, cb: (err: any, data?: ListLanguagesCommandOutput) => void): void;
|
|
92
69
|
listLanguages(args: ListLanguagesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListLanguagesCommandOutput) => void): void;
|
|
93
70
|
/**
|
|
94
|
-
* @
|
|
95
|
-
* <p>Provides a list of your parallel data resources in Amazon Translate.</p>
|
|
71
|
+
* @see {@link ListParallelDataCommand}
|
|
96
72
|
*/
|
|
97
73
|
listParallelData(args: ListParallelDataCommandInput, options?: __HttpHandlerOptions): Promise<ListParallelDataCommandOutput>;
|
|
98
74
|
listParallelData(args: ListParallelDataCommandInput, cb: (err: any, data?: ListParallelDataCommandOutput) => void): void;
|
|
99
75
|
listParallelData(args: ListParallelDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListParallelDataCommandOutput) => void): void;
|
|
100
76
|
/**
|
|
101
|
-
* @
|
|
102
|
-
* <p>Lists all tags associated with a given Amazon Translate resource.
|
|
103
|
-
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
104
|
-
* Tagging your resources</a>.</p>
|
|
77
|
+
* @see {@link ListTagsForResourceCommand}
|
|
105
78
|
*/
|
|
106
79
|
listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
|
|
107
80
|
listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
108
81
|
listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
109
82
|
/**
|
|
110
|
-
* @
|
|
111
|
-
* <p>Provides a list of custom terminologies associated with your account.</p>
|
|
83
|
+
* @see {@link ListTerminologiesCommand}
|
|
112
84
|
*/
|
|
113
85
|
listTerminologies(args: ListTerminologiesCommandInput, options?: __HttpHandlerOptions): Promise<ListTerminologiesCommandOutput>;
|
|
114
86
|
listTerminologies(args: ListTerminologiesCommandInput, cb: (err: any, data?: ListTerminologiesCommandOutput) => void): void;
|
|
115
87
|
listTerminologies(args: ListTerminologiesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTerminologiesCommandOutput) => void): void;
|
|
116
88
|
/**
|
|
117
|
-
* @
|
|
118
|
-
* <p>Gets a list of the batch translation jobs that you have submitted.</p>
|
|
89
|
+
* @see {@link ListTextTranslationJobsCommand}
|
|
119
90
|
*/
|
|
120
91
|
listTextTranslationJobs(args: ListTextTranslationJobsCommandInput, options?: __HttpHandlerOptions): Promise<ListTextTranslationJobsCommandOutput>;
|
|
121
92
|
listTextTranslationJobs(args: ListTextTranslationJobsCommandInput, cb: (err: any, data?: ListTextTranslationJobsCommandOutput) => void): void;
|
|
122
93
|
listTextTranslationJobs(args: ListTextTranslationJobsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTextTranslationJobsCommandOutput) => void): void;
|
|
123
94
|
/**
|
|
124
|
-
* @
|
|
125
|
-
* <p>Starts an asynchronous batch translation job. Use batch translation jobs to
|
|
126
|
-
* translate large volumes of text across multiple documents at once.
|
|
127
|
-
* For batch translation, you can input documents with different source languages (specify <code>auto</code>
|
|
128
|
-
* as the source language). You can specify one
|
|
129
|
-
* or more target languages. Batch translation translates each input document into each of the target languages.
|
|
130
|
-
* For more information, see
|
|
131
|
-
* <a href="https://docs.aws.amazon.com/translate/latest/dg/async.html">Asynchronous batch processing</a>.</p>
|
|
132
|
-
*
|
|
133
|
-
* <p>Batch translation jobs can be described with the <a>DescribeTextTranslationJob</a> operation, listed with the <a>ListTextTranslationJobs</a> operation, and stopped with the <a>StopTextTranslationJob</a> operation.</p>
|
|
95
|
+
* @see {@link StartTextTranslationJobCommand}
|
|
134
96
|
*/
|
|
135
97
|
startTextTranslationJob(args: StartTextTranslationJobCommandInput, options?: __HttpHandlerOptions): Promise<StartTextTranslationJobCommandOutput>;
|
|
136
98
|
startTextTranslationJob(args: StartTextTranslationJobCommandInput, cb: (err: any, data?: StartTextTranslationJobCommandOutput) => void): void;
|
|
137
99
|
startTextTranslationJob(args: StartTextTranslationJobCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartTextTranslationJobCommandOutput) => void): void;
|
|
138
100
|
/**
|
|
139
|
-
* @
|
|
140
|
-
* <p>Stops an asynchronous batch translation job that is in progress.</p>
|
|
141
|
-
* <p>If the job's state is <code>IN_PROGRESS</code>, the job will be marked for termination and
|
|
142
|
-
* put into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped,
|
|
143
|
-
* it is put into the <code>COMPLETED</code> state. Otherwise, the job is put into the
|
|
144
|
-
* <code>STOPPED</code> state.</p>
|
|
145
|
-
* <p>Asynchronous batch translation jobs are started with the <a>StartTextTranslationJob</a> operation. You can use the <a>DescribeTextTranslationJob</a> or <a>ListTextTranslationJobs</a>
|
|
146
|
-
* operations to get a batch translation job's <code>JobId</code>.</p>
|
|
101
|
+
* @see {@link StopTextTranslationJobCommand}
|
|
147
102
|
*/
|
|
148
103
|
stopTextTranslationJob(args: StopTextTranslationJobCommandInput, options?: __HttpHandlerOptions): Promise<StopTextTranslationJobCommandOutput>;
|
|
149
104
|
stopTextTranslationJob(args: StopTextTranslationJobCommandInput, cb: (err: any, data?: StopTextTranslationJobCommandOutput) => void): void;
|
|
150
105
|
stopTextTranslationJob(args: StopTextTranslationJobCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StopTextTranslationJobCommandOutput) => void): void;
|
|
151
106
|
/**
|
|
152
|
-
* @
|
|
153
|
-
* <p>Associates a specific tag with a resource. A tag is a key-value pair
|
|
154
|
-
* that adds as a metadata to a resource.
|
|
155
|
-
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
156
|
-
* Tagging your resources</a>.</p>
|
|
107
|
+
* @see {@link TagResourceCommand}
|
|
157
108
|
*/
|
|
158
109
|
tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
|
|
159
110
|
tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
160
111
|
tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
161
112
|
/**
|
|
162
|
-
* @
|
|
163
|
-
* <p>Translates input text from the source language to the target language. For a list of
|
|
164
|
-
* available languages and language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
|
|
113
|
+
* @see {@link TranslateTextCommand}
|
|
165
114
|
*/
|
|
166
115
|
translateText(args: TranslateTextCommandInput, options?: __HttpHandlerOptions): Promise<TranslateTextCommandOutput>;
|
|
167
116
|
translateText(args: TranslateTextCommandInput, cb: (err: any, data?: TranslateTextCommandOutput) => void): void;
|
|
168
117
|
translateText(args: TranslateTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TranslateTextCommandOutput) => void): void;
|
|
169
118
|
/**
|
|
170
|
-
* @
|
|
171
|
-
* <p>Removes a specific tag associated with an Amazon Translate resource.
|
|
172
|
-
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
173
|
-
* Tagging your resources</a>.</p>
|
|
119
|
+
* @see {@link UntagResourceCommand}
|
|
174
120
|
*/
|
|
175
121
|
untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
|
|
176
122
|
untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
177
123
|
untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
178
124
|
/**
|
|
179
|
-
* @
|
|
180
|
-
* <p>Updates a previously created parallel data resource by importing a new input file from
|
|
181
|
-
* Amazon S3.</p>
|
|
125
|
+
* @see {@link UpdateParallelDataCommand}
|
|
182
126
|
*/
|
|
183
127
|
updateParallelData(args: UpdateParallelDataCommandInput, options?: __HttpHandlerOptions): Promise<UpdateParallelDataCommandOutput>;
|
|
184
128
|
updateParallelData(args: UpdateParallelDataCommandInput, cb: (err: any, data?: UpdateParallelDataCommandOutput) => void): void;
|
|
185
129
|
updateParallelData(args: UpdateParallelDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateParallelDataCommandOutput) => void): void;
|
|
186
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* @public
|
|
133
|
+
* <p>Provides translation of the input content from the source language to the target language.</p>
|
|
134
|
+
*/
|
|
135
|
+
export declare class Translate extends TranslateClient implements Translate {
|
|
136
|
+
}
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
UpdateParallelDataCommandOutput,
|
|
73
73
|
} from "./commands/UpdateParallelDataCommand";
|
|
74
74
|
import { TranslateClient } from "./TranslateClient";
|
|
75
|
-
export
|
|
75
|
+
export interface Translate {
|
|
76
76
|
createParallelData(
|
|
77
77
|
args: CreateParallelDataCommandInput,
|
|
78
78
|
options?: __HttpHandlerOptions
|
|
@@ -308,3 +308,4 @@ export declare class Translate extends TranslateClient {
|
|
|
308
308
|
cb: (err: any, data?: UpdateParallelDataCommandOutput) => void
|
|
309
309
|
): void;
|
|
310
310
|
}
|
|
311
|
+
export declare class Translate extends TranslateClient implements Translate {}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-translate",
|
|
3
3
|
"description": "AWS SDK for JavaScript Translate Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.316.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.316.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.316.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.316.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.316.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.316.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|