@alicloud/aidge20260428 3.1.0 → 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.
Files changed (46) hide show
  1. package/dist/client.d.ts +81 -52
  2. package/dist/client.js +117 -52
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/ImageTranslationProRequest.d.ts +11 -8
  5. package/dist/models/ImageTranslationProRequest.js.map +1 -1
  6. package/dist/models/ImageTranslationProResponseBody.d.ts +16 -24
  7. package/dist/models/ImageTranslationProResponseBody.js +0 -2
  8. package/dist/models/ImageTranslationProResponseBody.js.map +1 -1
  9. package/dist/models/ImageTranslationStandardRequest.d.ts +14 -6
  10. package/dist/models/ImageTranslationStandardRequest.js +2 -0
  11. package/dist/models/ImageTranslationStandardRequest.js.map +1 -1
  12. package/dist/models/ImageTranslationStandardResponseBody.d.ts +357 -4
  13. package/dist/models/ImageTranslationStandardResponseBody.js +222 -1
  14. package/dist/models/ImageTranslationStandardResponseBody.js.map +1 -1
  15. package/dist/models/MerchandisePlacementDetectionRequest.d.ts +47 -0
  16. package/dist/models/MerchandisePlacementDetectionRequest.js +64 -0
  17. package/dist/models/MerchandisePlacementDetectionRequest.js.map +1 -0
  18. package/dist/models/MerchandisePlacementDetectionResponse.d.ts +19 -0
  19. package/dist/models/MerchandisePlacementDetectionResponse.js +69 -0
  20. package/dist/models/MerchandisePlacementDetectionResponse.js.map +1 -0
  21. package/dist/models/MerchandisePlacementDetectionResponseBody.d.ts +210 -0
  22. package/dist/models/MerchandisePlacementDetectionResponseBody.js +182 -0
  23. package/dist/models/MerchandisePlacementDetectionResponseBody.js.map +1 -0
  24. package/dist/models/QueryAsyncTaskResultResponseBody.d.ts +3 -3
  25. package/dist/models/TextTranslateRequest.d.ts +7 -1
  26. package/dist/models/TextTranslateRequest.js.map +1 -1
  27. package/dist/models/TextTranslateResponseBody.d.ts +4 -4
  28. package/dist/models/TextTranslateShrinkRequest.d.ts +7 -1
  29. package/dist/models/TextTranslateShrinkRequest.js.map +1 -1
  30. package/dist/models/model.d.ts +13 -0
  31. package/dist/models/model.js +32 -6
  32. package/dist/models/model.js.map +1 -1
  33. package/package.json +1 -1
  34. package/src/client.ts +124 -52
  35. package/src/models/ImageTranslationProRequest.ts +11 -8
  36. package/src/models/ImageTranslationProResponseBody.ts +16 -26
  37. package/src/models/ImageTranslationStandardRequest.ts +16 -6
  38. package/src/models/ImageTranslationStandardResponseBody.ts +524 -4
  39. package/src/models/MerchandisePlacementDetectionRequest.ts +66 -0
  40. package/src/models/MerchandisePlacementDetectionResponse.ts +40 -0
  41. package/src/models/MerchandisePlacementDetectionResponseBody.ts +309 -0
  42. package/src/models/QueryAsyncTaskResultResponseBody.ts +3 -3
  43. package/src/models/TextTranslateRequest.ts +7 -1
  44. package/src/models/TextTranslateResponseBody.ts +4 -4
  45. package/src/models/TextTranslateShrinkRequest.ts +7 -1
  46. package/src/models/model.ts +13 -0
@@ -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 status.
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 ID.
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 task result.
76
+ * The asynchronous node result.
77
77
  */
78
78
  data?: QueryAsyncTaskResultResponseBodyData;
79
79
  /**
@@ -4,6 +4,9 @@ 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. 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
+ *
7
10
  * @example
8
11
  * MyCompany-Chat
9
12
  */
