@alicloud/cams20200606 1.0.4 → 1.0.7

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.js CHANGED
@@ -19,6 +19,90 @@ const openapi_client_1 = __importStar(require("@alicloud/openapi-client")), $Ope
19
19
  const openapi_util_1 = __importDefault(require("@alicloud/openapi-util"));
20
20
  const endpoint_util_1 = __importDefault(require("@alicloud/endpoint-util"));
21
21
  const $tea = __importStar(require("@alicloud/tea-typescript"));
22
+ class CheckChatappContactsRequest extends $tea.Model {
23
+ constructor(map) {
24
+ super(map);
25
+ }
26
+ static names() {
27
+ return {
28
+ channelType: 'ChannelType',
29
+ contacts: 'Contacts',
30
+ custWabaId: 'CustWabaId',
31
+ from: 'From',
32
+ };
33
+ }
34
+ static types() {
35
+ return {
36
+ channelType: 'string',
37
+ contacts: { 'type': 'array', 'itemType': 'string' },
38
+ custWabaId: 'string',
39
+ from: 'string',
40
+ };
41
+ }
42
+ }
43
+ exports.CheckChatappContactsRequest = CheckChatappContactsRequest;
44
+ class CheckChatappContactsShrinkRequest extends $tea.Model {
45
+ constructor(map) {
46
+ super(map);
47
+ }
48
+ static names() {
49
+ return {
50
+ channelType: 'ChannelType',
51
+ contactsShrink: 'Contacts',
52
+ custWabaId: 'CustWabaId',
53
+ from: 'From',
54
+ };
55
+ }
56
+ static types() {
57
+ return {
58
+ channelType: 'string',
59
+ contactsShrink: 'string',
60
+ custWabaId: 'string',
61
+ from: 'string',
62
+ };
63
+ }
64
+ }
65
+ exports.CheckChatappContactsShrinkRequest = CheckChatappContactsShrinkRequest;
66
+ class CheckChatappContactsResponseBody extends $tea.Model {
67
+ constructor(map) {
68
+ super(map);
69
+ }
70
+ static names() {
71
+ return {
72
+ code: 'Code',
73
+ data: 'Data',
74
+ message: 'Message',
75
+ requestId: 'RequestId',
76
+ };
77
+ }
78
+ static types() {
79
+ return {
80
+ code: 'string',
81
+ data: { 'type': 'array', 'itemType': CheckChatappContactsResponseBodyData },
82
+ message: 'string',
83
+ requestId: 'string',
84
+ };
85
+ }
86
+ }
87
+ exports.CheckChatappContactsResponseBody = CheckChatappContactsResponseBody;
88
+ class CheckChatappContactsResponse extends $tea.Model {
89
+ constructor(map) {
90
+ super(map);
91
+ }
92
+ static names() {
93
+ return {
94
+ headers: 'headers',
95
+ body: 'body',
96
+ };
97
+ }
98
+ static types() {
99
+ return {
100
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
101
+ body: CheckChatappContactsResponseBody,
102
+ };
103
+ }
104
+ }
105
+ exports.CheckChatappContactsResponse = CheckChatappContactsResponse;
22
106
  class CheckContactsRequest extends $tea.Model {
23
107
  constructor(map) {
24
108
  super(map);
@@ -93,30 +177,54 @@ class CreateChatappTemplateRequest extends $tea.Model {
93
177
  return {
94
178
  category: 'Category',
95
179
  components: 'Components',
180
+ custWabaId: 'CustWabaId',
96
181
  example: 'Example',
97
182
  language: 'Language',
98
183
  name: 'Name',
99
- ownerId: 'OwnerId',
100
- resourceOwnerAccount: 'ResourceOwnerAccount',
101
- resourceOwnerId: 'ResourceOwnerId',
102
184
  templateType: 'TemplateType',
103
185
  };
104
186
  }
105
187
  static types() {
106
188
  return {
107
189
  category: 'string',
108
- components: 'string',
109
- example: 'string',
190
+ components: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponents },
191
+ custWabaId: 'string',
192
+ example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
110
193
  language: 'string',
111
194
  name: 'string',
112
- ownerId: 'number',
113
- resourceOwnerAccount: 'string',
114
- resourceOwnerId: 'number',
115
195
  templateType: 'string',
116
196
  };
117
197
  }
118
198
  }
