@alicloud/green20220302 1.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.
- package/LICENSE +13 -0
- package/README.md +25 -0
- package/dist/client.d.ts +432 -0
- package/dist/client.js +798 -0
- package/dist/client.js.map +1 -0
- package/package.json +32 -0
- package/src/client.ts +958 -0
package/dist/client.js
ADDED
|
@@ -0,0 +1,798 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
3
|
+
if (mod && mod.__esModule) return mod;
|
|
4
|
+
var result = {};
|
|
5
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
6
|
+
result["default"] = mod;
|
|
7
|
+
return result;
|
|
8
|
+
};
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
// This file is auto-generated, don't edit it
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
const tea_util_1 = __importStar(require("@alicloud/tea-util")), $Util = tea_util_1;
|
|
18
|
+
const openapi_client_1 = __importStar(require("@alicloud/openapi-client")), $OpenApi = openapi_client_1;
|
|
19
|
+
const openapi_util_1 = __importDefault(require("@alicloud/openapi-util"));
|
|
20
|
+
const endpoint_util_1 = __importDefault(require("@alicloud/endpoint-util"));
|
|
21
|
+
const $tea = __importStar(require("@alicloud/tea-typescript"));
|
|
22
|
+
class DescribeImageResultExtRequest extends $tea.Model {
|
|
23
|
+
constructor(map) {
|
|
24
|
+
super(map);
|
|
25
|
+
}
|
|
26
|
+
static names() {
|
|
27
|
+
return {
|
|
28
|
+
infoType: 'InfoType',
|
|
29
|
+
reqId: 'ReqId',
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static types() {
|
|
33
|
+
return {
|
|
34
|
+
infoType: 'string',
|
|
35
|
+
reqId: 'string',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.DescribeImageResultExtRequest = DescribeImageResultExtRequest;
|
|
40
|
+
class DescribeImageResultExtResponseBody extends $tea.Model {
|
|
41
|
+
constructor(map) {
|
|
42
|
+
super(map);
|
|
43
|
+
}
|
|
44
|
+
static names() {
|
|
45
|
+
return {
|
|
46
|
+
code: 'Code',
|
|
47
|
+
data: 'Data',
|
|
48
|
+
msg: 'Msg',
|
|
49
|
+
requestId: 'RequestId',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static types() {
|
|
53
|
+
return {
|
|
54
|
+
code: 'number',
|
|
55
|
+
data: DescribeImageResultExtResponseBodyData,
|
|
56
|
+
msg: 'string',
|
|
57
|
+
requestId: 'string',
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.DescribeImageResultExtResponseBody = DescribeImageResultExtResponseBody;
|
|
62
|
+
class DescribeImageResultExtResponse extends $tea.Model {
|
|
63
|
+
constructor(map) {
|
|
64
|
+
super(map);
|
|
65
|
+
}
|
|
66
|
+
static names() {
|
|
67
|
+
return {
|
|
68
|
+
headers: 'headers',
|
|
69
|
+
statusCode: 'statusCode',
|
|
70
|
+
body: 'body',
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
static types() {
|
|
74
|
+
return {
|
|
75
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
76
|
+
statusCode: 'number',
|
|
77
|
+
body: DescribeImageResultExtResponseBody,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.DescribeImageResultExtResponse = DescribeImageResultExtResponse;
|
|
82
|
+
class ImageModerationRequest extends $tea.Model {
|
|
83
|
+
constructor(map) {
|
|
84
|
+
super(map);
|
|
85
|
+
}
|
|
86
|
+
static names() {
|
|
87
|
+
return {
|
|
88
|
+
service: 'Service',
|
|
89
|
+
serviceParameters: 'ServiceParameters',
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
static types() {
|
|
93
|
+
return {
|
|
94
|
+
service: 'string',
|
|
95
|
+
serviceParameters: 'string',
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.ImageModerationRequest = ImageModerationRequest;
|
|
100
|
+
class ImageModerationResponseBody extends $tea.Model {
|
|
101
|
+
constructor(map) {
|
|
102
|
+
super(map);
|
|
103
|
+
}
|
|
104
|
+
static names() {
|
|
105
|
+
return {
|
|
106
|
+
code: 'Code',
|
|
107
|
+
data: 'Data',
|
|
108
|
+
msg: 'Msg',
|
|
109
|
+
requestId: 'RequestId',
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
static types() {
|
|
113
|
+
return {
|
|
114
|
+
code: 'number',
|
|
115
|
+
data: ImageModerationResponseBodyData,
|
|
116
|
+
msg: 'string',
|
|
117
|
+
requestId: 'string',
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.ImageModerationResponseBody = ImageModerationResponseBody;
|
|
122
|
+
class ImageModerationResponse extends $tea.Model {
|
|
123
|
+
constructor(map) {
|
|
124
|
+
super(map);
|
|
125
|
+
}
|
|
126
|
+
static names() {
|
|
127
|
+
return {
|
|
128
|
+
headers: 'headers',
|
|
129
|
+
statusCode: 'statusCode',
|
|
130
|
+
body: 'body',
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
static types() {
|
|
134
|
+
return {
|
|
135
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
136
|
+
statusCode: 'number',
|
|
137
|
+
body: ImageModerationResponseBody,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
exports.ImageModerationResponse = ImageModerationResponse;
|
|
142
|
+
class TextModerationRequest extends $tea.Model {
|
|
143
|
+
constructor(map) {
|
|
144
|
+
super(map);
|
|
145
|
+
}
|
|
146
|
+
static names() {
|
|
147
|
+
return {
|
|
148
|
+
service: 'Service',
|
|
149
|
+
serviceParameters: 'ServiceParameters',
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
static types() {
|
|
153
|
+
return {
|
|
154
|
+
service: 'string',
|
|
155
|
+
serviceParameters: 'string',
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.TextModerationRequest = TextModerationRequest;
|
|
160
|
+
class TextModerationResponseBody extends $tea.Model {
|
|
161
|
+
constructor(map) {
|
|
162
|
+
super(map);
|
|
163
|
+
}
|
|
164
|
+
static names() {
|
|
165
|
+
return {
|
|
166
|
+
code: 'Code',
|
|
167
|
+
data: 'Data',
|
|
168
|
+
message: 'Message',
|
|
169
|
+
requestId: 'RequestId',
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
static types() {
|
|
173
|
+
return {
|
|
174
|
+
code: 'number',
|
|
175
|
+
data: TextModerationResponseBodyData,
|
|
176
|
+
message: 'string',
|
|
177
|
+
requestId: 'string',
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
exports.TextModerationResponseBody = TextModerationResponseBody;
|
|
182
|
+
class TextModerationResponse extends $tea.Model {
|
|
183
|
+
constructor(map) {
|
|
184
|
+
super(map);
|
|
185
|
+
}
|
|
186
|
+
static names() {
|
|
187
|
+
return {
|
|
188
|
+
headers: 'headers',
|
|
189
|
+
statusCode: 'statusCode',
|
|
190
|
+
body: 'body',
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
static types() {
|
|
194
|
+
return {
|
|
195
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
196
|
+
statusCode: 'number',
|
|
197
|
+
body: TextModerationResponseBody,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.TextModerationResponse = TextModerationResponse;
|
|
202
|
+
class VoiceModerationRequest extends $tea.Model {
|
|
203
|
+
constructor(map) {
|
|
204
|
+
super(map);
|
|
205
|
+
}
|
|
206
|
+
static names() {
|
|
207
|
+
return {
|
|
208
|
+
service: 'Service',
|
|
209
|
+
serviceParameters: 'ServiceParameters',
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
static types() {
|
|
213
|
+
return {
|
|
214
|
+
service: 'string',
|
|
215
|
+
serviceParameters: 'string',
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
exports.VoiceModerationRequest = VoiceModerationRequest;
|
|
220
|
+
class VoiceModerationResponseBody extends $tea.Model {
|
|
221
|
+
constructor(map) {
|
|
222
|
+
super(map);
|
|
223
|
+
}
|
|
224
|
+
static names() {
|
|
225
|
+
return {
|
|
226
|
+
code: 'Code',
|
|
227
|
+
data: 'Data',
|
|
228
|
+
message: 'Message',
|
|
229
|
+
requestId: 'RequestId',
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
static types() {
|
|
233
|
+
return {
|
|
234
|
+
code: 'number',
|
|
235
|
+
data: VoiceModerationResponseBodyData,
|
|
236
|
+
message: 'string',
|
|
237
|
+
requestId: 'string',
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
exports.VoiceModerationResponseBody = VoiceModerationResponseBody;
|
|
242
|
+
class VoiceModerationResponse extends $tea.Model {
|
|
243
|
+
constructor(map) {
|
|
244
|
+
super(map);
|
|
245
|
+
}
|
|
246
|
+
static names() {
|
|
247
|
+
return {
|
|
248
|
+
headers: 'headers',
|
|
249
|
+
statusCode: 'statusCode',
|
|
250
|
+
body: 'body',
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
static types() {
|
|
254
|
+
return {
|
|
255
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
256
|
+
statusCode: 'number',
|
|
257
|
+
body: VoiceModerationResponseBody,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
exports.VoiceModerationResponse = VoiceModerationResponse;
|
|
262
|
+
class VoiceModerationCancelRequest extends $tea.Model {
|
|
263
|
+
constructor(map) {
|
|
264
|
+
super(map);
|
|
265
|
+
}
|
|
266
|
+
static names() {
|
|
267
|
+
return {
|
|
268
|
+
service: 'Service',
|
|
269
|
+
serviceParameters: 'ServiceParameters',
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
static types() {
|
|
273
|
+
return {
|
|
274
|
+
service: 'string',
|
|
275
|
+
serviceParameters: 'string',
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
exports.VoiceModerationCancelRequest = VoiceModerationCancelRequest;
|
|
280
|
+
class VoiceModerationCancelResponseBody extends $tea.Model {
|
|
281
|
+
constructor(map) {
|
|
282
|
+
super(map);
|
|
283
|
+
}
|
|
284
|
+
static names() {
|
|
285
|
+
return {
|
|
286
|
+
code: 'Code',
|
|
287
|
+
message: 'Message',
|
|
288
|
+
requestId: 'RequestId',
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
static types() {
|
|
292
|
+
return {
|
|
293
|
+
code: 'number',
|
|
294
|
+
message: 'string',
|
|
295
|
+
requestId: 'string',
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
exports.VoiceModerationCancelResponseBody = VoiceModerationCancelResponseBody;
|
|
300
|
+
class VoiceModerationCancelResponse extends $tea.Model {
|
|
301
|
+
constructor(map) {
|
|
302
|
+
super(map);
|
|
303
|
+
}
|
|
304
|
+
static names() {
|
|
305
|
+
return {
|
|
306
|
+
headers: 'headers',
|
|
307
|
+
statusCode: 'statusCode',
|
|
308
|
+
body: 'body',
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
static types() {
|
|
312
|
+
return {
|
|
313
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
314
|
+
statusCode: 'number',
|
|
315
|
+
body: VoiceModerationCancelResponseBody,
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
exports.VoiceModerationCancelResponse = VoiceModerationCancelResponse;
|
|
320
|
+
class VoiceModerationResultRequest extends $tea.Model {
|
|
321
|
+
constructor(map) {
|
|
322
|
+
super(map);
|
|
323
|
+
}
|
|
324
|
+
static names() {
|
|
325
|
+
return {
|
|
326
|
+
service: 'Service',
|
|
327
|
+
serviceParameters: 'ServiceParameters',
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
static types() {
|
|
331
|
+
return {
|
|
332
|
+
service: 'string',
|
|
333
|
+
serviceParameters: 'string',
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
exports.VoiceModerationResultRequest = VoiceModerationResultRequest;
|
|
338
|
+
class VoiceModerationResultResponseBody extends $tea.Model {
|
|
339
|
+
constructor(map) {
|
|
340
|
+
super(map);
|
|
341
|
+
}
|
|
342
|
+
static names() {
|
|
343
|
+
return {
|
|
344
|
+
code: 'Code',
|
|
345
|
+
data: 'Data',
|
|
346
|
+
message: 'Message',
|
|
347
|
+
requestId: 'RequestId',
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
static types() {
|
|
351
|
+
return {
|
|
352
|
+
code: 'number',
|
|
353
|
+
data: VoiceModerationResultResponseBodyData,
|
|
354
|
+
message: 'string',
|
|
355
|
+
requestId: 'string',
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
exports.VoiceModerationResultResponseBody = VoiceModerationResultResponseBody;
|
|
360
|
+
class VoiceModerationResultResponse extends $tea.Model {
|
|
361
|
+
constructor(map) {
|
|
362
|
+
super(map);
|
|
363
|
+
}
|
|
364
|
+
static names() {
|
|
365
|
+
return {
|
|
366
|
+
headers: 'headers',
|
|
367
|
+
statusCode: 'statusCode',
|
|
368
|
+
body: 'body',
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
static types() {
|
|
372
|
+
return {
|
|
373
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
374
|
+
statusCode: 'number',
|
|
375
|
+
body: VoiceModerationResultResponseBody,
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
exports.VoiceModerationResultResponse = VoiceModerationResultResponse;
|
|
380
|
+
class DescribeImageResultExtResponseBodyDataCustomImage extends $tea.Model {
|
|
381
|
+
constructor(map) {
|
|
382
|
+
super(map);
|
|
383
|
+
}
|
|
384
|
+
static names() {
|
|
385
|
+
return {
|
|
386
|
+
imageId: 'ImageId',
|
|
387
|
+
libId: 'LibId',
|
|
388
|
+
libName: 'LibName',
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
static types() {
|
|
392
|
+
return {
|
|
393
|
+
imageId: 'string',
|
|
394
|
+
libId: 'string',
|
|
395
|
+
libName: 'string',
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
exports.DescribeImageResultExtResponseBodyDataCustomImage = DescribeImageResultExtResponseBodyDataCustomImage;
|
|
400
|
+
class DescribeImageResultExtResponseBodyDataPublicFigure extends $tea.Model {
|
|
401
|
+
constructor(map) {
|
|
402
|
+
super(map);
|
|
403
|
+
}
|
|
404
|
+
static names() {
|
|
405
|
+
return {
|
|
406
|
+
figureId: 'FigureId',
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
static types() {
|
|
410
|
+
return {
|
|
411
|
+
figureId: 'string',
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
exports.DescribeImageResultExtResponseBodyDataPublicFigure = DescribeImageResultExtResponseBodyDataPublicFigure;
|
|
416
|
+
class DescribeImageResultExtResponseBodyDataTextInImage extends $tea.Model {
|
|
417
|
+
constructor(map) {
|
|
418
|
+
super(map);
|
|
419
|
+
}
|
|
420
|
+
static names() {
|
|
421
|
+
return {
|
|
422
|
+
ocrDatas: 'OcrDatas',
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
static types() {
|
|
426
|
+
return {
|
|
427
|
+
ocrDatas: { 'type': 'array', 'itemType': 'string' },
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
exports.DescribeImageResultExtResponseBodyDataTextInImage = DescribeImageResultExtResponseBodyDataTextInImage;
|
|
432
|
+
class DescribeImageResultExtResponseBodyData extends $tea.Model {
|
|
433
|
+
constructor(map) {
|
|
434
|
+
super(map);
|
|
435
|
+
}
|
|
436
|
+
static names() {
|
|
437
|
+
return {
|
|
438
|
+
customImage: 'CustomImage',
|
|
439
|
+
publicFigure: 'PublicFigure',
|
|
440
|
+
textInImage: 'TextInImage',
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
static types() {
|
|
444
|
+
return {
|
|
445
|
+
customImage: { 'type': 'array', 'itemType': DescribeImageResultExtResponseBodyDataCustomImage },
|
|
446
|
+
publicFigure: { 'type': 'array', 'itemType': DescribeImageResultExtResponseBodyDataPublicFigure },
|
|
447
|
+
textInImage: DescribeImageResultExtResponseBodyDataTextInImage,
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
exports.DescribeImageResultExtResponseBodyData = DescribeImageResultExtResponseBodyData;
|
|
452
|
+
class ImageModerationResponseBodyDataResult extends $tea.Model {
|
|
453
|
+
constructor(map) {
|
|
454
|
+
super(map);
|
|
455
|
+
}
|
|
456
|
+
static names() {
|
|
457
|
+
return {
|
|
458
|
+
confidence: 'Confidence',
|
|
459
|
+
label: 'Label',
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
static types() {
|
|
463
|
+
return {
|
|
464
|
+
confidence: 'number',
|
|
465
|
+
label: 'string',
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
exports.ImageModerationResponseBodyDataResult = ImageModerationResponseBodyDataResult;
|
|
470
|
+
class ImageModerationResponseBodyData extends $tea.Model {
|
|
471
|
+
constructor(map) {
|
|
472
|
+
super(map);
|
|
473
|
+
}
|
|
474
|
+
static names() {
|
|
475
|
+
return {
|
|
476
|
+
dataId: 'DataId',
|
|
477
|
+
result: 'Result',
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
static types() {
|
|
481
|
+
return {
|
|
482
|
+
dataId: 'string',
|
|
483
|
+
result: { 'type': 'array', 'itemType': ImageModerationResponseBodyDataResult },
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
exports.ImageModerationResponseBodyData = ImageModerationResponseBodyData;
|
|
488
|
+
class TextModerationResponseBodyData extends $tea.Model {
|
|
489
|
+
constructor(map) {
|
|
490
|
+
super(map);
|
|
491
|
+
}
|
|
492
|
+
static names() {
|
|
493
|
+
return {
|
|
494
|
+
accountId: 'accountId',
|
|
495
|
+
deviceId: 'deviceId',
|
|
496
|
+
labels: 'labels',
|
|
497
|
+
reason: 'reason',
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
static types() {
|
|
501
|
+
return {
|
|
502
|
+
accountId: 'string',
|
|
503
|
+
deviceId: 'string',
|
|
504
|
+
labels: 'string',
|
|
505
|
+
reason: 'string',
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
exports.TextModerationResponseBodyData = TextModerationResponseBodyData;
|
|
510
|
+
class VoiceModerationResponseBodyData extends $tea.Model {
|
|
511
|
+
constructor(map) {
|
|
512
|
+
super(map);
|
|
513
|
+
}
|
|
514
|
+
static names() {
|
|
515
|
+
return {
|
|
516
|
+
taskId: 'TaskId',
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
static types() {
|
|
520
|
+
return {
|
|
521
|
+
taskId: 'string',
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
exports.VoiceModerationResponseBodyData = VoiceModerationResponseBodyData;
|
|
526
|
+
class VoiceModerationResultResponseBodyDataSliceDetails extends $tea.Model {
|
|
527
|
+
constructor(map) {
|
|
528
|
+
super(map);
|
|
529
|
+
}
|
|
530
|
+
static names() {
|
|
531
|
+
return {
|
|
532
|
+
endTime: 'EndTime',
|
|
533
|
+
endTimestamp: 'EndTimestamp',
|
|
534
|
+
extend: 'Extend',
|
|
535
|
+
labels: 'Labels',
|
|
536
|
+
originAlgoResult: 'OriginAlgoResult',
|
|
537
|
+
riskTips: 'RiskTips',
|
|
538
|
+
riskWords: 'RiskWords',
|
|
539
|
+
score: 'Score',
|
|
540
|
+
startTime: 'StartTime',
|
|
541
|
+
startTimestamp: 'StartTimestamp',
|
|
542
|
+
text: 'Text',
|
|
543
|
+
url: 'Url',
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
static types() {
|
|
547
|
+
return {
|
|
548
|
+
endTime: 'number',
|
|
549
|
+
endTimestamp: 'number',
|
|
550
|
+
extend: 'string',
|
|
551
|
+
labels: 'string',
|
|
552
|
+
originAlgoResult: { 'type': 'map', 'keyType': 'string', 'valueType': 'any' },
|
|
553
|
+
riskTips: 'string',
|
|
554
|
+
riskWords: 'string',
|
|
555
|
+
score: 'number',
|
|
556
|
+
startTime: 'number',
|
|
557
|
+
startTimestamp: 'number',
|
|
558
|
+
text: 'string',
|
|
559
|
+
url: 'string',
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
exports.VoiceModerationResultResponseBodyDataSliceDetails = VoiceModerationResultResponseBodyDataSliceDetails;
|
|
564
|
+
class VoiceModerationResultResponseBodyData extends $tea.Model {
|
|
565
|
+
constructor(map) {
|
|
566
|
+
super(map);
|
|
567
|
+
}
|
|
568
|
+
static names() {
|
|
569
|
+
return {
|
|
570
|
+
liveId: 'LiveId',
|
|
571
|
+
sliceDetails: 'SliceDetails',
|
|
572
|
+
taskId: 'TaskId',
|
|
573
|
+
url: 'Url',
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
static types() {
|
|
577
|
+
return {
|
|
578
|
+
liveId: 'string',
|
|
579
|
+
sliceDetails: { 'type': 'array', 'itemType': VoiceModerationResultResponseBodyDataSliceDetails },
|
|
580
|
+
taskId: 'string',
|
|
581
|
+
url: 'string',
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
exports.VoiceModerationResultResponseBodyData = VoiceModerationResultResponseBodyData;
|
|
586
|
+
class Client extends openapi_client_1.default {
|
|
587
|
+
constructor(config) {
|
|
588
|
+
super(config);
|
|
589
|
+
this._endpointRule = "regional";
|
|
590
|
+
this._endpointMap = {
|
|
591
|
+
'ap-northeast-1': "green.ap-southeast-1.aliyuncs.com",
|
|
592
|
+
'ap-south-1': "green.ap-southeast-1.aliyuncs.com",
|
|
593
|
+
'ap-southeast-2': "green.ap-southeast-1.aliyuncs.com",
|
|
594
|
+
'ap-southeast-3': "green.ap-southeast-1.aliyuncs.com",
|
|
595
|
+
'ap-southeast-5': "green.ap-southeast-1.aliyuncs.com",
|
|
596
|
+
'cn-chengdu': "green.aliyuncs.com",
|
|
597
|
+
'cn-hongkong': "green.aliyuncs.com",
|
|
598
|
+
'cn-huhehaote': "green.aliyuncs.com",
|
|
599
|
+
'cn-qingdao': "green.aliyuncs.com",
|
|
600
|
+
'cn-zhangjiakou': "green.aliyuncs.com",
|
|
601
|
+
'eu-central-1': "green.ap-southeast-1.aliyuncs.com",
|
|
602
|
+
'eu-west-1': "green.ap-southeast-1.aliyuncs.com",
|
|
603
|
+
'me-east-1': "green.ap-southeast-1.aliyuncs.com",
|
|
604
|
+
'us-east-1': "green.ap-southeast-1.aliyuncs.com",
|
|
605
|
+
'cn-hangzhou-finance': "green.aliyuncs.com",
|
|
606
|
+
'cn-shenzhen-finance-1': "green.aliyuncs.com",
|
|
607
|
+
'cn-shanghai-finance-1': "green.aliyuncs.com",
|
|
608
|
+
'cn-north-2-gov-1': "green.aliyuncs.com",
|
|
609
|
+
};
|
|
610
|
+
this.checkConfig(config);
|
|
611
|
+
this._endpoint = this.getEndpoint("green", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
|
|
612
|
+
}
|
|
613
|
+
getEndpoint(productId, regionId, endpointRule, network, suffix, endpointMap, endpoint) {
|
|
614
|
+
if (!tea_util_1.default.empty(endpoint)) {
|
|
615
|
+
return endpoint;
|
|
616
|
+
}
|
|
617
|
+
if (!tea_util_1.default.isUnset(endpointMap) && !tea_util_1.default.empty(endpointMap[regionId])) {
|
|
618
|
+
return endpointMap[regionId];
|
|
619
|
+
}
|
|
620
|
+
return endpoint_util_1.default.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
621
|
+
}
|
|
622
|
+
async describeImageResultExtWithOptions(request, runtime) {
|
|
623
|
+
tea_util_1.default.validateModel(request);
|
|
624
|
+
let body = {};
|
|
625
|
+
if (!tea_util_1.default.isUnset(request.infoType)) {
|
|
626
|
+
body["InfoType"] = request.infoType;
|
|
627
|
+
}
|
|
628
|
+
if (!tea_util_1.default.isUnset(request.reqId)) {
|
|
629
|
+
body["ReqId"] = request.reqId;
|
|
630
|
+
}
|
|
631
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
632
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
633
|
+
});
|
|
634
|
+
let params = new $OpenApi.Params({
|
|
635
|
+
action: "DescribeImageResultExt",
|
|
636
|
+
version: "2022-03-02",
|
|
637
|
+
protocol: "HTTPS",
|
|
638
|
+
pathname: "/",
|
|
639
|
+
method: "POST",
|
|
640
|
+
authType: "AK",
|
|
641
|
+
style: "RPC",
|
|
642
|
+
reqBodyType: "formData",
|
|
643
|
+
bodyType: "json",
|
|
644
|
+
});
|
|
645
|
+
return $tea.cast(await this.callApi(params, req, runtime), new DescribeImageResultExtResponse({}));
|
|
646
|
+
}
|
|
647
|
+
async describeImageResultExt(request) {
|
|
648
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
649
|
+
return await this.describeImageResultExtWithOptions(request, runtime);
|
|
650
|
+
}
|
|
651
|
+
async imageModerationWithOptions(request, runtime) {
|
|
652
|
+
tea_util_1.default.validateModel(request);
|
|
653
|
+
let body = {};
|
|
654
|
+
if (!tea_util_1.default.isUnset(request.service)) {
|
|
655
|
+
body["Service"] = request.service;
|
|
656
|
+
}
|
|
657
|
+
if (!tea_util_1.default.isUnset(request.serviceParameters)) {
|
|
658
|
+
body["ServiceParameters"] = request.serviceParameters;
|
|
659
|
+
}
|
|
660
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
661
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
662
|
+
});
|
|
663
|
+
let params = new $OpenApi.Params({
|
|
664
|
+
action: "ImageModeration",
|
|
665
|
+
version: "2022-03-02",
|
|
666
|
+
protocol: "HTTPS",
|
|
667
|
+
pathname: "/",
|
|
668
|
+
method: "POST",
|
|
669
|
+
authType: "AK",
|
|
670
|
+
style: "RPC",
|
|
671
|
+
reqBodyType: "formData",
|
|
672
|
+
bodyType: "json",
|
|
673
|
+
});
|
|
674
|
+
return $tea.cast(await this.callApi(params, req, runtime), new ImageModerationResponse({}));
|
|
675
|
+
}
|
|
676
|
+
async imageModeration(request) {
|
|
677
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
678
|
+
return await this.imageModerationWithOptions(request, runtime);
|
|
679
|
+
}
|
|
680
|
+
async textModerationWithOptions(request, runtime) {
|
|
681
|
+
tea_util_1.default.validateModel(request);
|
|
682
|
+
let body = {};
|
|
683
|
+
if (!tea_util_1.default.isUnset(request.service)) {
|
|
684
|
+
body["Service"] = request.service;
|
|
685
|
+
}
|
|
686
|
+
if (!tea_util_1.default.isUnset(request.serviceParameters)) {
|
|
687
|
+
body["ServiceParameters"] = request.serviceParameters;
|
|
688
|
+
}
|
|
689
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
690
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
691
|
+
});
|
|
692
|
+
let params = new $OpenApi.Params({
|
|
693
|
+
action: "TextModeration",
|
|
694
|
+
version: "2022-03-02",
|
|
695
|
+
protocol: "HTTPS",
|
|
696
|
+
pathname: "/",
|
|
697
|
+
method: "POST",
|
|
698
|
+
authType: "AK",
|
|
699
|
+
style: "RPC",
|
|
700
|
+
reqBodyType: "formData",
|
|
701
|
+
bodyType: "json",
|
|
702
|
+
});
|
|
703
|
+
return $tea.cast(await this.callApi(params, req, runtime), new TextModerationResponse({}));
|
|
704
|
+
}
|
|
705
|
+
async textModeration(request) {
|
|
706
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
707
|
+
return await this.textModerationWithOptions(request, runtime);
|
|
708
|
+
}
|
|
709
|
+
async voiceModerationWithOptions(request, runtime) {
|
|
710
|
+
tea_util_1.default.validateModel(request);
|
|
711
|
+
let body = {};
|
|
712
|
+
if (!tea_util_1.default.isUnset(request.service)) {
|
|
713
|
+
body["Service"] = request.service;
|
|
714
|
+
}
|
|
715
|
+
if (!tea_util_1.default.isUnset(request.serviceParameters)) {
|
|
716
|
+
body["ServiceParameters"] = request.serviceParameters;
|
|
717
|
+
}
|
|
718
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
719
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
720
|
+
});
|
|
721
|
+
let params = new $OpenApi.Params({
|
|
722
|
+
action: "VoiceModeration",
|
|
723
|
+
version: "2022-03-02",
|
|
724
|
+
protocol: "HTTPS",
|
|
725
|
+
pathname: "/",
|
|
726
|
+
method: "POST",
|
|
727
|
+
authType: "AK",
|
|
728
|
+
style: "RPC",
|
|
729
|
+
reqBodyType: "formData",
|
|
730
|
+
bodyType: "json",
|
|
731
|
+
});
|
|
732
|
+
return $tea.cast(await this.callApi(params, req, runtime), new VoiceModerationResponse({}));
|
|
733
|
+
}
|
|
734
|
+
async voiceModeration(request) {
|
|
735
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
736
|
+
return await this.voiceModerationWithOptions(request, runtime);
|
|
737
|
+
}
|
|
738
|
+
async voiceModerationCancelWithOptions(request, runtime) {
|
|
739
|
+
tea_util_1.default.validateModel(request);
|
|
740
|
+
let body = {};
|
|
741
|
+
if (!tea_util_1.default.isUnset(request.service)) {
|
|
742
|
+
body["Service"] = request.service;
|
|
743
|
+
}
|
|
744
|
+
if (!tea_util_1.default.isUnset(request.serviceParameters)) {
|
|
745
|
+
body["ServiceParameters"] = request.serviceParameters;
|
|
746
|
+
}
|
|
747
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
748
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
749
|
+
});
|
|
750
|
+
let params = new $OpenApi.Params({
|
|
751
|
+
action: "VoiceModerationCancel",
|
|
752
|
+
version: "2022-03-02",
|
|
753
|
+
protocol: "HTTPS",
|
|
754
|
+
pathname: "/",
|
|
755
|
+
method: "POST",
|
|
756
|
+
authType: "AK",
|
|
757
|
+
style: "RPC",
|
|
758
|
+
reqBodyType: "formData",
|
|
759
|
+
bodyType: "json",
|
|
760
|
+
});
|
|
761
|
+
return $tea.cast(await this.callApi(params, req, runtime), new VoiceModerationCancelResponse({}));
|
|
762
|
+
}
|
|
763
|
+
async voiceModerationCancel(request) {
|
|
764
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
765
|
+
return await this.voiceModerationCancelWithOptions(request, runtime);
|
|
766
|
+
}
|
|
767
|
+
async voiceModerationResultWithOptions(request, runtime) {
|
|
768
|
+
tea_util_1.default.validateModel(request);
|
|
769
|
+
let body = {};
|
|
770
|
+
if (!tea_util_1.default.isUnset(request.service)) {
|
|
771
|
+
body["Service"] = request.service;
|
|
772
|
+
}
|
|
773
|
+
if (!tea_util_1.default.isUnset(request.serviceParameters)) {
|
|
774
|
+
body["ServiceParameters"] = request.serviceParameters;
|
|
775
|
+
}
|
|
776
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
777
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
778
|
+
});
|
|
779
|
+
let params = new $OpenApi.Params({
|
|
780
|
+
action: "VoiceModerationResult",
|
|
781
|
+
version: "2022-03-02",
|
|
782
|
+
protocol: "HTTPS",
|
|
783
|
+
pathname: "/",
|
|
784
|
+
method: "POST",
|
|
785
|
+
authType: "AK",
|
|
786
|
+
style: "RPC",
|
|
787
|
+
reqBodyType: "formData",
|
|
788
|
+
bodyType: "json",
|
|
789
|
+
});
|
|
790
|
+
return $tea.cast(await this.callApi(params, req, runtime), new VoiceModerationResultResponse({}));
|
|
791
|
+
}
|
|
792
|
+
async voiceModerationResult(request) {
|
|
793
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
794
|
+
return await this.voiceModerationResultWithOptions(request, runtime);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
exports.default = Client;
|
|
798
|
+
//# sourceMappingURL=client.js.map
|