@alicloud/cams20200606 1.0.5 → 1.0.6
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 +193 -30
- package/dist/client.js +338 -135
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +427 -177
package/src/client.ts
CHANGED
|
@@ -10,30 +10,46 @@ import * as $tea from '@alicloud/tea-typescript';
|
|
|
10
10
|
|
|
11
11
|
export class CheckChatappContactsRequest extends $tea.Model {
|
|
12
12
|
channelType?: string;
|
|
13
|
-
contacts?: string;
|
|
13
|
+
contacts?: string[];
|
|
14
14
|
from?: string;
|
|
15
|
-
ownerId?: number;
|
|
16
|
-
resourceOwnerAccount?: string;
|
|
17
|
-
resourceOwnerId?: number;
|
|
18
15
|
static names(): { [key: string]: string } {
|
|
19
16
|
return {
|
|
20
17
|
channelType: 'ChannelType',
|
|
21
18
|
contacts: 'Contacts',
|
|
22
19
|
from: 'From',
|
|
23
|
-
ownerId: 'OwnerId',
|
|
24
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
25
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
26
20
|
};
|
|
27
21
|
}
|
|
28
22
|
|
|
29
23
|
static types(): { [key: string]: any } {
|
|
30
24
|
return {
|
|
31
25
|
channelType: 'string',
|
|
32
|
-
contacts: 'string',
|
|
26
|
+
contacts: { 'type': 'array', 'itemType': 'string' },
|
|
27
|
+
from: 'string',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
constructor(map?: { [key: string]: any }) {
|
|
32
|
+
super(map);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class CheckChatappContactsShrinkRequest extends $tea.Model {
|
|
37
|
+
channelType?: string;
|
|
38
|
+
contactsShrink?: string;
|
|
39
|
+
from?: string;
|
|
40
|
+
static names(): { [key: string]: string } {
|
|
41
|
+
return {
|
|
42
|
+
channelType: 'ChannelType',
|
|
43
|
+
contactsShrink: 'Contacts',
|
|
44
|
+
from: 'From',
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static types(): { [key: string]: any } {
|
|
49
|
+
return {
|
|
50
|
+
channelType: 'string',
|
|
51
|
+
contactsShrink: 'string',
|
|
33
52
|
from: 'string',
|
|
34
|
-
ownerId: 'number',
|
|
35
|
-
resourceOwnerAccount: 'string',
|
|
36
|
-
resourceOwnerId: 'number',
|
|
37
53
|
};
|
|
38
54
|
}
|
|
39
55
|
|
|
@@ -178,13 +194,10 @@ export class CheckContactsResponse extends $tea.Model {
|
|
|
178
194
|
|
|
179
195
|
export class CreateChatappTemplateRequest extends $tea.Model {
|
|
180
196
|
category?: string;
|
|
181
|
-
components?:
|
|
182
|
-
example?: string;
|
|
197
|
+
components?: CreateChatappTemplateRequestComponents[];
|
|
198
|
+
example?: { [key: string]: string };
|
|
183
199
|
language?: string;
|
|
184
200
|
name?: string;
|
|
185
|
-
ownerId?: number;
|
|
186
|
-
resourceOwnerAccount?: string;
|
|
187
|
-
resourceOwnerId?: number;
|
|
188
201
|
templateType?: string;
|
|
189
202
|
static names(): { [key: string]: string } {
|
|
190
203
|
return {
|
|
@@ -193,9 +206,6 @@ export class CreateChatappTemplateRequest extends $tea.Model {
|
|
|
193
206
|
example: 'Example',
|
|
194
207
|
language: 'Language',
|
|
195
208
|
name: 'Name',
|
|
196
|
-
ownerId: 'OwnerId',
|
|
197
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
198
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
199
209
|
templateType: 'TemplateType',
|
|
200
210
|
};
|
|
201
211
|
}
|
|
@@ -203,13 +213,44 @@ export class CreateChatappTemplateRequest extends $tea.Model {
|
|
|
203
213
|
static types(): { [key: string]: any } {
|
|
204
214
|
return {
|
|
205
215
|
category: 'string',
|
|
206
|
-
components: '
|
|
207
|
-
example: 'string',
|
|
216
|
+
components: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponents },
|
|
217
|
+
example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
218
|
+
language: 'string',
|
|
219
|
+
name: 'string',
|
|
220
|
+
templateType: 'string',
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
constructor(map?: { [key: string]: any }) {
|
|
225
|
+
super(map);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export class CreateChatappTemplateShrinkRequest extends $tea.Model {
|
|
230
|
+
category?: string;
|
|
231
|
+
componentsShrink?: string;
|
|
232
|
+
exampleShrink?: string;
|
|
233
|
+
language?: string;
|
|
234
|
+
name?: string;
|
|
235
|
+
templateType?: string;
|
|
236
|
+
static names(): { [key: string]: string } {
|
|
237
|
+
return {
|
|
238
|
+
category: 'Category',
|
|
239
|
+
componentsShrink: 'Components',
|
|
240
|
+
exampleShrink: 'Example',
|
|
241
|
+
language: 'Language',
|
|
242
|
+
name: 'Name',
|
|
243
|
+
templateType: 'TemplateType',
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
static types(): { [key: string]: any } {
|
|
248
|
+
return {
|
|
249
|
+
category: 'string',
|
|
250
|
+
componentsShrink: 'string',
|
|
251
|
+
exampleShrink: 'string',
|
|
208
252
|
language: 'string',
|
|
209
253
|
name: 'string',
|
|
210
|
-
ownerId: 'number',
|
|
211
|
-
resourceOwnerAccount: 'string',
|
|
212
|
-
resourceOwnerId: 'number',
|
|
213
254
|
templateType: 'string',
|
|
214
255
|
};
|
|
215
256
|
}
|
|
@@ -221,7 +262,7 @@ export class CreateChatappTemplateRequest extends $tea.Model {
|
|
|
221
262
|
|
|
222
263
|
export class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
223
264
|
code?: string;
|
|
224
|
-
data?:
|
|
265
|
+
data?: CreateChatappTemplateResponseBodyData;
|
|
225
266
|
message?: string;
|
|
226
267
|
requestId?: string;
|
|
227
268
|
static names(): { [key: string]: string } {
|
|
@@ -236,7 +277,7 @@ export class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
|
236
277
|
static types(): { [key: string]: any } {
|
|
237
278
|
return {
|
|
238
279
|
code: 'string',
|
|
239
|
-
data:
|
|
280
|
+
data: CreateChatappTemplateResponseBodyData,
|
|
240
281
|
message: 'string',
|
|
241
282
|
requestId: 'string',
|
|
242
283
|
};
|
|
@@ -270,24 +311,15 @@ export class CreateChatappTemplateResponse extends $tea.Model {
|
|
|
270
311
|
}
|
|
271
312
|
|
|
272
313
|
export class DeleteChatappTemplateRequest extends $tea.Model {
|
|
273
|
-
ownerId?: number;
|
|
274
|
-
resourceOwnerAccount?: string;
|
|
275
|
-
resourceOwnerId?: number;
|
|
276
314
|
templateCode?: string;
|
|
277
315
|
static names(): { [key: string]: string } {
|
|
278
316
|
return {
|
|
279
|
-
ownerId: 'OwnerId',
|
|
280
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
281
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
282
317
|
templateCode: 'TemplateCode',
|
|
283
318
|
};
|
|
284
319
|
}
|
|
285
320
|
|
|
286
321
|
static types(): { [key: string]: any } {
|
|
287
322
|
return {
|
|
288
|
-
ownerId: 'number',
|
|
289
|
-
resourceOwnerAccount: 'string',
|
|
290
|
-
resourceOwnerId: 'number',
|
|
291
323
|
templateCode: 'string',
|
|
292
324
|
};
|
|
293
325
|
}
|
|
@@ -347,15 +379,11 @@ export class DeleteChatappTemplateResponse extends $tea.Model {
|
|
|
347
379
|
export class GetChatappTemplateDetailRequest extends $tea.Model {
|
|
348
380
|
language?: string;
|
|
349
381
|
ownerId?: number;
|
|
350
|
-
resourceOwnerAccount?: string;
|
|
351
|
-
resourceOwnerId?: number;
|
|
352
382
|
templateCode?: string;
|
|
353
383
|
static names(): { [key: string]: string } {
|
|
354
384
|
return {
|
|
355
385
|
language: 'Language',
|
|
356
386
|
ownerId: 'OwnerId',
|
|
357
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
358
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
359
387
|
templateCode: 'TemplateCode',
|
|
360
388
|
};
|
|
361
389
|
}
|
|
@@ -364,8 +392,6 @@ export class GetChatappTemplateDetailRequest extends $tea.Model {
|
|
|
364
392
|
return {
|
|
365
393
|
language: 'string',
|
|
366
394
|
ownerId: 'number',
|
|
367
|
-
resourceOwnerAccount: 'string',
|
|
368
|
-
resourceOwnerId: 'number',
|
|
369
395
|
templateCode: 'string',
|
|
370
396
|
};
|
|
371
397
|
}
|
|
@@ -377,7 +403,7 @@ export class GetChatappTemplateDetailRequest extends $tea.Model {
|
|
|
377
403
|
|
|
378
404
|
export class GetChatappTemplateDetailResponseBody extends $tea.Model {
|
|
379
405
|
code?: string;
|
|
380
|
-
data?:
|
|
406
|
+
data?: GetChatappTemplateDetailResponseBodyData;
|
|
381
407
|
message?: string;
|
|
382
408
|
requestId?: string;
|
|
383
409
|
static names(): { [key: string]: string } {
|
|
@@ -392,7 +418,7 @@ export class GetChatappTemplateDetailResponseBody extends $tea.Model {
|
|
|
392
418
|
static types(): { [key: string]: any } {
|
|
393
419
|
return {
|
|
394
420
|
code: 'string',
|
|
395
|
-
data:
|
|
421
|
+
data: GetChatappTemplateDetailResponseBodyData,
|
|
396
422
|
message: 'string',
|
|
397
423
|
requestId: 'string',
|
|
398
424
|
};
|
|
@@ -429,19 +455,13 @@ export class ListChatappTemplateRequest extends $tea.Model {
|
|
|
429
455
|
auditStatus?: string;
|
|
430
456
|
language?: string;
|
|
431
457
|
name?: string;
|
|
432
|
-
|
|
433
|
-
page?: string;
|
|
434
|
-
resourceOwnerAccount?: string;
|
|
435
|
-
resourceOwnerId?: number;
|
|
458
|
+
page?: ListChatappTemplateRequestPage;
|
|
436
459
|
static names(): { [key: string]: string } {
|
|
437
460
|
return {
|
|
438
461
|
auditStatus: 'AuditStatus',
|
|
439
462
|
language: 'Language',
|
|
440
463
|
name: 'Name',
|
|
441
|
-
ownerId: 'OwnerId',
|
|
442
464
|
page: 'Page',
|
|
443
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
444
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
445
465
|
};
|
|
446
466
|
}
|
|
447
467
|
|
|
@@ -450,10 +470,35 @@ export class ListChatappTemplateRequest extends $tea.Model {
|
|
|
450
470
|
auditStatus: 'string',
|
|
451
471
|
language: 'string',
|
|
452
472
|
name: 'string',
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
473
|
+
page: ListChatappTemplateRequestPage,
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
constructor(map?: { [key: string]: any }) {
|
|
478
|
+
super(map);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export class ListChatappTemplateShrinkRequest extends $tea.Model {
|
|
483
|
+
auditStatus?: string;
|
|
484
|
+
language?: string;
|
|
485
|
+
name?: string;
|
|
486
|
+
pageShrink?: string;
|
|
487
|
+
static names(): { [key: string]: string } {
|
|
488
|
+
return {
|
|
489
|
+
auditStatus: 'AuditStatus',
|
|
490
|
+
language: 'Language',
|
|
491
|
+
name: 'Name',
|
|
492
|
+
pageShrink: 'Page',
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
static types(): { [key: string]: any } {
|
|
497
|
+
return {
|
|
498
|
+
auditStatus: 'string',
|
|
499
|
+
language: 'string',
|
|
500
|
+
name: 'string',
|
|
501
|
+
pageShrink: 'string',
|
|
457
502
|
};
|
|
458
503
|
}
|
|
459
504
|
|
|
@@ -518,12 +563,9 @@ export class SendChatappMessageRequest extends $tea.Model {
|
|
|
518
563
|
from?: string;
|
|
519
564
|
language?: string;
|
|
520
565
|
messageType?: string;
|
|
521
|
-
|
|
522
|
-
payload?: string;
|
|
523
|
-
resourceOwnerAccount?: string;
|
|
524
|
-
resourceOwnerId?: number;
|
|
566
|
+
payload?: string[];
|
|
525
567
|
templateCode?: string;
|
|
526
|
-
templateParams?: string;
|
|
568
|
+
templateParams?: { [key: string]: string };
|
|
527
569
|
to?: string;
|
|
528
570
|
type?: string;
|
|
529
571
|
static names(): { [key: string]: string } {
|
|
@@ -533,10 +575,7 @@ export class SendChatappMessageRequest extends $tea.Model {
|
|
|
533
575
|
from: 'From',
|
|
534
576
|
language: 'Language',
|
|
535
577
|
messageType: 'MessageType',
|
|
536
|
-
ownerId: 'OwnerId',
|
|
537
578
|
payload: 'Payload',
|
|
538
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
539
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
540
579
|
templateCode: 'TemplateCode',
|
|
541
580
|
templateParams: 'TemplateParams',
|
|
542
581
|
to: 'To',
|
|
@@ -551,12 +590,55 @@ export class SendChatappMessageRequest extends $tea.Model {
|
|
|
551
590
|
from: 'string',
|
|
552
591
|
language: 'string',
|
|
553
592
|
messageType: 'string',
|
|
554
|
-
|
|
555
|
-
payload: 'string',
|
|
556
|
-
resourceOwnerAccount: 'string',
|
|
557
|
-
resourceOwnerId: 'number',
|
|
593
|
+
payload: { 'type': 'array', 'itemType': 'string' },
|
|
558
594
|
templateCode: 'string',
|
|
559
|
-
templateParams: 'string',
|
|
595
|
+
templateParams: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
596
|
+
to: 'string',
|
|
597
|
+
type: 'string',
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
constructor(map?: { [key: string]: any }) {
|
|
602
|
+
super(map);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
export class SendChatappMessageShrinkRequest extends $tea.Model {
|
|
607
|
+
channelType?: string;
|
|
608
|
+
content?: string;
|
|
609
|
+
from?: string;
|
|
610
|
+
language?: string;
|
|
611
|
+
messageType?: string;
|
|
612
|
+
payloadShrink?: string;
|
|
613
|
+
templateCode?: string;
|
|
614
|
+
templateParamsShrink?: string;
|
|
615
|
+
to?: string;
|
|
616
|
+
type?: string;
|
|
617
|
+
static names(): { [key: string]: string } {
|
|
618
|
+
return {
|
|
619
|
+
channelType: 'ChannelType',
|
|
620
|
+
content: 'Content',
|
|
621
|
+
from: 'From',
|
|
622
|
+
language: 'Language',
|
|
623
|
+
messageType: 'MessageType',
|
|
624
|
+
payloadShrink: 'Payload',
|
|
625
|
+
templateCode: 'TemplateCode',
|
|
626
|
+
templateParamsShrink: 'TemplateParams',
|
|
627
|
+
to: 'To',
|
|
628
|
+
type: 'Type',
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
static types(): { [key: string]: any } {
|
|
633
|
+
return {
|
|
634
|
+
channelType: 'string',
|
|
635
|
+
content: 'string',
|
|
636
|
+
from: 'string',
|
|
637
|
+
language: 'string',
|
|
638
|
+
messageType: 'string',
|
|
639
|
+
payloadShrink: 'string',
|
|
640
|
+
templateCode: 'string',
|
|
641
|
+
templateParamsShrink: 'string',
|
|
560
642
|
to: 'string',
|
|
561
643
|
type: 'string',
|
|
562
644
|
};
|
|
@@ -569,14 +651,14 @@ export class SendChatappMessageRequest extends $tea.Model {
|
|
|
569
651
|
|
|
570
652
|
export class SendChatappMessageResponseBody extends $tea.Model {
|
|
571
653
|
code?: string;
|
|
572
|
-
data?: string;
|
|
573
654
|
message?: string;
|
|
655
|
+
messageId?: string;
|
|
574
656
|
requestId?: string;
|
|
575
657
|
static names(): { [key: string]: string } {
|
|
576
658
|
return {
|
|
577
659
|
code: 'Code',
|
|
578
|
-
data: 'Data',
|
|
579
660
|
message: 'Message',
|
|
661
|
+
messageId: 'MessageId',
|
|
580
662
|
requestId: 'RequestId',
|
|
581
663
|
};
|
|
582
664
|
}
|
|
@@ -584,8 +666,8 @@ export class SendChatappMessageResponseBody extends $tea.Model {
|
|
|
584
666
|
static types(): { [key: string]: any } {
|
|
585
667
|
return {
|
|
586
668
|
code: 'string',
|
|
587
|
-
data: 'string',
|
|
588
669
|
message: 'string',
|
|
670
|
+
messageId: 'string',
|
|
589
671
|
requestId: 'string',
|
|
590
672
|
};
|
|
591
673
|
}
|
|
@@ -775,6 +857,208 @@ export class CheckContactsResponseBodyContacts extends $tea.Model {
|
|
|
775
857
|
}
|
|
776
858
|
}
|
|
777
859
|
|
|
860
|
+
export class CreateChatappTemplateRequestComponentsButtons extends $tea.Model {
|
|
861
|
+
phoneNumber?: string;
|
|
862
|
+
text?: string;
|
|
863
|
+
type?: string;
|
|
864
|
+
url?: string;
|
|
865
|
+
urlType?: string;
|
|
866
|
+
static names(): { [key: string]: string } {
|
|
867
|
+
return {
|
|
868
|
+
phoneNumber: 'PhoneNumber',
|
|
869
|
+
text: 'Text',
|
|
870
|
+
type: 'Type',
|
|
871
|
+
url: 'Url',
|
|
872
|
+
urlType: 'UrlType',
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
static types(): { [key: string]: any } {
|
|
877
|
+
return {
|
|
878
|
+
phoneNumber: 'string',
|
|
879
|
+
text: 'string',
|
|
880
|
+
type: 'string',
|
|
881
|
+
url: 'string',
|
|
882
|
+
urlType: 'string',
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
constructor(map?: { [key: string]: any }) {
|
|
887
|
+
super(map);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
export class CreateChatappTemplateRequestComponents extends $tea.Model {
|
|
892
|
+
buttons?: CreateChatappTemplateRequestComponentsButtons[];
|
|
893
|
+
format?: string;
|
|
894
|
+
text?: string;
|
|
895
|
+
type?: string;
|
|
896
|
+
url?: string;
|
|
897
|
+
static names(): { [key: string]: string } {
|
|
898
|
+
return {
|
|
899
|
+
buttons: 'Buttons',
|
|
900
|
+
format: 'Format',
|
|
901
|
+
text: 'Text',
|
|
902
|
+
type: 'Type',
|
|
903
|
+
url: 'Url',
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
static types(): { [key: string]: any } {
|
|
908
|
+
return {
|
|
909
|
+
buttons: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponentsButtons },
|
|
910
|
+
format: 'string',
|
|
911
|
+
text: 'string',
|
|
912
|
+
type: 'string',
|
|
913
|
+
url: 'string',
|
|
914
|
+
};
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
constructor(map?: { [key: string]: any }) {
|
|
918
|
+
super(map);
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
export class CreateChatappTemplateResponseBodyData extends $tea.Model {
|
|
923
|
+
templateCode?: string;
|
|
924
|
+
templateName?: string;
|
|
925
|
+
static names(): { [key: string]: string } {
|
|
926
|
+
return {
|
|
927
|
+
templateCode: 'TemplateCode',
|
|
928
|
+
templateName: 'TemplateName',
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
static types(): { [key: string]: any } {
|
|
933
|
+
return {
|
|
934
|
+
templateCode: 'string',
|
|
935
|
+
templateName: 'string',
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
constructor(map?: { [key: string]: any }) {
|
|
940
|
+
super(map);
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
export class GetChatappTemplateDetailResponseBodyDataComponentsButtons extends $tea.Model {
|
|
945
|
+
phoneNumber?: string;
|
|
946
|
+
text?: string;
|
|
947
|
+
type?: string;
|
|
948
|
+
url?: string;
|
|
949
|
+
urlType?: string;
|
|
950
|
+
static names(): { [key: string]: string } {
|
|
951
|
+
return {
|
|
952
|
+
phoneNumber: 'PhoneNumber',
|
|
953
|
+
text: 'Text',
|
|
954
|
+
type: 'Type',
|
|
955
|
+
url: 'Url',
|
|
956
|
+
urlType: 'UrlType',
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
static types(): { [key: string]: any } {
|
|
961
|
+
return {
|
|
962
|
+
phoneNumber: 'string',
|
|
963
|
+
text: 'string',
|
|
964
|
+
type: 'string',
|
|
965
|
+
url: 'string',
|
|
966
|
+
urlType: 'string',
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
constructor(map?: { [key: string]: any }) {
|
|
971
|
+
super(map);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
export class GetChatappTemplateDetailResponseBodyDataComponents extends $tea.Model {
|
|
976
|
+
buttons?: GetChatappTemplateDetailResponseBodyDataComponentsButtons[];
|
|
977
|
+
text?: string;
|
|
978
|
+
type?: string;
|
|
979
|
+
url?: string;
|
|
980
|
+
static names(): { [key: string]: string } {
|
|
981
|
+
return {
|
|
982
|
+
buttons: 'Buttons',
|
|
983
|
+
text: 'Text',
|
|
984
|
+
type: 'Type',
|
|
985
|
+
url: 'Url',
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
static types(): { [key: string]: any } {
|
|
990
|
+
return {
|
|
991
|
+
buttons: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponentsButtons },
|
|
992
|
+
text: 'string',
|
|
993
|
+
type: 'string',
|
|
994
|
+
url: 'string',
|
|
995
|
+
};
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
constructor(map?: { [key: string]: any }) {
|
|
999
|
+
super(map);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
export class GetChatappTemplateDetailResponseBodyData extends $tea.Model {
|
|
1004
|
+
auditStatus?: string;
|
|
1005
|
+
category?: string;
|
|
1006
|
+
components?: GetChatappTemplateDetailResponseBodyDataComponents[];
|
|
1007
|
+
example?: { [key: string]: string };
|
|
1008
|
+
language?: string;
|
|
1009
|
+
name?: string;
|
|
1010
|
+
templateCode?: string;
|
|
1011
|
+
static names(): { [key: string]: string } {
|
|
1012
|
+
return {
|
|
1013
|
+
auditStatus: 'AuditStatus',
|
|
1014
|
+
category: 'Category',
|
|
1015
|
+
components: 'Components',
|
|
1016
|
+
example: 'Example',
|
|
1017
|
+
language: 'Language',
|
|
1018
|
+
name: 'Name',
|
|
1019
|
+
templateCode: 'TemplateCode',
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
static types(): { [key: string]: any } {
|
|
1024
|
+
return {
|
|
1025
|
+
auditStatus: 'string',
|
|
1026
|
+
category: 'string',
|
|
1027
|
+
components: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponents },
|
|
1028
|
+
example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
1029
|
+
language: 'string',
|
|
1030
|
+
name: 'string',
|
|
1031
|
+
templateCode: 'string',
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
constructor(map?: { [key: string]: any }) {
|
|
1036
|
+
super(map);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export class ListChatappTemplateRequestPage extends $tea.Model {
|
|
1041
|
+
index?: number;
|
|
1042
|
+
size?: number;
|
|
1043
|
+
static names(): { [key: string]: string } {
|
|
1044
|
+
return {
|
|
1045
|
+
index: 'Index',
|
|
1046
|
+
size: 'Size',
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
static types(): { [key: string]: any } {
|
|
1051
|
+
return {
|
|
1052
|
+
index: 'number',
|
|
1053
|
+
size: 'number',
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
constructor(map?: { [key: string]: any }) {
|
|
1058
|
+
super(map);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
778
1062
|
export class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
|
|
779
1063
|
auditStatus?: string;
|
|
780
1064
|
category?: string;
|
|
@@ -854,35 +1138,29 @@ export default class Client extends OpenApi {
|
|
|
854
1138
|
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
855
1139
|
}
|
|
856
1140
|
|
|
857
|
-
async checkChatappContactsWithOptions(
|
|
858
|
-
Util.validateModel(
|
|
859
|
-
let
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
if (!Util.isUnset(request.contacts)) {
|
|
865
|
-
query["Contacts"] = request.contacts;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
if (!Util.isUnset(request.from)) {
|
|
869
|
-
query["From"] = request.from;
|
|
1141
|
+
async checkChatappContactsWithOptions(tmpReq: CheckChatappContactsRequest, runtime: $Util.RuntimeOptions): Promise<CheckChatappContactsResponse> {
|
|
1142
|
+
Util.validateModel(tmpReq);
|
|
1143
|
+
let request = new CheckChatappContactsShrinkRequest({ });
|
|
1144
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1145
|
+
if (!Util.isUnset(tmpReq.contacts)) {
|
|
1146
|
+
request.contactsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contacts, "Contacts", "json");
|
|
870
1147
|
}
|
|
871
1148
|
|
|
872
|
-
|
|
873
|
-
|
|
1149
|
+
let body : {[key: string ]: any} = { };
|
|
1150
|
+
if (!Util.isUnset(request.channelType)) {
|
|
1151
|
+
body["ChannelType"] = request.channelType;
|
|
874
1152
|
}
|
|
875
1153
|
|
|
876
|
-
if (!Util.isUnset(request.
|
|
877
|
-
|
|
1154
|
+
if (!Util.isUnset(request.contactsShrink)) {
|
|
1155
|
+
body["Contacts"] = request.contactsShrink;
|
|
878
1156
|
}
|
|
879
1157
|
|
|
880
|
-
if (!Util.isUnset(request.
|
|
881
|
-
|
|
1158
|
+
if (!Util.isUnset(request.from)) {
|
|
1159
|
+
body["From"] = request.from;
|
|
882
1160
|
}
|
|
883
1161
|
|
|
884
1162
|
let req = new $OpenApi.OpenApiRequest({
|
|
885
|
-
|
|
1163
|
+
body: OpenApiUtil.parseToMap(body),
|
|
886
1164
|
});
|
|
887
1165
|
let params = new $OpenApi.Params({
|
|
888
1166
|
action: "CheckChatappContacts",
|
|
@@ -954,47 +1232,45 @@ export default class Client extends OpenApi {
|
|
|
954
1232
|
return await this.checkContactsWithOptions(request, runtime);
|
|
955
1233
|
}
|
|
956
1234
|
|
|
957
|
-
async createChatappTemplateWithOptions(
|
|
958
|
-
Util.validateModel(
|
|
959
|
-
let
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
if (!Util.isUnset(request.components)) {
|
|
965
|
-
query["Components"] = request.components;
|
|
1235
|
+
async createChatappTemplateWithOptions(tmpReq: CreateChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<CreateChatappTemplateResponse> {
|
|
1236
|
+
Util.validateModel(tmpReq);
|
|
1237
|
+
let request = new CreateChatappTemplateShrinkRequest({ });
|
|
1238
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1239
|
+
if (!Util.isUnset(tmpReq.components)) {
|
|
1240
|
+
request.componentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.components, "Components", "json");
|
|
966
1241
|
}
|
|
967
1242
|
|
|
968
|
-
if (!Util.isUnset(
|
|
969
|
-
|
|
1243
|
+
if (!Util.isUnset(tmpReq.example)) {
|
|
1244
|
+
request.exampleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.example, "Example", "json");
|
|
970
1245
|
}
|
|
971
1246
|
|
|
972
|
-
|
|
973
|
-
|
|
1247
|
+
let body : {[key: string ]: any} = { };
|
|
1248
|
+
if (!Util.isUnset(request.category)) {
|
|
1249
|
+
body["Category"] = request.category;
|
|
974
1250
|
}
|
|
975
1251
|
|
|
976
|
-
if (!Util.isUnset(request.
|
|
977
|
-
|
|
1252
|
+
if (!Util.isUnset(request.componentsShrink)) {
|
|
1253
|
+
body["Components"] = request.componentsShrink;
|
|
978
1254
|
}
|
|
979
1255
|
|
|
980
|
-
if (!Util.isUnset(request.
|
|
981
|
-
|
|
1256
|
+
if (!Util.isUnset(request.exampleShrink)) {
|
|
1257
|
+
body["Example"] = request.exampleShrink;
|
|
982
1258
|
}
|
|
983
1259
|
|
|
984
|
-
if (!Util.isUnset(request.
|
|
985
|
-
|
|
1260
|
+
if (!Util.isUnset(request.language)) {
|
|
1261
|
+
body["Language"] = request.language;
|
|
986
1262
|
}
|
|
987
1263
|
|
|
988
|
-
if (!Util.isUnset(request.
|
|
989
|
-
|
|
1264
|
+
if (!Util.isUnset(request.name)) {
|
|
1265
|
+
body["Name"] = request.name;
|
|
990
1266
|
}
|
|
991
1267
|
|
|
992
1268
|
if (!Util.isUnset(request.templateType)) {
|
|
993
|
-
|
|
1269
|
+
body["TemplateType"] = request.templateType;
|
|
994
1270
|
}
|
|
995
1271
|
|
|
996
1272
|
let req = new $OpenApi.OpenApiRequest({
|
|
997
|
-
|
|
1273
|
+
body: OpenApiUtil.parseToMap(body),
|
|
998
1274
|
});
|
|
999
1275
|
let params = new $OpenApi.Params({
|
|
1000
1276
|
action: "CreateChatappTemplate",
|
|
@@ -1018,18 +1294,6 @@ export default class Client extends OpenApi {
|
|
|
1018
1294
|
async deleteChatappTemplateWithOptions(request: DeleteChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<DeleteChatappTemplateResponse> {
|
|
1019
1295
|
Util.validateModel(request);
|
|
1020
1296
|
let query = { };
|
|
1021
|
-
if (!Util.isUnset(request.ownerId)) {
|
|
1022
|
-
query["OwnerId"] = request.ownerId;
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
1026
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
1030
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
1297
|
if (!Util.isUnset(request.templateCode)) {
|
|
1034
1298
|
query["TemplateCode"] = request.templateCode;
|
|
1035
1299
|
}
|
|
@@ -1067,14 +1331,6 @@ export default class Client extends OpenApi {
|
|
|
1067
1331
|
query["OwnerId"] = request.ownerId;
|
|
1068
1332
|
}
|
|
1069
1333
|
|
|
1070
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
1071
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
1075
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
1334
|
if (!Util.isUnset(request.templateCode)) {
|
|
1079
1335
|
query["TemplateCode"] = request.templateCode;
|
|
1080
1336
|
}
|
|
@@ -1101,8 +1357,14 @@ export default class Client extends OpenApi {
|
|
|
1101
1357
|
return await this.getChatappTemplateDetailWithOptions(request, runtime);
|
|
1102
1358
|
}
|
|
1103
1359
|
|
|
1104
|
-
async listChatappTemplateWithOptions(
|
|
1105
|
-
Util.validateModel(
|
|
1360
|
+
async listChatappTemplateWithOptions(tmpReq: ListChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<ListChatappTemplateResponse> {
|
|
1361
|
+
Util.validateModel(tmpReq);
|
|
1362
|
+
let request = new ListChatappTemplateShrinkRequest({ });
|
|
1363
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1364
|
+
if (!Util.isUnset($tea.toMap(tmpReq.page))) {
|
|
1365
|
+
request.pageShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle($tea.toMap(tmpReq.page), "Page", "json");
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1106
1368
|
let query = { };
|
|
1107
1369
|
if (!Util.isUnset(request.auditStatus)) {
|
|
1108
1370
|
query["AuditStatus"] = request.auditStatus;
|
|
@@ -1116,20 +1378,8 @@ export default class Client extends OpenApi {
|
|
|
1116
1378
|
query["Name"] = request.name;
|
|
1117
1379
|
}
|
|
1118
1380
|
|
|
1119
|
-
if (!Util.isUnset(request.
|
|
1120
|
-
query["
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
if (!Util.isUnset(request.page)) {
|
|
1124
|
-
query["Page"] = request.page;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
1128
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
1132
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1381
|
+
if (!Util.isUnset(request.pageShrink)) {
|
|
1382
|
+
query["Page"] = request.pageShrink;
|
|
1133
1383
|
}
|
|
1134
1384
|
|
|
1135
1385
|
let req = new $OpenApi.OpenApiRequest({
|
|
@@ -1154,63 +1404,63 @@ export default class Client extends OpenApi {
|
|
|
1154
1404
|
return await this.listChatappTemplateWithOptions(request, runtime);
|
|
1155
1405
|
}
|
|
1156
1406
|
|
|
1157
|
-
async sendChatappMessageWithOptions(
|
|
1158
|
-
Util.validateModel(
|
|
1159
|
-
let
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
if (!Util.isUnset(request.content)) {
|
|
1165
|
-
query["Content"] = request.content;
|
|
1407
|
+
async sendChatappMessageWithOptions(tmpReq: SendChatappMessageRequest, runtime: $Util.RuntimeOptions): Promise<SendChatappMessageResponse> {
|
|
1408
|
+
Util.validateModel(tmpReq);
|
|
1409
|
+
let request = new SendChatappMessageShrinkRequest({ });
|
|
1410
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1411
|
+
if (!Util.isUnset(tmpReq.payload)) {
|
|
1412
|
+
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, "Payload", "json");
|
|
1166
1413
|
}
|
|
1167
1414
|
|
|
1168
|
-
if (!Util.isUnset(
|
|
1169
|
-
|
|
1415
|
+
if (!Util.isUnset(tmpReq.templateParams)) {
|
|
1416
|
+
request.templateParamsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.templateParams, "TemplateParams", "json");
|
|
1170
1417
|
}
|
|
1171
1418
|
|
|
1172
|
-
|
|
1173
|
-
|
|
1419
|
+
let query = { };
|
|
1420
|
+
if (!Util.isUnset(request.content)) {
|
|
1421
|
+
query["Content"] = request.content;
|
|
1174
1422
|
}
|
|
1175
1423
|
|
|
1176
|
-
if (!Util.isUnset(request.
|
|
1177
|
-
query["
|
|
1424
|
+
if (!Util.isUnset(request.payloadShrink)) {
|
|
1425
|
+
query["Payload"] = request.payloadShrink;
|
|
1178
1426
|
}
|
|
1179
1427
|
|
|
1180
|
-
|
|
1181
|
-
|
|
1428
|
+
let body : {[key: string ]: any} = { };
|
|
1429
|
+
if (!Util.isUnset(request.channelType)) {
|
|
1430
|
+
body["ChannelType"] = request.channelType;
|
|
1182
1431
|
}
|
|
1183
1432
|
|
|
1184
|
-
if (!Util.isUnset(request.
|
|
1185
|
-
|
|
1433
|
+
if (!Util.isUnset(request.from)) {
|
|
1434
|
+
body["From"] = request.from;
|
|
1186
1435
|
}
|
|
1187
1436
|
|
|
1188
|
-
if (!Util.isUnset(request.
|
|
1189
|
-
|
|
1437
|
+
if (!Util.isUnset(request.language)) {
|
|
1438
|
+
body["Language"] = request.language;
|
|
1190
1439
|
}
|
|
1191
1440
|
|
|
1192
|
-
if (!Util.isUnset(request.
|
|
1193
|
-
|
|
1441
|
+
if (!Util.isUnset(request.messageType)) {
|
|
1442
|
+
body["MessageType"] = request.messageType;
|
|
1194
1443
|
}
|
|
1195
1444
|
|
|
1196
1445
|
if (!Util.isUnset(request.templateCode)) {
|
|
1197
|
-
|
|
1446
|
+
body["TemplateCode"] = request.templateCode;
|
|
1198
1447
|
}
|
|
1199
1448
|
|
|
1200
|
-
if (!Util.isUnset(request.
|
|
1201
|
-
|
|
1449
|
+
if (!Util.isUnset(request.templateParamsShrink)) {
|
|
1450
|
+
body["TemplateParams"] = request.templateParamsShrink;
|
|
1202
1451
|
}
|
|
1203
1452
|
|
|
1204
1453
|
if (!Util.isUnset(request.to)) {
|
|
1205
|
-
|
|
1454
|
+
body["To"] = request.to;
|
|
1206
1455
|
}
|
|
1207
1456
|
|
|
1208
1457
|
if (!Util.isUnset(request.type)) {
|
|
1209
|
-
|
|
1458
|
+
body["Type"] = request.type;
|
|
1210
1459
|
}
|
|
1211
1460
|
|
|
1212
1461
|
let req = new $OpenApi.OpenApiRequest({
|
|
1213
1462
|
query: OpenApiUtil.query(query),
|
|
1463
|
+
body: OpenApiUtil.parseToMap(body),
|
|
1214
1464
|
});
|
|
1215
1465
|
let params = new $OpenApi.Params({
|
|
1216
1466
|
action: "SendChatappMessage",
|