@@ -18,7 +21,7 @@ export class TextTranslateRequest extends $dara.Model {
18
21
  formatType?: string;
19
22
  /**
20
23
  * @remarks
21
- * The intervention glossary ID. This parameter is optional. The glossary must be created separately in the console and its ID provided here. If the glossary ID is empty, the translation result is not modified.
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.
22
25
  *
23
26
  * @example
24
27
  * glossary_1
@@ -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) or **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 number of characters in the source text.
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 successful calls.
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 successful calls. Returns specific error information for exceptions, such as "The parameters contain sensitive information. Try other input."
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
@@ -4,6 +4,9 @@ import * as $dara from '@darabonba/typescript';
4
4
 
5
5
  export class TextTranslateShrinkRequest extends $dara.Model {
6
6
  /**
7
+ * @remarks
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
+ *
7
10
  * @example
8
11
  * MyCompany-Chat
9
12
  */
@@ -18,7 +21,7 @@ export class TextTranslateShrinkRequest extends $dara.Model {
18
21
  formatType?: string;
19
22
  /**
20
23
  * @remarks
21
- * The intervention glossary ID. This parameter is optional. The glossary must be created separately in the console and its ID provided here. If the glossary ID is empty, the translation result is not modified.
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.
22
25
  *
23
26
  * @example
24
27
  * glossary_1
@@ -53,6 +56,9 @@ export class TextTranslateShrinkRequest 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) or **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
  */
@@ -20,11 +20,21 @@ export { ImageTranslationProResponseBodyDataGenFilesResultList } from './ImageTr
20
20
  export { ImageTranslationProResponseBodyDataGenFiles } from './ImageTranslationProResponseBody';
21
21
  export { ImageTranslationProResponseBodyDataResultList } from './ImageTranslationProResponseBody';
22
22
  export { ImageTranslationProResponseBodyData } from './ImageTranslationProResponseBody';
23
+ export { ImageTranslationStandardResponseBodyDataEditInfoGoodsRects } from './ImageTranslationStandardResponseBody';
24
+ export { ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsImageRect } from './ImageTranslationStandardResponseBody';
25
+ export { ImageTranslationStandardResponseBodyDataEditInfoTextAreasTextsTextRect } from './ImageTranslationStandardResponseBody';
26
+ export { ImageTranslationStandardResponseBodyDataEditInfoTextAreasTexts } from './ImageTranslationStandardResponseBody';
27
+ export { ImageTranslationStandardResponseBodyDataEditInfoTextAreas } from './ImageTranslationStandardResponseBody';
28
+ export { ImageTranslationStandardResponseBodyDataEditInfo } from './ImageTranslationStandardResponseBody';
23
29
  export { ImageTranslationStandardResponseBodyData } from './ImageTranslationStandardResponseBody';
24
30
  export { LanguageDetectResponseBodyData } from './LanguageDetectResponseBody';
25
31
  export { MaterialInspectionResponseBodyDataResultSteps } from './MaterialInspectionResponseBody';
26
32
  export { MaterialInspectionResponseBodyDataResult } from './MaterialInspectionResponseBody';
27
33
  export { MaterialInspectionResponseBodyData } from './MaterialInspectionResponseBody';
34
+ export { MerchandisePlacementDetectionResponseBodyDataDataTop1 } from './MerchandisePlacementDetectionResponseBody';
35
+ export { MerchandisePlacementDetectionResponseBodyDataDataTopk } from './MerchandisePlacementDetectionResponseBody';
36
+ export { MerchandisePlacementDetectionResponseBodyDataData } from './MerchandisePlacementDetectionResponseBody';
37
+ export { MerchandisePlacementDetectionResponseBodyData } from './MerchandisePlacementDetectionResponseBody';
28
38
  export { PackageWeightSizeCheckResponseBodyData } from './PackageWeightSizeCheckResponseBody';
29
39
  export { QueryAsyncTaskResultResponseBodyData } from './QueryAsyncTaskResultResponseBody';
30
40
  export { SizeChartDetectResponseBodyData } from './SizeChartDetectResponseBody';
@@ -80,6 +90,9 @@ export { LanguageDetectResponse } from './LanguageDetectResponse';
80
90
  export { MaterialInspectionRequest } from './MaterialInspectionRequest';
81
91
  export { MaterialInspectionResponseBody } from './MaterialInspectionResponseBody';
82
92
  export { MaterialInspectionResponse } from './MaterialInspectionResponse';
93
+ export { MerchandisePlacementDetectionRequest } from './MerchandisePlacementDetectionRequest';
94
+ export { MerchandisePlacementDetectionResponseBody } from './MerchandisePlacementDetectionResponseBody';
95
+ export { MerchandisePlacementDetectionResponse } from './MerchandisePlacementDetectionResponse';
83
96
  export { PackageWeightSizeCheckRequest } from './PackageWeightSizeCheckRequest';
84
97
  export { PackageWeightSizeCheckResponseBody } from './PackageWeightSizeCheckResponseBody';
85
98
  export { PackageWeightSizeCheckResponse } from './PackageWeightSizeCheckResponse';