@alicloud/aidge20260428 5.1.0 → 5.2.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 (37) hide show
  1. package/dist/client.d.ts +111 -54
  2. package/dist/client.js +158 -54
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/ImageTranslationPlusResponseBody.d.ts +4 -6
  5. package/dist/models/ImageTranslationPlusResponseBody.js.map +1 -1
  6. package/dist/models/PrepaidTextTranslateRequest.d.ts +73 -0
  7. package/dist/models/PrepaidTextTranslateRequest.js +73 -0
  8. package/dist/models/PrepaidTextTranslateRequest.js.map +1 -0
  9. package/dist/models/PrepaidTextTranslateResponse.d.ts +19 -0
  10. package/dist/models/PrepaidTextTranslateResponse.js +69 -0
  11. package/dist/models/PrepaidTextTranslateResponse.js.map +1 -0
  12. package/dist/models/PrepaidTextTranslateResponseBody.d.ts +110 -0
  13. package/dist/models/PrepaidTextTranslateResponseBody.js +119 -0
  14. package/dist/models/PrepaidTextTranslateResponseBody.js.map +1 -0
  15. package/dist/models/PrepaidTextTranslateShrinkRequest.d.ts +73 -0
  16. package/dist/models/PrepaidTextTranslateShrinkRequest.js +70 -0
  17. package/dist/models/PrepaidTextTranslateShrinkRequest.js.map +1 -0
  18. package/dist/models/VideoGenerationRequest.d.ts +29 -0
  19. package/dist/models/VideoGenerationRequest.js.map +1 -1
  20. package/dist/models/VideoGenerationResponseBody.d.ts +23 -0
  21. package/dist/models/VideoGenerationResponseBody.js.map +1 -1
  22. package/dist/models/VideoGenerationShrinkRequest.d.ts +8 -0
  23. package/dist/models/VideoGenerationShrinkRequest.js.map +1 -1
  24. package/dist/models/model.d.ts +6 -0
  25. package/dist/models/model.js +15 -3
  26. package/dist/models/model.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/client.ts +168 -54
  29. package/src/models/ImageTranslationPlusResponseBody.ts +4 -6
  30. package/src/models/PrepaidTextTranslateRequest.ts +101 -0
  31. package/src/models/PrepaidTextTranslateResponse.ts +40 -0
  32. package/src/models/PrepaidTextTranslateResponseBody.ts +164 -0
  33. package/src/models/PrepaidTextTranslateShrinkRequest.ts +98 -0
  34. package/src/models/VideoGenerationRequest.ts +29 -0
  35. package/src/models/VideoGenerationResponseBody.ts +23 -0
  36. package/src/models/VideoGenerationShrinkRequest.ts +8 -0
  37. package/src/models/model.ts +6 -0
