@alicloud/quanmiaolightapp20240801 2.3.0 → 2.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/quanmiaolightapp20240801",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "",
5
5
  "main": "dist/client.js",
6
6
  "scripts": {
package/src/client.ts CHANGED
@@ -2365,6 +2365,202 @@ export class RunMarketingInformationWritingResponseBodyPayload extends $dara.Mod
2365
2365
  }
2366
2366
  }
2367
2367
 
2368
+ export class RunNetworkContentAuditRequestTags extends $dara.Model {
2369
+ /**
2370
+ * @example
2371
+ * xxxx
2372
+ */
2373
+ tagDefinePrompt?: string;
2374
+ /**
2375
+ * @example
2376
+ * xxxx
2377
+ */
2378
+ tagName?: string;
2379
+ static names(): { [key: string]: string } {
2380
+ return {
2381
+ tagDefinePrompt: 'tagDefinePrompt',
2382
+ tagName: 'tagName',
2383
+ };
2384
+ }
2385
+
2386
+ static types(): { [key: string]: any } {
2387
+ return {
2388
+ tagDefinePrompt: 'string',
2389
+ tagName: 'string',
2390
+ };
2391
+ }
2392
+
2393
+ validate() {
2394
+ super.validate();
2395
+ }
2396
+
2397
+ constructor(map?: { [key: string]: any }) {
2398
+ super(map);
2399
+ }
2400
+ }
2401
+
2402
+ export class RunNetworkContentAuditResponseBodyHeader extends $dara.Model {
2403
+ /**
2404
+ * @example
2405
+ * AccessForbidden
2406
+ */
2407
+ errorCode?: string;
2408
+ /**
2409
+ * @example
2410
+ * 错误信息
2411
+ */
2412
+ errorMessage?: string;
2413
+ /**
2414
+ * @example
2415
+ * task-finished
2416
+ */
2417
+ event?: string;
2418
+ /**
2419
+ * @example
2420
+ * xxxx
2421
+ */
2422
+ sessionId?: string;
2423
+ /**
2424
+ * @example
2425
+ * xxxx
2426
+ */
2427
+ taskId?: string;
2428
+ /**
2429
+ * @example
2430
+ * xxxxx
2431
+ */
2432
+ traceId?: string;
2433
+ static names(): { [key: string]: string } {
2434
+ return {
2435
+ errorCode: 'errorCode',
2436
+ errorMessage: 'errorMessage',
2437
+ event: 'event',
2438
+ sessionId: 'sessionId',
2439
+ taskId: 'taskId',
2440
+ traceId: 'traceId',
2441
+ };
2442
+ }
2443
+
2444
+ static types(): { [key: string]: any } {
2445
+ return {
2446
+ errorCode: 'string',
2447
+ errorMessage: 'string',
2448
+ event: 'string',
2449
+ sessionId: 'string',
2450
+ taskId: 'string',
2451
+ traceId: 'string',
2452
+ };
2453
+ }
2454
+
2455
+ validate() {
2456
+ super.validate();
2457
+ }
2458
+
2459
+ constructor(map?: { [key: string]: any }) {
2460
+ super(map);
2461
+ }
2462
+ }
2463
+
2464
+ export class RunNetworkContentAuditResponseBodyPayloadOutput extends $dara.Model {
2465
+ /**
2466
+ * @example
2467
+ * xxxx
2468
+ */
2469
+ text?: string;
2470
+ static names(): { [key: string]: string } {
2471
+ return {
2472
+ text: 'text',
2473
+ };
2474
+ }
2475
+
2476
+ static types(): { [key: string]: any } {
2477
+ return {
2478
+ text: 'string',
2479
+ };
2480
+ }
2481
+
2482
+ validate() {
2483
+ super.validate();
2484
+ }
2485
+
2486
+ constructor(map?: { [key: string]: any }) {
2487
+ super(map);
2488
+ }
2489
+ }
2490
+
2491
+ export class RunNetworkContentAuditResponseBodyPayloadUsage extends $dara.Model {
2492
+ /**
2493
+ * @example
2494
+ * 100
2495
+ */
2496
+ inputTokens?: number;
2497
+ /**
2498
+ * @example
2499
+ * 100
2500
+ */
2501
+ outputTokens?: number;
2502
+ /**
2503
+ * @example
2504
+ * 200
2505
+ */
2506
+ totalTokens?: number;
2507
+ static names(): { [key: string]: string } {
2508
+ return {
2509
+ inputTokens: 'inputTokens',
2510
+ outputTokens: 'outputTokens',
2511
+ totalTokens: 'totalTokens',
2512
+ };
2513
+ }
2514
+
2515
+ static types(): { [key: string]: any } {
2516
+ return {
2517
+ inputTokens: 'number',
2518
+ outputTokens: 'number',
2519
+ totalTokens: 'number',
2520
+ };
2521
+ }
2522
+
2523
+ validate() {
2524
+ super.validate();
2525
+ }
2526
+
2527
+ constructor(map?: { [key: string]: any }) {
2528
+ super(map);
2529
+ }
2530
+ }
2531
+
2532
+ export class RunNetworkContentAuditResponseBodyPayload extends $dara.Model {
2533
+ output?: RunNetworkContentAuditResponseBodyPayloadOutput;
2534
+ usage?: RunNetworkContentAuditResponseBodyPayloadUsage;
2535
+ static names(): { [key: string]: string } {
2536
+ return {
2537
+ output: 'output',
2538
+ usage: 'usage',
2539
+ };
2540
+ }
2541
+
2542
+ static types(): { [key: string]: any } {
2543
+ return {
2544
+ output: RunNetworkContentAuditResponseBodyPayloadOutput,
2545
+ usage: RunNetworkContentAuditResponseBodyPayloadUsage,
2546
+ };
2547
+ }
2548
+
2549
+ validate() {
2550
+ if(this.output && typeof (this.output as any).validate === 'function') {
2551
+ (this.output as any).validate();
2552
+ }
2553
+ if(this.usage && typeof (this.usage as any).validate === 'function') {
2554
+ (this.usage as any).validate();
2555
+ }
2556
+ super.validate();
2557
+ }
2558
+
2559
+ constructor(map?: { [key: string]: any }) {
2560
+ super(map);
2561
+ }
2562
+ }
2563
+
2368
2564
  export class RunScriptChatResponseBodyHeader extends $dara.Model {
2369
2565
  /**
2370
2566
  * @example
@@ -5872,6 +6068,222 @@ export class RunMarketingInformationWritingResponse extends $dara.Model {
5872
6068
  }
5873
6069
  }
5874
6070
 
6071
+ export class RunNetworkContentAuditRequest extends $dara.Model {
6072
+ /**
6073
+ * @example
6074
+ * clueMining
6075
+ */
6076
+ businessType?: string;
6077
+ /**
6078
+ * @remarks
6079
+ * This parameter is required.
6080
+ *
6081
+ * @example
6082
+ * 待分析文本
6083
+ */
6084
+ content?: string;
6085
+ /**
6086
+ * @example
6087
+ * 额外信息
6088
+ */
6089
+ extraInfo?: string;
6090
+ /**
6091
+ * @example
6092
+ * qwen-max
6093
+ */
6094
+ modelId?: string;
6095
+ /**
6096
+ * @example
6097
+ * 请返回如下JSON格式,{"key1":"","key2":""}
6098
+ */
6099
+ outputFormat?: string;
6100
+ tags?: RunNetworkContentAuditRequestTags[];
6101
+ /**
6102
+ * @example
6103
+ * 给你一条待分析文本数据,请你按照标签体系来对数据进行打标。
6104
+ */
6105
+ taskDescription?: string;
6106
+ static names(): { [key: string]: string } {
6107
+ return {
6108
+ businessType: 'businessType',
6109
+ content: 'content',
6110
+ extraInfo: 'extraInfo',
6111
+ modelId: 'modelId',
6112
+ outputFormat: 'outputFormat',
6113
+ tags: 'tags',
6114
+ taskDescription: 'taskDescription',
6115
+ };
6116
+ }
6117
+
6118
+ static types(): { [key: string]: any } {
6119
+ return {
6120
+ businessType: 'string',
6121
+ content: 'string',
6122
+ extraInfo: 'string',
6123
+ modelId: 'string',
6124
+ outputFormat: 'string',
6125
+ tags: { 'type': 'array', 'itemType': RunNetworkContentAuditRequestTags },
6126
+ taskDescription: 'string',
6127
+ };
6128
+ }
6129
+
6130
+ validate() {
6131
+ if(Array.isArray(this.tags)) {
6132
+ $dara.Model.validateArray(this.tags);
6133
+ }
6134
+ super.validate();
6135
+ }
6136
+
6137
+ constructor(map?: { [key: string]: any }) {
6138
+ super(map);
6139
+ }
6140
+ }
6141
+
6142
+ export class RunNetworkContentAuditShrinkRequest extends $dara.Model {
6143
+ /**
6144
+ * @example
6145
+ * clueMining
6146
+ */
6147
+ businessType?: string;
6148
+ /**
6149
+ * @remarks
6150
+ * This parameter is required.
6151
+ *
6152
+ * @example
6153
+ * 待分析文本
6154
+ */
6155
+ content?: string;
6156
+ /**
6157
+ * @example
6158
+ * 额外信息
6159
+ */
6160
+ extraInfo?: string;
6161
+ /**
6162
+ * @example
6163
+ * qwen-max
6164
+ */
6165
+ modelId?: string;
6166
+ /**
6167
+ * @example
6168
+ * 请返回如下JSON格式,{"key1":"","key2":""}
6169
+ */
6170
+ outputFormat?: string;
6171
+ tagsShrink?: string;
6172
+ /**
6173
+ * @example
6174
+ * 给你一条待分析文本数据,请你按照标签体系来对数据进行打标。
6175
+ */
6176
+ taskDescription?: string;
6177
+ static names(): { [key: string]: string } {
6178
+ return {
6179
+ businessType: 'businessType',
6180
+ content: 'content',
6181
+ extraInfo: 'extraInfo',
6182
+ modelId: 'modelId',
6183
+ outputFormat: 'outputFormat',
6184
+ tagsShrink: 'tags',
6185
+ taskDescription: 'taskDescription',
6186
+ };
6187
+ }
6188
+
6189
+ static types(): { [key: string]: any } {
6190
+ return {
6191
+ businessType: 'string',
6192
+ content: 'string',
6193
+ extraInfo: 'string',
6194
+ modelId: 'string',
6195
+ outputFormat: 'string',
6196
+ tagsShrink: 'string',
6197
+ taskDescription: 'string',
6198
+ };
6199
+ }
6200
+
6201
+ validate() {
6202
+ super.validate();
6203
+ }
6204
+
6205
+ constructor(map?: { [key: string]: any }) {
6206
+ super(map);
6207
+ }
6208
+ }
6209
+
6210
+ export class RunNetworkContentAuditResponseBody extends $dara.Model {
6211
+ header?: RunNetworkContentAuditResponseBodyHeader;
6212
+ payload?: RunNetworkContentAuditResponseBodyPayload;
6213
+ /**
6214
+ * @remarks
6215
+ * Id of the request
6216
+ *
6217
+ * @example
6218
+ * 5D0E915E-655D-59A8-894F-93873F73AAE5
6219
+ */
6220
+ requestId?: string;
6221
+ static names(): { [key: string]: string } {
6222
+ return {
6223
+ header: 'header',
6224
+ payload: 'payload',
6225
+ requestId: 'requestId',
6226
+ };
6227
+ }
6228
+
6229
+ static types(): { [key: string]: any } {
6230
+ return {
6231
+ header: RunNetworkContentAuditResponseBodyHeader,
6232
+ payload: RunNetworkContentAuditResponseBodyPayload,
6233
+ requestId: 'string',
6234
+ };
6235
+ }
6236
+
6237
+ validate() {
6238
+ if(this.header && typeof (this.header as any).validate === 'function') {
6239
+ (this.header as any).validate();
6240
+ }
6241
+ if(this.payload && typeof (this.payload as any).validate === 'function') {
6242
+ (this.payload as any).validate();
6243
+ }
6244
+ super.validate();
6245
+ }
6246
+
6247
+ constructor(map?: { [key: string]: any }) {
6248
+ super(map);
6249
+ }
6250
+ }
6251
+
6252
+ export class RunNetworkContentAuditResponse extends $dara.Model {
6253
+ headers?: { [key: string]: string };
6254
+ statusCode?: number;
6255
+ body?: RunNetworkContentAuditResponseBody;
6256
+ static names(): { [key: string]: string } {
6257
+ return {
6258
+ headers: 'headers',
6259
+ statusCode: 'statusCode',
6260
+ body: 'body',
6261
+ };
6262
+ }
6263
+
6264
+ static types(): { [key: string]: any } {
6265
+ return {
6266
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
6267
+ statusCode: 'number',
6268
+ body: RunNetworkContentAuditResponseBody,
6269
+ };
6270
+ }
6271
+
6272
+ validate() {
6273
+ if(this.headers) {
6274
+ $dara.Model.validateMap(this.headers);
6275
+ }
6276
+ if(this.body && typeof (this.body as any).validate === 'function') {
6277
+ (this.body as any).validate();
6278
+ }
6279
+ super.validate();
6280
+ }
6281
+
6282
+ constructor(map?: { [key: string]: any }) {
6283
+ super(map);
6284
+ }
6285
+ }
6286
+
5875
6287
  export class RunScriptChatRequest extends $dara.Model {
5876
6288
  /**
5877
6289
  * @remarks
@@ -7948,6 +8360,81 @@ export default class Client extends OpenApi {
7948
8360
  return await this.runMarketingInformationWritingWithOptions(workspaceId, request, headers, runtime);
7949
8361
  }
7950
8362
 
8363
+ /**
8364
+ * 轻应用-网络内容审核
8365
+ *
8366
+ * @param tmpReq - RunNetworkContentAuditRequest
8367
+ * @param headers - map
8368
+ * @param runtime - runtime options for this request RuntimeOptions
8369
+ * @returns RunNetworkContentAuditResponse
8370
+ */
8371
+ async runNetworkContentAuditWithOptions(workspaceId: string, tmpReq: RunNetworkContentAuditRequest, headers: {[key: string ]: string}, runtime: $dara.RuntimeOptions): Promise<RunNetworkContentAuditResponse> {
8372
+ tmpReq.validate();
8373
+ let request = new RunNetworkContentAuditShrinkRequest({ });
8374
+ OpenApiUtil.convert(tmpReq, request);
8375
+ if (!$dara.isNull(tmpReq.tags)) {
8376
+ request.tagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tags, "tags", "json");
8377
+ }
8378
+
8379
+ let body : {[key: string ]: any} = { };
8380
+ if (!$dara.isNull(request.businessType)) {
8381
+ body["businessType"] = request.businessType;
8382
+ }
8383
+
8384
+ if (!$dara.isNull(request.content)) {
8385
+ body["content"] = request.content;
8386
+ }
8387
+
8388
+ if (!$dara.isNull(request.extraInfo)) {
8389
+ body["extraInfo"] = request.extraInfo;
8390
+ }
8391
+
8392
+ if (!$dara.isNull(request.modelId)) {
8393
+ body["modelId"] = request.modelId;
8394
+ }
8395
+
8396
+ if (!$dara.isNull(request.outputFormat)) {
8397
+ body["outputFormat"] = request.outputFormat;
8398
+ }
8399
+
8400
+ if (!$dara.isNull(request.tagsShrink)) {
8401
+ body["tags"] = request.tagsShrink;
8402
+ }
8403
+
8404
+ if (!$dara.isNull(request.taskDescription)) {
8405
+ body["taskDescription"] = request.taskDescription;
8406
+ }
8407
+
8408
+ let req = new $OpenApiUtil.OpenApiRequest({
8409
+ headers: headers,
8410
+ body: OpenApiUtil.parseToMap(body),
8411
+ });
8412
+ let params = new $OpenApiUtil.Params({
8413
+ action: "RunNetworkContentAudit",
8414
+ version: "2024-08-01",
8415
+ protocol: "HTTPS",
8416
+ pathname: `/${$dara.URL.percentEncode(workspaceId)}/quanmiao/lightapp/runNetworkContentAudit`,
8417
+ method: "POST",
8418
+ authType: "AK",
8419
+ style: "ROA",
8420
+ reqBodyType: "formData",
8421
+ bodyType: "json",
8422
+ });
8423
+ return $dara.cast<RunNetworkContentAuditResponse>(await this.callApi(params, req, runtime), new RunNetworkContentAuditResponse({}));
8424
+ }
8425
+
8426
+ /**
8427
+ * 轻应用-网络内容审核
8428
+ *
8429
+ * @param request - RunNetworkContentAuditRequest
8430
+ * @returns RunNetworkContentAuditResponse
8431
+ */
8432
+ async runNetworkContentAudit(workspaceId: string, request: RunNetworkContentAuditRequest): Promise<RunNetworkContentAuditResponse> {
8433
+ let runtime = new $dara.RuntimeOptions({ });
8434
+ let headers : {[key: string ]: string} = { };
8435
+ return await this.runNetworkContentAuditWithOptions(workspaceId, request, headers, runtime);
8436
+ }
8437
+
7951
8438
  /**
7952
8439
  * 长剧本创作
7953
8440
  *