119
199
  exports.CreateChatappTemplateRequest = CreateChatappTemplateRequest;
200
+ class CreateChatappTemplateShrinkRequest extends $tea.Model {
201
+ constructor(map) {
202
+ super(map);
203
+ }
204
+ static names() {
205
+ return {
206
+ category: 'Category',
207
+ componentsShrink: 'Components',
208
+ custWabaId: 'CustWabaId',
209
+ exampleShrink: 'Example',
210
+ language: 'Language',
211
+ name: 'Name',
212
+ templateType: 'TemplateType',
213
+ };
214
+ }
215
+ static types() {
216
+ return {
217
+ category: 'string',
218
+ componentsShrink: 'string',
219
+ custWabaId: 'string',
220
+ exampleShrink: 'string',
221
+ language: 'string',
222
+ name: 'string',
223
+ templateType: 'string',
224
+ };
225
+ }
226
+ }
227
+ exports.CreateChatappTemplateShrinkRequest = CreateChatappTemplateShrinkRequest;
120
228
  class CreateChatappTemplateResponseBody extends $tea.Model {
121
229
  constructor(map) {
122
230
  super(map);
@@ -132,7 +240,7 @@ class CreateChatappTemplateResponseBody extends $tea.Model {
132
240
  static types() {
133
241
  return {
134
242
  code: 'string',
135
- data: 'string',
243
+ data: CreateChatappTemplateResponseBodyData,
136
244
  message: 'string',
137
245
  requestId: 'string',
138
246
  };
@@ -163,17 +271,13 @@ class DeleteChatappTemplateRequest extends $tea.Model {
163
271
  }
164
272
  static names() {
165
273
  return {
166
- ownerId: 'OwnerId',
167
- resourceOwnerAccount: 'ResourceOwnerAccount',
168
- resourceOwnerId: 'ResourceOwnerId',
274
+ custWabaId: 'CustWabaId',
169
275
  templateCode: 'TemplateCode',
170
276
  };
171
277
  }
172
278
  static types() {
173
279
  return {
174
- ownerId: 'number',
175
- resourceOwnerAccount: 'string',
176
- resourceOwnerId: 'number',
280
+ custWabaId: 'string',
177
281
  templateCode: 'string',
178
282
  };
179
283
  }
@@ -223,19 +327,15 @@ class GetChatappTemplateDetailRequest extends $tea.Model {
223
327
  }
224
328
  static names() {
225
329
  return {
330
+ custWabaId: 'CustWabaId',
226
331
  language: 'Language',
227
- ownerId: 'OwnerId',
228
- resourceOwnerAccount: 'ResourceOwnerAccount',
229
- resourceOwnerId: 'ResourceOwnerId',
230
332
  templateCode: 'TemplateCode',
231
333
  };
232
334
  }
233
335
  static types() {
234
336
  return {
337
+ custWabaId: 'string',
235
338
  language: 'string',
236
- ownerId: 'number',
237
- resourceOwnerAccount: 'string',
238
- resourceOwnerId: 'number',
239
339
  templateCode: 'string',
240
340
  };
241
341
  }
@@ -256,7 +356,7 @@ class GetChatappTemplateDetailResponseBody extends $tea.Model {
256
356
  static types() {
257
357
  return {
258
358
  code: 'string',
259
- data: 'string',
359
+ data: GetChatappTemplateDetailResponseBodyData,
260
360
  message: 'string',
261
361
  requestId: 'string',
262
362
  };
@@ -288,27 +388,47 @@ class ListChatappTemplateRequest extends $tea.Model {
288
388
  static names() {
289
389
  return {
290
390
  auditStatus: 'AuditStatus',
391
+ custWabaId: 'CustWabaId',
291
392
  language: 'Language',
292
393
  name: 'Name',
293
- ownerId: 'OwnerId',
294
394
  page: 'Page',
295
- resourceOwnerAccount: 'ResourceOwnerAccount',
296
- resourceOwnerId: 'ResourceOwnerId',
297
395
  };
298
396
  }
299
397
  static types() {
300
398
  return {
301
399
  auditStatus: 'string',
400
+ custWabaId: 'string',
302
401
  language: 'string',
303
402
  name: 'string',
304
- ownerId: 'number',
305
- page: 'string',
306
- resourceOwnerAccount: 'string',
307
- resourceOwnerId: 'number',
403
+ page: ListChatappTemplateRequestPage,
308
404
  };
309
405
  }
310
406
  }
311
407
  exports.ListChatappTemplateRequest = ListChatappTemplateRequest;
408
+ class ListChatappTemplateShrinkRequest extends $tea.Model {
409
+ constructor(map) {
410
+ super(map);
411
+ }
412
+ static names() {
413
+ return {
414
+ auditStatus: 'AuditStatus',
415
+ custWabaId: 'CustWabaId',
416
+ language: 'Language',
417
+ name: 'Name',
418
+ pageShrink: 'Page',
419
+ };
420
+ }
421
+ static types() {
422
+ return {
423
+ auditStatus: 'string',
424
+ custWabaId: 'string',
425
+ language: 'string',
426
+ name: 'string',
427
+ pageShrink: 'string',
428
+ };
429
+ }
430
+ }
431
+ exports.ListChatappTemplateShrinkRequest = ListChatappTemplateShrinkRequest;
312
432
  class ListChatappTemplateResponseBody extends $tea.Model {
313
433
  constructor(map) {
314
434
  super(map);
@@ -349,6 +469,118 @@ class ListChatappTemplateResponse extends $tea.Model {
349
469
  }
350
470
  }
351
471
  exports.ListChatappTemplateResponse = ListChatappTemplateResponse;
472
+ class SendChatappMessageRequest extends $tea.Model {
473
+ constructor(map) {
474
+ super(map);
475
+ }
476
+ static names() {
477
+ return {
478
+ channelType: 'ChannelType',
479
+ content: 'Content',
480
+ custWabaId: 'CustWabaId',
481
+ from: 'From',
482
+ language: 'Language',
483
+ messageType: 'MessageType',
484
+ payload: 'Payload',
485
+ templateCode: 'TemplateCode',
486
+ templateParams: 'TemplateParams',
487
+ to: 'To',
488
+ type: 'Type',
489
+ };
490
+ }
491
+ static types() {
492
+ return {
493
+ channelType: 'string',
494
+ content: 'string',
495
+ custWabaId: 'string',
496
+ from: 'string',
497
+ language: 'string',
498
+ messageType: 'string',
499
+ payload: { 'type': 'array', 'itemType': 'string' },
500
+ templateCode: 'string',
501
+ templateParams: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
502
+ to: 'string',
503
+ type: 'string',
504
+ };
505
+ }
506
+ }
507
+ exports.SendChatappMessageRequest = SendChatappMessageRequest;
508
+ class SendChatappMessageShrinkRequest extends $tea.Model {
509
+ constructor(map) {
510
+ super(map);
511
+ }
512
+ static names() {
513
+ return {
514
+ channelType: 'ChannelType',
515
+ content: 'Content',
516
+ custWabaId: 'CustWabaId',
517
+ from: 'From',
518
+ language: 'Language',
519
+ messageType: 'MessageType',
520
+ payloadShrink: 'Payload',
521
+ templateCode: 'TemplateCode',
522
+ templateParamsShrink: 'TemplateParams',
523
+ to: 'To',
524
+ type: 'Type',
525
+ };
526
+ }
527
+ static types() {
528
+ return {
529
+ channelType: 'string',
530
+ content: 'string',
531
+ custWabaId: 'string',
532
+ from: 'string',
533
+ language: 'string',
534
+ messageType: 'string',
535
+ payloadShrink: 'string',
536
+ templateCode: 'string',
537
+ templateParamsShrink: 'string',
538
+ to: 'string',
539
+ type: 'string',
540
+ };
541
+ }
542
+ }
543
+ exports.SendChatappMessageShrinkRequest = SendChatappMessageShrinkRequest;
544
+ class SendChatappMessageResponseBody extends $tea.Model {
545
+ constructor(map) {
546
+ super(map);
547
+ }
548
+ static names() {
549
+ return {
550
+ code: 'Code',
551
+ message: 'Message',
552
+ messageId: 'MessageId',
553
+ requestId: 'RequestId',
554
+ };
555
+ }
556
+ static types() {
557
+ return {
558
+ code: 'string',
559
+ message: 'string',
560
+ messageId: 'string',
561
+ requestId: 'string',
562
+ };
563
+ }
564
+ }
565
+ exports.SendChatappMessageResponseBody = SendChatappMessageResponseBody;
566
+ class SendChatappMessageResponse extends $tea.Model {
567
+ constructor(map) {
568
+ super(map);
569
+ }
570
+ static names() {
571
+ return {
572
+ headers: 'headers',
573
+ body: 'body',
574
+ };
575
+ }
576
+ static types() {
577
+ return {
578
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
579
+ body: SendChatappMessageResponseBody,
580
+ };
581
+ }
582
+ }
583
+ exports.SendChatappMessageResponse = SendChatappMessageResponse;
352
584
  class SendMessageRequest extends $tea.Model {
353
585
  constructor(map) {
354
586
  super(map);
@@ -435,6 +667,24 @@ class SendMessageResponse extends $tea.Model {
435
667
  }
436
668
  }
437
669
  exports.SendMessageResponse = SendMessageResponse;
670
+ class CheckChatappContactsResponseBodyData extends $tea.Model {
671
+ constructor(map) {
672
+ super(map);
673
+ }
674
+ static names() {
675
+ return {
676
+ phoneNumber: 'PhoneNumber',
677
+ status: 'Status',
678
+ };
679
+ }
680
+ static types() {
681
+ return {
682
+ phoneNumber: 'string',
683
+ status: 'string',
684
+ };
685
+ }
686
+ }
687
+ exports.CheckChatappContactsResponseBodyData = CheckChatappContactsResponseBodyData;
438
688
  class CheckContactsResponseBodyContacts extends $tea.Model {
439
689
  constructor(map) {
440
690
  super(map);
@@ -453,6 +703,172 @@ class CheckContactsResponseBodyContacts extends $tea.Model {
453
703
  }
454
704
  }
455
705
  exports.CheckContactsResponseBodyContacts = CheckContactsResponseBodyContacts;
706
+ class CreateChatappTemplateRequestComponentsButtons extends $tea.Model {
707
+ constructor(map) {
708
+ super(map);
709
+ }
710
+ static names() {
711
+ return {
712
+ phoneNumber: 'PhoneNumber',
713
+ text: 'Text',
714
+ type: 'Type',
715
+ url: 'Url',
716
+ urlType: 'UrlType',
717
+ };
718
+ }
719
+ static types() {
720
+ return {
721
+ phoneNumber: 'string',
722
+ text: 'string',
723
+ type: 'string',
724
+ url: 'string',
725
+ urlType: 'string',
726
+ };
727
+ }
728
+ }
729
+ exports.CreateChatappTemplateRequestComponentsButtons = CreateChatappTemplateRequestComponentsButtons;
730
+ class CreateChatappTemplateRequestComponents extends $tea.Model {
731
+ constructor(map) {
732
+ super(map);
733
+ }
734
+ static names() {
735
+ return {
736
+ buttons: 'Buttons',
737
+ caption: 'Caption',
738
+ fileName: 'FileName',
739
+ format: 'Format',
740
+ text: 'Text',
741
+ type: 'Type',
742
+ url: 'Url',
743
+ };
744
+ }
745
+ static types() {
746
+ return {
747
+ buttons: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponentsButtons },
748
+ caption: 'string',
749
+ fileName: 'string',
750
+ format: 'string',
751
+ text: 'string',
752
+ type: 'string',
753
+ url: 'string',
754
+ };
755
+ }
756
+ }
757
+ exports.CreateChatappTemplateRequestComponents = CreateChatappTemplateRequestComponents;
758
+ class CreateChatappTemplateResponseBodyData extends $tea.Model {
759
+ constructor(map) {
760
+ super(map);
761
+ }
762
+ static names() {
763
+ return {
764
+ templateCode: 'TemplateCode',
765
+ templateName: 'TemplateName',
766
+ };
767
+ }
768
+ static types() {
769
+ return {
770
+ templateCode: 'string',
771
+ templateName: 'string',
772
+ };
773
+ }
774
+ }
775
+ exports.CreateChatappTemplateResponseBodyData = CreateChatappTemplateResponseBodyData;
776
+ class GetChatappTemplateDetailResponseBodyDataComponentsButtons extends $tea.Model {
777
+ constructor(map) {
778
+ super(map);
779
+ }
780
+ static names() {
781
+ return {
782
+ phoneNumber: 'PhoneNumber',
783
+ text: 'Text',
784
+ type: 'Type',
785
+ url: 'Url',
786
+ urlType: 'UrlType',
787
+ };
788
+ }
789
+ static types() {
790
+ return {
791
+ phoneNumber: 'string',
792
+ text: 'string',
793
+ type: 'string',
794
+ url: 'string',
795
+ urlType: 'string',
796
+ };
797
+ }
798
+ }
799
+ exports.GetChatappTemplateDetailResponseBodyDataComponentsButtons = GetChatappTemplateDetailResponseBodyDataComponentsButtons;
800
+ class GetChatappTemplateDetailResponseBodyDataComponents extends $tea.Model {
801
+ constructor(map) {
802
+ super(map);
803
+ }
804
+ static names() {
805
+ return {
806
+ buttons: 'Buttons',
807
+ caption: 'Caption',
808
+ fileName: 'FileName',
809
+ text: 'Text',
810
+ type: 'Type',
811
+ url: 'Url',
812
+ };
813
+ }
814
+ static types() {
815
+ return {
816
+ buttons: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponentsButtons },
817
+ caption: 'string',
818
+ fileName: 'string',
819
+ text: 'string',
820
+ type: 'string',
821
+ url: 'string',
822
+ };
823
+ }
824
+ }
825
+ exports.GetChatappTemplateDetailResponseBodyDataComponents = GetChatappTemplateDetailResponseBodyDataComponents;
826
+ class GetChatappTemplateDetailResponseBodyData extends $tea.Model {
827
+ constructor(map) {
828
+ super(map);
829
+ }
830
+ static names() {
831
+ return {
832
+ auditStatus: 'AuditStatus',
833
+ category: 'Category',
834
+ components: 'Components',
835
+ example: 'Example',
836
+ language: 'Language',
837
+ name: 'Name',
838
+ templateCode: 'TemplateCode',
839
+ };
840
+ }
841
+ static types() {
842
+ return {
843
+ auditStatus: 'string',
844
+ category: 'string',
845
+ components: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponents },
846
+ example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
847
+ language: 'string',
848
+ name: 'string',
849
+ templateCode: 'string',
850
+ };
851
+ }
852
+ }
853
+ exports.GetChatappTemplateDetailResponseBodyData = GetChatappTemplateDetailResponseBodyData;
854
+ class ListChatappTemplateRequestPage extends $tea.Model {
855
+ constructor(map) {
856
+ super(map);
857
+ }
858
+ static names() {
859
+ return {
860
+ index: 'Index',
861
+ size: 'Size',
862
+ };
863
+ }
864
+ static types() {
865
+ return {
866
+ index: 'number',
867
+ size: 'number',
868
+ };
869
+ }
870
+ }
871
+ exports.ListChatappTemplateRequestPage = ListChatappTemplateRequestPage;
456
872
  class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
457
873
  constructor(map) {
458
874
  super(map);
@@ -513,6 +929,46 @@ class Client extends openapi_client_1.default {
513
929
  }
514
930
  return endpoint_util_1.default.getEndpointRules(productId, regionId, endpointRule, network, suffix);
515
931
  }
932
+ async checkChatappContactsWithOptions(tmpReq, runtime) {
933
+ tea_util_1.default.validateModel(tmpReq);
934
+ let request = new CheckChatappContactsShrinkRequest({});
935
+ openapi_util_1.default.convert(tmpReq, request);
936
+ if (!tea_util_1.default.isUnset(tmpReq.contacts)) {
937
+ request.contactsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.contacts, "Contacts", "json");
938
+ }
939
+ let body = {};
940
+ if (!tea_util_1.default.isUnset(request.channelType)) {
941
+ body["ChannelType"] = request.channelType;
942
+ }
943
+ if (!tea_util_1.default.isUnset(request.contactsShrink)) {
944
+ body["Contacts"] = request.contactsShrink;
945
+ }
946
+ if (!tea_util_1.default.isUnset(request.custWabaId)) {
947
+ body["CustWabaId"] = request.custWabaId;
948
+ }
949
+ if (!tea_util_1.default.isUnset(request.from)) {
950
+ body["From"] = request.from;
951
+ }
952
+ let req = new $OpenApi.OpenApiRequest({
953
+ body: openapi_util_1.default.parseToMap(body),
954
+ });
955
+ let params = new $OpenApi.Params({
956
+ action: "CheckChatappContacts",
957
+ version: "2020-06-06",
958
+ protocol: "HTTPS",
959
+ pathname: "/",
960
+ method: "POST",
961
+ authType: "AK",
962
+ style: "RPC",
963
+ reqBodyType: "formData",
964
+ bodyType: "json",
965
+ });
966
+ return $tea.cast(await this.callApi(params, req, runtime), new CheckChatappContactsResponse({}));
967
+ }
968
+ async checkChatappContacts(request) {
969
+ let runtime = new $Util.RuntimeOptions({});
970
+ return await this.checkChatappContactsWithOptions(request, runtime);
971
+ }
516
972
  async checkContactsWithOptions(request, runtime) {
517
973
  tea_util_1.default.validateModel(request);
518
974
  let query = {};
@@ -556,38 +1012,40 @@ class Client extends openapi_client_1.default {
556
1012
  let runtime = new $Util.RuntimeOptions({});
557
1013
  return await this.checkContactsWithOptions(request, runtime);
558
1014
  }
559
- async createChatappTemplateWithOptions(request, runtime) {
560
- tea_util_1.default.validateModel(request);
561
- let query = {};
562
- if (!tea_util_1.default.isUnset(request.category)) {
563
- query["Category"] = request.category;
1015
+ async createChatappTemplateWithOptions(tmpReq, runtime) {
1016
+ tea_util_1.default.validateModel(tmpReq);
1017
+ let request = new CreateChatappTemplateShrinkRequest({});
1018
+ openapi_util_1.default.convert(tmpReq, request);
1019
+ if (!tea_util_1.default.isUnset(tmpReq.components)) {
1020
+ request.componentsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.components, "Components", "json");
564
1021
  }
565
- if (!tea_util_1.default.isUnset(request.components)) {
566
- query["Components"] = request.components;
1022
+ if (!tea_util_1.default.isUnset(tmpReq.example)) {
1023
+ request.exampleShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.example, "Example", "json");
567
1024
  }
568
- if (!tea_util_1.default.isUnset(request.example)) {
569
- query["Example"] = request.example;
1025
+ let body = {};
1026
+ if (!tea_util_1.default.isUnset(request.category)) {
1027
+ body["Category"] = request.category;
570
1028
  }
571
- if (!tea_util_1.default.isUnset(request.language)) {
572
- query["Language"] = request.language;
1029
+ if (!tea_util_1.default.isUnset(request.componentsShrink)) {
1030
+ body["Components"] = request.componentsShrink;
573
1031
  }
574
- if (!tea_util_1.default.isUnset(request.name)) {
575
- query["Name"] = request.name;
1032
+ if (!tea_util_1.default.isUnset(request.custWabaId)) {
1033
+ body["CustWabaId"] = request.custWabaId;
576
1034
  }
577
- if (!tea_util_1.default.isUnset(request.ownerId)) {
578
- query["OwnerId"] = request.ownerId;
1035
+ if (!tea_util_1.default.isUnset(request.exampleShrink)) {
1036
+ body["Example"] = request.exampleShrink;
579
1037
  }
580
- if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
581
- query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
1038
+ if (!tea_util_1.default.isUnset(request.language)) {
1039
+ body["Language"] = request.language;
582
1040
  }
583
- if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
584
- query["ResourceOwnerId"] = request.resourceOwnerId;
1041
+ if (!tea_util_1.default.isUnset(request.name)) {
1042
+ body["Name"] = request.name;
585
1043
  }
586
1044
  if (!tea_util_1.default.isUnset(request.templateType)) {
587
- query["TemplateType"] = request.templateType;
1045
+ body["TemplateType"] = request.templateType;
588
1046
  }
589
1047
  let req = new $OpenApi.OpenApiRequest({
590
- query: openapi_util_1.default.query(query),
1048
+ body: openapi_util_1.default.parseToMap(body),
591
1049
  });
592
1050
  let params = new $OpenApi.Params({
593
1051
  action: "CreateChatappTemplate",
@@ -609,14 +1067,8 @@ class Client extends openapi_client_1.default {
609
1067
  async deleteChatappTemplateWithOptions(request, runtime) {
610
1068
  tea_util_1.default.validateModel(request);
611
1069
  let query = {};
612
- if (!tea_util_1.default.isUnset(request.ownerId)) {
613
- query["OwnerId"] = request.ownerId;
614
- }
615
- if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
616
- query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
617
- }
618
- if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
619
- query["ResourceOwnerId"] = request.resourceOwnerId;
1070
+ if (!tea_util_1.default.isUnset(request.custWabaId)) {
1071
+ query["CustWabaId"] = request.custWabaId;
620
1072
  }
621
1073
  if (!tea_util_1.default.isUnset(request.templateCode)) {
622
1074
  query["TemplateCode"] = request.templateCode;
@@ -644,18 +1096,12 @@ class Client extends openapi_client_1.default {
644
1096
  async getChatappTemplateDetailWithOptions(request, runtime) {
645
1097
  tea_util_1.default.validateModel(request);
646
1098
  let query = {};
1099
+ if (!tea_util_1.default.isUnset(request.custWabaId)) {
1100
+ query["CustWabaId"] = request.custWabaId;
1101
+ }
647
1102
  if (!tea_util_1.default.isUnset(request.language)) {
648
1103
  query["Language"] = request.language;
649
1104
  }
650
- if (!tea_util_1.default.isUnset(request.ownerId)) {
651
- query["OwnerId"] = request.ownerId;
652
- }
653
- if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
654
- query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
655
- }
656
- if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
657
- query["ResourceOwnerId"] = request.resourceOwnerId;
658
- }
659
1105
  if (!tea_util_1.default.isUnset(request.templateCode)) {
660
1106
  query["TemplateCode"] = request.templateCode;
661
1107
  }
@@ -679,29 +1125,28 @@ class Client extends openapi_client_1.default {
679
1125
  let runtime = new $Util.RuntimeOptions({});
680
1126
  return await this.getChatappTemplateDetailWithOptions(request, runtime);
681
1127
  }
682
- async listChatappTemplateWithOptions(request, runtime) {
683
- tea_util_1.default.validateModel(request);
1128
+ async listChatappTemplateWithOptions(tmpReq, runtime) {
1129
+ tea_util_1.default.validateModel(tmpReq);
1130
+ let request = new ListChatappTemplateShrinkRequest({});
1131
+ openapi_util_1.default.convert(tmpReq, request);
1132
+ if (!tea_util_1.default.isUnset($tea.toMap(tmpReq.page))) {
1133
+ request.pageShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle($tea.toMap(tmpReq.page), "Page", "json");
1134
+ }
684
1135
  let query = {};
685
1136
  if (!tea_util_1.default.isUnset(request.auditStatus)) {
686
1137
  query["AuditStatus"] = request.auditStatus;
687
1138
  }
1139
+ if (!tea_util_1.default.isUnset(request.custWabaId)) {
1140
+ query["CustWabaId"] = request.custWabaId;
1141
+ }
688
1142
  if (!tea_util_1.default.isUnset(request.language)) {
689
1143
  query["Language"] = request.language;
690
1144
  }
691
1145
  if (!tea_util_1.default.isUnset(request.name)) {
692
1146
  query["Name"] = request.name;
693
1147
  }
694
- if (!tea_util_1.default.isUnset(request.ownerId)) {
695
- query["OwnerId"] = request.ownerId;
696
- }
697
- if (!tea_util_1.default.isUnset(request.page)) {
698
- query["Page"] = request.page;
699
- }
700
- if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
701
- query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
702
- }
703
- if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
704
- query["ResourceOwnerId"] = request.resourceOwnerId;
1148
+ if (!tea_util_1.default.isUnset(request.pageShrink)) {
1149
+ query["Page"] = request.pageShrink;
705
1150
  }
706
1151
  let req = new $OpenApi.OpenApiRequest({
707
1152
  query: openapi_util_1.default.query(query),
@@ -723,6 +1168,72 @@ class Client extends openapi_client_1.default {
723
1168
  let runtime = new $Util.RuntimeOptions({});
724
1169
  return await this.listChatappTemplateWithOptions(request, runtime);
725
1170
  }
1171
+ async sendChatappMessageWithOptions(tmpReq, runtime) {
1172
+ tea_util_1.default.validateModel(tmpReq);
1173
+ let request = new SendChatappMessageShrinkRequest({});
1174
+ openapi_util_1.default.convert(tmpReq, request);
1175
+ if (!tea_util_1.default.isUnset(tmpReq.payload)) {
1176
+ request.payloadShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.payload, "Payload", "json");
1177
+ }
1178
+ if (!tea_util_1.default.isUnset(tmpReq.templateParams)) {
1179
+ request.templateParamsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.templateParams, "TemplateParams", "json");
1180
+ }
1181
+ let query = {};
1182
+ if (!tea_util_1.default.isUnset(request.content)) {
1183
+ query["Content"] = request.content;
1184
+ }
1185
+ if (!tea_util_1.default.isUnset(request.payloadShrink)) {
1186
+ query["Payload"] = request.payloadShrink;
1187
+ }
1188
+ let body = {};
1189
+ if (!tea_util_1.default.isUnset(request.channelType)) {
1190
+ body["ChannelType"] = request.channelType;
1191
+ }
1192
+ if (!tea_util_1.default.isUnset(request.custWabaId)) {
1193
+ body["CustWabaId"] = request.custWabaId;
1194
+ }
1195
+ if (!tea_util_1.default.isUnset(request.from)) {
1196
+ body["From"] = request.from;
1197
+ }
1198
+ if (!tea_util_1.default.isUnset(request.language)) {
1199
+ body["Language"] = request.language;
1200
+ }
1201
+ if (!tea_util_1.default.isUnset(request.messageType)) {
1202
+ body["MessageType"] = request.messageType;
1203
+ }
1204
+ if (!tea_util_1.default.isUnset(request.templateCode)) {
1205
+ body["TemplateCode"] = request.templateCode;
1206
+ }
1207
+ if (!tea_util_1.default.isUnset(request.templateParamsShrink)) {
1208
+ body["TemplateParams"] = request.templateParamsShrink;
1209
+ }
1210
+ if (!tea_util_1.default.isUnset(request.to)) {
1211
+ body["To"] = request.to;
1212
+ }
1213
+ if (!tea_util_1.default.isUnset(request.type)) {
1214
+ body["Type"] = request.type;
1215
+ }
1216
+ let req = new $OpenApi.OpenApiRequest({
1217
+ query: openapi_util_1.default.query(query),
1218
+ body: openapi_util_1.default.parseToMap(body),
1219
+ });
1220
+ let params = new $OpenApi.Params({
1221
+ action: "SendChatappMessage",
1222
+ version: "2020-06-06",
1223
+ protocol: "HTTPS",
1224
+ pathname: "/",
1225
+ method: "POST",
1226
+ authType: "AK",
1227
+ style: "RPC",
1228
+ reqBodyType: "formData",
1229
+ bodyType: "json",
1230
+ });
1231
+ return $tea.cast(await this.callApi(params, req, runtime), new SendChatappMessageResponse({}));
1232
+ }
1233
+ async sendChatappMessage(request) {
1234
+ let runtime = new $Util.RuntimeOptions({});
1235
+ return await this.sendChatappMessageWithOptions(request, runtime);
1236
+ }
726
1237
  async sendMessageWithOptions(request, runtime) {
727
1238
  tea_util_1.default.validateModel(request);
728
1239
  let query = {};