@alicloud/aidge20260428 3.1.1 → 4.0.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/client.d.ts +89 -68
- package/dist/client.js +122 -68
- package/dist/client.js.map +1 -1
- package/dist/models/ImageTranslationProRequest.d.ts +11 -8
- package/dist/models/ImageTranslationProRequest.js.map +1 -1
- package/dist/models/ImageTranslationProResponseBody.d.ts +16 -24
- package/dist/models/ImageTranslationProResponseBody.js +0 -2
- package/dist/models/ImageTranslationProResponseBody.js.map +1 -1
- package/dist/models/ImageTranslationStandardRequest.d.ts +6 -9
- package/dist/models/ImageTranslationStandardRequest.js.map +1 -1
- package/dist/models/ImageTranslationStandardResponseBody.d.ts +6 -14
- package/dist/models/ImageTranslationStandardResponseBody.js +0 -2
- package/dist/models/ImageTranslationStandardResponseBody.js.map +1 -1
- package/dist/models/MerchandisePlacementDetectionRequest.d.ts +47 -0
- package/dist/models/MerchandisePlacementDetectionRequest.js +64 -0
- package/dist/models/MerchandisePlacementDetectionRequest.js.map +1 -0
- package/dist/models/MerchandisePlacementDetectionResponse.d.ts +19 -0
- package/dist/models/MerchandisePlacementDetectionResponse.js +69 -0
- package/dist/models/MerchandisePlacementDetectionResponse.js.map +1 -0
- package/dist/models/MerchandisePlacementDetectionResponseBody.d.ts +210 -0
- package/dist/models/MerchandisePlacementDetectionResponseBody.js +182 -0
- package/dist/models/MerchandisePlacementDetectionResponseBody.js.map +1 -0
- package/dist/models/QueryAsyncTaskResultResponseBody.d.ts +3 -3
- package/dist/models/TextTranslateRequest.d.ts +7 -7
- package/dist/models/TextTranslateShrinkRequest.d.ts +7 -7
- package/dist/models/model.d.ts +7 -0
- package/dist/models/model.js +17 -3
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +128 -68
- package/src/models/ImageTranslationProRequest.ts +11 -8
- package/src/models/ImageTranslationProResponseBody.ts +16 -26
- package/src/models/ImageTranslationStandardRequest.ts +6 -9
- package/src/models/ImageTranslationStandardResponseBody.ts +6 -16
- package/src/models/MerchandisePlacementDetectionRequest.ts +66 -0
- package/src/models/MerchandisePlacementDetectionResponse.ts +40 -0
- package/src/models/MerchandisePlacementDetectionResponseBody.ts +309 -0
- package/src/models/QueryAsyncTaskResultResponseBody.ts +3 -3
- package/src/models/TextTranslateRequest.ts +7 -7
- package/src/models/TextTranslateShrinkRequest.ts +7 -7
- package/src/models/model.ts +7 -0
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class ImageTranslationStandardRequest extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The
|
|
8
|
+
* The glossary ID. Optional. Create a glossary in the console and provide its ID. If the glossary ID is empty, the translation results are not modified.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* glossary_1
|
|
@@ -14,9 +14,6 @@ export class ImageTranslationStandardRequest extends $dara.Model {
|
|
|
14
14
|
/**
|
|
15
15
|
* @remarks
|
|
16
16
|
* - Image URL: Must be publicly accessible.
|
|
17
|
-
* - Format: png, jpeg, jpg, bmp, webp
|
|
18
|
-
* - Pixels: Width and height must not exceed 4000
|
|
19
|
-
* - File size: Original file ≤ 10 MB
|
|
20
17
|
*
|
|
21
18
|
* This parameter is required.
|
|
22
19
|
*
|
|
@@ -26,7 +23,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
|
|
|
26
23
|
imageUrl?: string;
|
|
27
24
|
/**
|
|
28
25
|
* @remarks
|
|
29
|
-
* Specifies whether to translate text on the
|
|
26
|
+
* Specifies whether to translate text on the main subject of the image. Optional. Default value: false. This helps you protect information by avoiding translation of embedded information such as product names.
|
|
30
27
|
*
|
|
31
28
|
* @example
|
|
32
29
|
* false
|
|
@@ -34,7 +31,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
|
|
|
34
31
|
includingProductArea?: boolean;
|
|
35
32
|
/**
|
|
36
33
|
* @remarks
|
|
37
|
-
* The source language code. Required. For supported language
|
|
34
|
+
* The source language code. Required. For supported language pairs, see the supported language pair list.
|
|
38
35
|
*
|
|
39
36
|
* This parameter is required.
|
|
40
37
|
*
|
|
@@ -44,7 +41,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
|
|
|
44
41
|
sourceLanguage?: string;
|
|
45
42
|
/**
|
|
46
43
|
* @remarks
|
|
47
|
-
* The target language code. Required. For supported language
|
|
44
|
+
* The target language code. Required. For supported language pairs, see the supported language pair list.
|
|
48
45
|
*
|
|
49
46
|
* This parameter is required.
|
|
50
47
|
*
|
|
@@ -54,7 +51,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
|
|
|
54
51
|
targetLanguage?: string;
|
|
55
52
|
/**
|
|
56
53
|
* @remarks
|
|
57
|
-
* Specifies whether to translate brand names on the image. Optional. Default value: false. This helps protect brand name information from being translated.
|
|
54
|
+
* Specifies whether to translate brand names on the image. Optional. Default value: false. This helps you protect brand name information from being translated.
|
|
58
55
|
*
|
|
59
56
|
* @example
|
|
60
57
|
* false
|
|
@@ -62,7 +59,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
|
|
|
62
59
|
translatingBrandInTheProduct?: boolean;
|
|
63
60
|
/**
|
|
64
61
|
* @remarks
|
|
65
|
-
* Specifies whether to return layer information such as text position, font, and color. When set to true, layer information is returned for
|
|
62
|
+
* Specifies whether to return layer information such as text position, font, and color. When set to true, layer information is returned for integration with image editors for secondary editing. Default value: false.
|
|
66
63
|
*
|
|
67
64
|
* @example
|
|
68
65
|
* false
|
|
@@ -213,14 +213,6 @@ export class ImageTranslationStandardResponseBodyDataEditInfoTextAreasTexts exte
|
|
|
213
213
|
* 1
|
|
214
214
|
*/
|
|
215
215
|
lineCount?: number;
|
|
216
|
-
/**
|
|
217
|
-
* @remarks
|
|
218
|
-
* The OVIS error message.
|
|
219
|
-
*
|
|
220
|
-
* @example
|
|
221
|
-
* desc
|
|
222
|
-
*/
|
|
223
|
-
ovisErrMsg?: string;
|
|
224
216
|
/**
|
|
225
217
|
* @remarks
|
|
226
218
|
* The text area.
|
|
@@ -239,7 +231,7 @@ export class ImageTranslationStandardResponseBodyDataEditInfoTextAreasTexts exte
|
|
|
239
231
|
* The text value.
|
|
240
232
|
*
|
|
241
233
|
* @example
|
|
242
|
-
* Solid
|
|
234
|
+
* Solid Wood Wardrobe.
|
|
243
235
|
*/
|
|
244
236
|
value?: string;
|
|
245
237
|
/**
|
|
@@ -258,7 +250,6 @@ export class ImageTranslationStandardResponseBodyDataEditInfoTextAreasTexts exte
|
|
|
258
250
|
imageRect: 'ImageRect',
|
|
259
251
|
language: 'Language',
|
|
260
252
|
lineCount: 'LineCount',
|
|
261
|
-
ovisErrMsg: 'OvisErrMsg',
|
|
262
253
|
textRect: 'TextRect',
|
|
263
254
|
valid: 'Valid',
|
|
264
255
|
value: 'Value',
|
|
@@ -274,7 +265,6 @@ export class ImageTranslationStandardResponseBodyDataEditInfoTextAreasTexts exte
|
|
|
274
265
|
imageRect: ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsImageRect,
|
|
275
266
|
language: 'string',
|
|
276
267
|
lineCount: 'number',
|
|
277
|
-
ovisErrMsg: 'string',
|
|
278
268
|
textRect: ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsTextRect,
|
|
279
269
|
valid: 'boolean',
|
|
280
270
|
value: 'string',
|
|
@@ -398,7 +388,7 @@ export class ImageTranslationStandardResponseBodyDataEditInfo extends $dara.Mode
|
|
|
398
388
|
font?: string[];
|
|
399
389
|
/**
|
|
400
390
|
* @remarks
|
|
401
|
-
* The product area
|
|
391
|
+
* The product area rectangles.
|
|
402
392
|
*/
|
|
403
393
|
goodsRects?: ImageTranslationStandardResponseBodyDataEditInfoGoodsRects;
|
|
404
394
|
/**
|
|
@@ -538,7 +528,7 @@ export class ImageTranslationStandardResponseBodyData extends $dara.Model {
|
|
|
538
528
|
imageUrl?: string;
|
|
539
529
|
/**
|
|
540
530
|
* @remarks
|
|
541
|
-
* The usage information, including the number of processed
|
|
531
|
+
* The usage information, including the number of images processed.
|
|
542
532
|
*
|
|
543
533
|
* @example
|
|
544
534
|
* {"ProcessedImageCount":1}
|
|
@@ -591,7 +581,7 @@ export class ImageTranslationStandardResponseBody extends $dara.Model {
|
|
|
591
581
|
data?: ImageTranslationStandardResponseBodyData;
|
|
592
582
|
/**
|
|
593
583
|
* @remarks
|
|
594
|
-
* The error message. Returns "Success" for successful calls and specific error information for
|
|
584
|
+
* The error message. Returns "Success" for successful calls, and returns specific error information for failed calls.
|
|
595
585
|
*
|
|
596
586
|
* @example
|
|
597
587
|
* Success
|
|
@@ -599,7 +589,7 @@ export class ImageTranslationStandardResponseBody extends $dara.Model {
|
|
|
599
589
|
message?: string;
|
|
600
590
|
/**
|
|
601
591
|
* @remarks
|
|
602
|
-
* The request ID,
|
|
592
|
+
* The request ID, which uniquely identifies the request.
|
|
603
593
|
*
|
|
604
594
|
* @example
|
|
605
595
|
* 1CEC4D94-905A-1ED1-A7B4-1BFEFFB3D850
|
|
@@ -607,7 +597,7 @@ export class ImageTranslationStandardResponseBody extends $dara.Model {
|
|
|
607
597
|
requestId?: string;
|
|
608
598
|
/**
|
|
609
599
|
* @remarks
|
|
610
|
-
* Indicates whether the call is successful. A value of true indicates success
|
|
600
|
+
* Indicates whether the call is successful. A value of true indicates success, and a value of false indicates failure.
|
|
611
601
|
*
|
|
612
602
|
* @example
|
|
613
603
|
* true
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class MerchandisePlacementDetectionRequest extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @remarks
|
|
8
|
+
* Specifies a custom API version. If you created a "My API" during the trial phase, you can find the corresponding ApiId in the product console under "Intelligent Inspection > API Management > My API".
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* api_xxx
|
|
12
|
+
*/
|
|
13
|
+
apiId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @remarks
|
|
16
|
+
* The URL of the shelf or floor-stack image to be recognized (accessible via the public network or OSS).
|
|
17
|
+
*
|
|
18
|
+
* This parameter is required.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* https://example.com/shelf.jpg
|
|
22
|
+
*/
|
|
23
|
+
imageUrl?: string;
|
|
24
|
+
/**
|
|
25
|
+
* @remarks
|
|
26
|
+
* The customer-specific SKU vector library ID that determines which library to retrieve from. The library must be created in advance through the library creation process.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* rag_xxx
|
|
30
|
+
*/
|
|
31
|
+
ragId?: string;
|
|
32
|
+
/**
|
|
33
|
+
* @remarks
|
|
34
|
+
* The business type (reserved for future routing by business line). The current release supports skincare & lotion.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* Lotion.
|
|
38
|
+
*/
|
|
39
|
+
type?: string;
|
|
40
|
+
static names(): { [key: string]: string } {
|
|
41
|
+
return {
|
|
42
|
+
apiId: 'ApiId',
|
|
43
|
+
imageUrl: 'ImageUrl',
|
|
44
|
+
ragId: 'RagId',
|
|
45
|
+
type: 'Type',
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
static types(): { [key: string]: any } {
|
|
50
|
+
return {
|
|
51
|
+
apiId: 'string',
|
|
52
|
+
imageUrl: 'string',
|
|
53
|
+
ragId: 'string',
|
|
54
|
+
type: 'string',
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
validate() {
|
|
59
|
+
super.validate();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
constructor(map?: { [key: string]: any }) {
|
|
63
|
+
super(map);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import { MerchandisePlacementDetectionResponseBody } from "./MerchandisePlacementDetectionResponseBody";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class MerchandisePlacementDetectionResponse extends $dara.Model {
|
|
7
|
+
headers?: { [key: string]: string };
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
body?: MerchandisePlacementDetectionResponseBody;
|
|
10
|
+
static names(): { [key: string]: string } {
|
|
11
|
+
return {
|
|
12
|
+
headers: 'headers',
|
|
13
|
+
statusCode: 'statusCode',
|
|
14
|
+
body: 'body',
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static types(): { [key: string]: any } {
|
|
19
|
+
return {
|
|
20
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
21
|
+
statusCode: 'number',
|
|
22
|
+
body: MerchandisePlacementDetectionResponseBody,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
validate() {
|
|
27
|
+
if(this.headers) {
|
|
28
|
+
$dara.Model.validateMap(this.headers);
|
|
29
|
+
}
|
|
30
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
31
|
+
(this.body as any).validate();
|
|
32
|
+
}
|
|
33
|
+
super.validate();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
constructor(map?: { [key: string]: any }) {
|
|
37
|
+
super(map);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class MerchandisePlacementDetectionResponseBodyDataDataTop1 extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @remarks
|
|
8
|
+
* The similarity score, ranging from 0 to 1.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* 0.53
|
|
12
|
+
*/
|
|
13
|
+
score?: number;
|
|
14
|
+
/**
|
|
15
|
+
* @remarks
|
|
16
|
+
* The ID of the recalled product.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* 123
|
|
20
|
+
*/
|
|
21
|
+
skuId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @remarks
|
|
24
|
+
* The name of the recalled product.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* Bright Milk 500ml.
|
|
28
|
+
*/
|
|
29
|
+
skuName?: string;
|
|
30
|
+
static names(): { [key: string]: string } {
|
|
31
|
+
return {
|
|
32
|
+
score: 'Score',
|
|
33
|
+
skuId: 'SkuId',
|
|
34
|
+
skuName: 'SkuName',
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static types(): { [key: string]: any } {
|
|
39
|
+
return {
|
|
40
|
+
score: 'number',
|
|
41
|
+
skuId: 'string',
|
|
42
|
+
skuName: 'string',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
validate() {
|
|
47
|
+
super.validate();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
constructor(map?: { [key: string]: any }) {
|
|
51
|
+
super(map);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class MerchandisePlacementDetectionResponseBodyDataDataTopk extends $dara.Model {
|
|
56
|
+
/**
|
|
57
|
+
* @remarks
|
|
58
|
+
* The recall rank.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* 1
|
|
62
|
+
*/
|
|
63
|
+
rank?: number;
|
|
64
|
+
/**
|
|
65
|
+
* @remarks
|
|
66
|
+
* The similarity score, ranging from 0 to 1.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* 0.82
|
|
70
|
+
*/
|
|
71
|
+
score?: number;
|
|
72
|
+
/**
|
|
73
|
+
* @remarks
|
|
74
|
+
* The ID of the recalled product.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* 123
|
|
78
|
+
*/
|
|
79
|
+
skuId?: string;
|
|
80
|
+
/**
|
|
81
|
+
* @remarks
|
|
82
|
+
* The name of the recalled product.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* Bright Milk 500ml.
|
|
86
|
+
*/
|
|
87
|
+
skuName?: string;
|
|
88
|
+
static names(): { [key: string]: string } {
|
|
89
|
+
return {
|
|
90
|
+
rank: 'Rank',
|
|
91
|
+
score: 'Score',
|
|
92
|
+
skuId: 'SkuId',
|
|
93
|
+
skuName: 'SkuName',
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
static types(): { [key: string]: any } {
|
|
98
|
+
return {
|
|
99
|
+
rank: 'number',
|
|
100
|
+
score: 'number',
|
|
101
|
+
skuId: 'string',
|
|
102
|
+
skuName: 'string',
|
|
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 MerchandisePlacementDetectionResponseBodyDataData extends $dara.Model {
|
|
116
|
+
/**
|
|
117
|
+
* @remarks
|
|
118
|
+
* The position coordinates of the detection box in the format [x1,y1,x2,y2].
|
|
119
|
+
*/
|
|
120
|
+
bbox?: number[];
|
|
121
|
+
/**
|
|
122
|
+
* @remarks
|
|
123
|
+
* The failure reason for the detection box. The value is null if the detection is successful.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* "embedding failed"
|
|
127
|
+
*/
|
|
128
|
+
error?: string;
|
|
129
|
+
/**
|
|
130
|
+
* @remarks
|
|
131
|
+
* The index of the detection box.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* 1
|
|
135
|
+
*/
|
|
136
|
+
idx?: number;
|
|
137
|
+
/**
|
|
138
|
+
* @remarks
|
|
139
|
+
* The top-1 recalled product for the detection box.
|
|
140
|
+
*/
|
|
141
|
+
top1?: MerchandisePlacementDetectionResponseBodyDataDataTop1;
|
|
142
|
+
/**
|
|
143
|
+
* @remarks
|
|
144
|
+
* The list of top-K recalled products for the detection box.
|
|
145
|
+
*/
|
|
146
|
+
topk?: MerchandisePlacementDetectionResponseBodyDataDataTopk[];
|
|
147
|
+
static names(): { [key: string]: string } {
|
|
148
|
+
return {
|
|
149
|
+
bbox: 'Bbox',
|
|
150
|
+
error: 'Error',
|
|
151
|
+
idx: 'Idx',
|
|
152
|
+
top1: 'Top1',
|
|
153
|
+
topk: 'Topk',
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
static types(): { [key: string]: any } {
|
|
158
|
+
return {
|
|
159
|
+
bbox: { 'type': 'array', 'itemType': 'number' },
|
|
160
|
+
error: 'string',
|
|
161
|
+
idx: 'number',
|
|
162
|
+
top1: MerchandisePlacementDetectionResponseBodyDataDataTop1,
|
|
163
|
+
topk: { 'type': 'array', 'itemType': MerchandisePlacementDetectionResponseBodyDataDataTopk },
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
validate() {
|
|
168
|
+
if(Array.isArray(this.bbox)) {
|
|
169
|
+
$dara.Model.validateArray(this.bbox);
|
|
170
|
+
}
|
|
171
|
+
if(this.top1 && typeof (this.top1 as any).validate === 'function') {
|
|
172
|
+
(this.top1 as any).validate();
|
|
173
|
+
}
|
|
174
|
+
if(Array.isArray(this.topk)) {
|
|
175
|
+
$dara.Model.validateArray(this.topk);
|
|
176
|
+
}
|
|
177
|
+
super.validate();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
constructor(map?: { [key: string]: any }) {
|
|
181
|
+
super(map);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export class MerchandisePlacementDetectionResponseBodyData extends $dara.Model {
|
|
186
|
+
/**
|
|
187
|
+
* @remarks
|
|
188
|
+
* The number of valid detection boxes.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* 100
|
|
192
|
+
*/
|
|
193
|
+
boxCount?: number;
|
|
194
|
+
/**
|
|
195
|
+
* @remarks
|
|
196
|
+
* The list of retrieval details for each detection box.
|
|
197
|
+
*/
|
|
198
|
+
data?: MerchandisePlacementDetectionResponseBodyDataData[];
|
|
199
|
+
/**
|
|
200
|
+
* @remarks
|
|
201
|
+
* The usage information. The key is the usage metric name, and the value is the count.
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* {"ProcessingCount":1}
|
|
205
|
+
*/
|
|
206
|
+
usageMap?: { [key: string]: number };
|
|
207
|
+
static names(): { [key: string]: string } {
|
|
208
|
+
return {
|
|
209
|
+
boxCount: 'BoxCount',
|
|
210
|
+
data: 'Data',
|
|
211
|
+
usageMap: 'UsageMap',
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
static types(): { [key: string]: any } {
|
|
216
|
+
return {
|
|
217
|
+
boxCount: 'number',
|
|
218
|
+
data: { 'type': 'array', 'itemType': MerchandisePlacementDetectionResponseBodyDataData },
|
|
219
|
+
usageMap: { 'type': 'map', 'keyType': 'string', 'valueType': 'number' },
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
validate() {
|
|
224
|
+
if(Array.isArray(this.data)) {
|
|
225
|
+
$dara.Model.validateArray(this.data);
|
|
226
|
+
}
|
|
227
|
+
if(this.usageMap) {
|
|
228
|
+
$dara.Model.validateMap(this.usageMap);
|
|
229
|
+
}
|
|
230
|
+
super.validate();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
constructor(map?: { [key: string]: any }) {
|
|
234
|
+
super(map);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export class MerchandisePlacementDetectionResponseBody extends $dara.Model {
|
|
239
|
+
/**
|
|
240
|
+
* @remarks
|
|
241
|
+
* The error code. This parameter is not returned if the call is successful.
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* 200
|
|
245
|
+
*/
|
|
246
|
+
code?: string;
|
|
247
|
+
/**
|
|
248
|
+
* @remarks
|
|
249
|
+
* The display detection result.
|
|
250
|
+
*/
|
|
251
|
+
data?: MerchandisePlacementDetectionResponseBodyData;
|
|
252
|
+
/**
|
|
253
|
+
* @remarks
|
|
254
|
+
* The error message. This parameter is not returned if the call is successful.
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* OK
|
|
258
|
+
*/
|
|
259
|
+
message?: string;
|
|
260
|
+
/**
|
|
261
|
+
* @remarks
|
|
262
|
+
* Id of the request
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* E1AD60F1-BAC7-546B-9533-E7AD02B16E3F
|
|
266
|
+
*/
|
|
267
|
+
requestId?: string;
|
|
268
|
+
/**
|
|
269
|
+
* @remarks
|
|
270
|
+
* Indicates whether the call is successful. Valid values:
|
|
271
|
+
* - true: The call is successful.
|
|
272
|
+
* - false: The call failed.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* True
|
|
276
|
+
*/
|
|
277
|
+
success?: boolean;
|
|
278
|
+
static names(): { [key: string]: string } {
|
|
279
|
+
return {
|
|
280
|
+
code: 'Code',
|
|
281
|
+
data: 'Data',
|
|
282
|
+
message: 'Message',
|
|
283
|
+
requestId: 'RequestId',
|
|
284
|
+
success: 'Success',
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
static types(): { [key: string]: any } {
|
|
289
|
+
return {
|
|
290
|
+
code: 'string',
|
|
291
|
+
data: MerchandisePlacementDetectionResponseBodyData,
|
|
292
|
+
message: 'string',
|
|
293
|
+
requestId: 'string',
|
|
294
|
+
success: 'boolean',
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
validate() {
|
|
299
|
+
if(this.data && typeof (this.data as any).validate === 'function') {
|
|
300
|
+
(this.data as any).validate();
|
|
301
|
+
}
|
|
302
|
+
super.validate();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
constructor(map?: { [key: string]: any }) {
|
|
306
|
+
super(map);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
@@ -13,7 +13,7 @@ export class QueryAsyncTaskResultResponseBodyData extends $dara.Model {
|
|
|
13
13
|
result?: string;
|
|
14
14
|
/**
|
|
15
15
|
* @remarks
|
|
16
|
-
* The task
|
|
16
|
+
* The status of the task.
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* COMPLETED
|
|
@@ -21,7 +21,7 @@ export class QueryAsyncTaskResultResponseBodyData extends $dara.Model {
|
|
|
21
21
|
status?: string;
|
|
22
22
|
/**
|
|
23
23
|
* @remarks
|
|
24
|
-
* The downstream task
|
|
24
|
+
* The ID of the downstream task.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* task-xxxxx
|
|
@@ -73,7 +73,7 @@ export class QueryAsyncTaskResultResponseBody extends $dara.Model {
|
|
|
73
73
|
code?: string;
|
|
74
74
|
/**
|
|
75
75
|
* @remarks
|
|
76
|
-
* The asynchronous
|
|
76
|
+
* The asynchronous node result.
|
|
77
77
|
*/
|
|
78
78
|
data?: QueryAsyncTaskResultResponseBodyData;
|
|
79
79
|
/**
|
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class TextTranslateRequest extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The business scenario identifier.
|
|
8
|
+
* The business scenario identifier. This parameter is 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
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* MyCompany-Chat
|
|
@@ -13,7 +13,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
13
13
|
bizName?: string;
|
|
14
14
|
/**
|
|
15
15
|
* @remarks
|
|
16
|
-
* The format type of the source text.
|
|
16
|
+
* The format type of the source text. This parameter is optional. Valid values: text (plain text format) and html (web page format that preserves HTML tags).
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* text
|
|
@@ -21,7 +21,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
21
21
|
formatType?: string;
|
|
22
22
|
/**
|
|
23
23
|
* @remarks
|
|
24
|
-
* The intervention glossary ID.
|
|
24
|
+
* The intervention glossary ID. This parameter is optional. The glossary must be created separately in the console, and its ID must be provided. If the glossary ID is empty, the translation result is not modified.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* glossary_1
|
|
@@ -29,7 +29,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
29
29
|
glossary?: string;
|
|
30
30
|
/**
|
|
31
31
|
* @remarks
|
|
32
|
-
* The source language code.
|
|
32
|
+
* The source language code. This parameter is optional. If not specified, the language is automatically detected. You can pass auto for language detection.
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* auto
|
|
@@ -37,7 +37,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
37
37
|
sourceLanguage?: string;
|
|
38
38
|
/**
|
|
39
39
|
* @remarks
|
|
40
|
-
* The list of texts to translate.
|
|
40
|
+
* The list of texts to translate. This parameter is required. The total character length cannot exceed 50,000, and the list length cannot exceed 50.
|
|
41
41
|
*
|
|
42
42
|
* This parameter is required.
|
|
43
43
|
*
|
|
@@ -47,7 +47,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
47
47
|
sourceTextList?: string[];
|
|
48
48
|
/**
|
|
49
49
|
* @remarks
|
|
50
|
-
* The target language code.
|
|
50
|
+
* The target language code. This parameter is required. More than 100 language directions are supported. For details, refer to the supported language directions list.
|
|
51
51
|
*
|
|
52
52
|
* This parameter is required.
|
|
53
53
|
*
|
|
@@ -57,7 +57,7 @@ export class TextTranslateRequest extends $dara.Model {
|
|
|
57
57
|
targetLanguage?: string;
|
|
58
58
|
/**
|
|
59
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)
|
|
60
|
+
* The format of the translation text. **html** (web page format. This setting processes both the source text and translated text in HTML format) or **text** (text format. This setting processes both the source text and translated result as plain text without format processing).
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
63
|
* e-commerce-title
|