@alicloud/cams20200606 1.0.7 → 1.0.10

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
@@ -92,83 +92,19 @@ class CheckChatappContactsResponse extends $tea.Model {
92
92
  static names() {
93
93
  return {
94
94
  headers: 'headers',
95
+ statusCode: 'statusCode',
95
96
  body: 'body',
96
97
  };
97
98
  }
98
99
  static types() {
99
100
  return {
100
101
  headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
102
+ statusCode: 'number',
101
103
  body: CheckChatappContactsResponseBody,
102
104
  };
103
105
  }
104
106
  }
105
107
  exports.CheckChatappContactsResponse = CheckChatappContactsResponse;
106
- class CheckContactsRequest extends $tea.Model {
107
- constructor(map) {
108
- super(map);
109
- }
110
- static names() {
111
- return {
112
- channelType: 'ChannelType',
113
- contacts: 'Contacts',
114
- from: 'From',
115
- ownerId: 'OwnerId',
116
- resourceOwnerAccount: 'ResourceOwnerAccount',
117
- resourceOwnerId: 'ResourceOwnerId',
118
- };
119
- }
120
- static types() {
121
- return {
122
- channelType: 'string',
123
- contacts: 'string',
124
- from: 'string',
125
- ownerId: 'number',
126
- resourceOwnerAccount: 'string',
127
- resourceOwnerId: 'number',
128
- };
129
- }
130
- }
131
- exports.CheckContactsRequest = CheckContactsRequest;
132
- class CheckContactsResponseBody extends $tea.Model {
133
- constructor(map) {
134
- super(map);
135
- }
136
- static names() {
137
- return {
138
- contacts: 'Contacts',
139
- requestId: 'RequestId',
140
- resultCode: 'ResultCode',
141
- resultMessage: 'ResultMessage',
142
- };
143
- }
144
- static types() {
145
- return {
146
- contacts: { 'type': 'array', 'itemType': CheckContactsResponseBodyContacts },
147
- requestId: 'string',
148
- resultCode: 'string',
149
- resultMessage: 'string',
150
- };
151
- }
152
- }
153
- exports.CheckContactsResponseBody = CheckContactsResponseBody;
154
- class CheckContactsResponse extends $tea.Model {
155
- constructor(map) {
156
- super(map);
157
- }
158
- static names() {
159
- return {
160
- headers: 'headers',
161
- body: 'body',
162
- };
163
- }
164
- static types() {
165
- return {
166
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
167
- body: CheckContactsResponseBody,
168
- };
169
- }
170
- }
171
- exports.CheckContactsResponse = CheckContactsResponse;
172
108
  class CreateChatappTemplateRequest extends $tea.Model {
173
109
  constructor(map) {
174
110
  super(map);
@@ -254,12 +190,14 @@ class CreateChatappTemplateResponse extends $tea.Model {
254
190
  static names() {
255
191
  return {
256
192
  headers: 'headers',
193
+ statusCode: 'statusCode',
257
194
  body: 'body',
258
195
  };
259
196
  }
260
197
  static types() {
261
198
  return {
262
199
  headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
200
+ statusCode: 'number',
263
201
  body: CreateChatappTemplateResponseBody,
264
202
  };
265
203
  }
@@ -310,12 +248,14 @@ class DeleteChatappTemplateResponse extends $tea.Model {
310
248
  static names() {
311
249
  return {
312
250
  headers: 'headers',
251
+ statusCode: 'statusCode',
313
252
  body: 'body',
314
253
  };
315
254
  }
316
255
  static types() {
317
256
  return {
318
257
  headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
258
+ statusCode: 'number',
319
259
  body: DeleteChatappTemplateResponseBody,
320
260
  };
321
261
  }
@@ -370,12 +310,14 @@ class GetChatappTemplateDetailResponse extends $tea.Model {
370
310
  static names() {
371
311
  return {
372
312
  headers: 'headers',
313
+ statusCode: 'statusCode',
373
314
  body: 'body',
374
315
  };
375
316
  }
376
317
  static types() {
377
318
  return {
378
319
  headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
320
+ statusCode: 'number',
379
321
  body: GetChatappTemplateDetailResponseBody,
380
322
  };
381
323
  }
@@ -458,234 +400,248 @@ class ListChatappTemplateResponse extends $tea.Model {
458
400
  static names() {
459
401
  return {
460
402
  headers: 'headers',
403
+ statusCode: 'statusCode',
461
404
  body: 'body',
462
405
  };
463
406
  }
464
407
  static types() {
465
408
  return {
466
409
  headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
410
+ statusCode: 'number',
467
411
  body: ListChatappTemplateResponseBody,
468
412
  };
469
413
  }
470
414
  }
471
415
  exports.ListChatappTemplateResponse = ListChatappTemplateResponse;
472
- class SendChatappMessageRequest extends $tea.Model {
416
+ class SendChatappMassMessageRequest extends $tea.Model {
473
417
  constructor(map) {
474
418
  super(map);
475
419
  }
476
420
  static names() {
477
421
  return {
478
422
  channelType: 'ChannelType',
479
- content: 'Content',
480
423
  custWabaId: 'CustWabaId',
424
+ fallBackContent: 'FallBackContent',
425
+ fallBackId: 'FallBackId',
481
426
  from: 'From',
482
427
  language: 'Language',
483
- messageType: 'MessageType',
484
- payload: 'Payload',
428
+ senderList: 'SenderList',
429
+ taskId: 'TaskId',
485
430
  templateCode: 'TemplateCode',
486
- templateParams: 'TemplateParams',
487
- to: 'To',
488
- type: 'Type',
489
431
  };
490
432
  }
491
433
  static types() {
492
434
  return {
493
435
  channelType: 'string',
494
- content: 'string',
495
436
  custWabaId: 'string',
437
+ fallBackContent: 'string',
438
+ fallBackId: 'string',
496
439
  from: 'string',
497
440
  language: 'string',
498
- messageType: 'string',
499
- payload: { 'type': 'array', 'itemType': 'string' },
441
+ senderList: { 'type': 'array', 'itemType': SendChatappMassMessageRequestSenderList },
442
+ taskId: 'string',
500
443
  templateCode: 'string',
501
- templateParams: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
502
- to: 'string',
503
- type: 'string',
504
444
  };
505
445
  }
506
446
  }
507
- exports.SendChatappMessageRequest = SendChatappMessageRequest;
508
- class SendChatappMessageShrinkRequest extends $tea.Model {
447
+ exports.SendChatappMassMessageRequest = SendChatappMassMessageRequest;
448
+ class SendChatappMassMessageShrinkRequest extends $tea.Model {
509
449
  constructor(map) {
510
450
  super(map);
511
451
  }
512
452
  static names() {
513
453
  return {
514
454
  channelType: 'ChannelType',
515
- content: 'Content',
516
455
  custWabaId: 'CustWabaId',
456
+ fallBackContent: 'FallBackContent',
457
+ fallBackId: 'FallBackId',
517
458
  from: 'From',
518
459
  language: 'Language',
519
- messageType: 'MessageType',
520
- payloadShrink: 'Payload',
460
+ senderListShrink: 'SenderList',
461
+ taskId: 'TaskId',
521
462
  templateCode: 'TemplateCode',
522
- templateParamsShrink: 'TemplateParams',
523
- to: 'To',
524
- type: 'Type',
525
463
  };
526
464
  }
527
465
  static types() {
528
466
  return {
529
467
  channelType: 'string',
530
- content: 'string',
531
468
  custWabaId: 'string',
469
+ fallBackContent: 'string',
470
+ fallBackId: 'string',
532
471
  from: 'string',
533
472
  language: 'string',
534
- messageType: 'string',
535
- payloadShrink: 'string',
473
+ senderListShrink: 'string',
474
+ taskId: 'string',
536
475
  templateCode: 'string',
537
- templateParamsShrink: 'string',
538
- to: 'string',
539
- type: 'string',
540
476
  };
541
477
  }
542
478
  }
543
- exports.SendChatappMessageShrinkRequest = SendChatappMessageShrinkRequest;
544
- class SendChatappMessageResponseBody extends $tea.Model {
479
+ exports.SendChatappMassMessageShrinkRequest = SendChatappMassMessageShrinkRequest;
480
+ class SendChatappMassMessageResponseBody extends $tea.Model {
545
481
  constructor(map) {
546
482
  super(map);
547
483
  }
548
484
  static names() {
549
485
  return {
550
486
  code: 'Code',
487
+ groupMessageId: 'GroupMessageId',
551
488
  message: 'Message',
552
- messageId: 'MessageId',
553
489
  requestId: 'RequestId',
554
490
  };
555
491
  }
556
492
  static types() {
557
493
  return {
558
494
  code: 'string',
495
+ groupMessageId: 'string',
559
496
  message: 'string',
560
- messageId: 'string',
561
497
  requestId: 'string',
562
498
  };
563
499
  }
564
500
  }
565
- exports.SendChatappMessageResponseBody = SendChatappMessageResponseBody;
566
- class SendChatappMessageResponse extends $tea.Model {
501
+ exports.SendChatappMassMessageResponseBody = SendChatappMassMessageResponseBody;
502
+ class SendChatappMassMessageResponse extends $tea.Model {
567
503
  constructor(map) {
568
504
  super(map);
569
505
  }
570
506
  static names() {
571
507
  return {
572
508
  headers: 'headers',
509
+ statusCode: 'statusCode',
573
510
  body: 'body',
574
511
  };
575
512
  }
576
513
  static types() {
577
514
  return {
578
515
  headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
579
- body: SendChatappMessageResponseBody,
516
+ statusCode: 'number',
517
+ body: SendChatappMassMessageResponseBody,
580
518
  };
581
519
  }
582
520
  }
583
- exports.SendChatappMessageResponse = SendChatappMessageResponse;
584
- class SendMessageRequest extends $tea.Model {
521
+ exports.SendChatappMassMessageResponse = SendChatappMassMessageResponse;
522
+ class SendChatappMessageRequest extends $tea.Model {
585
523
  constructor(map) {
586
524
  super(map);
587
525
  }
588
526
  static names() {
589
527
  return {
590
- caption: 'Caption',
591
528
  channelType: 'ChannelType',
592
- fileName: 'FileName',
529
+ content: 'Content',
530
+ custWabaId: 'CustWabaId',
531
+ fallBackContent: 'FallBackContent',
532
+ fallBackId: 'FallBackId',
593
533
  from: 'From',
594
- link: 'Link',
534
+ language: 'Language',
595
535
  messageType: 'MessageType',
596
- ownerId: 'OwnerId',
597
- resourceOwnerAccount: 'ResourceOwnerAccount',
598
- resourceOwnerId: 'ResourceOwnerId',
599
- templateBodyParams: 'TemplateBodyParams',
600
- templateButtonParams: 'TemplateButtonParams',
536
+ payload: 'Payload',
601
537
  templateCode: 'TemplateCode',
602
- templateHeaderParams: 'TemplateHeaderParams',
603
- text: 'Text',
538
+ templateParams: 'TemplateParams',
604
539
  to: 'To',
605
540
  type: 'Type',
606
541
  };
607
542
  }
608
543
  static types() {
609
544
  return {
610
- caption: 'string',
611
545
  channelType: 'string',
612
- fileName: 'string',
546
+ content: 'string',
547
+ custWabaId: 'string',
548
+ fallBackContent: 'string',
549
+ fallBackId: 'string',
613
550
  from: 'string',
614
- link: 'string',
551
+ language: 'string',
615
552
  messageType: 'string',
616
- ownerId: 'number',
617
- resourceOwnerAccount: 'string',
618
- resourceOwnerId: 'number',
619
- templateBodyParams: 'string',
620
- templateButtonParams: 'string',
553
+ payload: { 'type': 'array', 'itemType': 'string' },
621
554
  templateCode: 'string',
622
- templateHeaderParams: 'string',
623
- text: 'string',
555
+ templateParams: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
624
556
  to: 'string',
625
557
  type: 'string',
626
558
  };
627
559
  }
628
560
  }
629
- exports.SendMessageRequest = SendMessageRequest;
630
- class SendMessageResponseBody extends $tea.Model {
561
+ exports.SendChatappMessageRequest = SendChatappMessageRequest;
562
+ class SendChatappMessageShrinkRequest extends $tea.Model {
631
563
  constructor(map) {
632
564
  super(map);
633
565
  }
634
566
  static names() {
635
567
  return {
636
- module: 'Module',
637
- requestId: 'RequestId',
638
- resultCode: 'ResultCode',
639
- resultMessage: 'ResultMessage',
568
+ channelType: 'ChannelType',
569
+ content: 'Content',
570
+ custWabaId: 'CustWabaId',
571
+ fallBackContent: 'FallBackContent',
572
+ fallBackId: 'FallBackId',
573
+ from: 'From',
574
+ language: 'Language',
575
+ messageType: 'MessageType',
576
+ payloadShrink: 'Payload',
577
+ templateCode: 'TemplateCode',
578
+ templateParamsShrink: 'TemplateParams',
579
+ to: 'To',
580
+ type: 'Type',
640
581
  };
641
582
  }
642
583
  static types() {
643
584
  return {
644
- module: SendMessageResponseBodyModule,
645
- requestId: 'string',
646
- resultCode: 'string',
647
- resultMessage: 'string',
585
+ channelType: 'string',
586
+ content: 'string',
587
+ custWabaId: 'string',
588
+ fallBackContent: 'string',
589
+ fallBackId: 'string',
590
+ from: 'string',
591
+ language: 'string',
592
+ messageType: 'string',
593
+ payloadShrink: 'string',
594
+ templateCode: 'string',
595
+ templateParamsShrink: 'string',
596
+ to: 'string',
597
+ type: 'string',
648
598
  };
649
599
  }
650
600
  }
651
- exports.SendMessageResponseBody = SendMessageResponseBody;
652
- class SendMessageResponse extends $tea.Model {
601
+ exports.SendChatappMessageShrinkRequest = SendChatappMessageShrinkRequest;
602
+ class SendChatappMessageResponseBody extends $tea.Model {
653
603
  constructor(map) {
654
604
  super(map);
655
605
  }
656
606
  static names() {
657
607
  return {
658
- headers: 'headers',
659
- body: 'body',
608
+ code: 'Code',
609
+ message: 'Message',
610
+ messageId: 'MessageId',
611
+ requestId: 'RequestId',
660
612
  };
661
613
  }
662
614
  static types() {
663
615
  return {
664
- headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
665
- body: SendMessageResponseBody,
616
+ code: 'string',
617
+ message: 'string',
618
+ messageId: 'string',
619
+ requestId: 'string',
666
620
  };
667
621
  }
668
622
  }
669
- exports.SendMessageResponse = SendMessageResponse;
670
- class CheckChatappContactsResponseBodyData extends $tea.Model {
623
+ exports.SendChatappMessageResponseBody = SendChatappMessageResponseBody;
624
+ class SendChatappMessageResponse extends $tea.Model {
671
625
  constructor(map) {
672
626
  super(map);
673
627
  }
674
628
  static names() {
675
629
  return {
676
- phoneNumber: 'PhoneNumber',
677
- status: 'Status',
630
+ headers: 'headers',
631
+ statusCode: 'statusCode',
632
+ body: 'body',
678
633
  };
679
634
  }
680
635
  static types() {
681
636
  return {
682
- phoneNumber: 'string',
683
- status: 'string',
637
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
638
+ statusCode: 'number',
639
+ body: SendChatappMessageResponseBody,
684
640
  };
685
641
  }
686
642
  }
687
- exports.CheckChatappContactsResponseBodyData = CheckChatappContactsResponseBodyData;
688
- class CheckContactsResponseBodyContacts extends $tea.Model {
643
+ exports.SendChatappMessageResponse = SendChatappMessageResponse;
644
+ class CheckChatappContactsResponseBodyData extends $tea.Model {
689
645
  constructor(map) {
690
646
  super(map);
691
647
  }
@@ -702,7 +658,7 @@ class CheckContactsResponseBodyContacts extends $tea.Model {
702
658
  };
703
659
  }
704
660
  }
705
- exports.CheckContactsResponseBodyContacts = CheckContactsResponseBodyContacts;
661
+ exports.CheckChatappContactsResponseBodyData = CheckChatappContactsResponseBodyData;
706
662
  class CreateChatappTemplateRequestComponentsButtons extends $tea.Model {
707
663
  constructor(map) {
708
664
  super(map);
@@ -806,6 +762,7 @@ class GetChatappTemplateDetailResponseBodyDataComponents extends $tea.Model {
806
762
  buttons: 'Buttons',
807
763
  caption: 'Caption',
808
764
  fileName: 'FileName',
765
+ format: 'Format',
809
766
  text: 'Text',
810
767
  type: 'Type',
811
768
  url: 'Url',
@@ -816,6 +773,7 @@ class GetChatappTemplateDetailResponseBodyDataComponents extends $tea.Model {
816
773
  buttons: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponentsButtons },
817
774
  caption: 'string',
818
775
  fileName: 'string',
776
+ format: 'string',
819
777
  text: 'string',
820
778
  type: 'string',
821
779
  url: 'string',
@@ -893,26 +851,26 @@ class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
893
851
  }
894
852
  }
895
853
  exports.ListChatappTemplateResponseBodyListTemplate = ListChatappTemplateResponseBodyListTemplate;
896
- class SendMessageResponseBodyModule extends $tea.Model {
854
+ class SendChatappMassMessageRequestSenderList extends $tea.Model {
897
855
  constructor(map) {
898
856
  super(map);
899
857
  }
900
858
  static names() {
901
859
  return {
902
- fromId: 'FromId',
903
- messageId: 'MessageId',
904
- toId: 'ToId',
860
+ payload: 'Payload',
861
+ templateParams: 'TemplateParams',
862
+ to: 'To',
905
863
  };
906
864
  }
907
865
  static types() {
908
866
  return {
909
- fromId: 'string',
910
- messageId: 'string',
911
- toId: 'string',
867
+ payload: { 'type': 'array', 'itemType': 'string' },
868
+ templateParams: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
869
+ to: 'string',
912
870
  };
913
871
  }
914
872
  }
915
- exports.SendMessageResponseBodyModule = SendMessageResponseBodyModule;
873
+ exports.SendChatappMassMessageRequestSenderList = SendChatappMassMessageRequestSenderList;
916
874
  class Client extends openapi_client_1.default {
917
875
  constructor(config) {
918
876
  super(config);
@@ -969,49 +927,6 @@ class Client extends openapi_client_1.default {
969
927
  let runtime = new $Util.RuntimeOptions({});
970
928
  return await this.checkChatappContactsWithOptions(request, runtime);
971
929
  }
972
- async checkContactsWithOptions(request, runtime) {
973
- tea_util_1.default.validateModel(request);
974
- let query = {};
975
- if (!tea_util_1.default.isUnset(request.ownerId)) {
976
- query["OwnerId"] = request.ownerId;
977
- }
978
- if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
979
- query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
980
- }
981
- if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
982
- query["ResourceOwnerId"] = request.resourceOwnerId;
983
- }
984
- let body = {};
985
- if (!tea_util_1.default.isUnset(request.channelType)) {
986
- body["ChannelType"] = request.channelType;
987
- }
988
- if (!tea_util_1.default.isUnset(request.contacts)) {
989
- body["Contacts"] = request.contacts;
990
- }
991
- if (!tea_util_1.default.isUnset(request.from)) {
992
- body["From"] = request.from;
993
- }
994
- let req = new $OpenApi.OpenApiRequest({
995
- query: openapi_util_1.default.query(query),
996
- body: openapi_util_1.default.parseToMap(body),
997
- });
998
- let params = new $OpenApi.Params({
999
- action: "CheckContacts",
1000
- version: "2020-06-06",
1001
- protocol: "HTTPS",
1002
- pathname: "/",
1003
- method: "POST",
1004
- authType: "AK",
1005
- style: "RPC",
1006
- reqBodyType: "formData",
1007
- bodyType: "json",
1008
- });
1009
- return $tea.cast(await this.callApi(params, req, runtime), new CheckContactsResponse({}));
1010
- }
1011
- async checkContacts(request) {
1012
- let runtime = new $Util.RuntimeOptions({});
1013
- return await this.checkContactsWithOptions(request, runtime);
1014
- }
1015
930
  async createChatappTemplateWithOptions(tmpReq, runtime) {
1016
931
  tea_util_1.default.validateModel(tmpReq);
1017
932
  let request = new CreateChatappTemplateShrinkRequest({});
@@ -1168,22 +1083,12 @@ class Client extends openapi_client_1.default {
1168
1083
  let runtime = new $Util.RuntimeOptions({});
1169
1084
  return await this.listChatappTemplateWithOptions(request, runtime);
1170
1085
  }
1171
- async sendChatappMessageWithOptions(tmpReq, runtime) {
1086
+ async sendChatappMassMessageWithOptions(tmpReq, runtime) {
1172
1087
  tea_util_1.default.validateModel(tmpReq);
1173
- let request = new SendChatappMessageShrinkRequest({});
1088
+ let request = new SendChatappMassMessageShrinkRequest({});
1174
1089
  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;
1090
+ if (!tea_util_1.default.isUnset(tmpReq.senderList)) {
1091
+ request.senderListShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.senderList, "SenderList", "json");
1187
1092
  }
1188
1093
  let body = {};
1189
1094
  if (!tea_util_1.default.isUnset(request.channelType)) {
@@ -1192,33 +1097,32 @@ class Client extends openapi_client_1.default {
1192
1097
  if (!tea_util_1.default.isUnset(request.custWabaId)) {
1193
1098
  body["CustWabaId"] = request.custWabaId;
1194
1099
  }
1100
+ if (!tea_util_1.default.isUnset(request.fallBackContent)) {
1101
+ body["FallBackContent"] = request.fallBackContent;
1102
+ }
1103
+ if (!tea_util_1.default.isUnset(request.fallBackId)) {
1104
+ body["FallBackId"] = request.fallBackId;
1105
+ }
1195
1106
  if (!tea_util_1.default.isUnset(request.from)) {
1196
1107
  body["From"] = request.from;
1197
1108
  }
1198
1109
  if (!tea_util_1.default.isUnset(request.language)) {
1199
1110
  body["Language"] = request.language;
1200
1111
  }
1201
- if (!tea_util_1.default.isUnset(request.messageType)) {
1202
- body["MessageType"] = request.messageType;
1112
+ if (!tea_util_1.default.isUnset(request.senderListShrink)) {
1113
+ body["SenderList"] = request.senderListShrink;
1114
+ }
1115
+ if (!tea_util_1.default.isUnset(request.taskId)) {
1116
+ body["TaskId"] = request.taskId;
1203
1117
  }
1204
1118
  if (!tea_util_1.default.isUnset(request.templateCode)) {
1205
1119
  body["TemplateCode"] = request.templateCode;
1206
1120
  }
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
1121
  let req = new $OpenApi.OpenApiRequest({
1217
- query: openapi_util_1.default.query(query),
1218
1122
  body: openapi_util_1.default.parseToMap(body),
1219
1123
  });
1220
1124
  let params = new $OpenApi.Params({
1221
- action: "SendChatappMessage",
1125
+ action: "SendChatappMassMessage",
1222
1126
  version: "2020-06-06",
1223
1127
  protocol: "HTTPS",
1224
1128
  pathname: "/",
@@ -1228,57 +1132,56 @@ class Client extends openapi_client_1.default {
1228
1132
  reqBodyType: "formData",
1229
1133
  bodyType: "json",
1230
1134
  });
1231
- return $tea.cast(await this.callApi(params, req, runtime), new SendChatappMessageResponse({}));
1135
+ return $tea.cast(await this.callApi(params, req, runtime), new SendChatappMassMessageResponse({}));
1232
1136
  }
1233
- async sendChatappMessage(request) {
1137
+ async sendChatappMassMessage(request) {
1234
1138
  let runtime = new $Util.RuntimeOptions({});
1235
- return await this.sendChatappMessageWithOptions(request, runtime);
1139
+ return await this.sendChatappMassMessageWithOptions(request, runtime);
1236
1140
  }
1237
- async sendMessageWithOptions(request, runtime) {
1238
- tea_util_1.default.validateModel(request);
1239
- let query = {};
1240
- if (!tea_util_1.default.isUnset(request.ownerId)) {
1241
- query["OwnerId"] = request.ownerId;
1141
+ async sendChatappMessageWithOptions(tmpReq, runtime) {
1142
+ tea_util_1.default.validateModel(tmpReq);
1143
+ let request = new SendChatappMessageShrinkRequest({});
1144
+ openapi_util_1.default.convert(tmpReq, request);
1145
+ if (!tea_util_1.default.isUnset(tmpReq.payload)) {
1146
+ request.payloadShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.payload, "Payload", "json");
1242
1147
  }
1243
- if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
1244
- query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
1148
+ if (!tea_util_1.default.isUnset(tmpReq.templateParams)) {
1149
+ request.templateParamsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.templateParams, "TemplateParams", "json");
1245
1150
  }
1246
- if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
1247
- query["ResourceOwnerId"] = request.resourceOwnerId;
1151
+ let query = {};
1152
+ if (!tea_util_1.default.isUnset(request.content)) {
1153
+ query["Content"] = request.content;
1248
1154
  }
1249
- let body = {};
1250
- if (!tea_util_1.default.isUnset(request.caption)) {
1251
- body["Caption"] = request.caption;
1155
+ if (!tea_util_1.default.isUnset(request.payloadShrink)) {
1156
+ query["Payload"] = request.payloadShrink;
1252
1157
  }
1158
+ let body = {};
1253
1159
  if (!tea_util_1.default.isUnset(request.channelType)) {
1254
1160
  body["ChannelType"] = request.channelType;
1255
1161
  }
1256
- if (!tea_util_1.default.isUnset(request.fileName)) {
1257
- body["FileName"] = request.fileName;
1162
+ if (!tea_util_1.default.isUnset(request.custWabaId)) {
1163
+ body["CustWabaId"] = request.custWabaId;
1164
+ }
1165
+ if (!tea_util_1.default.isUnset(request.fallBackContent)) {
1166
+ body["FallBackContent"] = request.fallBackContent;
1167
+ }
1168
+ if (!tea_util_1.default.isUnset(request.fallBackId)) {
1169
+ body["FallBackId"] = request.fallBackId;
1258
1170
  }
1259
1171
  if (!tea_util_1.default.isUnset(request.from)) {
1260
1172
  body["From"] = request.from;
1261
1173
  }
1262
- if (!tea_util_1.default.isUnset(request.link)) {
1263
- body["Link"] = request.link;
1174
+ if (!tea_util_1.default.isUnset(request.language)) {
1175
+ body["Language"] = request.language;
1264
1176
  }
1265
1177
  if (!tea_util_1.default.isUnset(request.messageType)) {
1266
1178
  body["MessageType"] = request.messageType;
1267
1179
  }
1268
- if (!tea_util_1.default.isUnset(request.templateBodyParams)) {
1269
- body["TemplateBodyParams"] = request.templateBodyParams;
1270
- }
1271
- if (!tea_util_1.default.isUnset(request.templateButtonParams)) {
1272
- body["TemplateButtonParams"] = request.templateButtonParams;
1273
- }
1274
1180
  if (!tea_util_1.default.isUnset(request.templateCode)) {
1275
1181
  body["TemplateCode"] = request.templateCode;
1276
1182
  }
1277
- if (!tea_util_1.default.isUnset(request.templateHeaderParams)) {
1278
- body["TemplateHeaderParams"] = request.templateHeaderParams;
1279
- }
1280
- if (!tea_util_1.default.isUnset(request.text)) {
1281
- body["Text"] = request.text;
1183
+ if (!tea_util_1.default.isUnset(request.templateParamsShrink)) {
1184
+ body["TemplateParams"] = request.templateParamsShrink;
1282
1185
  }
1283
1186
  if (!tea_util_1.default.isUnset(request.to)) {
1284
1187
  body["To"] = request.to;
@@ -1291,7 +1194,7 @@ class Client extends openapi_client_1.default {
1291
1194
  body: openapi_util_1.default.parseToMap(body),
1292
1195
  });
1293
1196
  let params = new $OpenApi.Params({
1294
- action: "SendMessage",
1197
+ action: "SendChatappMessage",
1295
1198
  version: "2020-06-06",
1296
1199
  protocol: "HTTPS",
1297
1200
  pathname: "/",
@@ -1301,11 +1204,11 @@ class Client extends openapi_client_1.default {
1301
1204
  reqBodyType: "formData",
1302
1205
  bodyType: "json",
1303
1206
  });
1304
- return $tea.cast(await this.callApi(params, req, runtime), new SendMessageResponse({}));
1207
+ return $tea.cast(await this.callApi(params, req, runtime), new SendChatappMessageResponse({}));
1305
1208
  }
1306
- async sendMessage(request) {
1209
+ async sendChatappMessage(request) {
1307
1210
  let runtime = new $Util.RuntimeOptions({});
1308
- return await this.sendMessageWithOptions(request, runtime);
1211
+ return await this.sendChatappMessageWithOptions(request, runtime);
1309
1212
  }
1310
1213
  }
1311
1214
  exports.default = Client;