@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
@@ -215,7 +215,7 @@ export class ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreasTextsTe
215
215
  export class ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreasTexts extends $dara.Model {
216
216
  /**
217
217
  * @remarks
218
- * The color of the translated text.
218
+ * The text color after translation.
219
219
  *
220
220
  * @example
221
221
  * #515151
@@ -258,14 +258,6 @@ export class ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreasTexts e
258
258
  * 1
259
259
  */
260
260
  lineCount?: number;
261
- /**
262
- * @remarks
263
- * The Ovis model error message and execution time.
264
- *
265
- * @example
266
- * | ovis time: 0.748
267
- */
268
- ovisErrMsg?: string;
269
261
  /**
270
262
  * @remarks
271
263
  * The coordinates of the text box area.
@@ -303,7 +295,6 @@ export class ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreasTexts e
303
295
  imageRect: 'ImageRect',
304
296
  language: 'Language',
305
297
  lineCount: 'LineCount',
306
- ovisErrMsg: 'OvisErrMsg',
307
298
  textRect: 'TextRect',
308
299
  valid: 'Valid',
309
300
  value: 'Value',
@@ -319,7 +310,6 @@ export class ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreasTexts e
319
310
  imageRect: ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreasTextsImageRect,
320
311
  language: 'string',
321
312
  lineCount: 'number',
322
- ovisErrMsg: 'string',
323
313
  textRect: ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreasTextsTextRect,
324
314
  valid: 'boolean',
325
315
  value: 'string',
@@ -356,7 +346,7 @@ export class ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreas extend
356
346
  * The original text before translation.
357
347
  *
358
348
  * @example
359
- * 萌趣造型·清脆响铃
349
+ * Cute Shape · Crisp Bell.
360
350
  */
361
351
  content?: string;
362
352
  /**
@@ -385,7 +375,7 @@ export class ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreas extend
385
375
  lineCount?: number;
386
376
  /**
387
377
  * @remarks
388
- * The list of translated texts. Each element corresponds to the translation result for one target language.
378
+ * The list of translated texts. Each element corresponds to the translation result for a target language.
389
379
  */
390
380
  texts?: ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreasTexts[];
391
381
  /**
@@ -445,12 +435,12 @@ export class ImageTranslationProResponseBodyDataGenFilesEditInfo extends $dara.M
445
435
  goodsRects?: ImageTranslationProResponseBodyDataGenFilesEditInfoGoodsRects;
446
436
  /**
447
437
  * @remarks
448
- * The list of translation target languages.
438
+ * The list of target languages for translation.
449
439
  */
450
440
  languages?: string[];
451
441
  /**
452
442
  * @remarks
453
- * The URL of the image with all text removed.
443
+ * The URL of the image after all text has been erased.
454
444
  *
455
445
  * @example
456
446
  * http://dashscope-a717.oss-cn-beijing.aliyuncs.com/repaired.png
@@ -463,7 +453,7 @@ export class ImageTranslationProResponseBodyDataGenFilesEditInfo extends $dara.M
463
453
  resultImageIds?: string[];
464
454
  /**
465
455
  * @remarks
466
- * The list of text boxes, including all recognized text area information.
456
+ * The list of text boxes, which contains information about all recognized text areas.
467
457
  */
468
458
  textAreas?: ImageTranslationProResponseBodyDataGenFilesEditInfoTextAreas[];
469
459
  static names(): { [key: string]: string } {
@@ -523,7 +513,7 @@ export class ImageTranslationProResponseBodyDataGenFilesResultList extends $dara
523
513
  fileUrl?: string;
524
514
  /**
525
515
  * @remarks
526
- * The translation target language.
516
+ * The target language for translation.
527
517
  *
528
518
  * @example
529
519
  * en
@@ -555,7 +545,7 @@ export class ImageTranslationProResponseBodyDataGenFilesResultList extends $dara
555
545
  export class ImageTranslationProResponseBodyDataGenFiles extends $dara.Model {
556
546
  /**
557
547
  * @remarks
558
- * The editor information, including recognized text areas, product areas, fonts, and other information.
548
+ * The editor information, which contains recognition information such as text areas, product areas, and fonts.
559
549
  */
560
550
  editInfo?: ImageTranslationProResponseBodyDataGenFilesEditInfo;
561
551
  /**
@@ -613,7 +603,7 @@ export class ImageTranslationProResponseBodyDataResultList extends $dara.Model {
613
603
  fileUrl?: string;
614
604
  /**
615
605
  * @remarks
616
- * The target language of the image translation.
606
+ * The target language for image translation.
617
607
  *
618
608
  * @example
619
609
  * en
@@ -645,7 +635,7 @@ export class ImageTranslationProResponseBodyDataResultList extends $dara.Model {
645
635
  export class ImageTranslationProResponseBodyData extends $dara.Model {
646
636
  /**
647
637
  * @remarks
648
- * The editor protocol, including translation result files and editing information.
638
+ * The editor protocol, which contains translation result files and editing information.
649
639
  */
650
640
  genFiles?: ImageTranslationProResponseBodyDataGenFiles[];
651
641
  /**
@@ -655,7 +645,7 @@ export class ImageTranslationProResponseBodyData extends $dara.Model {
655
645
  resultList?: ImageTranslationProResponseBodyDataResultList[];
656
646
  /**
657
647
  * @remarks
658
- * The asynchronous task ID. Not returned for synchronous calls.
648
+ * The asynchronous task ID. This parameter is not returned for synchronous calls.
659
649
  *
660
650
  * @example
661
651
  * abc123-task-id
@@ -663,7 +653,7 @@ export class ImageTranslationProResponseBodyData extends $dara.Model {
663
653
  taskId?: string;
664
654
  /**
665
655
  * @remarks
666
- * The usage information, including the number of processed images.
656
+ * The usage information, which contains the number of processed images.
667
657
  */
668
658
  usageMap?: { [key: string]: number };
669
659
  static names(): { [key: string]: string } {
@@ -705,7 +695,7 @@ export class ImageTranslationProResponseBodyData extends $dara.Model {
705
695
  export class ImageTranslationProResponseBody extends $dara.Model {
706
696
  /**
707
697
  * @remarks
708
- * The response code. 200 indicates a successful call. For other response codes, see the error code information.
698
+ * The response code. 200 indicates a successful call. For other response codes, refer to the error code information.
709
699
  *
710
700
  * @example
711
701
  * 200
@@ -713,12 +703,12 @@ export class ImageTranslationProResponseBody extends $dara.Model {
713
703
  code?: string;
714
704
  /**
715
705
  * @remarks
716
- * The translation result data. ResultList contains the URL of the translation result. GenFiles contains EditInfo with the recognized text information.
706
+ * The translation result data. ResultList contains the URLs of translation results, and GenFiles contains EditInfo with the recognized text information.
717
707
  */
718
708
  data?: ImageTranslationProResponseBodyData;
719
709
  /**
720
710
  * @remarks
721
- * The error message. Returns "Success" for successful calls. Returns specific error information for exceptions, such as "The content contains sensitive data. Try other input."
711
+ * The error message. "Success" is returned for successful calls. Specific error information is returned for failed calls, such as "The content contains sensitive data. Try other input."
722
712
  *
723
713
  * @example
724
714
  * Success
@@ -734,7 +724,7 @@ export class ImageTranslationProResponseBody extends $dara.Model {
734
724
  requestId?: string;
735
725
  /**
736
726
  * @remarks
737
- * Indicates whether the call was successful. true indicates success. false indicates failure.
727
+ * Indicates whether the call is successful. true indicates success, and false indicates failure.
738
728
  *
739
729
  * @example
740
730
  * true
@@ -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 ID of the intervention glossary. This parameter is optional. Create the glossary in the console and provide its ID. If the glossary ID is empty, the translation results are not modified.
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
@@ -13,7 +13,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
13
13
  glossary?: string;
14
14
  /**
15
15
  * @remarks
16
- * The URL of the original image. This parameter is required. Image requirements: the width and height cannot exceed 4000 × 4000 pixels, the file size cannot exceed 10 MB, and the supported formats are png, jpeg, jpg, bmp, and webp.
16
+ * - Image URL: Must be publicly accessible.
17
17
  *
18
18
  * This parameter is required.
19
19
  *
@@ -23,7 +23,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
23
23
  imageUrl?: string;
24
24
  /**
25
25
  * @remarks
26
- * Specifies whether to translate text on the product subject in the image. This parameter is optional. Default value: false. This helps protect information by preventing translation of embedded information such as product names.
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.
27
27
  *
28
28
  * @example
29
29
  * false
@@ -31,7 +31,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
31
31
  includingProductArea?: boolean;
32
32
  /**
33
33
  * @remarks
34
- * The source language code. This parameter is required. For supported language directions, see the supported language directions list.
34
+ * The source language code. Required. For supported language pairs, see the supported language pair list.
35
35
  *
36
36
  * This parameter is required.
37
37
  *
@@ -41,7 +41,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
41
41
  sourceLanguage?: string;
42
42
  /**
43
43
  * @remarks
44
- * The target language code. This parameter is required. For supported language directions, see the supported language directions list.
44
+ * The target language code. Required. For supported language pairs, see the supported language pair list.
45
45
  *
46
46
  * This parameter is required.
47
47
  *
@@ -51,12 +51,20 @@ export class ImageTranslationStandardRequest extends $dara.Model {
51
51
  targetLanguage?: string;
52
52
  /**
53
53
  * @remarks
54
- * Specifies whether to translate brand names on the image. This parameter is 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.
55
55
  *
56
56
  * @example
57
57
  * false
58
58
  */
59
59
  translatingBrandInTheProduct?: boolean;
60
+ /**
61
+ * @remarks
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.
63
+ *
64
+ * @example
65
+ * false
66
+ */
67
+ useImageEditor?: boolean;
60
68
  static names(): { [key: string]: string } {
61
69
  return {
62
70
  glossary: 'Glossary',
@@ -65,6 +73,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
65
73
  sourceLanguage: 'SourceLanguage',
66
74
  targetLanguage: 'TargetLanguage',
67
75
  translatingBrandInTheProduct: 'TranslatingBrandInTheProduct',
76
+ useImageEditor: 'UseImageEditor',
68
77
  };
69
78
  }
70
79
 
@@ -76,6 +85,7 @@ export class ImageTranslationStandardRequest extends $dara.Model {
76
85
  sourceLanguage: 'string',
77
86
  targetLanguage: 'string',
78
87
  translatingBrandInTheProduct: 'boolean',
88
+ useImageEditor: 'boolean',
79
89
  };
80
90
  }
81
91