@@ -0,0 +1,164 @@
1
+ // This file is auto-generated, don't edit it
2
+ import * as $dara from '@darabonba/typescript';
3
+
4
+
5
+ export class PrepaidTextTranslateResponseBodyDataTranslations extends $dara.Model {
6
+ /**
7
+ * @remarks
8
+ * The character count of the source text.
9
+ *
10
+ * @example
11
+ * 11
12
+ */
13
+ characters?: number;
14
+ /**
15
+ * @remarks
16
+ * The automatically detected source language.
17
+ *
18
+ * @example
19
+ * en
20
+ */
21
+ detectedLanguage?: string;
22
+ /**
23
+ * @remarks
24
+ * The translated text.
25
+ *
26
+ * @example
27
+ * 你好世界
28
+ */
29
+ translatedText?: string;
30
+ static names(): { [key: string]: string } {
31
+ return {
32
+ characters: 'Characters',
33
+ detectedLanguage: 'DetectedLanguage',
34
+ translatedText: 'TranslatedText',
35
+ };
36
+ }
37
+
38
+ static types(): { [key: string]: any } {
39
+ return {
40
+ characters: 'number',
41
+ detectedLanguage: 'string',
42
+ translatedText: '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 PrepaidTextTranslateResponseBodyData extends $dara.Model {
56
+ /**
57
+ * @remarks
58
+ * The translation result list. Each element corresponds to a translation result for an entry in the input text list.
59
+ */
60
+ translations?: PrepaidTextTranslateResponseBodyDataTranslations[];
61
+ /**
62
+ * @remarks
63
+ * The usage information, including the input character count.
64
+ */
65
+ usageMap?: { [key: string]: number };
66
+ static names(): { [key: string]: string } {
67
+ return {
68
+ translations: 'Translations',
69
+ usageMap: 'UsageMap',
70
+ };
71
+ }
72
+
73
+ static types(): { [key: string]: any } {
74
+ return {
75
+ translations: { 'type': 'array', 'itemType': PrepaidTextTranslateResponseBodyDataTranslations },
76
+ usageMap: { 'type': 'map', 'keyType': 'string', 'valueType': 'number' },
77
+ };
78
+ }
79
+
80
+ validate() {
81
+ if(Array.isArray(this.translations)) {
82
+ $dara.Model.validateArray(this.translations);
83
+ }
84
+ if(this.usageMap) {
85
+ $dara.Model.validateMap(this.usageMap);
86
+ }
87
+ super.validate();
88
+ }
89
+
90
+ constructor(map?: { [key: string]: any }) {
91
+ super(map);
92
+ }
93
+ }
94
+
95
+ export class PrepaidTextTranslateResponseBody extends $dara.Model {
96
+ /**
97
+ * @remarks
98
+ * The response code. Returns "success" for normal calls.
99
+ *
100
+ * @example
101
+ * success
102
+ */
103
+ code?: string;
104
+ /**
105
+ * @remarks
106
+ * The translation result data, including the translation list and usage information.
107
+ */
108
+ data?: PrepaidTextTranslateResponseBodyData;
109
+ /**
110
+ * @remarks
111
+ * The error message. Returns "Success" for normal calls. Returns specific error information for exceptions, such as "The parameters contain sensitive information. Try other input."
112
+ *
113
+ * @example
114
+ * Success
115
+ */
116
+ message?: string;
117
+ /**
118
+ * @remarks
119
+ * The request ID, used to identify a unique request call.
120
+ *
121
+ * @example
122
+ * E1AD60F1-BAC7-546B-9533-E7AD02B16E3F
123
+ */
124
+ requestId?: string;
125
+ /**
126
+ * @remarks
127
+ * Indicates whether the call is successful. true indicates success. false indicates failure.
128
+ *
129
+ * @example
130
+ * True
131
+ */
132
+ success?: boolean;
133
+ static names(): { [key: string]: string } {
134
+ return {
135
+ code: 'Code',
136
+ data: 'Data',
137
+ message: 'Message',
138
+ requestId: 'RequestId',
139
+ success: 'Success',
140
+ };
141
+ }
142
+
143
+ static types(): { [key: string]: any } {
144
+ return {
145
+ code: 'string',
146
+ data: PrepaidTextTranslateResponseBodyData,
147
+ message: 'string',
148
+ requestId: 'string',
149
+ success: 'boolean',
150
+ };
151
+ }
152
+
153
+ validate() {
154
+ if(this.data && typeof (this.data as any).validate === 'function') {
155
+ (this.data as any).validate();
156
+ }
157
+ super.validate();
158
+ }
159
+
160
+ constructor(map?: { [key: string]: any }) {
161
+ super(map);
162
+ }
163
+ }
164
+
@@ -0,0 +1,98 @@
1
+ // This file is auto-generated, don't edit it
2
+ import * as $dara from '@darabonba/typescript';
3
+
4
+
5
+ export class PrepaidTextTranslateShrinkRequest extends $dara.Model {
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 an invalid value is passed, the general translation strategy is used by default.
9
+ *
10
+ * @example
11
+ * Alibaba-商品
12
+ */
13
+ bizName?: string;
14
+ /**
15
+ * @remarks
16
+ * The format type of the source text. This parameter is optional. Supports text (plain text format) and html (web page format, preserving HTML tags).
17
+ *
18
+ * @example
19
+ * text
20
+ */
21
+ formatType?: string;
22
+ /**
23
+ * @remarks
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
+ *
26
+ * @example
27
+ * custom_glossary
28
+ */
29
+ glossary?: string;
30
+ /**
31
+ * @remarks
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
+ *
34
+ * @example
35
+ * auto
36
+ */
37
+ sourceLanguage?: string;
38
+ /**
39
+ * @remarks
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
+ *
42
+ * This parameter is required.
43
+ *
44
+ * @example
45
+ * ["Hello world"]
46
+ */
47
+ sourceTextListShrink?: string;
48
+ /**
49
+ * @remarks
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
+ *
52
+ * This parameter is required.
53
+ *
54
+ * @example
55
+ * zh
56
+ */
57
+ targetLanguage?: string;
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
+ *
62
+ * @example
63
+ * e-commerce-title
64
+ */
65
+ translateScene?: string;
66
+ static names(): { [key: string]: string } {
67
+ return {
68
+ bizName: 'BizName',
69
+ formatType: 'FormatType',
70
+ glossary: 'Glossary',
71
+ sourceLanguage: 'SourceLanguage',
72
+ sourceTextListShrink: 'SourceTextList',
73
+ targetLanguage: 'TargetLanguage',
74
+ translateScene: 'TranslateScene',
75
+ };
76
+ }
77
+
78
+ static types(): { [key: string]: any } {
79
+ return {
80
+ bizName: 'string',
81
+ formatType: 'string',
82
+ glossary: 'string',
83
+ sourceLanguage: 'string',
84
+ sourceTextListShrink: 'string',
85
+ targetLanguage: 'string',
86
+ translateScene: 'string',
87
+ };
88
+ }
89
+
90
+ validate() {
91
+ super.validate();
92
+ }
93
+
94
+ constructor(map?: { [key: string]: any }) {
95
+ super(map);
96
+ }
97
+ }
98
+
@@ -3,14 +3,22 @@ import * as $dara from '@darabonba/typescript';
3
3
 
4
4
 
5
5
  export class VideoGenerationRequestInput extends $dara.Model {
6
+ /**
7
+ * @remarks
8
+ * The extended information.
9
+ */
6
10
  extra?: { [key: string]: any };
7
11
  /**
8
12
  * @remarks
13
+ * The list of product image URLs (1 to 6 images). The URLs must be publicly accessible.
14
+ *
9
15
  * This parameter is required.
10
16
  */
11
17
  images?: string[];
12
18
  /**
13
19
  * @remarks
20
+ * The product title. A maximum of the first 60 characters are used.
21
+ *
14
22
  * This parameter is required.
15
23
  *
16
24
  * @example
@@ -50,11 +58,17 @@ export class VideoGenerationRequestInput extends $dara.Model {
50
58
 
51
59
  export class VideoGenerationRequestIntent extends $dara.Model {
52
60
  /**
61
+ * @remarks
62
+ * The distribution channel.
63
+ *
53
64
  * @example
54
65
  * -
55
66
  */
56
67
  channel?: string;
57
68
  /**
69
+ * @remarks
70
+ * The business goal.
71
+ *
58
72
  * @example
59
73
  * -
60
74
  */
@@ -85,6 +99,8 @@ export class VideoGenerationRequestIntent extends $dara.Model {
85
99
  export class VideoGenerationRequestOutput extends $dara.Model {
86
100
  /**
87
101
  * @remarks
102
+ * The video duration in seconds. Currently supports integers between 5 and 15. More options will be available in the future.
103
+ *
88
104
  * This parameter is required.
89
105
  *
90
106
  * @example
@@ -93,6 +109,8 @@ export class VideoGenerationRequestOutput extends $dara.Model {
93
109
  duration?: number;
94
110
  /**
95
111
  * @remarks
112
+ * The output resolution.
113
+ *
96
114
  * This parameter is required.
97
115
  *
98
116
  * @example
@@ -100,6 +118,9 @@ export class VideoGenerationRequestOutput extends $dara.Model {
100
118
  */
101
119
  quality?: string;
102
120
  /**
121
+ * @remarks
122
+ * The video aspect ratio.
123
+ *
103
124
  * @example
104
125
  * 9:16
105
126
  */
@@ -132,12 +153,20 @@ export class VideoGenerationRequestOutput extends $dara.Model {
132
153
  export class VideoGenerationRequest extends $dara.Model {
133
154
  /**
134
155
  * @remarks
156
+ * The product input.
157
+ *
135
158
  * This parameter is required.
136
159
  */
137
160
  input?: VideoGenerationRequestInput;
161
+ /**
162
+ * @remarks
163
+ * The intent parameters. Currently unavailable.
164
+ */
138
165
  intent?: VideoGenerationRequestIntent;
139
166
  /**
140
167
  * @remarks
168
+ * The output parameters.
169
+ *
141
170
  * This parameter is required.
142
171
  */
143
172
  output?: VideoGenerationRequestOutput;
@@ -4,10 +4,17 @@ import * as $dara from '@darabonba/typescript';
4
4
 
5
5
  export class VideoGenerationResponseBodyData extends $dara.Model {
6
6
  /**
7
+ * @remarks
8
+ * The downstream task ID.
9
+ *
7
10
  * @example
8
11
  * 778fa8bd21804828a5d147050e30edac
9
12
  */
10
13
  taskId?: string;
14
+ /**
15
+ * @remarks
16
+ * The metering usage information.
17
+ */
11
18
  usageMap?: { [key: string]: number };
12
19
  static names(): { [key: string]: string } {
13
20
  return {
@@ -37,22 +44,38 @@ export class VideoGenerationResponseBodyData extends $dara.Model {
37
44
 
38
45
  export class VideoGenerationResponseBody extends $dara.Model {
39
46
  /**
47
+ * @remarks
48
+ * The response code. A value of success indicates a successful call, and a value of failed indicates a failure.
49
+ *
40
50
  * @example
41
51
  * success
42
52
  */
43
53
  code?: string;
54
+ /**
55
+ * @remarks
56
+ * The struct of the returned result.
57
+ */
44
58
  data?: VideoGenerationResponseBodyData;
45
59
  /**
60
+ * @remarks
61
+ * The response message. An error message is returned if the call fails.
62
+ *
46
63
  * @example
47
64
  * Success
48
65
  */
49
66
  message?: string;
50
67
  /**
68
+ * @remarks
69
+ * The request ID, used to identify a unique request call.
70
+ *
51
71
  * @example
52
72
  * 70CBEFDF-BB17-1EB3-8A21-569F3124738F
53
73
  */
54
74
  requestId?: string;
55
75
  /**
76
+ * @remarks
77
+ * Indicates whether the call is successful. A value of true indicates success, and a value of false indicates failure.
78
+ *
56
79
  * @example
57
80
  * true
58
81
  */
@@ -5,12 +5,20 @@ import * as $dara from '@darabonba/typescript';
5
5
  export class VideoGenerationShrinkRequest extends $dara.Model {
6
6
  /**
7
7
  * @remarks
8
+ * The product input.
9
+ *
8
10
  * This parameter is required.
9
11
  */
10
12
  inputShrink?: string;
13
+ /**
14
+ * @remarks
15
+ * The intent parameters. Currently unavailable.
16
+ */
11
17
  intentShrink?: string;
12
18
  /**
13
19
  * @remarks
20
+ * The output parameters.
21
+ *
14
22
  * This parameter is required.
15
23
  */
16
24
  outputShrink?: string;
@@ -37,6 +37,8 @@ export { MerchandisePlacementDetectionResponseBodyDataDataTopk } from './Merchan
37
37
  export { MerchandisePlacementDetectionResponseBodyDataData } from './MerchandisePlacementDetectionResponseBody';
38
38
  export { MerchandisePlacementDetectionResponseBodyData } from './MerchandisePlacementDetectionResponseBody';
39
39
  export { PackageWeightSizeCheckResponseBodyData } from './PackageWeightSizeCheckResponseBody';
40
+ export { PrepaidTextTranslateResponseBodyDataTranslations } from './PrepaidTextTranslateResponseBody';
41
+ export { PrepaidTextTranslateResponseBodyData } from './PrepaidTextTranslateResponseBody';
40
42
  export { QueryAsyncTaskResultResponseBodyData } from './QueryAsyncTaskResultResponseBody';
41
43
  export { SizeChartDetectResponseBodyData } from './SizeChartDetectResponseBody';
42
44
  export { SizeChartExtractResponseBodyData } from './SizeChartExtractResponseBody';
@@ -104,6 +106,10 @@ export { MerchandisePlacementDetectionResponse } from './MerchandisePlacementDet
104
106
  export { PackageWeightSizeCheckRequest } from './PackageWeightSizeCheckRequest';
105
107
  export { PackageWeightSizeCheckResponseBody } from './PackageWeightSizeCheckResponseBody';
106
108
  export { PackageWeightSizeCheckResponse } from './PackageWeightSizeCheckResponse';
109
+ export { PrepaidTextTranslateRequest } from './PrepaidTextTranslateRequest';
110
+ export { PrepaidTextTranslateShrinkRequest } from './PrepaidTextTranslateShrinkRequest';
111
+ export { PrepaidTextTranslateResponseBody } from './PrepaidTextTranslateResponseBody';
112
+ export { PrepaidTextTranslateResponse } from './PrepaidTextTranslateResponse';
107
113
  export { QueryAsyncTaskResultRequest } from './QueryAsyncTaskResultRequest';
108
114
  export { QueryAsyncTaskResultResponseBody } from './QueryAsyncTaskResultResponseBody';
109
115
  export { QueryAsyncTaskResultResponse } from './QueryAsyncTaskResultResponse';