@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.d.ts +313 -19
- package/dist/client.js +591 -80
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +799 -153
package/src/client.ts
CHANGED
|
@@ -8,6 +8,112 @@ import OpenApiUtil from '@alicloud/openapi-util';
|
|
|
8
8
|
import EndpointUtil from '@alicloud/endpoint-util';
|
|
9
9
|
import * as $tea from '@alicloud/tea-typescript';
|
|
10
10
|
|
|
11
|
+
export class CheckChatappContactsRequest extends $tea.Model {
|
|
12
|
+
channelType?: string;
|
|
13
|
+
contacts?: string[];
|
|
14
|
+
custWabaId?: string;
|
|
15
|
+
from?: string;
|
|
16
|
+
static names(): { [key: string]: string } {
|
|
17
|
+
return {
|
|
18
|
+
channelType: 'ChannelType',
|
|
19
|
+
contacts: 'Contacts',
|
|
20
|
+
custWabaId: 'CustWabaId',
|
|
21
|
+
from: 'From',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static types(): { [key: string]: any } {
|
|
26
|
+
return {
|
|
27
|
+
channelType: 'string',
|
|
28
|
+
contacts: { 'type': 'array', 'itemType': 'string' },
|
|
29
|
+
custWabaId: 'string',
|
|
30
|
+
from: 'string',
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
constructor(map?: { [key: string]: any }) {
|
|
35
|
+
super(map);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export class CheckChatappContactsShrinkRequest extends $tea.Model {
|
|
40
|
+
channelType?: string;
|
|
41
|
+
contactsShrink?: string;
|
|
42
|
+
custWabaId?: string;
|
|
43
|
+
from?: string;
|
|
44
|
+
static names(): { [key: string]: string } {
|
|
45
|
+
return {
|
|
46
|
+
channelType: 'ChannelType',
|
|
47
|
+
contactsShrink: 'Contacts',
|
|
48
|
+
custWabaId: 'CustWabaId',
|
|
49
|
+
from: 'From',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static types(): { [key: string]: any } {
|
|
54
|
+
return {
|
|
55
|
+
channelType: 'string',
|
|
56
|
+
contactsShrink: 'string',
|
|
57
|
+
custWabaId: 'string',
|
|
58
|
+
from: 'string',
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
constructor(map?: { [key: string]: any }) {
|
|
63
|
+
super(map);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class CheckChatappContactsResponseBody extends $tea.Model {
|
|
68
|
+
code?: string;
|
|
69
|
+
data?: CheckChatappContactsResponseBodyData[];
|
|
70
|
+
message?: string;
|
|
71
|
+
requestId?: string;
|
|
72
|
+
static names(): { [key: string]: string } {
|
|
73
|
+
return {
|
|
74
|
+
code: 'Code',
|
|
75
|
+
data: 'Data',
|
|
76
|
+
message: 'Message',
|
|
77
|
+
requestId: 'RequestId',
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
static types(): { [key: string]: any } {
|
|
82
|
+
return {
|
|
83
|
+
code: 'string',
|
|
84
|
+
data: { 'type': 'array', 'itemType': CheckChatappContactsResponseBodyData },
|
|
85
|
+
message: 'string',
|
|
86
|
+
requestId: 'string',
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
constructor(map?: { [key: string]: any }) {
|
|
91
|
+
super(map);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export class CheckChatappContactsResponse extends $tea.Model {
|
|
96
|
+
headers: { [key: string]: string };
|
|
97
|
+
body: CheckChatappContactsResponseBody;
|
|
98
|
+
static names(): { [key: string]: string } {
|
|
99
|
+
return {
|
|
100
|
+
headers: 'headers',
|
|
101
|
+
body: 'body',
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static types(): { [key: string]: any } {
|
|
106
|
+
return {
|
|
107
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
108
|
+
body: CheckChatappContactsResponseBody,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
constructor(map?: { [key: string]: any }) {
|
|
113
|
+
super(map);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
11
117
|
export class CheckContactsRequest extends $tea.Model {
|
|
12
118
|
channelType?: string;
|
|
13
119
|
contacts?: string;
|
|
@@ -94,24 +200,20 @@ export class CheckContactsResponse extends $tea.Model {
|
|
|
94
200
|
|
|
95
201
|
export class CreateChatappTemplateRequest extends $tea.Model {
|
|
96
202
|
category?: string;
|
|
97
|
-
components?:
|
|
98
|
-
|
|
203
|
+
components?: CreateChatappTemplateRequestComponents[];
|
|
204
|
+
custWabaId?: string;
|
|
205
|
+
example?: { [key: string]: string };
|
|
99
206
|
language?: string;
|
|
100
207
|
name?: string;
|
|
101
|
-
ownerId?: number;
|
|
102
|
-
resourceOwnerAccount?: string;
|
|
103
|
-
resourceOwnerId?: number;
|
|
104
208
|
templateType?: string;
|
|
105
209
|
static names(): { [key: string]: string } {
|
|
106
210
|
return {
|
|
107
211
|
category: 'Category',
|
|
108
212
|
components: 'Components',
|
|
213
|
+
custWabaId: 'CustWabaId',
|
|
109
214
|
example: 'Example',
|
|
110
215
|
language: 'Language',
|
|
111
216
|
name: 'Name',
|
|
112
|
-
ownerId: 'OwnerId',
|
|
113
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
114
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
115
217
|
templateType: 'TemplateType',
|
|
116
218
|
};
|
|
117
219
|
}
|
|
@@ -119,13 +221,48 @@ export class CreateChatappTemplateRequest extends $tea.Model {
|
|
|
119
221
|
static types(): { [key: string]: any } {
|
|
120
222
|
return {
|
|
121
223
|
category: 'string',
|
|
122
|
-
components: '
|
|
123
|
-
|
|
224
|
+
components: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponents },
|
|
225
|
+
custWabaId: 'string',
|
|
226
|
+
example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
227
|
+
language: 'string',
|
|
228
|
+
name: 'string',
|
|
229
|
+
templateType: 'string',
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
constructor(map?: { [key: string]: any }) {
|
|
234
|
+
super(map);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export class CreateChatappTemplateShrinkRequest extends $tea.Model {
|
|
239
|
+
category?: string;
|
|
240
|
+
componentsShrink?: string;
|
|
241
|
+
custWabaId?: string;
|
|
242
|
+
exampleShrink?: string;
|
|
243
|
+
language?: string;
|
|
244
|
+
name?: string;
|
|
245
|
+
templateType?: string;
|
|
246
|
+
static names(): { [key: string]: string } {
|
|
247
|
+
return {
|
|
248
|
+
category: 'Category',
|
|
249
|
+
componentsShrink: 'Components',
|
|
250
|
+
custWabaId: 'CustWabaId',
|
|
251
|
+
exampleShrink: 'Example',
|
|
252
|
+
language: 'Language',
|
|
253
|
+
name: 'Name',
|
|
254
|
+
templateType: 'TemplateType',
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
static types(): { [key: string]: any } {
|
|
259
|
+
return {
|
|
260
|
+
category: 'string',
|
|
261
|
+
componentsShrink: 'string',
|
|
262
|
+
custWabaId: 'string',
|
|
263
|
+
exampleShrink: 'string',
|
|
124
264
|
language: 'string',
|
|
125
265
|
name: 'string',
|
|
126
|
-
ownerId: 'number',
|
|
127
|
-
resourceOwnerAccount: 'string',
|
|
128
|
-
resourceOwnerId: 'number',
|
|
129
266
|
templateType: 'string',
|
|
130
267
|
};
|
|
131
268
|
}
|
|
@@ -137,7 +274,7 @@ export class CreateChatappTemplateRequest extends $tea.Model {
|
|
|
137
274
|
|
|
138
275
|
export class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
139
276
|
code?: string;
|
|
140
|
-
data?:
|
|
277
|
+
data?: CreateChatappTemplateResponseBodyData;
|
|
141
278
|
message?: string;
|
|
142
279
|
requestId?: string;
|
|
143
280
|
static names(): { [key: string]: string } {
|
|
@@ -152,7 +289,7 @@ export class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
|
152
289
|
static types(): { [key: string]: any } {
|
|
153
290
|
return {
|
|
154
291
|
code: 'string',
|
|
155
|
-
data:
|
|
292
|
+
data: CreateChatappTemplateResponseBodyData,
|
|
156
293
|
message: 'string',
|
|
157
294
|
requestId: 'string',
|
|
158
295
|
};
|
|
@@ -186,24 +323,18 @@ export class CreateChatappTemplateResponse extends $tea.Model {
|
|
|
186
323
|
}
|
|
187
324
|
|
|
188
325
|
export class DeleteChatappTemplateRequest extends $tea.Model {
|
|
189
|
-
|
|
190
|
-
resourceOwnerAccount?: string;
|
|
191
|
-
resourceOwnerId?: number;
|
|
326
|
+
custWabaId?: string;
|
|
192
327
|
templateCode?: string;
|
|
193
328
|
static names(): { [key: string]: string } {
|
|
194
329
|
return {
|
|
195
|
-
|
|
196
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
197
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
330
|
+
custWabaId: 'CustWabaId',
|
|
198
331
|
templateCode: 'TemplateCode',
|
|
199
332
|
};
|
|
200
333
|
}
|
|
201
334
|
|
|
202
335
|
static types(): { [key: string]: any } {
|
|
203
336
|
return {
|
|
204
|
-
|
|
205
|
-
resourceOwnerAccount: 'string',
|
|
206
|
-
resourceOwnerId: 'number',
|
|
337
|
+
custWabaId: 'string',
|
|
207
338
|
templateCode: 'string',
|
|
208
339
|
};
|
|
209
340
|
}
|
|
@@ -261,27 +392,21 @@ export class DeleteChatappTemplateResponse extends $tea.Model {
|
|
|
261
392
|
}
|
|
262
393
|
|
|
263
394
|
export class GetChatappTemplateDetailRequest extends $tea.Model {
|
|
395
|
+
custWabaId?: string;
|
|
264
396
|
language?: string;
|
|
265
|
-
ownerId?: number;
|
|
266
|
-
resourceOwnerAccount?: string;
|
|
267
|
-
resourceOwnerId?: number;
|
|
268
397
|
templateCode?: string;
|
|
269
398
|
static names(): { [key: string]: string } {
|
|
270
399
|
return {
|
|
400
|
+
custWabaId: 'CustWabaId',
|
|
271
401
|
language: 'Language',
|
|
272
|
-
ownerId: 'OwnerId',
|
|
273
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
274
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
275
402
|
templateCode: 'TemplateCode',
|
|
276
403
|
};
|
|
277
404
|
}
|
|
278
405
|
|
|
279
406
|
static types(): { [key: string]: any } {
|
|
280
407
|
return {
|
|
408
|
+
custWabaId: 'string',
|
|
281
409
|
language: 'string',
|
|
282
|
-
ownerId: 'number',
|
|
283
|
-
resourceOwnerAccount: 'string',
|
|
284
|
-
resourceOwnerId: 'number',
|
|
285
410
|
templateCode: 'string',
|
|
286
411
|
};
|
|
287
412
|
}
|
|
@@ -293,7 +418,7 @@ export class GetChatappTemplateDetailRequest extends $tea.Model {
|
|
|
293
418
|
|
|
294
419
|
export class GetChatappTemplateDetailResponseBody extends $tea.Model {
|
|
295
420
|
code?: string;
|
|
296
|
-
data?:
|
|
421
|
+
data?: GetChatappTemplateDetailResponseBodyData;
|
|
297
422
|
message?: string;
|
|
298
423
|
requestId?: string;
|
|
299
424
|
static names(): { [key: string]: string } {
|
|
@@ -308,7 +433,7 @@ export class GetChatappTemplateDetailResponseBody extends $tea.Model {
|
|
|
308
433
|
static types(): { [key: string]: any } {
|
|
309
434
|
return {
|
|
310
435
|
code: 'string',
|
|
311
|
-
data:
|
|
436
|
+
data: GetChatappTemplateDetailResponseBodyData,
|
|
312
437
|
message: 'string',
|
|
313
438
|
requestId: 'string',
|
|
314
439
|
};
|
|
@@ -343,33 +468,58 @@ export class GetChatappTemplateDetailResponse extends $tea.Model {
|
|
|
343
468
|
|
|
344
469
|
export class ListChatappTemplateRequest extends $tea.Model {
|
|
345
470
|
auditStatus?: string;
|
|
471
|
+
custWabaId?: string;
|
|
346
472
|
language?: string;
|
|
347
473
|
name?: string;
|
|
348
|
-
|
|
349
|
-
page?: string;
|
|
350
|
-
resourceOwnerAccount?: string;
|
|
351
|
-
resourceOwnerId?: number;
|
|
474
|
+
page?: ListChatappTemplateRequestPage;
|
|
352
475
|
static names(): { [key: string]: string } {
|
|
353
476
|
return {
|
|
354
477
|
auditStatus: 'AuditStatus',
|
|
478
|
+
custWabaId: 'CustWabaId',
|
|
355
479
|
language: 'Language',
|
|
356
480
|
name: 'Name',
|
|
357
|
-
ownerId: 'OwnerId',
|
|
358
481
|
page: 'Page',
|
|
359
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
360
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
361
482
|
};
|
|
362
483
|
}
|
|
363
484
|
|
|
364
485
|
static types(): { [key: string]: any } {
|
|
365
486
|
return {
|
|
366
487
|
auditStatus: 'string',
|
|
488
|
+
custWabaId: 'string',
|
|
367
489
|
language: 'string',
|
|
368
490
|
name: 'string',
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
491
|
+
page: ListChatappTemplateRequestPage,
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
constructor(map?: { [key: string]: any }) {
|
|
496
|
+
super(map);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export class ListChatappTemplateShrinkRequest extends $tea.Model {
|
|
501
|
+
auditStatus?: string;
|
|
502
|
+
custWabaId?: string;
|
|
503
|
+
language?: string;
|
|
504
|
+
name?: string;
|
|
505
|
+
pageShrink?: string;
|
|
506
|
+
static names(): { [key: string]: string } {
|
|
507
|
+
return {
|
|
508
|
+
auditStatus: 'AuditStatus',
|
|
509
|
+
custWabaId: 'CustWabaId',
|
|
510
|
+
language: 'Language',
|
|
511
|
+
name: 'Name',
|
|
512
|
+
pageShrink: 'Page',
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
static types(): { [key: string]: any } {
|
|
517
|
+
return {
|
|
518
|
+
auditStatus: 'string',
|
|
519
|
+
custWabaId: 'string',
|
|
520
|
+
language: 'string',
|
|
521
|
+
name: 'string',
|
|
522
|
+
pageShrink: 'string',
|
|
373
523
|
};
|
|
374
524
|
}
|
|
375
525
|
|
|
@@ -428,39 +578,29 @@ export class ListChatappTemplateResponse extends $tea.Model {
|
|
|
428
578
|
}
|
|
429
579
|
}
|
|
430
580
|
|
|
431
|
-
export class
|
|
432
|
-
caption?: string;
|
|
581
|
+
export class SendChatappMessageRequest extends $tea.Model {
|
|
433
582
|
channelType?: string;
|
|
434
|
-
|
|
583
|
+
content?: string;
|
|
584
|
+
custWabaId?: string;
|
|
435
585
|
from?: string;
|
|
436
|
-
|
|
586
|
+
language?: string;
|
|
437
587
|
messageType?: string;
|
|
438
|
-
|
|
439
|
-
resourceOwnerAccount?: string;
|
|
440
|
-
resourceOwnerId?: number;
|
|
441
|
-
templateBodyParams?: string;
|
|
442
|
-
templateButtonParams?: string;
|
|
588
|
+
payload?: string[];
|
|
443
589
|
templateCode?: string;
|
|
444
|
-
|
|
445
|
-
text?: string;
|
|
590
|
+
templateParams?: { [key: string]: string };
|
|
446
591
|
to?: string;
|
|
447
592
|
type?: string;
|
|
448
593
|
static names(): { [key: string]: string } {
|
|
449
594
|
return {
|
|
450
|
-
caption: 'Caption',
|
|
451
595
|
channelType: 'ChannelType',
|
|
452
|
-
|
|
596
|
+
content: 'Content',
|
|
597
|
+
custWabaId: 'CustWabaId',
|
|
453
598
|
from: 'From',
|
|
454
|
-
|
|
599
|
+
language: 'Language',
|
|
455
600
|
messageType: 'MessageType',
|
|
456
|
-
|
|
457
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
458
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
459
|
-
templateBodyParams: 'TemplateBodyParams',
|
|
460
|
-
templateButtonParams: 'TemplateButtonParams',
|
|
601
|
+
payload: 'Payload',
|
|
461
602
|
templateCode: 'TemplateCode',
|
|
462
|
-
|
|
463
|
-
text: 'Text',
|
|
603
|
+
templateParams: 'TemplateParams',
|
|
464
604
|
to: 'To',
|
|
465
605
|
type: 'Type',
|
|
466
606
|
};
|
|
@@ -468,20 +608,15 @@ export class SendMessageRequest extends $tea.Model {
|
|
|
468
608
|
|
|
469
609
|
static types(): { [key: string]: any } {
|
|
470
610
|
return {
|
|
471
|
-
caption: 'string',
|
|
472
611
|
channelType: 'string',
|
|
473
|
-
|
|
612
|
+
content: 'string',
|
|
613
|
+
custWabaId: 'string',
|
|
474
614
|
from: 'string',
|
|
475
|
-
|
|
615
|
+
language: 'string',
|
|
476
616
|
messageType: 'string',
|
|
477
|
-
|
|
478
|
-
resourceOwnerAccount: 'string',
|
|
479
|
-
resourceOwnerId: 'number',
|
|
480
|
-
templateBodyParams: 'string',
|
|
481
|
-
templateButtonParams: 'string',
|
|
617
|
+
payload: { 'type': 'array', 'itemType': 'string' },
|
|
482
618
|
templateCode: 'string',
|
|
483
|
-
|
|
484
|
-
text: 'string',
|
|
619
|
+
templateParams: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
485
620
|
to: 'string',
|
|
486
621
|
type: 'string',
|
|
487
622
|
};
|
|
@@ -492,26 +627,47 @@ export class SendMessageRequest extends $tea.Model {
|
|
|
492
627
|
}
|
|
493
628
|
}
|
|
494
629
|
|
|
495
|
-
export class
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
630
|
+
export class SendChatappMessageShrinkRequest extends $tea.Model {
|
|
631
|
+
channelType?: string;
|
|
632
|
+
content?: string;
|
|
633
|
+
custWabaId?: string;
|
|
634
|
+
from?: string;
|
|
635
|
+
language?: string;
|
|
636
|
+
messageType?: string;
|
|
637
|
+
payloadShrink?: string;
|
|
638
|
+
templateCode?: string;
|
|
639
|
+
templateParamsShrink?: string;
|
|
640
|
+
to?: string;
|
|
641
|
+
type?: string;
|
|
500
642
|
static names(): { [key: string]: string } {
|
|
501
643
|
return {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
644
|
+
channelType: 'ChannelType',
|
|
645
|
+
content: 'Content',
|
|
646
|
+
custWabaId: 'CustWabaId',
|
|
647
|
+
from: 'From',
|
|
648
|
+
language: 'Language',
|
|
649
|
+
messageType: 'MessageType',
|
|
650
|
+
payloadShrink: 'Payload',
|
|
651
|
+
templateCode: 'TemplateCode',
|
|
652
|
+
templateParamsShrink: 'TemplateParams',
|
|
653
|
+
to: 'To',
|
|
654
|
+
type: 'Type',
|
|
506
655
|
};
|
|
507
656
|
}
|
|
508
657
|
|
|
509
658
|
static types(): { [key: string]: any } {
|
|
510
659
|
return {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
660
|
+
channelType: 'string',
|
|
661
|
+
content: 'string',
|
|
662
|
+
custWabaId: 'string',
|
|
663
|
+
from: 'string',
|
|
664
|
+
language: 'string',
|
|
665
|
+
messageType: 'string',
|
|
666
|
+
payloadShrink: 'string',
|
|
667
|
+
templateCode: 'string',
|
|
668
|
+
templateParamsShrink: 'string',
|
|
669
|
+
to: 'string',
|
|
670
|
+
type: 'string',
|
|
515
671
|
};
|
|
516
672
|
}
|
|
517
673
|
|
|
@@ -520,19 +676,161 @@ export class SendMessageResponseBody extends $tea.Model {
|
|
|
520
676
|
}
|
|
521
677
|
}
|
|
522
678
|
|
|
523
|
-
export class
|
|
524
|
-
|
|
525
|
-
|
|
679
|
+
export class SendChatappMessageResponseBody extends $tea.Model {
|
|
680
|
+
code?: string;
|
|
681
|
+
message?: string;
|
|
682
|
+
messageId?: string;
|
|
683
|
+
requestId?: string;
|
|
526
684
|
static names(): { [key: string]: string } {
|
|
527
685
|
return {
|
|
528
|
-
|
|
529
|
-
|
|
686
|
+
code: 'Code',
|
|
687
|
+
message: 'Message',
|
|
688
|
+
messageId: 'MessageId',
|
|
689
|
+
requestId: 'RequestId',
|
|
530
690
|
};
|
|
531
691
|
}
|
|
532
692
|
|
|
533
693
|
static types(): { [key: string]: any } {
|
|
534
694
|
return {
|
|
535
|
-
|
|
695
|
+
code: 'string',
|
|
696
|
+
message: 'string',
|
|
697
|
+
messageId: 'string',
|
|
698
|
+
requestId: 'string',
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
constructor(map?: { [key: string]: any }) {
|
|
703
|
+
super(map);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
export class SendChatappMessageResponse extends $tea.Model {
|
|
708
|
+
headers: { [key: string]: string };
|
|
709
|
+
body: SendChatappMessageResponseBody;
|
|
710
|
+
static names(): { [key: string]: string } {
|
|
711
|
+
return {
|
|
712
|
+
headers: 'headers',
|
|
713
|
+
body: 'body',
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
static types(): { [key: string]: any } {
|
|
718
|
+
return {
|
|
719
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
720
|
+
body: SendChatappMessageResponseBody,
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
constructor(map?: { [key: string]: any }) {
|
|
725
|
+
super(map);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
export class SendMessageRequest extends $tea.Model {
|
|
730
|
+
caption?: string;
|
|
731
|
+
channelType?: string;
|
|
732
|
+
fileName?: string;
|
|
733
|
+
from?: string;
|
|
734
|
+
link?: string;
|
|
735
|
+
messageType?: string;
|
|
736
|
+
ownerId?: number;
|
|
737
|
+
resourceOwnerAccount?: string;
|
|
738
|
+
resourceOwnerId?: number;
|
|
739
|
+
templateBodyParams?: string;
|
|
740
|
+
templateButtonParams?: string;
|
|
741
|
+
templateCode?: string;
|
|
742
|
+
templateHeaderParams?: string;
|
|
743
|
+
text?: string;
|
|
744
|
+
to?: string;
|
|
745
|
+
type?: string;
|
|
746
|
+
static names(): { [key: string]: string } {
|
|
747
|
+
return {
|
|
748
|
+
caption: 'Caption',
|
|
749
|
+
channelType: 'ChannelType',
|
|
750
|
+
fileName: 'FileName',
|
|
751
|
+
from: 'From',
|
|
752
|
+
link: 'Link',
|
|
753
|
+
messageType: 'MessageType',
|
|
754
|
+
ownerId: 'OwnerId',
|
|
755
|
+
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
756
|
+
resourceOwnerId: 'ResourceOwnerId',
|
|
757
|
+
templateBodyParams: 'TemplateBodyParams',
|
|
758
|
+
templateButtonParams: 'TemplateButtonParams',
|
|
759
|
+
templateCode: 'TemplateCode',
|
|
760
|
+
templateHeaderParams: 'TemplateHeaderParams',
|
|
761
|
+
text: 'Text',
|
|
762
|
+
to: 'To',
|
|
763
|
+
type: 'Type',
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
static types(): { [key: string]: any } {
|
|
768
|
+
return {
|
|
769
|
+
caption: 'string',
|
|
770
|
+
channelType: 'string',
|
|
771
|
+
fileName: 'string',
|
|
772
|
+
from: 'string',
|
|
773
|
+
link: 'string',
|
|
774
|
+
messageType: 'string',
|
|
775
|
+
ownerId: 'number',
|
|
776
|
+
resourceOwnerAccount: 'string',
|
|
777
|
+
resourceOwnerId: 'number',
|
|
778
|
+
templateBodyParams: 'string',
|
|
779
|
+
templateButtonParams: 'string',
|
|
780
|
+
templateCode: 'string',
|
|
781
|
+
templateHeaderParams: 'string',
|
|
782
|
+
text: 'string',
|
|
783
|
+
to: 'string',
|
|
784
|
+
type: 'string',
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
constructor(map?: { [key: string]: any }) {
|
|
789
|
+
super(map);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
export class SendMessageResponseBody extends $tea.Model {
|
|
794
|
+
module?: SendMessageResponseBodyModule;
|
|
795
|
+
requestId?: string;
|
|
796
|
+
resultCode?: string;
|
|
797
|
+
resultMessage?: string;
|
|
798
|
+
static names(): { [key: string]: string } {
|
|
799
|
+
return {
|
|
800
|
+
module: 'Module',
|
|
801
|
+
requestId: 'RequestId',
|
|
802
|
+
resultCode: 'ResultCode',
|
|
803
|
+
resultMessage: 'ResultMessage',
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
static types(): { [key: string]: any } {
|
|
808
|
+
return {
|
|
809
|
+
module: SendMessageResponseBodyModule,
|
|
810
|
+
requestId: 'string',
|
|
811
|
+
resultCode: 'string',
|
|
812
|
+
resultMessage: 'string',
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
constructor(map?: { [key: string]: any }) {
|
|
817
|
+
super(map);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
export class SendMessageResponse extends $tea.Model {
|
|
822
|
+
headers: { [key: string]: string };
|
|
823
|
+
body: SendMessageResponseBody;
|
|
824
|
+
static names(): { [key: string]: string } {
|
|
825
|
+
return {
|
|
826
|
+
headers: 'headers',
|
|
827
|
+
body: 'body',
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
static types(): { [key: string]: any } {
|
|
832
|
+
return {
|
|
833
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
536
834
|
body: SendMessageResponseBody,
|
|
537
835
|
};
|
|
538
836
|
}
|
|
@@ -542,6 +840,28 @@ export class SendMessageResponse extends $tea.Model {
|
|
|
542
840
|
}
|
|
543
841
|
}
|
|
544
842
|
|
|
843
|
+
export class CheckChatappContactsResponseBodyData extends $tea.Model {
|
|
844
|
+
phoneNumber?: string;
|
|
845
|
+
status?: string;
|
|
846
|
+
static names(): { [key: string]: string } {
|
|
847
|
+
return {
|
|
848
|
+
phoneNumber: 'PhoneNumber',
|
|
849
|
+
status: 'Status',
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
static types(): { [key: string]: any } {
|
|
854
|
+
return {
|
|
855
|
+
phoneNumber: 'string',
|
|
856
|
+
status: 'string',
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
constructor(map?: { [key: string]: any }) {
|
|
861
|
+
super(map);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
|
|
545
865
|
export class CheckContactsResponseBodyContacts extends $tea.Model {
|
|
546
866
|
phoneNumber?: string;
|
|
547
867
|
status?: string;
|
|
@@ -564,6 +884,220 @@ export class CheckContactsResponseBodyContacts extends $tea.Model {
|
|
|
564
884
|
}
|
|
565
885
|
}
|
|
566
886
|
|
|
887
|
+
export class CreateChatappTemplateRequestComponentsButtons extends $tea.Model {
|
|
888
|
+
phoneNumber?: string;
|
|
889
|
+
text?: string;
|
|
890
|
+
type?: string;
|
|
891
|
+
url?: string;
|
|
892
|
+
urlType?: string;
|
|
893
|
+
static names(): { [key: string]: string } {
|
|
894
|
+
return {
|
|
895
|
+
phoneNumber: 'PhoneNumber',
|
|
896
|
+
text: 'Text',
|
|
897
|
+
type: 'Type',
|
|
898
|
+
url: 'Url',
|
|
899
|
+
urlType: 'UrlType',
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
static types(): { [key: string]: any } {
|
|
904
|
+
return {
|
|
905
|
+
phoneNumber: 'string',
|
|
906
|
+
text: 'string',
|
|
907
|
+
type: 'string',
|
|
908
|
+
url: 'string',
|
|
909
|
+
urlType: 'string',
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
constructor(map?: { [key: string]: any }) {
|
|
914
|
+
super(map);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
export class CreateChatappTemplateRequestComponents extends $tea.Model {
|
|
919
|
+
buttons?: CreateChatappTemplateRequestComponentsButtons[];
|
|
920
|
+
caption?: string;
|
|
921
|
+
fileName?: string;
|
|
922
|
+
format?: string;
|
|
923
|
+
text?: string;
|
|
924
|
+
type?: string;
|
|
925
|
+
url?: string;
|
|
926
|
+
static names(): { [key: string]: string } {
|
|
927
|
+
return {
|
|
928
|
+
buttons: 'Buttons',
|
|
929
|
+
caption: 'Caption',
|
|
930
|
+
fileName: 'FileName',
|
|
931
|
+
format: 'Format',
|
|
932
|
+
text: 'Text',
|
|
933
|
+
type: 'Type',
|
|
934
|
+
url: 'Url',
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
static types(): { [key: string]: any } {
|
|
939
|
+
return {
|
|
940
|
+
buttons: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponentsButtons },
|
|
941
|
+
caption: 'string',
|
|
942
|
+
fileName: 'string',
|
|
943
|
+
format: 'string',
|
|
944
|
+
text: 'string',
|
|
945
|
+
type: 'string',
|
|
946
|
+
url: 'string',
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
constructor(map?: { [key: string]: any }) {
|
|
951
|
+
super(map);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
export class CreateChatappTemplateResponseBodyData extends $tea.Model {
|
|
956
|
+
templateCode?: string;
|
|
957
|
+
templateName?: string;
|
|
958
|
+
static names(): { [key: string]: string } {
|
|
959
|
+
return {
|
|
960
|
+
templateCode: 'TemplateCode',
|
|
961
|
+
templateName: 'TemplateName',
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
static types(): { [key: string]: any } {
|
|
966
|
+
return {
|
|
967
|
+
templateCode: 'string',
|
|
968
|
+
templateName: 'string',
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
constructor(map?: { [key: string]: any }) {
|
|
973
|
+
super(map);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
export class GetChatappTemplateDetailResponseBodyDataComponentsButtons extends $tea.Model {
|
|
978
|
+
phoneNumber?: string;
|
|
979
|
+
text?: string;
|
|
980
|
+
type?: string;
|
|
981
|
+
url?: string;
|
|
982
|
+
urlType?: string;
|
|
983
|
+
static names(): { [key: string]: string } {
|
|
984
|
+
return {
|
|
985
|
+
phoneNumber: 'PhoneNumber',
|
|
986
|
+
text: 'Text',
|
|
987
|
+
type: 'Type',
|
|
988
|
+
url: 'Url',
|
|
989
|
+
urlType: 'UrlType',
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
static types(): { [key: string]: any } {
|
|
994
|
+
return {
|
|
995
|
+
phoneNumber: 'string',
|
|
996
|
+
text: 'string',
|
|
997
|
+
type: 'string',
|
|
998
|
+
url: 'string',
|
|
999
|
+
urlType: 'string',
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
constructor(map?: { [key: string]: any }) {
|
|
1004
|
+
super(map);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
export class GetChatappTemplateDetailResponseBodyDataComponents extends $tea.Model {
|
|
1009
|
+
buttons?: GetChatappTemplateDetailResponseBodyDataComponentsButtons[];
|
|
1010
|
+
caption?: string;
|
|
1011
|
+
fileName?: string;
|
|
1012
|
+
text?: string;
|
|
1013
|
+
type?: string;
|
|
1014
|
+
url?: string;
|
|
1015
|
+
static names(): { [key: string]: string } {
|
|
1016
|
+
return {
|
|
1017
|
+
buttons: 'Buttons',
|
|
1018
|
+
caption: 'Caption',
|
|
1019
|
+
fileName: 'FileName',
|
|
1020
|
+
text: 'Text',
|
|
1021
|
+
type: 'Type',
|
|
1022
|
+
url: 'Url',
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
static types(): { [key: string]: any } {
|
|
1027
|
+
return {
|
|
1028
|
+
buttons: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponentsButtons },
|
|
1029
|
+
caption: 'string',
|
|
1030
|
+
fileName: 'string',
|
|
1031
|
+
text: 'string',
|
|
1032
|
+
type: 'string',
|
|
1033
|
+
url: 'string',
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
constructor(map?: { [key: string]: any }) {
|
|
1038
|
+
super(map);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
export class GetChatappTemplateDetailResponseBodyData extends $tea.Model {
|
|
1043
|
+
auditStatus?: string;
|
|
1044
|
+
category?: string;
|
|
1045
|
+
components?: GetChatappTemplateDetailResponseBodyDataComponents[];
|
|
1046
|
+
example?: { [key: string]: string };
|
|
1047
|
+
language?: string;
|
|
1048
|
+
name?: string;
|
|
1049
|
+
templateCode?: string;
|
|
1050
|
+
static names(): { [key: string]: string } {
|
|
1051
|
+
return {
|
|
1052
|
+
auditStatus: 'AuditStatus',
|
|
1053
|
+
category: 'Category',
|
|
1054
|
+
components: 'Components',
|
|
1055
|
+
example: 'Example',
|
|
1056
|
+
language: 'Language',
|
|
1057
|
+
name: 'Name',
|
|
1058
|
+
templateCode: 'TemplateCode',
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
static types(): { [key: string]: any } {
|
|
1063
|
+
return {
|
|
1064
|
+
auditStatus: 'string',
|
|
1065
|
+
category: 'string',
|
|
1066
|
+
components: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponents },
|
|
1067
|
+
example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
1068
|
+
language: 'string',
|
|
1069
|
+
name: 'string',
|
|
1070
|
+
templateCode: 'string',
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
constructor(map?: { [key: string]: any }) {
|
|
1075
|
+
super(map);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
export class ListChatappTemplateRequestPage extends $tea.Model {
|
|
1080
|
+
index?: number;
|
|
1081
|
+
size?: number;
|
|
1082
|
+
static names(): { [key: string]: string } {
|
|
1083
|
+
return {
|
|
1084
|
+
index: 'Index',
|
|
1085
|
+
size: 'Size',
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
static types(): { [key: string]: any } {
|
|
1090
|
+
return {
|
|
1091
|
+
index: 'number',
|
|
1092
|
+
size: 'number',
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
constructor(map?: { [key: string]: any }) {
|
|
1097
|
+
super(map);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
|
|
567
1101
|
export class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
|
|
568
1102
|
auditStatus?: string;
|
|
569
1103
|
category?: string;
|
|
@@ -643,6 +1177,53 @@ export default class Client extends OpenApi {
|
|
|
643
1177
|
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
644
1178
|
}
|
|
645
1179
|
|
|
1180
|
+
async checkChatappContactsWithOptions(tmpReq: CheckChatappContactsRequest, runtime: $Util.RuntimeOptions): Promise<CheckChatappContactsResponse> {
|
|
1181
|
+
Util.validateModel(tmpReq);
|
|
1182
|
+
let request = new CheckChatappContactsShrinkRequest({ });
|
|
1183
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1184
|
+
if (!Util.isUnset(tmpReq.contacts)) {
|
|
1185
|
+
request.contactsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contacts, "Contacts", "json");
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
let body : {[key: string ]: any} = { };
|
|
1189
|
+
if (!Util.isUnset(request.channelType)) {
|
|
1190
|
+
body["ChannelType"] = request.channelType;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
if (!Util.isUnset(request.contactsShrink)) {
|
|
1194
|
+
body["Contacts"] = request.contactsShrink;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1198
|
+
body["CustWabaId"] = request.custWabaId;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
if (!Util.isUnset(request.from)) {
|
|
1202
|
+
body["From"] = request.from;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
1206
|
+
body: OpenApiUtil.parseToMap(body),
|
|
1207
|
+
});
|
|
1208
|
+
let params = new $OpenApi.Params({
|
|
1209
|
+
action: "CheckChatappContacts",
|
|
1210
|
+
version: "2020-06-06",
|
|
1211
|
+
protocol: "HTTPS",
|
|
1212
|
+
pathname: "/",
|
|
1213
|
+
method: "POST",
|
|
1214
|
+
authType: "AK",
|
|
1215
|
+
style: "RPC",
|
|
1216
|
+
reqBodyType: "formData",
|
|
1217
|
+
bodyType: "json",
|
|
1218
|
+
});
|
|
1219
|
+
return $tea.cast<CheckChatappContactsResponse>(await this.callApi(params, req, runtime), new CheckChatappContactsResponse({}));
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
async checkChatappContacts(request: CheckChatappContactsRequest): Promise<CheckChatappContactsResponse> {
|
|
1223
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
1224
|
+
return await this.checkChatappContactsWithOptions(request, runtime);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
646
1227
|
async checkContactsWithOptions(request: CheckContactsRequest, runtime: $Util.RuntimeOptions): Promise<CheckContactsResponse> {
|
|
647
1228
|
Util.validateModel(request);
|
|
648
1229
|
let query = { };
|
|
@@ -694,47 +1275,49 @@ export default class Client extends OpenApi {
|
|
|
694
1275
|
return await this.checkContactsWithOptions(request, runtime);
|
|
695
1276
|
}
|
|
696
1277
|
|
|
697
|
-
async createChatappTemplateWithOptions(
|
|
698
|
-
Util.validateModel(
|
|
699
|
-
let
|
|
700
|
-
|
|
701
|
-
|
|
1278
|
+
async createChatappTemplateWithOptions(tmpReq: CreateChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<CreateChatappTemplateResponse> {
|
|
1279
|
+
Util.validateModel(tmpReq);
|
|
1280
|
+
let request = new CreateChatappTemplateShrinkRequest({ });
|
|
1281
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1282
|
+
if (!Util.isUnset(tmpReq.components)) {
|
|
1283
|
+
request.componentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.components, "Components", "json");
|
|
702
1284
|
}
|
|
703
1285
|
|
|
704
|
-
if (!Util.isUnset(
|
|
705
|
-
|
|
1286
|
+
if (!Util.isUnset(tmpReq.example)) {
|
|
1287
|
+
request.exampleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.example, "Example", "json");
|
|
706
1288
|
}
|
|
707
1289
|
|
|
708
|
-
|
|
709
|
-
|
|
1290
|
+
let body : {[key: string ]: any} = { };
|
|
1291
|
+
if (!Util.isUnset(request.category)) {
|
|
1292
|
+
body["Category"] = request.category;
|
|
710
1293
|
}
|
|
711
1294
|
|
|
712
|
-
if (!Util.isUnset(request.
|
|
713
|
-
|
|
1295
|
+
if (!Util.isUnset(request.componentsShrink)) {
|
|
1296
|
+
body["Components"] = request.componentsShrink;
|
|
714
1297
|
}
|
|
715
1298
|
|
|
716
|
-
if (!Util.isUnset(request.
|
|
717
|
-
|
|
1299
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1300
|
+
body["CustWabaId"] = request.custWabaId;
|
|
718
1301
|
}
|
|
719
1302
|
|
|
720
|
-
if (!Util.isUnset(request.
|
|
721
|
-
|
|
1303
|
+
if (!Util.isUnset(request.exampleShrink)) {
|
|
1304
|
+
body["Example"] = request.exampleShrink;
|
|
722
1305
|
}
|
|
723
1306
|
|
|
724
|
-
if (!Util.isUnset(request.
|
|
725
|
-
|
|
1307
|
+
if (!Util.isUnset(request.language)) {
|
|
1308
|
+
body["Language"] = request.language;
|
|
726
1309
|
}
|
|
727
1310
|
|
|
728
|
-
if (!Util.isUnset(request.
|
|
729
|
-
|
|
1311
|
+
if (!Util.isUnset(request.name)) {
|
|
1312
|
+
body["Name"] = request.name;
|
|
730
1313
|
}
|
|
731
1314
|
|
|
732
1315
|
if (!Util.isUnset(request.templateType)) {
|
|
733
|
-
|
|
1316
|
+
body["TemplateType"] = request.templateType;
|
|
734
1317
|
}
|
|
735
1318
|
|
|
736
1319
|
let req = new $OpenApi.OpenApiRequest({
|
|
737
|
-
|
|
1320
|
+
body: OpenApiUtil.parseToMap(body),
|
|
738
1321
|
});
|
|
739
1322
|
let params = new $OpenApi.Params({
|
|
740
1323
|
action: "CreateChatappTemplate",
|
|
@@ -758,16 +1341,8 @@ export default class Client extends OpenApi {
|
|
|
758
1341
|
async deleteChatappTemplateWithOptions(request: DeleteChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<DeleteChatappTemplateResponse> {
|
|
759
1342
|
Util.validateModel(request);
|
|
760
1343
|
let query = { };
|
|
761
|
-
if (!Util.isUnset(request.
|
|
762
|
-
query["
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
766
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
770
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1344
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1345
|
+
query["CustWabaId"] = request.custWabaId;
|
|
771
1346
|
}
|
|
772
1347
|
|
|
773
1348
|
if (!Util.isUnset(request.templateCode)) {
|
|
@@ -799,20 +1374,12 @@ export default class Client extends OpenApi {
|
|
|
799
1374
|
async getChatappTemplateDetailWithOptions(request: GetChatappTemplateDetailRequest, runtime: $Util.RuntimeOptions): Promise<GetChatappTemplateDetailResponse> {
|
|
800
1375
|
Util.validateModel(request);
|
|
801
1376
|
let query = { };
|
|
802
|
-
if (!Util.isUnset(request.
|
|
803
|
-
query["
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
if (!Util.isUnset(request.ownerId)) {
|
|
807
|
-
query["OwnerId"] = request.ownerId;
|
|
1377
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1378
|
+
query["CustWabaId"] = request.custWabaId;
|
|
808
1379
|
}
|
|
809
1380
|
|
|
810
|
-
if (!Util.isUnset(request.
|
|
811
|
-
query["
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
815
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1381
|
+
if (!Util.isUnset(request.language)) {
|
|
1382
|
+
query["Language"] = request.language;
|
|
816
1383
|
}
|
|
817
1384
|
|
|
818
1385
|
if (!Util.isUnset(request.templateCode)) {
|
|
@@ -841,13 +1408,23 @@ export default class Client extends OpenApi {
|
|
|
841
1408
|
return await this.getChatappTemplateDetailWithOptions(request, runtime);
|
|
842
1409
|
}
|
|
843
1410
|
|
|
844
|
-
async listChatappTemplateWithOptions(
|
|
845
|
-
Util.validateModel(
|
|
1411
|
+
async listChatappTemplateWithOptions(tmpReq: ListChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<ListChatappTemplateResponse> {
|
|
1412
|
+
Util.validateModel(tmpReq);
|
|
1413
|
+
let request = new ListChatappTemplateShrinkRequest({ });
|
|
1414
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1415
|
+
if (!Util.isUnset($tea.toMap(tmpReq.page))) {
|
|
1416
|
+
request.pageShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle($tea.toMap(tmpReq.page), "Page", "json");
|
|
1417
|
+
}
|
|
1418
|
+
|
|
846
1419
|
let query = { };
|
|
847
1420
|
if (!Util.isUnset(request.auditStatus)) {
|
|
848
1421
|
query["AuditStatus"] = request.auditStatus;
|
|
849
1422
|
}
|
|
850
1423
|
|
|
1424
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1425
|
+
query["CustWabaId"] = request.custWabaId;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
851
1428
|
if (!Util.isUnset(request.language)) {
|
|
852
1429
|
query["Language"] = request.language;
|
|
853
1430
|
}
|
|
@@ -856,27 +1433,96 @@ export default class Client extends OpenApi {
|
|
|
856
1433
|
query["Name"] = request.name;
|
|
857
1434
|
}
|
|
858
1435
|
|
|
859
|
-
if (!Util.isUnset(request.
|
|
860
|
-
query["
|
|
1436
|
+
if (!Util.isUnset(request.pageShrink)) {
|
|
1437
|
+
query["Page"] = request.pageShrink;
|
|
861
1438
|
}
|
|
862
1439
|
|
|
863
|
-
|
|
864
|
-
query
|
|
1440
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
1441
|
+
query: OpenApiUtil.query(query),
|
|
1442
|
+
});
|
|
1443
|
+
let params = new $OpenApi.Params({
|
|
1444
|
+
action: "ListChatappTemplate",
|
|
1445
|
+
version: "2020-06-06",
|
|
1446
|
+
protocol: "HTTPS",
|
|
1447
|
+
pathname: "/",
|
|
1448
|
+
method: "POST",
|
|
1449
|
+
authType: "AK",
|
|
1450
|
+
style: "RPC",
|
|
1451
|
+
reqBodyType: "formData",
|
|
1452
|
+
bodyType: "json",
|
|
1453
|
+
});
|
|
1454
|
+
return $tea.cast<ListChatappTemplateResponse>(await this.callApi(params, req, runtime), new ListChatappTemplateResponse({}));
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
async listChatappTemplate(request: ListChatappTemplateRequest): Promise<ListChatappTemplateResponse> {
|
|
1458
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
1459
|
+
return await this.listChatappTemplateWithOptions(request, runtime);
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
async sendChatappMessageWithOptions(tmpReq: SendChatappMessageRequest, runtime: $Util.RuntimeOptions): Promise<SendChatappMessageResponse> {
|
|
1463
|
+
Util.validateModel(tmpReq);
|
|
1464
|
+
let request = new SendChatappMessageShrinkRequest({ });
|
|
1465
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1466
|
+
if (!Util.isUnset(tmpReq.payload)) {
|
|
1467
|
+
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, "Payload", "json");
|
|
865
1468
|
}
|
|
866
1469
|
|
|
867
|
-
if (!Util.isUnset(
|
|
868
|
-
|
|
1470
|
+
if (!Util.isUnset(tmpReq.templateParams)) {
|
|
1471
|
+
request.templateParamsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.templateParams, "TemplateParams", "json");
|
|
869
1472
|
}
|
|
870
1473
|
|
|
871
|
-
|
|
872
|
-
|
|
1474
|
+
let query = { };
|
|
1475
|
+
if (!Util.isUnset(request.content)) {
|
|
1476
|
+
query["Content"] = request.content;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
if (!Util.isUnset(request.payloadShrink)) {
|
|
1480
|
+
query["Payload"] = request.payloadShrink;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
let body : {[key: string ]: any} = { };
|
|
1484
|
+
if (!Util.isUnset(request.channelType)) {
|
|
1485
|
+
body["ChannelType"] = request.channelType;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1489
|
+
body["CustWabaId"] = request.custWabaId;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
if (!Util.isUnset(request.from)) {
|
|
1493
|
+
body["From"] = request.from;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
if (!Util.isUnset(request.language)) {
|
|
1497
|
+
body["Language"] = request.language;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
if (!Util.isUnset(request.messageType)) {
|
|
1501
|
+
body["MessageType"] = request.messageType;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
if (!Util.isUnset(request.templateCode)) {
|
|
1505
|
+
body["TemplateCode"] = request.templateCode;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
if (!Util.isUnset(request.templateParamsShrink)) {
|
|
1509
|
+
body["TemplateParams"] = request.templateParamsShrink;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
if (!Util.isUnset(request.to)) {
|
|
1513
|
+
body["To"] = request.to;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
if (!Util.isUnset(request.type)) {
|
|
1517
|
+
body["Type"] = request.type;
|
|
873
1518
|
}
|
|
874
1519
|
|
|
875
1520
|
let req = new $OpenApi.OpenApiRequest({
|
|
876
1521
|
query: OpenApiUtil.query(query),
|
|
1522
|
+
body: OpenApiUtil.parseToMap(body),
|
|
877
1523
|
});
|
|
878
1524
|
let params = new $OpenApi.Params({
|
|
879
|
-
action: "
|
|
1525
|
+
action: "SendChatappMessage",
|
|
880
1526
|
version: "2020-06-06",
|
|
881
1527
|
protocol: "HTTPS",
|
|
882
1528
|
pathname: "/",
|
|
@@ -886,12 +1532,12 @@ export default class Client extends OpenApi {
|
|
|
886
1532
|
reqBodyType: "formData",
|
|
887
1533
|
bodyType: "json",
|
|
888
1534
|
});
|
|
889
|
-
return $tea.cast<
|
|
1535
|
+
return $tea.cast<SendChatappMessageResponse>(await this.callApi(params, req, runtime), new SendChatappMessageResponse({}));
|
|
890
1536
|
}
|
|
891
1537
|
|
|
892
|
-
async
|
|
1538
|
+
async sendChatappMessage(request: SendChatappMessageRequest): Promise<SendChatappMessageResponse> {
|
|
893
1539
|
let runtime = new $Util.RuntimeOptions({ });
|
|
894
|
-
return await this.
|
|
1540
|
+
return await this.sendChatappMessageWithOptions(request, runtime);
|
|
895
1541
|
}
|
|
896
1542
|
|
|
897
1543
|
async sendMessageWithOptions(request: SendMessageRequest, runtime: $Util.RuntimeOptions): Promise<SendMessageResponse> {
|