@alicloud/aidge20260428 3.0.1 → 3.1.1
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/client.d.ts +99 -32
- package/dist/client.js +140 -32
- package/dist/client.js.map +1 -1
- package/dist/models/ImageTranslationStandardRequest.d.ts +17 -6
- package/dist/models/ImageTranslationStandardRequest.js +2 -0
- package/dist/models/ImageTranslationStandardRequest.js.map +1 -1
- package/dist/models/ImageTranslationStandardResponseBody.d.ts +365 -4
- package/dist/models/ImageTranslationStandardResponseBody.js +224 -1
- package/dist/models/ImageTranslationStandardResponseBody.js.map +1 -1
- package/dist/models/TextTranslateRequest.d.ts +11 -5
- package/dist/models/TextTranslateRequest.js.map +1 -1
- package/dist/models/TextTranslateResponseBody.d.ts +4 -4
- package/dist/models/TextTranslateShrinkRequest.d.ts +11 -5
- package/dist/models/TextTranslateShrinkRequest.js.map +1 -1
- package/dist/models/VideoTranslationRequest.d.ts +39 -0
- package/dist/models/VideoTranslationRequest.js +67 -0
- package/dist/models/VideoTranslationRequest.js.map +1 -0
- package/dist/models/VideoTranslationResponse.d.ts +19 -0
- package/dist/models/VideoTranslationResponse.js +69 -0
- package/dist/models/VideoTranslationResponse.js.map +1 -0
- package/dist/models/VideoTranslationResponseBody.d.ts +51 -0
- package/dist/models/VideoTranslationResponseBody.js +88 -0
- package/dist/models/VideoTranslationResponseBody.js.map +1 -0
- package/dist/models/VideoTranslationShrinkRequest.d.ts +39 -0
- package/dist/models/VideoTranslationShrinkRequest.js +64 -0
- package/dist/models/VideoTranslationShrinkRequest.js.map +1 -0
- package/dist/models/model.d.ts +11 -0
- package/dist/models/model.js +28 -6
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +148 -32
- package/src/models/ImageTranslationStandardRequest.ts +19 -6
- package/src/models/ImageTranslationStandardResponseBody.ts +534 -4
- package/src/models/TextTranslateRequest.ts +11 -5
- package/src/models/TextTranslateResponseBody.ts +4 -4
- package/src/models/TextTranslateShrinkRequest.ts +11 -5
- package/src/models/VideoTranslationRequest.ts +61 -0
- package/src/models/VideoTranslationResponse.ts +40 -0
- package/src/models/VideoTranslationResponseBody.ts +85 -0
- package/src/models/VideoTranslationShrinkRequest.ts +58 -0
- package/src/models/model.ts +11 -0
|
@@ -2,7 +2,532 @@
|
|
|
2
2
|
import * as $dara from '@darabonba/typescript';
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
export class ImageTranslationStandardResponseBodyDataEditInfoGoodsRects extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @remarks
|
|
8
|
+
* The rotation angle.
|
|
9
|
+
*/
|
|
10
|
+
degree?: number;
|
|
11
|
+
/**
|
|
12
|
+
* @remarks
|
|
13
|
+
* The height.
|
|
14
|
+
*/
|
|
15
|
+
height?: number;
|
|
16
|
+
/**
|
|
17
|
+
* @remarks
|
|
18
|
+
* The left coordinate.
|
|
19
|
+
*/
|
|
20
|
+
left?: number;
|
|
21
|
+
/**
|
|
22
|
+
* @remarks
|
|
23
|
+
* The top coordinate.
|
|
24
|
+
*/
|
|
25
|
+
top?: number;
|
|
26
|
+
/**
|
|
27
|
+
* @remarks
|
|
28
|
+
* The width.
|
|
29
|
+
*/
|
|
30
|
+
width?: number;
|
|
31
|
+
static names(): { [key: string]: string } {
|
|
32
|
+
return {
|
|
33
|
+
degree: 'Degree',
|
|
34
|
+
height: 'Height',
|
|
35
|
+
left: 'Left',
|
|
36
|
+
top: 'Top',
|
|
37
|
+
width: 'Width',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static types(): { [key: string]: any } {
|
|
42
|
+
return {
|
|
43
|
+
degree: 'number',
|
|
44
|
+
height: 'number',
|
|
45
|
+
left: 'number',
|
|
46
|
+
top: 'number',
|
|
47
|
+
width: 'number',
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
validate() {
|
|
52
|
+
super.validate();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
constructor(map?: { [key: string]: any }) {
|
|
56
|
+
super(map);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export class ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsImageRect extends $dara.Model {
|
|
61
|
+
/**
|
|
62
|
+
* @remarks
|
|
63
|
+
* The rotation angle.
|
|
64
|
+
*/
|
|
65
|
+
degree?: number;
|
|
66
|
+
/**
|
|
67
|
+
* @remarks
|
|
68
|
+
* The height.
|
|
69
|
+
*/
|
|
70
|
+
height?: number;
|
|
71
|
+
/**
|
|
72
|
+
* @remarks
|
|
73
|
+
* The left coordinate.
|
|
74
|
+
*/
|
|
75
|
+
left?: number;
|
|
76
|
+
/**
|
|
77
|
+
* @remarks
|
|
78
|
+
* The top coordinate.
|
|
79
|
+
*/
|
|
80
|
+
top?: number;
|
|
81
|
+
/**
|
|
82
|
+
* @remarks
|
|
83
|
+
* The width.
|
|
84
|
+
*/
|
|
85
|
+
width?: number;
|
|
86
|
+
static names(): { [key: string]: string } {
|
|
87
|
+
return {
|
|
88
|
+
degree: 'Degree',
|
|
89
|
+
height: 'Height',
|
|
90
|
+
left: 'Left',
|
|
91
|
+
top: 'Top',
|
|
92
|
+
width: 'Width',
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
static types(): { [key: string]: any } {
|
|
97
|
+
return {
|
|
98
|
+
degree: 'number',
|
|
99
|
+
height: 'number',
|
|
100
|
+
left: 'number',
|
|
101
|
+
top: 'number',
|
|
102
|
+
width: 'number',
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
validate() {
|
|
107
|
+
super.validate();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
constructor(map?: { [key: string]: any }) {
|
|
111
|
+
super(map);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export class ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsTextRect extends $dara.Model {
|
|
116
|
+
/**
|
|
117
|
+
* @remarks
|
|
118
|
+
* The rotation angle.
|
|
119
|
+
*/
|
|
120
|
+
degree?: number;
|
|
121
|
+
/**
|
|
122
|
+
* @remarks
|
|
123
|
+
* The height.
|
|
124
|
+
*/
|
|
125
|
+
height?: number;
|
|
126
|
+
/**
|
|
127
|
+
* @remarks
|
|
128
|
+
* The left coordinate.
|
|
129
|
+
*/
|
|
130
|
+
left?: number;
|
|
131
|
+
/**
|
|
132
|
+
* @remarks
|
|
133
|
+
* The top coordinate.
|
|
134
|
+
*/
|
|
135
|
+
top?: number;
|
|
136
|
+
/**
|
|
137
|
+
* @remarks
|
|
138
|
+
* The width.
|
|
139
|
+
*/
|
|
140
|
+
width?: number;
|
|
141
|
+
static names(): { [key: string]: string } {
|
|
142
|
+
return {
|
|
143
|
+
degree: 'Degree',
|
|
144
|
+
height: 'Height',
|
|
145
|
+
left: 'Left',
|
|
146
|
+
top: 'Top',
|
|
147
|
+
width: 'Width',
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
static types(): { [key: string]: any } {
|
|
152
|
+
return {
|
|
153
|
+
degree: 'number',
|
|
154
|
+
height: 'number',
|
|
155
|
+
left: 'number',
|
|
156
|
+
top: 'number',
|
|
157
|
+
width: 'number',
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
validate() {
|
|
162
|
+
super.validate();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
constructor(map?: { [key: string]: any }) {
|
|
166
|
+
super(map);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export class ImageTranslationStandardResponseBodyDataEditInfoTextAreasTexts extends $dara.Model {
|
|
171
|
+
/**
|
|
172
|
+
* @remarks
|
|
173
|
+
* The color.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* #9d7746
|
|
177
|
+
*/
|
|
178
|
+
color?: string;
|
|
179
|
+
/**
|
|
180
|
+
* @remarks
|
|
181
|
+
* The font size.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* 42
|
|
185
|
+
*/
|
|
186
|
+
fontsize?: number;
|
|
187
|
+
/**
|
|
188
|
+
* @remarks
|
|
189
|
+
* The horizontal layout.
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* left
|
|
193
|
+
*/
|
|
194
|
+
horizontalLayout?: string;
|
|
195
|
+
/**
|
|
196
|
+
* @remarks
|
|
197
|
+
* The image area.
|
|
198
|
+
*/
|
|
199
|
+
imageRect?: ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsImageRect;
|
|
200
|
+
/**
|
|
201
|
+
* @remarks
|
|
202
|
+
* The language.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* zh
|
|
206
|
+
*/
|
|
207
|
+
language?: string;
|
|
208
|
+
/**
|
|
209
|
+
* @remarks
|
|
210
|
+
* The line count.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* 1
|
|
214
|
+
*/
|
|
215
|
+
lineCount?: number;
|
|
216
|
+
/**
|
|
217
|
+
* @remarks
|
|
218
|
+
* The OVIS error message.
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* desc
|
|
222
|
+
*/
|
|
223
|
+
ovisErrMsg?: string;
|
|
224
|
+
/**
|
|
225
|
+
* @remarks
|
|
226
|
+
* The text area.
|
|
227
|
+
*/
|
|
228
|
+
textRect?: ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsTextRect;
|
|
229
|
+
/**
|
|
230
|
+
* @remarks
|
|
231
|
+
* Indicates whether the text is valid.
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* true
|
|
235
|
+
*/
|
|
236
|
+
valid?: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* @remarks
|
|
239
|
+
* The text value.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* Solid wood wardrobe.
|
|
243
|
+
*/
|
|
244
|
+
value?: string;
|
|
245
|
+
/**
|
|
246
|
+
* @remarks
|
|
247
|
+
* The vertical layout.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* center
|
|
251
|
+
*/
|
|
252
|
+
verticalLayout?: string;
|
|
253
|
+
static names(): { [key: string]: string } {
|
|
254
|
+
return {
|
|
255
|
+
color: 'Color',
|
|
256
|
+
fontsize: 'Fontsize',
|
|
257
|
+
horizontalLayout: 'HorizontalLayout',
|
|
258
|
+
imageRect: 'ImageRect',
|
|
259
|
+
language: 'Language',
|
|
260
|
+
lineCount: 'LineCount',
|
|
261
|
+
ovisErrMsg: 'OvisErrMsg',
|
|
262
|
+
textRect: 'TextRect',
|
|
263
|
+
valid: 'Valid',
|
|
264
|
+
value: 'Value',
|
|
265
|
+
verticalLayout: 'VerticalLayout',
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
static types(): { [key: string]: any } {
|
|
270
|
+
return {
|
|
271
|
+
color: 'string',
|
|
272
|
+
fontsize: 'number',
|
|
273
|
+
horizontalLayout: 'string',
|
|
274
|
+
imageRect: ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsImageRect,
|
|
275
|
+
language: 'string',
|
|
276
|
+
lineCount: 'number',
|
|
277
|
+
ovisErrMsg: 'string',
|
|
278
|
+
textRect: ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsTextRect,
|
|
279
|
+
valid: 'boolean',
|
|
280
|
+
value: 'string',
|
|
281
|
+
verticalLayout: 'string',
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
validate() {
|
|
286
|
+
if(this.imageRect && typeof (this.imageRect as any).validate === 'function') {
|
|
287
|
+
(this.imageRect as any).validate();
|
|
288
|
+
}
|
|
289
|
+
if(this.textRect && typeof (this.textRect as any).validate === 'function') {
|
|
290
|
+
(this.textRect as any).validate();
|
|
291
|
+
}
|
|
292
|
+
super.validate();
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
constructor(map?: { [key: string]: any }) {
|
|
296
|
+
super(map);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export class ImageTranslationStandardResponseBodyDataEditInfoTextAreas extends $dara.Model {
|
|
301
|
+
/**
|
|
302
|
+
* @remarks
|
|
303
|
+
* The color.
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* #000000
|
|
307
|
+
*/
|
|
308
|
+
color?: string;
|
|
309
|
+
/**
|
|
310
|
+
* @remarks
|
|
311
|
+
* The content.
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* SOLIDWOOD WARDROBE
|
|
315
|
+
*/
|
|
316
|
+
content?: string;
|
|
317
|
+
/**
|
|
318
|
+
* @remarks
|
|
319
|
+
* The font size.
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* 36
|
|
323
|
+
*/
|
|
324
|
+
fontsize?: number;
|
|
325
|
+
/**
|
|
326
|
+
* @remarks
|
|
327
|
+
* The horizontal layout.
|
|
328
|
+
*
|
|
329
|
+
* @example
|
|
330
|
+
* left
|
|
331
|
+
*/
|
|
332
|
+
horizontalLayout?: string;
|
|
333
|
+
/**
|
|
334
|
+
* @remarks
|
|
335
|
+
* The line count.
|
|
336
|
+
*
|
|
337
|
+
* @example
|
|
338
|
+
* 2
|
|
339
|
+
*/
|
|
340
|
+
lineCount?: number;
|
|
341
|
+
/**
|
|
342
|
+
* @remarks
|
|
343
|
+
* The list of texts.
|
|
344
|
+
*/
|
|
345
|
+
texts?: ImageTranslationStandardResponseBodyDataEditInfoTextAreasTexts[];
|
|
346
|
+
/**
|
|
347
|
+
* @remarks
|
|
348
|
+
* The vertical layout.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* center
|
|
352
|
+
*/
|
|
353
|
+
verticalLayout?: string;
|
|
354
|
+
static names(): { [key: string]: string } {
|
|
355
|
+
return {
|
|
356
|
+
color: 'Color',
|
|
357
|
+
content: 'Content',
|
|
358
|
+
fontsize: 'Fontsize',
|
|
359
|
+
horizontalLayout: 'HorizontalLayout',
|
|
360
|
+
lineCount: 'LineCount',
|
|
361
|
+
texts: 'Texts',
|
|
362
|
+
verticalLayout: 'VerticalLayout',
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
static types(): { [key: string]: any } {
|
|
367
|
+
return {
|
|
368
|
+
color: 'string',
|
|
369
|
+
content: 'string',
|
|
370
|
+
fontsize: 'number',
|
|
371
|
+
horizontalLayout: 'string',
|
|
372
|
+
lineCount: 'number',
|
|
373
|
+
texts: { 'type': 'array', 'itemType': ImageTranslationStandardResponseBodyDataEditInfoTextAreasTexts },
|
|
374
|
+
verticalLayout: 'string',
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
validate() {
|
|
379
|
+
if(Array.isArray(this.texts)) {
|
|
380
|
+
$dara.Model.validateArray(this.texts);
|
|
381
|
+
}
|
|
382
|
+
super.validate();
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
constructor(map?: { [key: string]: any }) {
|
|
386
|
+
super(map);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export class ImageTranslationStandardResponseBodyDataEditInfo extends $dara.Model {
|
|
391
|
+
/**
|
|
392
|
+
* @remarks
|
|
393
|
+
* The list of fonts used.
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* ["NotoSansSC-Bold"]
|
|
397
|
+
*/
|
|
398
|
+
font?: string[];
|
|
399
|
+
/**
|
|
400
|
+
* @remarks
|
|
401
|
+
* The product area rectangle.
|
|
402
|
+
*/
|
|
403
|
+
goodsRects?: ImageTranslationStandardResponseBodyDataEditInfoGoodsRects;
|
|
404
|
+
/**
|
|
405
|
+
* @remarks
|
|
406
|
+
* The product image URL.
|
|
407
|
+
*
|
|
408
|
+
* @example
|
|
409
|
+
* https://xiuxiu-pro.meitudata.com/posters/34d78f9157e5560a4d612949ca6f6485.jpg
|
|
410
|
+
*/
|
|
411
|
+
goodsUrl?: string;
|
|
412
|
+
/**
|
|
413
|
+
* @remarks
|
|
414
|
+
* The list of target languages.
|
|
415
|
+
*
|
|
416
|
+
* @example
|
|
417
|
+
* ["zh"]
|
|
418
|
+
*/
|
|
419
|
+
languages?: string[];
|
|
420
|
+
/**
|
|
421
|
+
* @remarks
|
|
422
|
+
* The original image URL.
|
|
423
|
+
*
|
|
424
|
+
* @example
|
|
425
|
+
* https://xiuxiu-pro.meitudata.com/posters/34d78f9157e5560a4d612949ca6f6485.jpg
|
|
426
|
+
*/
|
|
427
|
+
pictUrl?: string;
|
|
428
|
+
/**
|
|
429
|
+
* @remarks
|
|
430
|
+
* The repaired image URL.
|
|
431
|
+
*
|
|
432
|
+
* @example
|
|
433
|
+
* http://dashscope-a717.oss-cn-beijing.aliyuncs.com/xxx.png
|
|
434
|
+
*/
|
|
435
|
+
repairedUrl?: string;
|
|
436
|
+
/**
|
|
437
|
+
* @remarks
|
|
438
|
+
* The list of repaired image URLs.
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* ["http://dashscope-a717.oss-cn-beijing.aliyuncs.com/xxx.png"]
|
|
442
|
+
*/
|
|
443
|
+
repairedUrls?: string[];
|
|
444
|
+
/**
|
|
445
|
+
* @remarks
|
|
446
|
+
* The list of result image IDs.
|
|
447
|
+
*
|
|
448
|
+
* @example
|
|
449
|
+
* ["c18ab570-81aa-11f1-a14a-5ee00dcfdc3c"]
|
|
450
|
+
*/
|
|
451
|
+
resultImageIds?: string[];
|
|
452
|
+
/**
|
|
453
|
+
* @remarks
|
|
454
|
+
* The list of result image URLs.
|
|
455
|
+
*
|
|
456
|
+
* @example
|
|
457
|
+
* ["http://dashscope-a717.oss-cn-beijing.aliyuncs.com/xxx.jpg"]
|
|
458
|
+
*/
|
|
459
|
+
resultUrls?: string[];
|
|
460
|
+
/**
|
|
461
|
+
* @remarks
|
|
462
|
+
* The list of text areas.
|
|
463
|
+
*/
|
|
464
|
+
textAreas?: ImageTranslationStandardResponseBodyDataEditInfoTextAreas[];
|
|
465
|
+
static names(): { [key: string]: string } {
|
|
466
|
+
return {
|
|
467
|
+
font: 'Font',
|
|
468
|
+
goodsRects: 'GoodsRects',
|
|
469
|
+
goodsUrl: 'GoodsUrl',
|
|
470
|
+
languages: 'Languages',
|
|
471
|
+
pictUrl: 'PictUrl',
|
|
472
|
+
repairedUrl: 'RepairedUrl',
|
|
473
|
+
repairedUrls: 'RepairedUrls',
|
|
474
|
+
resultImageIds: 'ResultImageIds',
|
|
475
|
+
resultUrls: 'ResultUrls',
|
|
476
|
+
textAreas: 'TextAreas',
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
static types(): { [key: string]: any } {
|
|
481
|
+
return {
|
|
482
|
+
font: { 'type': 'array', 'itemType': 'string' },
|
|
483
|
+
goodsRects: ImageTranslationStandardResponseBodyDataEditInfoGoodsRects,
|
|
484
|
+
goodsUrl: 'string',
|
|
485
|
+
languages: { 'type': 'array', 'itemType': 'string' },
|
|
486
|
+
pictUrl: 'string',
|
|
487
|
+
repairedUrl: 'string',
|
|
488
|
+
repairedUrls: { 'type': 'array', 'itemType': 'string' },
|
|
489
|
+
resultImageIds: { 'type': 'array', 'itemType': 'string' },
|
|
490
|
+
resultUrls: { 'type': 'array', 'itemType': 'string' },
|
|
491
|
+
textAreas: { 'type': 'array', 'itemType': ImageTranslationStandardResponseBodyDataEditInfoTextAreas },
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
validate() {
|
|
496
|
+
if(Array.isArray(this.font)) {
|
|
497
|
+
$dara.Model.validateArray(this.font);
|
|
498
|
+
}
|
|
499
|
+
if(this.goodsRects && typeof (this.goodsRects as any).validate === 'function') {
|
|
500
|
+
(this.goodsRects as any).validate();
|
|
501
|
+
}
|
|
502
|
+
if(Array.isArray(this.languages)) {
|
|
503
|
+
$dara.Model.validateArray(this.languages);
|
|
504
|
+
}
|
|
505
|
+
if(Array.isArray(this.repairedUrls)) {
|
|
506
|
+
$dara.Model.validateArray(this.repairedUrls);
|
|
507
|
+
}
|
|
508
|
+
if(Array.isArray(this.resultImageIds)) {
|
|
509
|
+
$dara.Model.validateArray(this.resultImageIds);
|
|
510
|
+
}
|
|
511
|
+
if(Array.isArray(this.resultUrls)) {
|
|
512
|
+
$dara.Model.validateArray(this.resultUrls);
|
|
513
|
+
}
|
|
514
|
+
if(Array.isArray(this.textAreas)) {
|
|
515
|
+
$dara.Model.validateArray(this.textAreas);
|
|
516
|
+
}
|
|
517
|
+
super.validate();
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
constructor(map?: { [key: string]: any }) {
|
|
521
|
+
super(map);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
5
525
|
export class ImageTranslationStandardResponseBodyData extends $dara.Model {
|
|
526
|
+
/**
|
|
527
|
+
* @remarks
|
|
528
|
+
* The edit information.
|
|
529
|
+
*/
|
|
530
|
+
editInfo?: ImageTranslationStandardResponseBodyDataEditInfo;
|
|
6
531
|
/**
|
|
7
532
|
* @remarks
|
|
8
533
|
* The URL of the image generated after image translation.
|
|
@@ -21,6 +546,7 @@ export class ImageTranslationStandardResponseBodyData extends $dara.Model {
|
|
|
21
546
|
usageMap?: { [key: string]: number };
|
|
22
547
|
static names(): { [key: string]: string } {
|
|
23
548
|
return {
|
|
549
|
+
editInfo: 'EditInfo',
|
|
24
550
|
imageUrl: 'ImageUrl',
|
|
25
551
|
usageMap: 'UsageMap',
|
|
26
552
|
};
|
|
@@ -28,12 +554,16 @@ export class ImageTranslationStandardResponseBodyData extends $dara.Model {
|
|
|
28
554
|
|
|
29
555
|
static types(): { [key: string]: any } {
|
|
30
556
|
return {
|
|
557
|
+
editInfo: ImageTranslationStandardResponseBodyDataEditInfo,
|
|
31
558
|
imageUrl: 'string',
|
|
32
559
|
usageMap: { 'type': 'map', 'keyType': 'string', 'valueType': 'number' },
|
|
33
560
|
};
|
|
34
561
|
}
|
|
35
562
|
|
|
36
563
|
validate() {
|
|
564
|
+
if(this.editInfo && typeof (this.editInfo as any).validate === 'function') {
|
|
565
|
+
(this.editInfo as any).validate();
|
|
566
|
+
}
|
|
37
567
|
if(this.usageMap) {
|
|
38
568
|
$dara.Model.validateMap(this.usageMap);
|
|
39
569
|
}
|
|
@@ -48,7 +578,7 @@ export class ImageTranslationStandardResponseBodyData extends $dara.Model {
|
|
|
48
578
|
export class ImageTranslationStandardResponseBody extends $dara.Model {
|
|
49
579
|
/**
|
|
50
580
|
* @remarks
|
|
51
|
-
* The response code. A value of 200 indicates a successful call. For other response codes,
|
|
581
|
+
* The response code. A value of 200 indicates a successful call. For other response codes, refer to the error code information.
|
|
52
582
|
*
|
|
53
583
|
* @example
|
|
54
584
|
* 200
|
|
@@ -61,7 +591,7 @@ export class ImageTranslationStandardResponseBody extends $dara.Model {
|
|
|
61
591
|
data?: ImageTranslationStandardResponseBodyData;
|
|
62
592
|
/**
|
|
63
593
|
* @remarks
|
|
64
|
-
* The error message. "Success"
|
|
594
|
+
* The error message. Returns "Success" for successful calls and specific error information for exceptions.
|
|
65
595
|
*
|
|
66
596
|
* @example
|
|
67
597
|
* Success
|
|
@@ -69,7 +599,7 @@ export class ImageTranslationStandardResponseBody extends $dara.Model {
|
|
|
69
599
|
message?: string;
|
|
70
600
|
/**
|
|
71
601
|
* @remarks
|
|
72
|
-
* The request ID,
|
|
602
|
+
* The request ID, used to identify a unique request call.
|
|
73
603
|
*
|
|
74
604
|
* @example
|
|
75
605
|
* 1CEC4D94-905A-1ED1-A7B4-1BFEFFB3D850
|
|
@@ -77,7 +607,7 @@ export class ImageTranslationStandardResponseBody extends $dara.Model {
|
|
|
77
607
|
requestId?: string;
|
|
78
608
|
/**
|
|
79
609
|
* @remarks
|
|
80
|
-
* Indicates whether the call
|
|
610
|
+
* Indicates whether the call is successful. A value of true indicates success. A value of false indicates failure.
|
|
81
611
|
*
|
|
82
612
|
* @example
|
|
83
613
|
* true
|
|
@@ -4,13 +4,16 @@ import * as $dara from '@darabonba/typescript';
|
|
|
4
4
|
|
|
5
5
|
export class TextTranslateRequest extends $dara.Model {
|
|
6
6
|
/**
|
|
7
|
+
* @remarks
|
|
8
|
+
* The business scenario identifier. Optional. Valid values: e-commerce-title, e-commerce-description, e-commerce-chat, e-commerce-cpv, novel, game. If not specified or invalid, the general translation strategy is used by default.
|
|
9
|
+
*
|
|
7
10
|
* @example
|
|
8
11
|
* MyCompany-Chat
|
|
9
12
|
*/
|
|
10
13
|
bizName?: string;
|
|
11
14
|
/**
|
|
12
15
|
* @remarks
|
|
13
|
-
* The format type of the source text.
|
|
16
|
+
* The format type of the source text. Optional. Supports text (plain text format) and html (web page format, preserving HTML tags).
|
|
14
17
|
*
|
|
15
18
|
* @example
|
|
16
19
|
* text
|
|
@@ -18,7 +21,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
18
21
|
formatType?: string;
|
|
19
22
|
/**
|
|
20
23
|
* @remarks
|
|
21
|
-
* The intervention glossary ID.
|
|
24
|
+
* The intervention glossary ID. Optional. The glossary must be created separately in the console and its ID provided. If the glossary ID is empty, the translation result is not modified.
|
|
22
25
|
*
|
|
23
26
|
* @example
|
|
24
27
|
* glossary_1
|
|
@@ -26,7 +29,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
26
29
|
glossary?: string;
|
|
27
30
|
/**
|
|
28
31
|
* @remarks
|
|
29
|
-
* The source language code.
|
|
32
|
+
* The source language code. Optional. If not specified, the language is automatically detected. You can pass auto for language detection.
|
|
30
33
|
*
|
|
31
34
|
* @example
|
|
32
35
|
* auto
|
|
@@ -34,7 +37,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
34
37
|
sourceLanguage?: string;
|
|
35
38
|
/**
|
|
36
39
|
* @remarks
|
|
37
|
-
* The list of texts to translate.
|
|
40
|
+
* The list of texts to translate. Required. The total character length cannot exceed 50,000, and the list length cannot exceed 50.
|
|
38
41
|
*
|
|
39
42
|
* This parameter is required.
|
|
40
43
|
*
|
|
@@ -44,7 +47,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
44
47
|
sourceTextList?: string[];
|
|
45
48
|
/**
|
|
46
49
|
* @remarks
|
|
47
|
-
* The target language code.
|
|
50
|
+
* The target language code. Required. Supports more than 100 language directions. For details, refer to the supported language directions list.
|
|
48
51
|
*
|
|
49
52
|
* This parameter is required.
|
|
50
53
|
*
|
|
@@ -53,6 +56,9 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
53
56
|
*/
|
|
54
57
|
targetLanguage?: string;
|
|
55
58
|
/**
|
|
59
|
+
* @remarks
|
|
60
|
+
* The format of the translation text. **html** (web page format. This setting processes both the source text and translated text in HTML format). **text** (text format. This setting processes both the source text and translated result as plain text without format processing).
|
|
61
|
+
*
|
|
56
62
|
* @example
|
|
57
63
|
* e-commerce-title
|
|
58
64
|
*/
|
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class TextTranslateResponseBodyDataTranslations extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The
|
|
8
|
+
* The source text character count.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* 11
|
|
@@ -24,7 +24,7 @@ export class TextTranslateResponseBodyDataTranslations extends $dara.Model {
|
|
|
24
24
|
* The translated text.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
|
-
*
|
|
27
|
+
* Hello World.
|
|
28
28
|
*/
|
|
29
29
|
translatedText?: string;
|
|
30
30
|
static names(): { [key: string]: string } {
|
|
@@ -98,7 +98,7 @@ export class TextTranslateResponseBodyData extends $dara.Model {
|
|
|
98
98
|
export class TextTranslateResponseBody extends $dara.Model {
|
|
99
99
|
/**
|
|
100
100
|
* @remarks
|
|
101
|
-
* The response code. Returns "success" for
|
|
101
|
+
* The response code. Returns "success" for normal calls.
|
|
102
102
|
*
|
|
103
103
|
* @example
|
|
104
104
|
* success
|
|
@@ -111,7 +111,7 @@ export class TextTranslateResponseBody extends $dara.Model {
|
|
|
111
111
|
data?: TextTranslateResponseBodyData;
|
|
112
112
|
/**
|
|
113
113
|
* @remarks
|
|
114
|
-
* The error message. Returns "Success" for
|
|
114
|
+
* The error message. Returns "Success" for normal calls. Returns specific error information for exceptions, such as "The parameters contain sensitive information. Try other input."
|
|
115
115
|
*
|
|
116
116
|
* @example
|
|
117
117
|
* Success
|