@alicloud/aidge20260428 5.10.1 → 5.11.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/src/client.ts CHANGED
@@ -1163,6 +1163,92 @@ export default class Client extends OpenApi {
1163
1163
  return await this.generalRephotographyDetectionWithOptions(request, runtime);
1164
1164
  }
1165
1165
 
1166
+ /**
1167
+ * 商品文案生成改写
1168
+ *
1169
+ * @param request - GenerateProductContentRequest
1170
+ * @param runtime - runtime options for this request RuntimeOptions
1171
+ * @returns GenerateProductContentResponse
1172
+ */
1173
+ async generateProductContentWithOptions(request: $_model.GenerateProductContentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GenerateProductContentResponse> {
1174
+ request.validate();
1175
+ let query = { };
1176
+ if (!$dara.isNull(request.bulletPointCount)) {
1177
+ query["BulletPointCount"] = request.bulletPointCount;
1178
+ }
1179
+
1180
+ if (!$dara.isNull(request.contentType)) {
1181
+ query["ContentType"] = request.contentType;
1182
+ }
1183
+
1184
+ if (!$dara.isNull(request.enableTranslation)) {
1185
+ query["EnableTranslation"] = request.enableTranslation;
1186
+ }
1187
+
1188
+ if (!$dara.isNull(request.maxLength)) {
1189
+ query["MaxLength"] = request.maxLength;
1190
+ }
1191
+
1192
+ if (!$dara.isNull(request.minLength)) {
1193
+ query["MinLength"] = request.minLength;
1194
+ }
1195
+
1196
+ if (!$dara.isNull(request.operation)) {
1197
+ query["Operation"] = request.operation;
1198
+ }
1199
+
1200
+ if (!$dara.isNull(request.platform)) {
1201
+ query["Platform"] = request.platform;
1202
+ }
1203
+
1204
+ if (!$dara.isNull(request.productAttributes)) {
1205
+ query["ProductAttributes"] = request.productAttributes;
1206
+ }
1207
+
1208
+ if (!$dara.isNull(request.productCategory)) {
1209
+ query["ProductCategory"] = request.productCategory;
1210
+ }
1211
+
1212
+ if (!$dara.isNull(request.sourceLanguage)) {
1213
+ query["SourceLanguage"] = request.sourceLanguage;
1214
+ }
1215
+
1216
+ if (!$dara.isNull(request.sourceText)) {
1217
+ query["SourceText"] = request.sourceText;
1218
+ }
1219
+
1220
+ if (!$dara.isNull(request.targetLanguage)) {
1221
+ query["TargetLanguage"] = request.targetLanguage;
1222
+ }
1223
+
1224
+ let req = new $OpenApiUtil.OpenApiRequest({
1225
+ query: OpenApiUtil.query(query),
1226
+ });
1227
+ let params = new $OpenApiUtil.Params({
1228
+ action: "GenerateProductContent",
1229
+ version: "2026-04-28",
1230
+ protocol: "HTTPS",
1231
+ pathname: "/",
1232
+ method: "POST",
1233
+ authType: "AK",
1234
+ style: "RPC",
1235
+ reqBodyType: "formData",
1236
+ bodyType: "json",
1237
+ });
1238
+ return $dara.cast<$_model.GenerateProductContentResponse>(await this.callApi(params, req, runtime), new $_model.GenerateProductContentResponse({}));
1239
+ }
1240
+
1241
+ /**
1242
+ * 商品文案生成改写
1243
+ *
1244
+ * @param request - GenerateProductContentRequest
1245
+ * @returns GenerateProductContentResponse
1246
+ */
1247
+ async generateProductContent(request: $_model.GenerateProductContentRequest): Promise<$_model.GenerateProductContentResponse> {
1248
+ let runtime = new $dara.RuntimeOptions({ });
1249
+ return await this.generateProductContentWithOptions(request, runtime);
1250
+ }
1251
+
1166
1252
  /**
1167
1253
  * Intelligently crops images to specified dimensions, automatically identifies the main subject area, and precisely crops to various sizes to meet design requirements across different scenarios. (Synchronous)
1168
1254
  *
@@ -0,0 +1,120 @@
1
+ // This file is auto-generated, don't edit it
2
+ import * as $dara from '@darabonba/typescript';
3
+
4
+
5
+ export class GenerateProductContentRequest extends $dara.Model {
6
+ /**
7
+ * @example
8
+ * 5
9
+ */
10
+ bulletPointCount?: number;
11
+ /**
12
+ * @remarks
13
+ * This parameter is required.
14
+ *
15
+ * @example
16
+ * description
17
+ */
18
+ contentType?: string;
19
+ /**
20
+ * @example
21
+ * True
22
+ */
23
+ enableTranslation?: boolean;
24
+ /**
25
+ * @example
26
+ * 1000
27
+ */
28
+ maxLength?: number;
29
+ /**
30
+ * @example
31
+ * 500
32
+ */
33
+ minLength?: number;
34
+ /**
35
+ * @remarks
36
+ * This parameter is required.
37
+ *
38
+ * @example
39
+ * generate
40
+ */
41
+ operation?: string;
42
+ /**
43
+ * @example
44
+ * amazon
45
+ */
46
+ platform?: string;
47
+ /**
48
+ * @example
49
+ * {"brand":"苏泊尔","material":"304不锈钢"}
50
+ */
51
+ productAttributes?: string;
52
+ /**
53
+ * @example
54
+ * 厨房用具
55
+ */
56
+ productCategory?: string;
57
+ /**
58
+ * @remarks
59
+ * This parameter is required.
60
+ *
61
+ * @example
62
+ * zh
63
+ */
64
+ sourceLanguage?: string;
65
+ /**
66
+ * @remarks
67
+ * This parameter is required.
68
+ *
69
+ * @example
70
+ * 不锈钢蒸锅28cm三层大容量家用厨房必备蒸煮两用锅具
71
+ */
72
+ sourceText?: string;
73
+ /**
74
+ * @example
75
+ * en
76
+ */
77
+ targetLanguage?: string;
78
+ static names(): { [key: string]: string } {
79
+ return {
80
+ bulletPointCount: 'BulletPointCount',
81
+ contentType: 'ContentType',
82
+ enableTranslation: 'EnableTranslation',
83
+ maxLength: 'MaxLength',
84
+ minLength: 'MinLength',
85
+ operation: 'Operation',
86
+ platform: 'Platform',
87
+ productAttributes: 'ProductAttributes',
88
+ productCategory: 'ProductCategory',
89
+ sourceLanguage: 'SourceLanguage',
90
+ sourceText: 'SourceText',
91
+ targetLanguage: 'TargetLanguage',
92
+ };
93
+ }
94
+
95
+ static types(): { [key: string]: any } {
96
+ return {
97
+ bulletPointCount: 'number',
98
+ contentType: 'string',
99
+ enableTranslation: 'boolean',
100
+ maxLength: 'number',
101
+ minLength: 'number',
102
+ operation: 'string',
103
+ platform: 'string',
104
+ productAttributes: 'string',
105
+ productCategory: 'string',
106
+ sourceLanguage: 'string',
107
+ sourceText: 'string',
108
+ targetLanguage: 'string',
109
+ };
110
+ }
111
+
112
+ validate() {
113
+ super.validate();
114
+ }
115
+
116
+ constructor(map?: { [key: string]: any }) {
117
+ super(map);
118
+ }
119
+ }
120
+
@@ -0,0 +1,40 @@
1
+ // This file is auto-generated, don't edit it
2
+ import * as $dara from '@darabonba/typescript';
3
+ import { GenerateProductContentResponseBody } from "./GenerateProductContentResponseBody";
4
+
5
+
6
+ export class GenerateProductContentResponse extends $dara.Model {
7
+ headers?: { [key: string]: string };
8
+ statusCode?: number;
9
+ body?: GenerateProductContentResponseBody;
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: GenerateProductContentResponseBody,
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,124 @@
1
+ // This file is auto-generated, don't edit it
2
+ import * as $dara from '@darabonba/typescript';
3
+
4
+
5
+ export class GenerateProductContentResponseBodyData extends $dara.Model {
6
+ /**
7
+ * @example
8
+ * title
9
+ */
10
+ contentType?: string;
11
+ /**
12
+ * @example
13
+ * 54
14
+ */
15
+ length?: number;
16
+ /**
17
+ * @example
18
+ * ru
19
+ */
20
+ outputLanguage?: string;
21
+ pointLengths?: number[];
22
+ points?: string[];
23
+ /**
24
+ * @example
25
+ * Чашка Для Мороженого Из Нержавеющей Стали 14,5x10,8 см
26
+ */
27
+ text?: string;
28
+ usageMap?: { [key: string]: number };
29
+ static names(): { [key: string]: string } {
30
+ return {
31
+ contentType: 'ContentType',
32
+ length: 'Length',
33
+ outputLanguage: 'OutputLanguage',
34
+ pointLengths: 'PointLengths',
35
+ points: 'Points',
36
+ text: 'Text',
37
+ usageMap: 'UsageMap',
38
+ };
39
+ }
40
+
41
+ static types(): { [key: string]: any } {
42
+ return {
43
+ contentType: 'string',
44
+ length: 'number',
45
+ outputLanguage: 'string',
46
+ pointLengths: { 'type': 'array', 'itemType': 'number' },
47
+ points: { 'type': 'array', 'itemType': 'string' },
48
+ text: 'string',
49
+ usageMap: { 'type': 'map', 'keyType': 'string', 'valueType': 'number' },
50
+ };
51
+ }
52
+
53
+ validate() {
54
+ if(Array.isArray(this.pointLengths)) {
55
+ $dara.Model.validateArray(this.pointLengths);
56
+ }
57
+ if(Array.isArray(this.points)) {
58
+ $dara.Model.validateArray(this.points);
59
+ }
60
+ if(this.usageMap) {
61
+ $dara.Model.validateMap(this.usageMap);
62
+ }
63
+ super.validate();
64
+ }
65
+
66
+ constructor(map?: { [key: string]: any }) {
67
+ super(map);
68
+ }
69
+ }
70
+
71
+ export class GenerateProductContentResponseBody extends $dara.Model {
72
+ /**
73
+ * @example
74
+ * success
75
+ */
76
+ code?: string;
77
+ data?: GenerateProductContentResponseBodyData;
78
+ /**
79
+ * @example
80
+ * OK
81
+ */
82
+ message?: string;
83
+ /**
84
+ * @example
85
+ * E1AD60F1-BAC7-546B-9533-E7AD02B16E3F
86
+ */
87
+ requestId?: string;
88
+ /**
89
+ * @example
90
+ * True
91
+ */
92
+ success?: boolean;
93
+ static names(): { [key: string]: string } {
94
+ return {
95
+ code: 'Code',
96
+ data: 'Data',
97
+ message: 'Message',
98
+ requestId: 'RequestId',
99
+ success: 'Success',
100
+ };
101
+ }
102
+
103
+ static types(): { [key: string]: any } {
104
+ return {
105
+ code: 'string',
106
+ data: GenerateProductContentResponseBodyData,
107
+ message: 'string',
108
+ requestId: 'string',
109
+ success: 'boolean',
110
+ };
111
+ }
112
+
113
+ validate() {
114
+ if(this.data && typeof (this.data as any).validate === 'function') {
115
+ (this.data as any).validate();
116
+ }
117
+ super.validate();
118
+ }
119
+
120
+ constructor(map?: { [key: string]: any }) {
121
+ super(map);
122
+ }
123
+ }
124
+
@@ -26,6 +26,7 @@ export { GeneralRephotographyDetectionResponseBodyDataResultGroundingRegions } f
26
26
  export { GeneralRephotographyDetectionResponseBodyDataResultGrounding } from './GeneralRephotographyDetectionResponseBody';
27
27
  export { GeneralRephotographyDetectionResponseBodyDataResult } from './GeneralRephotographyDetectionResponseBody';
28
28
  export { GeneralRephotographyDetectionResponseBodyData } from './GeneralRephotographyDetectionResponseBody';
29
+ export { GenerateProductContentResponseBodyData } from './GenerateProductContentResponseBody';
29
30
  export { ImageCroppingResponseBodyData } from './ImageCroppingResponseBody';
30
31
  export { ImageMattingResponseBodyData } from './ImageMattingResponseBody';
31
32
  export { ImageMattingAsyncResponseBodyData } from './ImageMattingAsyncResponseBody';
@@ -168,6 +169,9 @@ export { EcomVideoRecreationResponse } from './EcomVideoRecreationResponse';
168
169
  export { GeneralRephotographyDetectionRequest } from './GeneralRephotographyDetectionRequest';
169
170
  export { GeneralRephotographyDetectionResponseBody } from './GeneralRephotographyDetectionResponseBody';
170
171
  export { GeneralRephotographyDetectionResponse } from './GeneralRephotographyDetectionResponse';
172
+ export { GenerateProductContentRequest } from './GenerateProductContentRequest';
173
+ export { GenerateProductContentResponseBody } from './GenerateProductContentResponseBody';
174
+ export { GenerateProductContentResponse } from './GenerateProductContentResponse';
171
175
  export { ImageCroppingRequest } from './ImageCroppingRequest';
172
176
  export { ImageCroppingResponseBody } from './ImageCroppingResponseBody';
173
177
  export { ImageCroppingResponse } from './ImageCroppingResponse';