@alicloud/aidge20260428 5.12.1 → 5.12.2
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 +58 -58
- package/dist/client.js +62 -58
- package/dist/client.js.map +1 -1
- package/dist/models/VisionFlowRequest.d.ts +17 -17
- package/dist/models/VisionFlowResponseBody.d.ts +6 -6
- package/dist/models/VisionFlowShrinkRequest.d.ts +17 -17
- package/package.json +2 -1
- package/src/client.ts +62 -58
- package/src/models/VisionFlowRequest.ts +17 -17
- package/src/models/VisionFlowResponseBody.ts +6 -6
- package/src/models/VisionFlowShrinkRequest.ts +17 -17
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class VisionFlowRequest extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The AI capabilities to
|
|
8
|
+
* The AI capabilities to be processed. Multiple values are supported. Valid values: 1 (Intelligent element recognition), 2 (Intelligent cutout), 3 (Intelligent erasure), 4 (Image translation Pro), 5 (Intelligent cropping), and 6 (High-definition upscaling).
|
|
9
9
|
*
|
|
10
10
|
* This parameter is required.
|
|
11
11
|
*
|
|
@@ -15,7 +15,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
15
15
|
ability?: number[];
|
|
16
16
|
/**
|
|
17
17
|
* @remarks
|
|
18
|
-
* The background type of the
|
|
18
|
+
* The background type of the returned image. Valid values: WHITE_BACKGROUND (White background image) and TRANSPARENT (Transparent background image). Required when the intelligent cutout capability is selected.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* WHITE_BACKGROUND
|
|
@@ -23,7 +23,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
23
23
|
backGroundType?: string;
|
|
24
24
|
/**
|
|
25
25
|
* @remarks
|
|
26
|
-
* The glossary
|
|
26
|
+
* The ID of the intervention glossary. Optional. You must create the glossary in the console and provide its ID. If this parameter is left empty, the translation results are not modified.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* glossary_1
|
|
@@ -31,7 +31,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
31
31
|
glossary?: string;
|
|
32
32
|
/**
|
|
33
33
|
* @remarks
|
|
34
|
-
* The URL of the image to
|
|
34
|
+
* The URL of the image to be processed. Required. The resolution must be greater than 256×256, the long side must not exceed 1920 pixels, and the short side must not exceed 1080 pixels. The size must not exceed 5 MB. Supported formats include PNG, JPEG, JPG, BMP, and WEBP.
|
|
35
35
|
*
|
|
36
36
|
* This parameter is required.
|
|
37
37
|
*
|
|
@@ -41,7 +41,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
41
41
|
imageUrl?: string;
|
|
42
42
|
/**
|
|
43
43
|
* @remarks
|
|
44
|
-
* Specifies whether to translate text on the image subject. Optional. Default value: false.
|
|
44
|
+
* Specifies whether to translate text on the image subject. Optional. Default value: false. This parameter helps protect embedded information such as product names from being translated.
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
47
|
* false
|
|
@@ -49,7 +49,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
49
49
|
includingProductArea?: boolean;
|
|
50
50
|
/**
|
|
51
51
|
* @remarks
|
|
52
|
-
* Specifies whether images with the
|
|
52
|
+
* Specifies whether to include images with the specified elements in subsequent processing. A value of true indicates that images with the elements are included in subsequent processing. A value of false indicates that images with the elements are not included. Required when the intelligent element recognition capability is selected.
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* true
|
|
@@ -57,7 +57,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
57
57
|
isFilter?: boolean;
|
|
58
58
|
/**
|
|
59
59
|
* @remarks
|
|
60
|
-
* The specific
|
|
60
|
+
* The specific erasure area in Run-Length Encoding (RLE) format. Optional. If this parameter is specified, it takes precedence and the ObjectRemoveElements and NonobjectRemoveElements parameters are ignored.
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
63
|
* 474556 160 475356 160
|
|
@@ -65,7 +65,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
65
65
|
mask?: string;
|
|
66
66
|
/**
|
|
67
67
|
* @remarks
|
|
68
|
-
* The elements to detect on the non-subject area of the image
|
|
68
|
+
* The elements to detect on the non-subject area of the image. Multiple values are supported. Valid values: 1 (Watermark), 2 (Logo), 3 (Text), and 4 (Text block). When the intelligent element recognition capability is selected, at least one of this parameter and ObjectDetectElements must be specified.
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* [1,2,3]
|
|
@@ -73,7 +73,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
73
73
|
nonobjectDetectElements?: number[];
|
|
74
74
|
/**
|
|
75
75
|
* @remarks
|
|
76
|
-
* The elements to remove from the non-subject area of the image
|
|
76
|
+
* The elements to remove from the non-subject area of the image. Multiple values are supported. Valid values: 1 (Transparent text block), 2 (Specific name), 3 (Text), and 4 (Cluttered text). When the intelligent erasure capability is selected, at least one of this parameter and ObjectRemoveElements must be specified.
|
|
77
77
|
*
|
|
78
78
|
* @example
|
|
79
79
|
* [1,2,4]
|
|
@@ -81,7 +81,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
81
81
|
nonobjectRemoveElements?: number[];
|
|
82
82
|
/**
|
|
83
83
|
* @remarks
|
|
84
|
-
* The elements to detect on the image subject
|
|
84
|
+
* The elements to detect on the image subject. Multiple values are supported. Valid values: 1 (Watermark), 2 (Logo), 3 (Text), and 4 (Text block). When the intelligent element recognition capability is selected, at least one of this parameter and NonobjectDetectElements must be specified.
|
|
85
85
|
*
|
|
86
86
|
* @example
|
|
87
87
|
* [1,2,3,4]
|
|
@@ -89,7 +89,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
89
89
|
objectDetectElements?: number[];
|
|
90
90
|
/**
|
|
91
91
|
* @remarks
|
|
92
|
-
* The elements to remove from the image subject
|
|
92
|
+
* The elements to remove from the image subject. Multiple values are supported. Valid values: 1 (Transparent text block), 2 (Specific name), 3 (Text), and 4 (Cluttered text). When the intelligent erasure capability is selected, at least one of this parameter and NonobjectRemoveElements must be specified.
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
95
|
* [1,2,4]
|
|
@@ -97,7 +97,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
97
97
|
objectRemoveElements?: number[];
|
|
98
98
|
/**
|
|
99
99
|
* @remarks
|
|
100
|
-
* The source language code. Optional. For supported language pairs,
|
|
100
|
+
* The source language code. Optional. For supported language pairs, see the list of supported translation languages.
|
|
101
101
|
*
|
|
102
102
|
* @example
|
|
103
103
|
* zh
|
|
@@ -105,7 +105,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
105
105
|
sourceLanguage?: string;
|
|
106
106
|
/**
|
|
107
107
|
* @remarks
|
|
108
|
-
* The
|
|
108
|
+
* The expected height of the cropped image, in pixels. Valid values: 100 to 5000. Required when the intelligent cropping capability is selected.
|
|
109
109
|
*
|
|
110
110
|
* @example
|
|
111
111
|
* 800
|
|
@@ -113,7 +113,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
113
113
|
targetHeight?: number;
|
|
114
114
|
/**
|
|
115
115
|
* @remarks
|
|
116
|
-
* The target language code. Optional. For supported language pairs,
|
|
116
|
+
* The target language code. Optional. For supported language pairs, see the list of supported translation languages.
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
119
|
* en
|
|
@@ -121,7 +121,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
121
121
|
targetLanguage?: string;
|
|
122
122
|
/**
|
|
123
123
|
* @remarks
|
|
124
|
-
* The
|
|
124
|
+
* The expected width of the cropped image, in pixels. Valid values: 100 to 5000. Required when the intelligent cropping capability is selected.
|
|
125
125
|
*
|
|
126
126
|
* @example
|
|
127
127
|
* 800
|
|
@@ -129,7 +129,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
129
129
|
targetWidth?: number;
|
|
130
130
|
/**
|
|
131
131
|
* @remarks
|
|
132
|
-
* Specifies whether to translate brand names in the image. Optional. Default value: false.
|
|
132
|
+
* Specifies whether to translate brand names in the image. Optional. Default value: false. This parameter helps protect brand name information from being translated.
|
|
133
133
|
*
|
|
134
134
|
* @example
|
|
135
135
|
* false
|
|
@@ -137,7 +137,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
137
137
|
translatingBrandInTheProduct?: boolean;
|
|
138
138
|
/**
|
|
139
139
|
* @remarks
|
|
140
|
-
* The image upscaling factor. Optional. Default value: 2. Valid values: 2 to 4.
|
|
140
|
+
* The image upscaling factor. Optional. Default value: 2. Valid values: 2 to 4. Required when the high-definition upscaling capability is selected.
|
|
141
141
|
*
|
|
142
142
|
* @example
|
|
143
143
|
* 2
|
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class VisionFlowResponseBodyData extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The asynchronous task
|
|
8
|
+
* The ID of the asynchronous task, which is used to query the processing result by calling QueryAsyncTaskResult.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* e4c48e88-3c34-91e3-ab8a-08484dc4d402
|
|
@@ -35,7 +35,7 @@ export class VisionFlowResponseBodyData extends $dara.Model {
|
|
|
35
35
|
export class VisionFlowResponseBody extends $dara.Model {
|
|
36
36
|
/**
|
|
37
37
|
* @remarks
|
|
38
|
-
* The status code.
|
|
38
|
+
* The status code. If the call is successful, "success" is returned.
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* success
|
|
@@ -43,12 +43,12 @@ export class VisionFlowResponseBody extends $dara.Model {
|
|
|
43
43
|
code?: string;
|
|
44
44
|
/**
|
|
45
45
|
* @remarks
|
|
46
|
-
* The
|
|
46
|
+
* The submission result data of the asynchronous task, which includes the asynchronous task ID.
|
|
47
47
|
*/
|
|
48
48
|
data?: VisionFlowResponseBodyData;
|
|
49
49
|
/**
|
|
50
50
|
* @remarks
|
|
51
|
-
* The error message.
|
|
51
|
+
* The error message. If the call is successful, "Success" is returned.
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
54
|
* Success
|
|
@@ -56,7 +56,7 @@ export class VisionFlowResponseBody extends $dara.Model {
|
|
|
56
56
|
message?: string;
|
|
57
57
|
/**
|
|
58
58
|
* @remarks
|
|
59
|
-
* The request ID, used to
|
|
59
|
+
* The request ID, which is used to identify a unique request.
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
62
|
* F3E65785-0180-1227-91B0-2F5F52F679FB
|
|
@@ -64,7 +64,7 @@ export class VisionFlowResponseBody extends $dara.Model {
|
|
|
64
64
|
requestId?: string;
|
|
65
65
|
/**
|
|
66
66
|
* @remarks
|
|
67
|
-
* Indicates whether the call is successful. A value of true indicates success
|
|
67
|
+
* Indicates whether the call is successful. A value of true indicates success, and a value of false indicates failure.
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
70
|
* true
|
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class VisionFlowShrinkRequest extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The AI capabilities to
|
|
8
|
+
* The AI capabilities to be processed. Multiple values are supported. Valid values: 1 (Intelligent element recognition), 2 (Intelligent cutout), 3 (Intelligent erasure), 4 (Image translation Pro), 5 (Intelligent cropping), and 6 (High-definition upscaling).
|
|
9
9
|
*
|
|
10
10
|
* This parameter is required.
|
|
11
11
|
*
|
|
@@ -15,7 +15,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
15
15
|
abilityShrink?: string;
|
|
16
16
|
/**
|
|
17
17
|
* @remarks
|
|
18
|
-
* The background type of the
|
|
18
|
+
* The background type of the returned image. Valid values: WHITE_BACKGROUND (White background image) and TRANSPARENT (Transparent background image). Required when the intelligent cutout capability is selected.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* WHITE_BACKGROUND
|
|
@@ -23,7 +23,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
23
23
|
backGroundType?: string;
|
|
24
24
|
/**
|
|
25
25
|
* @remarks
|
|
26
|
-
* The glossary
|
|
26
|
+
* The ID of the intervention glossary. Optional. You must create the glossary in the console and provide its ID. If this parameter is left empty, the translation results are not modified.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* glossary_1
|
|
@@ -31,7 +31,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
31
31
|
glossary?: string;
|
|
32
32
|
/**
|
|
33
33
|
* @remarks
|
|
34
|
-
* The URL of the image to
|
|
34
|
+
* The URL of the image to be processed. Required. The resolution must be greater than 256×256, the long side must not exceed 1920 pixels, and the short side must not exceed 1080 pixels. The size must not exceed 5 MB. Supported formats include PNG, JPEG, JPG, BMP, and WEBP.
|
|
35
35
|
*
|
|
36
36
|
* This parameter is required.
|
|
37
37
|
*
|
|
@@ -41,7 +41,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
41
41
|
imageUrl?: string;
|
|
42
42
|
/**
|
|
43
43
|
* @remarks
|
|
44
|
-
* Specifies whether to translate text on the image subject. Optional. Default value: false.
|
|
44
|
+
* Specifies whether to translate text on the image subject. Optional. Default value: false. This parameter helps protect embedded information such as product names from being translated.
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
47
|
* false
|
|
@@ -49,7 +49,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
49
49
|
includingProductArea?: boolean;
|
|
50
50
|
/**
|
|
51
51
|
* @remarks
|
|
52
|
-
* Specifies whether images with the
|
|
52
|
+
* Specifies whether to include images with the specified elements in subsequent processing. A value of true indicates that images with the elements are included in subsequent processing. A value of false indicates that images with the elements are not included. Required when the intelligent element recognition capability is selected.
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* true
|
|
@@ -57,7 +57,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
57
57
|
isFilter?: boolean;
|
|
58
58
|
/**
|
|
59
59
|
* @remarks
|
|
60
|
-
* The specific
|
|
60
|
+
* The specific erasure area in Run-Length Encoding (RLE) format. Optional. If this parameter is specified, it takes precedence and the ObjectRemoveElements and NonobjectRemoveElements parameters are ignored.
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
63
|
* 474556 160 475356 160
|
|
@@ -65,7 +65,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
65
65
|
mask?: string;
|
|
66
66
|
/**
|
|
67
67
|
* @remarks
|
|
68
|
-
* The elements to detect on the non-subject area of the image
|
|
68
|
+
* The elements to detect on the non-subject area of the image. Multiple values are supported. Valid values: 1 (Watermark), 2 (Logo), 3 (Text), and 4 (Text block). When the intelligent element recognition capability is selected, at least one of this parameter and ObjectDetectElements must be specified.
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* [1,2,3]
|
|
@@ -73,7 +73,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
73
73
|
nonobjectDetectElementsShrink?: string;
|
|
74
74
|
/**
|
|
75
75
|
* @remarks
|
|
76
|
-
* The elements to remove from the non-subject area of the image
|
|
76
|
+
* The elements to remove from the non-subject area of the image. Multiple values are supported. Valid values: 1 (Transparent text block), 2 (Specific name), 3 (Text), and 4 (Cluttered text). When the intelligent erasure capability is selected, at least one of this parameter and ObjectRemoveElements must be specified.
|
|
77
77
|
*
|
|
78
78
|
* @example
|
|
79
79
|
* [1,2,4]
|
|
@@ -81,7 +81,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
81
81
|
nonobjectRemoveElementsShrink?: string;
|
|
82
82
|
/**
|
|
83
83
|
* @remarks
|
|
84
|
-
* The elements to detect on the image subject
|
|
84
|
+
* The elements to detect on the image subject. Multiple values are supported. Valid values: 1 (Watermark), 2 (Logo), 3 (Text), and 4 (Text block). When the intelligent element recognition capability is selected, at least one of this parameter and NonobjectDetectElements must be specified.
|
|
85
85
|
*
|
|
86
86
|
* @example
|
|
87
87
|
* [1,2,3,4]
|
|
@@ -89,7 +89,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
89
89
|
objectDetectElementsShrink?: string;
|
|
90
90
|
/**
|
|
91
91
|
* @remarks
|
|
92
|
-
* The elements to remove from the image subject
|
|
92
|
+
* The elements to remove from the image subject. Multiple values are supported. Valid values: 1 (Transparent text block), 2 (Specific name), 3 (Text), and 4 (Cluttered text). When the intelligent erasure capability is selected, at least one of this parameter and NonobjectRemoveElements must be specified.
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
95
|
* [1,2,4]
|
|
@@ -97,7 +97,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
97
97
|
objectRemoveElementsShrink?: string;
|
|
98
98
|
/**
|
|
99
99
|
* @remarks
|
|
100
|
-
* The source language code. Optional. For supported language pairs,
|
|
100
|
+
* The source language code. Optional. For supported language pairs, see the list of supported translation languages.
|
|
101
101
|
*
|
|
102
102
|
* @example
|
|
103
103
|
* zh
|
|
@@ -105,7 +105,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
105
105
|
sourceLanguage?: string;
|
|
106
106
|
/**
|
|
107
107
|
* @remarks
|
|
108
|
-
* The
|
|
108
|
+
* The expected height of the cropped image, in pixels. Valid values: 100 to 5000. Required when the intelligent cropping capability is selected.
|
|
109
109
|
*
|
|
110
110
|
* @example
|
|
111
111
|
* 800
|
|
@@ -113,7 +113,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
113
113
|
targetHeight?: number;
|
|
114
114
|
/**
|
|
115
115
|
* @remarks
|
|
116
|
-
* The target language code. Optional. For supported language pairs,
|
|
116
|
+
* The target language code. Optional. For supported language pairs, see the list of supported translation languages.
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
119
|
* en
|
|
@@ -121,7 +121,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
121
121
|
targetLanguage?: string;
|
|
122
122
|
/**
|
|
123
123
|
* @remarks
|
|
124
|
-
* The
|
|
124
|
+
* The expected width of the cropped image, in pixels. Valid values: 100 to 5000. Required when the intelligent cropping capability is selected.
|
|
125
125
|
*
|
|
126
126
|
* @example
|
|
127
127
|
* 800
|
|
@@ -129,7 +129,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
129
129
|
targetWidth?: number;
|
|
130
130
|
/**
|
|
131
131
|
* @remarks
|
|
132
|
-
* Specifies whether to translate brand names in the image. Optional. Default value: false.
|
|
132
|
+
* Specifies whether to translate brand names in the image. Optional. Default value: false. This parameter helps protect brand name information from being translated.
|
|
133
133
|
*
|
|
134
134
|
* @example
|
|
135
135
|
* false
|
|
@@ -137,7 +137,7 @@ export class VisionFlowShrinkRequest extends $dara.Model {
|
|
|
137
137
|
translatingBrandInTheProduct?: boolean;
|
|
138
138
|
/**
|
|
139
139
|
* @remarks
|
|
140
|
-
* The image upscaling factor. Optional. Default value: 2. Valid values: 2 to 4.
|
|
140
|
+
* The image upscaling factor. Optional. Default value: 2. Valid values: 2 to 4. Required when the high-definition upscaling capability is selected.
|
|
141
141
|
*
|
|
142
142
|
* @example
|
|
143
143
|
* 2
|