@aws-sdk/client-translate 3.312.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 +22 -252
- package/dist-cjs/protocols/Aws_json1_1.js +208 -703
- package/dist-es/Translate.js +22 -252
- package/dist-es/protocols/Aws_json1_1.js +209 -704
- package/dist-types/Translate.d.ts +25 -75
- package/dist-types/ts3.4/Translate.d.ts +2 -1
- package/package.json +6 -6
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);
|