@alicloud/cams20200606 1.0.5 → 1.0.8
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 +153 -105
- package/dist/client.js +323 -371
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +410 -467
package/dist/client.js
CHANGED
|
@@ -27,24 +27,42 @@ class CheckChatappContactsRequest extends $tea.Model {
|
|
|
27
27
|
return {
|
|
28
28
|
channelType: 'ChannelType',
|
|
29
29
|
contacts: 'Contacts',
|
|
30
|
+
custWabaId: 'CustWabaId',
|
|
30
31
|
from: 'From',
|
|
31
|
-
ownerId: 'OwnerId',
|
|
32
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
33
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
34
32
|
};
|
|
35
33
|
}
|
|
36
34
|
static types() {
|
|
37
35
|
return {
|
|
38
36
|
channelType: 'string',
|
|
39
|
-
contacts: 'string',
|
|
37
|
+
contacts: { 'type': 'array', 'itemType': 'string' },
|
|
38
|
+
custWabaId: 'string',
|
|
40
39
|
from: 'string',
|
|
41
|
-
ownerId: 'number',
|
|
42
|
-
resourceOwnerAccount: 'string',
|
|
43
|
-
resourceOwnerId: 'number',
|
|
44
40
|
};
|
|
45
41
|
}
|
|
46
42
|
}
|
|
47
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;
|
|
48
66
|
class CheckChatappContactsResponseBody extends $tea.Model {
|
|
49
67
|
constructor(map) {
|
|
50
68
|
super(map);
|
|
@@ -74,115 +92,75 @@ class CheckChatappContactsResponse extends $tea.Model {
|
|
|
74
92
|
static names() {
|
|
75
93
|
return {
|
|
76
94
|
headers: 'headers',
|
|
95
|
+
statusCode: 'statusCode',
|
|
77
96
|
body: 'body',
|
|
78
97
|
};
|
|
79
98
|
}
|
|
80
99
|
static types() {
|
|
81
100
|
return {
|
|
82
101
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
102
|
+
statusCode: 'number',
|
|
83
103
|
body: CheckChatappContactsResponseBody,
|
|
84
104
|
};
|
|
85
105
|
}
|
|
86
106
|
}
|
|
87
107
|
exports.CheckChatappContactsResponse = CheckChatappContactsResponse;
|
|
88
|
-
class
|
|
89
|
-
constructor(map) {
|
|
90
|
-
super(map);
|
|
91
|
-
}
|
|
92
|
-
static names() {
|
|
93
|
-
return {
|
|
94
|
-
channelType: 'ChannelType',
|
|
95
|
-
contacts: 'Contacts',
|
|
96
|
-
from: 'From',
|
|
97
|
-
ownerId: 'OwnerId',
|
|
98
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
99
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
static types() {
|
|
103
|
-
return {
|
|
104
|
-
channelType: 'string',
|
|
105
|
-
contacts: 'string',
|
|
106
|
-
from: 'string',
|
|
107
|
-
ownerId: 'number',
|
|
108
|
-
resourceOwnerAccount: 'string',
|
|
109
|
-
resourceOwnerId: 'number',
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
exports.CheckContactsRequest = CheckContactsRequest;
|
|
114
|
-
class CheckContactsResponseBody extends $tea.Model {
|
|
115
|
-
constructor(map) {
|
|
116
|
-
super(map);
|
|
117
|
-
}
|
|
118
|
-
static names() {
|
|
119
|
-
return {
|
|
120
|
-
contacts: 'Contacts',
|
|
121
|
-
requestId: 'RequestId',
|
|
122
|
-
resultCode: 'ResultCode',
|
|
123
|
-
resultMessage: 'ResultMessage',
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
static types() {
|
|
127
|
-
return {
|
|
128
|
-
contacts: { 'type': 'array', 'itemType': CheckContactsResponseBodyContacts },
|
|
129
|
-
requestId: 'string',
|
|
130
|
-
resultCode: 'string',
|
|
131
|
-
resultMessage: 'string',
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
exports.CheckContactsResponseBody = CheckContactsResponseBody;
|
|
136
|
-
class CheckContactsResponse extends $tea.Model {
|
|
108
|
+
class CreateChatappTemplateRequest extends $tea.Model {
|
|
137
109
|
constructor(map) {
|
|
138
110
|
super(map);
|
|
139
111
|
}
|
|
140
112
|
static names() {
|
|
141
113
|
return {
|
|
142
|
-
|
|
143
|
-
|
|
114
|
+
category: 'Category',
|
|
115
|
+
components: 'Components',
|
|
116
|
+
custWabaId: 'CustWabaId',
|
|
117
|
+
example: 'Example',
|
|
118
|
+
language: 'Language',
|
|
119
|
+
name: 'Name',
|
|
120
|
+
templateType: 'TemplateType',
|
|
144
121
|
};
|
|
145
122
|
}
|
|
146
123
|
static types() {
|
|
147
124
|
return {
|
|
148
|
-
|
|
149
|
-
|
|
125
|
+
category: 'string',
|
|
126
|
+
components: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponents },
|
|
127
|
+
custWabaId: 'string',
|
|
128
|
+
example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
129
|
+
language: 'string',
|
|
130
|
+
name: 'string',
|
|
131
|
+
templateType: 'string',
|
|
150
132
|
};
|
|
151
133
|
}
|
|
152
134
|
}
|
|
153
|
-
exports.
|
|
154
|
-
class
|
|
135
|
+
exports.CreateChatappTemplateRequest = CreateChatappTemplateRequest;
|
|
136
|
+
class CreateChatappTemplateShrinkRequest extends $tea.Model {
|
|
155
137
|
constructor(map) {
|
|
156
138
|
super(map);
|
|
157
139
|
}
|
|
158
140
|
static names() {
|
|
159
141
|
return {
|
|
160
142
|
category: 'Category',
|
|
161
|
-
|
|
162
|
-
|
|
143
|
+
componentsShrink: 'Components',
|
|
144
|
+
custWabaId: 'CustWabaId',
|
|
145
|
+
exampleShrink: 'Example',
|
|
163
146
|
language: 'Language',
|
|
164
147
|
name: 'Name',
|
|
165
|
-
ownerId: 'OwnerId',
|
|
166
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
167
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
168
148
|
templateType: 'TemplateType',
|
|
169
149
|
};
|
|
170
150
|
}
|
|
171
151
|
static types() {
|
|
172
152
|
return {
|
|
173
153
|
category: 'string',
|
|
174
|
-
|
|
175
|
-
|
|
154
|
+
componentsShrink: 'string',
|
|
155
|
+
custWabaId: 'string',
|
|
156
|
+
exampleShrink: 'string',
|
|
176
157
|
language: 'string',
|
|
177
158
|
name: 'string',
|
|
178
|
-
ownerId: 'number',
|
|
179
|
-
resourceOwnerAccount: 'string',
|
|
180
|
-
resourceOwnerId: 'number',
|
|
181
159
|
templateType: 'string',
|
|
182
160
|
};
|
|
183
161
|
}
|
|
184
162
|
}
|
|
185
|
-
exports.
|
|
163
|
+
exports.CreateChatappTemplateShrinkRequest = CreateChatappTemplateShrinkRequest;
|
|
186
164
|
class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
187
165
|
constructor(map) {
|
|
188
166
|
super(map);
|
|
@@ -198,7 +176,7 @@ class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
|
198
176
|
static types() {
|
|
199
177
|
return {
|
|
200
178
|
code: 'string',
|
|
201
|
-
data:
|
|
179
|
+
data: CreateChatappTemplateResponseBodyData,
|
|
202
180
|
message: 'string',
|
|
203
181
|
requestId: 'string',
|
|
204
182
|
};
|
|
@@ -212,12 +190,14 @@ class CreateChatappTemplateResponse extends $tea.Model {
|
|
|
212
190
|
static names() {
|
|
213
191
|
return {
|
|
214
192
|
headers: 'headers',
|
|
193
|
+
statusCode: 'statusCode',
|
|
215
194
|
body: 'body',
|
|
216
195
|
};
|
|
217
196
|
}
|
|
218
197
|
static types() {
|
|
219
198
|
return {
|
|
220
199
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
200
|
+
statusCode: 'number',
|
|
221
201
|
body: CreateChatappTemplateResponseBody,
|
|
222
202
|
};
|
|
223
203
|
}
|
|
@@ -229,17 +209,13 @@ class DeleteChatappTemplateRequest extends $tea.Model {
|
|
|
229
209
|
}
|
|
230
210
|
static names() {
|
|
231
211
|
return {
|
|
232
|
-
|
|
233
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
234
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
212
|
+
custWabaId: 'CustWabaId',
|
|
235
213
|
templateCode: 'TemplateCode',
|
|
236
214
|
};
|
|
237
215
|
}
|
|
238
216
|
static types() {
|
|
239
217
|
return {
|
|
240
|
-
|
|
241
|
-
resourceOwnerAccount: 'string',
|
|
242
|
-
resourceOwnerId: 'number',
|
|
218
|
+
custWabaId: 'string',
|
|
243
219
|
templateCode: 'string',
|
|
244
220
|
};
|
|
245
221
|
}
|
|
@@ -272,12 +248,14 @@ class DeleteChatappTemplateResponse extends $tea.Model {
|
|
|
272
248
|
static names() {
|
|
273
249
|
return {
|
|
274
250
|
headers: 'headers',
|
|
251
|
+
statusCode: 'statusCode',
|
|
275
252
|
body: 'body',
|
|
276
253
|
};
|
|
277
254
|
}
|
|
278
255
|
static types() {
|
|
279
256
|
return {
|
|
280
257
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
258
|
+
statusCode: 'number',
|
|
281
259
|
body: DeleteChatappTemplateResponseBody,
|
|
282
260
|
};
|
|
283
261
|
}
|
|
@@ -289,19 +267,15 @@ class GetChatappTemplateDetailRequest extends $tea.Model {
|
|
|
289
267
|
}
|
|
290
268
|
static names() {
|
|
291
269
|
return {
|
|
270
|
+
custWabaId: 'CustWabaId',
|
|
292
271
|
language: 'Language',
|
|
293
|
-
ownerId: 'OwnerId',
|
|
294
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
295
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
296
272
|
templateCode: 'TemplateCode',
|
|
297
273
|
};
|
|
298
274
|
}
|
|
299
275
|
static types() {
|
|
300
276
|
return {
|
|
277
|
+
custWabaId: 'string',
|
|
301
278
|
language: 'string',
|
|
302
|
-
ownerId: 'number',
|
|
303
|
-
resourceOwnerAccount: 'string',
|
|
304
|
-
resourceOwnerId: 'number',
|
|
305
279
|
templateCode: 'string',
|
|
306
280
|
};
|
|
307
281
|
}
|
|
@@ -322,7 +296,7 @@ class GetChatappTemplateDetailResponseBody extends $tea.Model {
|
|
|
322
296
|
static types() {
|
|
323
297
|
return {
|
|
324
298
|
code: 'string',
|
|
325
|
-
data:
|
|
299
|
+
data: GetChatappTemplateDetailResponseBodyData,
|
|
326
300
|
message: 'string',
|
|
327
301
|
requestId: 'string',
|
|
328
302
|
};
|
|
@@ -336,12 +310,14 @@ class GetChatappTemplateDetailResponse extends $tea.Model {
|
|
|
336
310
|
static names() {
|
|
337
311
|
return {
|
|
338
312
|
headers: 'headers',
|
|
313
|
+
statusCode: 'statusCode',
|
|
339
314
|
body: 'body',
|
|
340
315
|
};
|
|
341
316
|
}
|
|
342
317
|
static types() {
|
|
343
318
|
return {
|
|
344
319
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
320
|
+
statusCode: 'number',
|
|
345
321
|
body: GetChatappTemplateDetailResponseBody,
|
|
346
322
|
};
|
|
347
323
|
}
|
|
@@ -354,27 +330,47 @@ class ListChatappTemplateRequest extends $tea.Model {
|
|
|
354
330
|
static names() {
|
|
355
331
|
return {
|
|
356
332
|
auditStatus: 'AuditStatus',
|
|
333
|
+
custWabaId: 'CustWabaId',
|
|
357
334
|
language: 'Language',
|
|
358
335
|
name: 'Name',
|
|
359
|
-
ownerId: 'OwnerId',
|
|
360
336
|
page: 'Page',
|
|
361
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
362
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
363
337
|
};
|
|
364
338
|
}
|
|
365
339
|
static types() {
|
|
366
340
|
return {
|
|
367
341
|
auditStatus: 'string',
|
|
342
|
+
custWabaId: 'string',
|
|
368
343
|
language: 'string',
|
|
369
344
|
name: 'string',
|
|
370
|
-
|
|
371
|
-
page: 'string',
|
|
372
|
-
resourceOwnerAccount: 'string',
|
|
373
|
-
resourceOwnerId: 'number',
|
|
345
|
+
page: ListChatappTemplateRequestPage,
|
|
374
346
|
};
|
|
375
347
|
}
|
|
376
348
|
}
|
|
377
349
|
exports.ListChatappTemplateRequest = ListChatappTemplateRequest;
|
|
350
|
+
class ListChatappTemplateShrinkRequest extends $tea.Model {
|
|
351
|
+
constructor(map) {
|
|
352
|
+
super(map);
|
|
353
|
+
}
|
|
354
|
+
static names() {
|
|
355
|
+
return {
|
|
356
|
+
auditStatus: 'AuditStatus',
|
|
357
|
+
custWabaId: 'CustWabaId',
|
|
358
|
+
language: 'Language',
|
|
359
|
+
name: 'Name',
|
|
360
|
+
pageShrink: 'Page',
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
static types() {
|
|
364
|
+
return {
|
|
365
|
+
auditStatus: 'string',
|
|
366
|
+
custWabaId: 'string',
|
|
367
|
+
language: 'string',
|
|
368
|
+
name: 'string',
|
|
369
|
+
pageShrink: 'string',
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
exports.ListChatappTemplateShrinkRequest = ListChatappTemplateShrinkRequest;
|
|
378
374
|
class ListChatappTemplateResponseBody extends $tea.Model {
|
|
379
375
|
constructor(map) {
|
|
380
376
|
super(map);
|
|
@@ -404,12 +400,14 @@ class ListChatappTemplateResponse extends $tea.Model {
|
|
|
404
400
|
static names() {
|
|
405
401
|
return {
|
|
406
402
|
headers: 'headers',
|
|
403
|
+
statusCode: 'statusCode',
|
|
407
404
|
body: 'body',
|
|
408
405
|
};
|
|
409
406
|
}
|
|
410
407
|
static types() {
|
|
411
408
|
return {
|
|
412
409
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
410
|
+
statusCode: 'number',
|
|
413
411
|
body: ListChatappTemplateResponseBody,
|
|
414
412
|
};
|
|
415
413
|
}
|
|
@@ -423,13 +421,11 @@ class SendChatappMessageRequest extends $tea.Model {
|
|
|
423
421
|
return {
|
|
424
422
|
channelType: 'ChannelType',
|
|
425
423
|
content: 'Content',
|
|
424
|
+
custWabaId: 'CustWabaId',
|
|
426
425
|
from: 'From',
|
|
427
426
|
language: 'Language',
|
|
428
427
|
messageType: 'MessageType',
|
|
429
|
-
ownerId: 'OwnerId',
|
|
430
428
|
payload: 'Payload',
|
|
431
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
432
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
433
429
|
templateCode: 'TemplateCode',
|
|
434
430
|
templateParams: 'TemplateParams',
|
|
435
431
|
to: 'To',
|
|
@@ -440,21 +436,55 @@ class SendChatappMessageRequest extends $tea.Model {
|
|
|
440
436
|
return {
|
|
441
437
|
channelType: 'string',
|
|
442
438
|
content: 'string',
|
|
439
|
+
custWabaId: 'string',
|
|
443
440
|
from: 'string',
|
|
444
441
|
language: 'string',
|
|
445
442
|
messageType: 'string',
|
|
446
|
-
|
|
447
|
-
payload: 'string',
|
|
448
|
-
resourceOwnerAccount: 'string',
|
|
449
|
-
resourceOwnerId: 'number',
|
|
443
|
+
payload: { 'type': 'array', 'itemType': 'string' },
|
|
450
444
|
templateCode: 'string',
|
|
451
|
-
templateParams: 'string',
|
|
445
|
+
templateParams: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
452
446
|
to: 'string',
|
|
453
447
|
type: 'string',
|
|
454
448
|
};
|
|
455
449
|
}
|
|
456
450
|
}
|
|
457
451
|
exports.SendChatappMessageRequest = SendChatappMessageRequest;
|
|
452
|
+
class SendChatappMessageShrinkRequest extends $tea.Model {
|
|
453
|
+
constructor(map) {
|
|
454
|
+
super(map);
|
|
455
|
+
}
|
|
456
|
+
static names() {
|
|
457
|
+
return {
|
|
458
|
+
channelType: 'ChannelType',
|
|
459
|
+
content: 'Content',
|
|
460
|
+
custWabaId: 'CustWabaId',
|
|
461
|
+
from: 'From',
|
|
462
|
+
language: 'Language',
|
|
463
|
+
messageType: 'MessageType',
|
|
464
|
+
payloadShrink: 'Payload',
|
|
465
|
+
templateCode: 'TemplateCode',
|
|
466
|
+
templateParamsShrink: 'TemplateParams',
|
|
467
|
+
to: 'To',
|
|
468
|
+
type: 'Type',
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
static types() {
|
|
472
|
+
return {
|
|
473
|
+
channelType: 'string',
|
|
474
|
+
content: 'string',
|
|
475
|
+
custWabaId: 'string',
|
|
476
|
+
from: 'string',
|
|
477
|
+
language: 'string',
|
|
478
|
+
messageType: 'string',
|
|
479
|
+
payloadShrink: 'string',
|
|
480
|
+
templateCode: 'string',
|
|
481
|
+
templateParamsShrink: 'string',
|
|
482
|
+
to: 'string',
|
|
483
|
+
type: 'string',
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
exports.SendChatappMessageShrinkRequest = SendChatappMessageShrinkRequest;
|
|
458
488
|
class SendChatappMessageResponseBody extends $tea.Model {
|
|
459
489
|
constructor(map) {
|
|
460
490
|
super(map);
|
|
@@ -462,16 +492,16 @@ class SendChatappMessageResponseBody extends $tea.Model {
|
|
|
462
492
|
static names() {
|
|
463
493
|
return {
|
|
464
494
|
code: 'Code',
|
|
465
|
-
data: 'Data',
|
|
466
495
|
message: 'Message',
|
|
496
|
+
messageId: 'MessageId',
|
|
467
497
|
requestId: 'RequestId',
|
|
468
498
|
};
|
|
469
499
|
}
|
|
470
500
|
static types() {
|
|
471
501
|
return {
|
|
472
502
|
code: 'string',
|
|
473
|
-
data: 'string',
|
|
474
503
|
message: 'string',
|
|
504
|
+
messageId: 'string',
|
|
475
505
|
requestId: 'string',
|
|
476
506
|
};
|
|
477
507
|
}
|
|
@@ -484,140 +514,160 @@ class SendChatappMessageResponse extends $tea.Model {
|
|
|
484
514
|
static names() {
|
|
485
515
|
return {
|
|
486
516
|
headers: 'headers',
|
|
517
|
+
statusCode: 'statusCode',
|
|
487
518
|
body: 'body',
|
|
488
519
|
};
|
|
489
520
|
}
|
|
490
521
|
static types() {
|
|
491
522
|
return {
|
|
492
523
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
524
|
+
statusCode: 'number',
|
|
493
525
|
body: SendChatappMessageResponseBody,
|
|
494
526
|
};
|
|
495
527
|
}
|
|
496
528
|
}
|
|
497
529
|
exports.SendChatappMessageResponse = SendChatappMessageResponse;
|
|
498
|
-
class
|
|
530
|
+
class CheckChatappContactsResponseBodyData extends $tea.Model {
|
|
499
531
|
constructor(map) {
|
|
500
532
|
super(map);
|
|
501
533
|
}
|
|
502
534
|
static names() {
|
|
503
535
|
return {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
536
|
+
phoneNumber: 'PhoneNumber',
|
|
537
|
+
status: 'Status',
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
static types() {
|
|
541
|
+
return {
|
|
542
|
+
phoneNumber: 'string',
|
|
543
|
+
status: 'string',
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
exports.CheckChatappContactsResponseBodyData = CheckChatappContactsResponseBodyData;
|
|
548
|
+
class CreateChatappTemplateRequestComponentsButtons extends $tea.Model {
|
|
549
|
+
constructor(map) {
|
|
550
|
+
super(map);
|
|
551
|
+
}
|
|
552
|
+
static names() {
|
|
553
|
+
return {
|
|
554
|
+
phoneNumber: 'PhoneNumber',
|
|
517
555
|
text: 'Text',
|
|
518
|
-
to: 'To',
|
|
519
556
|
type: 'Type',
|
|
557
|
+
url: 'Url',
|
|
558
|
+
urlType: 'UrlType',
|
|
520
559
|
};
|
|
521
560
|
}
|
|
522
561
|
static types() {
|
|
523
562
|
return {
|
|
524
|
-
|
|
525
|
-
channelType: 'string',
|
|
526
|
-
fileName: 'string',
|
|
527
|
-
from: 'string',
|
|
528
|
-
link: 'string',
|
|
529
|
-
messageType: 'string',
|
|
530
|
-
ownerId: 'number',
|
|
531
|
-
resourceOwnerAccount: 'string',
|
|
532
|
-
resourceOwnerId: 'number',
|
|
533
|
-
templateBodyParams: 'string',
|
|
534
|
-
templateButtonParams: 'string',
|
|
535
|
-
templateCode: 'string',
|
|
536
|
-
templateHeaderParams: 'string',
|
|
563
|
+
phoneNumber: 'string',
|
|
537
564
|
text: 'string',
|
|
538
|
-
to: 'string',
|
|
539
565
|
type: 'string',
|
|
566
|
+
url: 'string',
|
|
567
|
+
urlType: 'string',
|
|
540
568
|
};
|
|
541
569
|
}
|
|
542
570
|
}
|
|
543
|
-
exports.
|
|
544
|
-
class
|
|
571
|
+
exports.CreateChatappTemplateRequestComponentsButtons = CreateChatappTemplateRequestComponentsButtons;
|
|
572
|
+
class CreateChatappTemplateRequestComponents extends $tea.Model {
|
|
545
573
|
constructor(map) {
|
|
546
574
|
super(map);
|
|
547
575
|
}
|
|
548
576
|
static names() {
|
|
549
577
|
return {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
578
|
+
buttons: 'Buttons',
|
|
579
|
+
caption: 'Caption',
|
|
580
|
+
fileName: 'FileName',
|
|
581
|
+
format: 'Format',
|
|
582
|
+
text: 'Text',
|
|
583
|
+
type: 'Type',
|
|
584
|
+
url: 'Url',
|
|
554
585
|
};
|
|
555
586
|
}
|
|
556
587
|
static types() {
|
|
557
588
|
return {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
589
|
+
buttons: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponentsButtons },
|
|
590
|
+
caption: 'string',
|
|
591
|
+
fileName: 'string',
|
|
592
|
+
format: 'string',
|
|
593
|
+
text: 'string',
|
|
594
|
+
type: 'string',
|
|
595
|
+
url: 'string',
|
|
562
596
|
};
|
|
563
597
|
}
|
|
564
598
|
}
|
|
565
|
-
exports.
|
|
566
|
-
class
|
|
599
|
+
exports.CreateChatappTemplateRequestComponents = CreateChatappTemplateRequestComponents;
|
|
600
|
+
class CreateChatappTemplateResponseBodyData extends $tea.Model {
|
|
567
601
|
constructor(map) {
|
|
568
602
|
super(map);
|
|
569
603
|
}
|
|
570
604
|
static names() {
|
|
571
605
|
return {
|
|
572
|
-
|
|
573
|
-
|
|
606
|
+
templateCode: 'TemplateCode',
|
|
607
|
+
templateName: 'TemplateName',
|
|
574
608
|
};
|
|
575
609
|
}
|
|
576
610
|
static types() {
|
|
577
611
|
return {
|
|
578
|
-
|
|
579
|
-
|
|
612
|
+
templateCode: 'string',
|
|
613
|
+
templateName: 'string',
|
|
580
614
|
};
|
|
581
615
|
}
|
|
582
616
|
}
|
|
583
|
-
exports.
|
|
584
|
-
class
|
|
617
|
+
exports.CreateChatappTemplateResponseBodyData = CreateChatappTemplateResponseBodyData;
|
|
618
|
+
class GetChatappTemplateDetailResponseBodyDataComponentsButtons extends $tea.Model {
|
|
585
619
|
constructor(map) {
|
|
586
620
|
super(map);
|
|
587
621
|
}
|
|
588
622
|
static names() {
|
|
589
623
|
return {
|
|
590
624
|
phoneNumber: 'PhoneNumber',
|
|
591
|
-
|
|
625
|
+
text: 'Text',
|
|
626
|
+
type: 'Type',
|
|
627
|
+
url: 'Url',
|
|
628
|
+
urlType: 'UrlType',
|
|
592
629
|
};
|
|
593
630
|
}
|
|
594
631
|
static types() {
|
|
595
632
|
return {
|
|
596
633
|
phoneNumber: 'string',
|
|
597
|
-
|
|
634
|
+
text: 'string',
|
|
635
|
+
type: 'string',
|
|
636
|
+
url: 'string',
|
|
637
|
+
urlType: 'string',
|
|
598
638
|
};
|
|
599
639
|
}
|
|
600
640
|
}
|
|
601
|
-
exports.
|
|
602
|
-
class
|
|
641
|
+
exports.GetChatappTemplateDetailResponseBodyDataComponentsButtons = GetChatappTemplateDetailResponseBodyDataComponentsButtons;
|
|
642
|
+
class GetChatappTemplateDetailResponseBodyDataComponents extends $tea.Model {
|
|
603
643
|
constructor(map) {
|
|
604
644
|
super(map);
|
|
605
645
|
}
|
|
606
646
|
static names() {
|
|
607
647
|
return {
|
|
608
|
-
|
|
609
|
-
|
|
648
|
+
buttons: 'Buttons',
|
|
649
|
+
caption: 'Caption',
|
|
650
|
+
fileName: 'FileName',
|
|
651
|
+
format: 'Format',
|
|
652
|
+
text: 'Text',
|
|
653
|
+
type: 'Type',
|
|
654
|
+
url: 'Url',
|
|
610
655
|
};
|
|
611
656
|
}
|
|
612
657
|
static types() {
|
|
613
658
|
return {
|
|
614
|
-
|
|
615
|
-
|
|
659
|
+
buttons: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponentsButtons },
|
|
660
|
+
caption: 'string',
|
|
661
|
+
fileName: 'string',
|
|
662
|
+
format: 'string',
|
|
663
|
+
text: 'string',
|
|
664
|
+
type: 'string',
|
|
665
|
+
url: 'string',
|
|
616
666
|
};
|
|
617
667
|
}
|
|
618
668
|
}
|
|
619
|
-
exports.
|
|
620
|
-
class
|
|
669
|
+
exports.GetChatappTemplateDetailResponseBodyDataComponents = GetChatappTemplateDetailResponseBodyDataComponents;
|
|
670
|
+
class GetChatappTemplateDetailResponseBodyData extends $tea.Model {
|
|
621
671
|
constructor(map) {
|
|
622
672
|
super(map);
|
|
623
673
|
}
|
|
@@ -625,42 +675,68 @@ class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
|
|
|
625
675
|
return {
|
|
626
676
|
auditStatus: 'AuditStatus',
|
|
627
677
|
category: 'Category',
|
|
678
|
+
components: 'Components',
|
|
679
|
+
example: 'Example',
|
|
628
680
|
language: 'Language',
|
|
681
|
+
name: 'Name',
|
|
629
682
|
templateCode: 'TemplateCode',
|
|
630
|
-
templateName: 'TemplateName',
|
|
631
683
|
};
|
|
632
684
|
}
|
|
633
685
|
static types() {
|
|
634
686
|
return {
|
|
635
687
|
auditStatus: 'string',
|
|
636
688
|
category: 'string',
|
|
689
|
+
components: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponents },
|
|
690
|
+
example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
637
691
|
language: 'string',
|
|
692
|
+
name: 'string',
|
|
638
693
|
templateCode: 'string',
|
|
639
|
-
templateName: 'string',
|
|
640
694
|
};
|
|
641
695
|
}
|
|
642
696
|
}
|
|
643
|
-
exports.
|
|
644
|
-
class
|
|
697
|
+
exports.GetChatappTemplateDetailResponseBodyData = GetChatappTemplateDetailResponseBodyData;
|
|
698
|
+
class ListChatappTemplateRequestPage extends $tea.Model {
|
|
645
699
|
constructor(map) {
|
|
646
700
|
super(map);
|
|
647
701
|
}
|
|
648
702
|
static names() {
|
|
649
703
|
return {
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
toId: 'ToId',
|
|
704
|
+
index: 'Index',
|
|
705
|
+
size: 'Size',
|
|
653
706
|
};
|
|
654
707
|
}
|
|
655
708
|
static types() {
|
|
656
709
|
return {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
toId: 'string',
|
|
710
|
+
index: 'number',
|
|
711
|
+
size: 'number',
|
|
660
712
|
};
|
|
661
713
|
}
|
|
662
714
|
}
|
|
663
|
-
exports.
|
|
715
|
+
exports.ListChatappTemplateRequestPage = ListChatappTemplateRequestPage;
|
|
716
|
+
class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
|
|
717
|
+
constructor(map) {
|
|
718
|
+
super(map);
|
|
719
|
+
}
|
|
720
|
+
static names() {
|
|
721
|
+
return {
|
|
722
|
+
auditStatus: 'AuditStatus',
|
|
723
|
+
category: 'Category',
|
|
724
|
+
language: 'Language',
|
|
725
|
+
templateCode: 'TemplateCode',
|
|
726
|
+
templateName: 'TemplateName',
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
static types() {
|
|
730
|
+
return {
|
|
731
|
+
auditStatus: 'string',
|
|
732
|
+
category: 'string',
|
|
733
|
+
language: 'string',
|
|
734
|
+
templateCode: 'string',
|
|
735
|
+
templateName: 'string',
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
exports.ListChatappTemplateResponseBodyListTemplate = ListChatappTemplateResponseBodyListTemplate;
|
|
664
740
|
class Client extends openapi_client_1.default {
|
|
665
741
|
constructor(config) {
|
|
666
742
|
super(config);
|
|
@@ -677,29 +753,28 @@ class Client extends openapi_client_1.default {
|
|
|
677
753
|
}
|
|
678
754
|
return endpoint_util_1.default.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
679
755
|
}
|
|
680
|
-
async checkChatappContactsWithOptions(
|
|
681
|
-
tea_util_1.default.validateModel(
|
|
682
|
-
let
|
|
683
|
-
|
|
684
|
-
|
|
756
|
+
async checkChatappContactsWithOptions(tmpReq, runtime) {
|
|
757
|
+
tea_util_1.default.validateModel(tmpReq);
|
|
758
|
+
let request = new CheckChatappContactsShrinkRequest({});
|
|
759
|
+
openapi_util_1.default.convert(tmpReq, request);
|
|
760
|
+
if (!tea_util_1.default.isUnset(tmpReq.contacts)) {
|
|
761
|
+
request.contactsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.contacts, "Contacts", "json");
|
|
685
762
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
if (!tea_util_1.default.isUnset(request.from)) {
|
|
690
|
-
query["From"] = request.from;
|
|
763
|
+
let body = {};
|
|
764
|
+
if (!tea_util_1.default.isUnset(request.channelType)) {
|
|
765
|
+
body["ChannelType"] = request.channelType;
|
|
691
766
|
}
|
|
692
|
-
if (!tea_util_1.default.isUnset(request.
|
|
693
|
-
|
|
767
|
+
if (!tea_util_1.default.isUnset(request.contactsShrink)) {
|
|
768
|
+
body["Contacts"] = request.contactsShrink;
|
|
694
769
|
}
|
|
695
|
-
if (!tea_util_1.default.isUnset(request.
|
|
696
|
-
|
|
770
|
+
if (!tea_util_1.default.isUnset(request.custWabaId)) {
|
|
771
|
+
body["CustWabaId"] = request.custWabaId;
|
|
697
772
|
}
|
|
698
|
-
if (!tea_util_1.default.isUnset(request.
|
|
699
|
-
|
|
773
|
+
if (!tea_util_1.default.isUnset(request.from)) {
|
|
774
|
+
body["From"] = request.from;
|
|
700
775
|
}
|
|
701
776
|
let req = new $OpenApi.OpenApiRequest({
|
|
702
|
-
|
|
777
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
703
778
|
});
|
|
704
779
|
let params = new $OpenApi.Params({
|
|
705
780
|
action: "CheckChatappContacts",
|
|
@@ -718,81 +793,40 @@ class Client extends openapi_client_1.default {
|
|
|
718
793
|
let runtime = new $Util.RuntimeOptions({});
|
|
719
794
|
return await this.checkChatappContactsWithOptions(request, runtime);
|
|
720
795
|
}
|
|
721
|
-
async
|
|
722
|
-
tea_util_1.default.validateModel(
|
|
723
|
-
let
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
|
|
728
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
796
|
+
async createChatappTemplateWithOptions(tmpReq, runtime) {
|
|
797
|
+
tea_util_1.default.validateModel(tmpReq);
|
|
798
|
+
let request = new CreateChatappTemplateShrinkRequest({});
|
|
799
|
+
openapi_util_1.default.convert(tmpReq, request);
|
|
800
|
+
if (!tea_util_1.default.isUnset(tmpReq.components)) {
|
|
801
|
+
request.componentsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.components, "Components", "json");
|
|
729
802
|
}
|
|
730
|
-
if (!tea_util_1.default.isUnset(
|
|
731
|
-
|
|
803
|
+
if (!tea_util_1.default.isUnset(tmpReq.example)) {
|
|
804
|
+
request.exampleShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.example, "Example", "json");
|
|
732
805
|
}
|
|
733
806
|
let body = {};
|
|
734
|
-
if (!tea_util_1.default.isUnset(request.channelType)) {
|
|
735
|
-
body["ChannelType"] = request.channelType;
|
|
736
|
-
}
|
|
737
|
-
if (!tea_util_1.default.isUnset(request.contacts)) {
|
|
738
|
-
body["Contacts"] = request.contacts;
|
|
739
|
-
}
|
|
740
|
-
if (!tea_util_1.default.isUnset(request.from)) {
|
|
741
|
-
body["From"] = request.from;
|
|
742
|
-
}
|
|
743
|
-
let req = new $OpenApi.OpenApiRequest({
|
|
744
|
-
query: openapi_util_1.default.query(query),
|
|
745
|
-
body: openapi_util_1.default.parseToMap(body),
|
|
746
|
-
});
|
|
747
|
-
let params = new $OpenApi.Params({
|
|
748
|
-
action: "CheckContacts",
|
|
749
|
-
version: "2020-06-06",
|
|
750
|
-
protocol: "HTTPS",
|
|
751
|
-
pathname: "/",
|
|
752
|
-
method: "POST",
|
|
753
|
-
authType: "AK",
|
|
754
|
-
style: "RPC",
|
|
755
|
-
reqBodyType: "formData",
|
|
756
|
-
bodyType: "json",
|
|
757
|
-
});
|
|
758
|
-
return $tea.cast(await this.callApi(params, req, runtime), new CheckContactsResponse({}));
|
|
759
|
-
}
|
|
760
|
-
async checkContacts(request) {
|
|
761
|
-
let runtime = new $Util.RuntimeOptions({});
|
|
762
|
-
return await this.checkContactsWithOptions(request, runtime);
|
|
763
|
-
}
|
|
764
|
-
async createChatappTemplateWithOptions(request, runtime) {
|
|
765
|
-
tea_util_1.default.validateModel(request);
|
|
766
|
-
let query = {};
|
|
767
807
|
if (!tea_util_1.default.isUnset(request.category)) {
|
|
768
|
-
|
|
808
|
+
body["Category"] = request.category;
|
|
809
|
+
}
|
|
810
|
+
if (!tea_util_1.default.isUnset(request.componentsShrink)) {
|
|
811
|
+
body["Components"] = request.componentsShrink;
|
|
769
812
|
}
|
|
770
|
-
if (!tea_util_1.default.isUnset(request.
|
|
771
|
-
|
|
813
|
+
if (!tea_util_1.default.isUnset(request.custWabaId)) {
|
|
814
|
+
body["CustWabaId"] = request.custWabaId;
|
|
772
815
|
}
|
|
773
|
-
if (!tea_util_1.default.isUnset(request.
|
|
774
|
-
|
|
816
|
+
if (!tea_util_1.default.isUnset(request.exampleShrink)) {
|
|
817
|
+
body["Example"] = request.exampleShrink;
|
|
775
818
|
}
|
|
776
819
|
if (!tea_util_1.default.isUnset(request.language)) {
|
|
777
|
-
|
|
820
|
+
body["Language"] = request.language;
|
|
778
821
|
}
|
|
779
822
|
if (!tea_util_1.default.isUnset(request.name)) {
|
|
780
|
-
|
|
781
|
-
}
|
|
782
|
-
if (!tea_util_1.default.isUnset(request.ownerId)) {
|
|
783
|
-
query["OwnerId"] = request.ownerId;
|
|
784
|
-
}
|
|
785
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
|
|
786
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
787
|
-
}
|
|
788
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
|
|
789
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
823
|
+
body["Name"] = request.name;
|
|
790
824
|
}
|
|
791
825
|
if (!tea_util_1.default.isUnset(request.templateType)) {
|
|
792
|
-
|
|
826
|
+
body["TemplateType"] = request.templateType;
|
|
793
827
|
}
|
|
794
828
|
let req = new $OpenApi.OpenApiRequest({
|
|
795
|
-
|
|
829
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
796
830
|
});
|
|
797
831
|
let params = new $OpenApi.Params({
|
|
798
832
|
action: "CreateChatappTemplate",
|
|
@@ -814,14 +848,8 @@ class Client extends openapi_client_1.default {
|
|
|
814
848
|
async deleteChatappTemplateWithOptions(request, runtime) {
|
|
815
849
|
tea_util_1.default.validateModel(request);
|
|
816
850
|
let query = {};
|
|
817
|
-
if (!tea_util_1.default.isUnset(request.
|
|
818
|
-
query["
|
|
819
|
-
}
|
|
820
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
|
|
821
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
822
|
-
}
|
|
823
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
|
|
824
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
851
|
+
if (!tea_util_1.default.isUnset(request.custWabaId)) {
|
|
852
|
+
query["CustWabaId"] = request.custWabaId;
|
|
825
853
|
}
|
|
826
854
|
if (!tea_util_1.default.isUnset(request.templateCode)) {
|
|
827
855
|
query["TemplateCode"] = request.templateCode;
|
|
@@ -849,18 +877,12 @@ class Client extends openapi_client_1.default {
|
|
|
849
877
|
async getChatappTemplateDetailWithOptions(request, runtime) {
|
|
850
878
|
tea_util_1.default.validateModel(request);
|
|
851
879
|
let query = {};
|
|
880
|
+
if (!tea_util_1.default.isUnset(request.custWabaId)) {
|
|
881
|
+
query["CustWabaId"] = request.custWabaId;
|
|
882
|
+
}
|
|
852
883
|
if (!tea_util_1.default.isUnset(request.language)) {
|
|
853
884
|
query["Language"] = request.language;
|
|
854
885
|
}
|
|
855
|
-
if (!tea_util_1.default.isUnset(request.ownerId)) {
|
|
856
|
-
query["OwnerId"] = request.ownerId;
|
|
857
|
-
}
|
|
858
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
|
|
859
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
860
|
-
}
|
|
861
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
|
|
862
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
863
|
-
}
|
|
864
886
|
if (!tea_util_1.default.isUnset(request.templateCode)) {
|
|
865
887
|
query["TemplateCode"] = request.templateCode;
|
|
866
888
|
}
|
|
@@ -884,29 +906,28 @@ class Client extends openapi_client_1.default {
|
|
|
884
906
|
let runtime = new $Util.RuntimeOptions({});
|
|
885
907
|
return await this.getChatappTemplateDetailWithOptions(request, runtime);
|
|
886
908
|
}
|
|
887
|
-
async listChatappTemplateWithOptions(
|
|
888
|
-
tea_util_1.default.validateModel(
|
|
909
|
+
async listChatappTemplateWithOptions(tmpReq, runtime) {
|
|
910
|
+
tea_util_1.default.validateModel(tmpReq);
|
|
911
|
+
let request = new ListChatappTemplateShrinkRequest({});
|
|
912
|
+
openapi_util_1.default.convert(tmpReq, request);
|
|
913
|
+
if (!tea_util_1.default.isUnset($tea.toMap(tmpReq.page))) {
|
|
914
|
+
request.pageShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle($tea.toMap(tmpReq.page), "Page", "json");
|
|
915
|
+
}
|
|
889
916
|
let query = {};
|
|
890
917
|
if (!tea_util_1.default.isUnset(request.auditStatus)) {
|
|
891
918
|
query["AuditStatus"] = request.auditStatus;
|
|
892
919
|
}
|
|
920
|
+
if (!tea_util_1.default.isUnset(request.custWabaId)) {
|
|
921
|
+
query["CustWabaId"] = request.custWabaId;
|
|
922
|
+
}
|
|
893
923
|
if (!tea_util_1.default.isUnset(request.language)) {
|
|
894
924
|
query["Language"] = request.language;
|
|
895
925
|
}
|
|
896
926
|
if (!tea_util_1.default.isUnset(request.name)) {
|
|
897
927
|
query["Name"] = request.name;
|
|
898
928
|
}
|
|
899
|
-
if (!tea_util_1.default.isUnset(request.
|
|
900
|
-
query["
|
|
901
|
-
}
|
|
902
|
-
if (!tea_util_1.default.isUnset(request.page)) {
|
|
903
|
-
query["Page"] = request.page;
|
|
904
|
-
}
|
|
905
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
|
|
906
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
907
|
-
}
|
|
908
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
|
|
909
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
929
|
+
if (!tea_util_1.default.isUnset(request.pageShrink)) {
|
|
930
|
+
query["Page"] = request.pageShrink;
|
|
910
931
|
}
|
|
911
932
|
let req = new $OpenApi.OpenApiRequest({
|
|
912
933
|
query: openapi_util_1.default.query(query),
|
|
@@ -928,113 +949,44 @@ class Client extends openapi_client_1.default {
|
|
|
928
949
|
let runtime = new $Util.RuntimeOptions({});
|
|
929
950
|
return await this.listChatappTemplateWithOptions(request, runtime);
|
|
930
951
|
}
|
|
931
|
-
async sendChatappMessageWithOptions(
|
|
932
|
-
tea_util_1.default.validateModel(
|
|
933
|
-
let
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
if (!tea_util_1.default.isUnset(request.content)) {
|
|
938
|
-
query["Content"] = request.content;
|
|
939
|
-
}
|
|
940
|
-
if (!tea_util_1.default.isUnset(request.from)) {
|
|
941
|
-
query["From"] = request.from;
|
|
942
|
-
}
|
|
943
|
-
if (!tea_util_1.default.isUnset(request.language)) {
|
|
944
|
-
query["Language"] = request.language;
|
|
945
|
-
}
|
|
946
|
-
if (!tea_util_1.default.isUnset(request.messageType)) {
|
|
947
|
-
query["MessageType"] = request.messageType;
|
|
948
|
-
}
|
|
949
|
-
if (!tea_util_1.default.isUnset(request.ownerId)) {
|
|
950
|
-
query["OwnerId"] = request.ownerId;
|
|
951
|
-
}
|
|
952
|
-
if (!tea_util_1.default.isUnset(request.payload)) {
|
|
953
|
-
query["Payload"] = request.payload;
|
|
952
|
+
async sendChatappMessageWithOptions(tmpReq, runtime) {
|
|
953
|
+
tea_util_1.default.validateModel(tmpReq);
|
|
954
|
+
let request = new SendChatappMessageShrinkRequest({});
|
|
955
|
+
openapi_util_1.default.convert(tmpReq, request);
|
|
956
|
+
if (!tea_util_1.default.isUnset(tmpReq.payload)) {
|
|
957
|
+
request.payloadShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.payload, "Payload", "json");
|
|
954
958
|
}
|
|
955
|
-
if (!tea_util_1.default.isUnset(
|
|
956
|
-
|
|
959
|
+
if (!tea_util_1.default.isUnset(tmpReq.templateParams)) {
|
|
960
|
+
request.templateParamsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.templateParams, "TemplateParams", "json");
|
|
957
961
|
}
|
|
958
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerId)) {
|
|
959
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
960
|
-
}
|
|
961
|
-
if (!tea_util_1.default.isUnset(request.templateCode)) {
|
|
962
|
-
query["TemplateCode"] = request.templateCode;
|
|
963
|
-
}
|
|
964
|
-
if (!tea_util_1.default.isUnset(request.templateParams)) {
|
|
965
|
-
query["TemplateParams"] = request.templateParams;
|
|
966
|
-
}
|
|
967
|
-
if (!tea_util_1.default.isUnset(request.to)) {
|
|
968
|
-
query["To"] = request.to;
|
|
969
|
-
}
|
|
970
|
-
if (!tea_util_1.default.isUnset(request.type)) {
|
|
971
|
-
query["Type"] = request.type;
|
|
972
|
-
}
|
|
973
|
-
let req = new $OpenApi.OpenApiRequest({
|
|
974
|
-
query: openapi_util_1.default.query(query),
|
|
975
|
-
});
|
|
976
|
-
let params = new $OpenApi.Params({
|
|
977
|
-
action: "SendChatappMessage",
|
|
978
|
-
version: "2020-06-06",
|
|
979
|
-
protocol: "HTTPS",
|
|
980
|
-
pathname: "/",
|
|
981
|
-
method: "POST",
|
|
982
|
-
authType: "AK",
|
|
983
|
-
style: "RPC",
|
|
984
|
-
reqBodyType: "formData",
|
|
985
|
-
bodyType: "json",
|
|
986
|
-
});
|
|
987
|
-
return $tea.cast(await this.callApi(params, req, runtime), new SendChatappMessageResponse({}));
|
|
988
|
-
}
|
|
989
|
-
async sendChatappMessage(request) {
|
|
990
|
-
let runtime = new $Util.RuntimeOptions({});
|
|
991
|
-
return await this.sendChatappMessageWithOptions(request, runtime);
|
|
992
|
-
}
|
|
993
|
-
async sendMessageWithOptions(request, runtime) {
|
|
994
|
-
tea_util_1.default.validateModel(request);
|
|
995
962
|
let query = {};
|
|
996
|
-
if (!tea_util_1.default.isUnset(request.
|
|
997
|
-
query["
|
|
998
|
-
}
|
|
999
|
-
if (!tea_util_1.default.isUnset(request.resourceOwnerAccount)) {
|
|
1000
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
963
|
+
if (!tea_util_1.default.isUnset(request.content)) {
|
|
964
|
+
query["Content"] = request.content;
|
|
1001
965
|
}
|
|
1002
|
-
if (!tea_util_1.default.isUnset(request.
|
|
1003
|
-
query["
|
|
966
|
+
if (!tea_util_1.default.isUnset(request.payloadShrink)) {
|
|
967
|
+
query["Payload"] = request.payloadShrink;
|
|
1004
968
|
}
|
|
1005
969
|
let body = {};
|
|
1006
|
-
if (!tea_util_1.default.isUnset(request.caption)) {
|
|
1007
|
-
body["Caption"] = request.caption;
|
|
1008
|
-
}
|
|
1009
970
|
if (!tea_util_1.default.isUnset(request.channelType)) {
|
|
1010
971
|
body["ChannelType"] = request.channelType;
|
|
1011
972
|
}
|
|
1012
|
-
if (!tea_util_1.default.isUnset(request.
|
|
1013
|
-
body["
|
|
973
|
+
if (!tea_util_1.default.isUnset(request.custWabaId)) {
|
|
974
|
+
body["CustWabaId"] = request.custWabaId;
|
|
1014
975
|
}
|
|
1015
976
|
if (!tea_util_1.default.isUnset(request.from)) {
|
|
1016
977
|
body["From"] = request.from;
|
|
1017
978
|
}
|
|
1018
|
-
if (!tea_util_1.default.isUnset(request.
|
|
1019
|
-
body["
|
|
979
|
+
if (!tea_util_1.default.isUnset(request.language)) {
|
|
980
|
+
body["Language"] = request.language;
|
|
1020
981
|
}
|
|
1021
982
|
if (!tea_util_1.default.isUnset(request.messageType)) {
|
|
1022
983
|
body["MessageType"] = request.messageType;
|
|
1023
984
|
}
|
|
1024
|
-
if (!tea_util_1.default.isUnset(request.templateBodyParams)) {
|
|
1025
|
-
body["TemplateBodyParams"] = request.templateBodyParams;
|
|
1026
|
-
}
|
|
1027
|
-
if (!tea_util_1.default.isUnset(request.templateButtonParams)) {
|
|
1028
|
-
body["TemplateButtonParams"] = request.templateButtonParams;
|
|
1029
|
-
}
|
|
1030
985
|
if (!tea_util_1.default.isUnset(request.templateCode)) {
|
|
1031
986
|
body["TemplateCode"] = request.templateCode;
|
|
1032
987
|
}
|
|
1033
|
-
if (!tea_util_1.default.isUnset(request.
|
|
1034
|
-
body["
|
|
1035
|
-
}
|
|
1036
|
-
if (!tea_util_1.default.isUnset(request.text)) {
|
|
1037
|
-
body["Text"] = request.text;
|
|
988
|
+
if (!tea_util_1.default.isUnset(request.templateParamsShrink)) {
|
|
989
|
+
body["TemplateParams"] = request.templateParamsShrink;
|
|
1038
990
|
}
|
|
1039
991
|
if (!tea_util_1.default.isUnset(request.to)) {
|
|
1040
992
|
body["To"] = request.to;
|
|
@@ -1047,7 +999,7 @@ class Client extends openapi_client_1.default {
|
|
|
1047
999
|
body: openapi_util_1.default.parseToMap(body),
|
|
1048
1000
|
});
|
|
1049
1001
|
let params = new $OpenApi.Params({
|
|
1050
|
-
action: "
|
|
1002
|
+
action: "SendChatappMessage",
|
|
1051
1003
|
version: "2020-06-06",
|
|
1052
1004
|
protocol: "HTTPS",
|
|
1053
1005
|
pathname: "/",
|
|
@@ -1057,11 +1009,11 @@ class Client extends openapi_client_1.default {
|
|
|
1057
1009
|
reqBodyType: "formData",
|
|
1058
1010
|
bodyType: "json",
|
|
1059
1011
|
});
|
|
1060
|
-
return $tea.cast(await this.callApi(params, req, runtime), new
|
|
1012
|
+
return $tea.cast(await this.callApi(params, req, runtime), new SendChatappMessageResponse({}));
|
|
1061
1013
|
}
|
|
1062
|
-
async
|
|
1014
|
+
async sendChatappMessage(request) {
|
|
1063
1015
|
let runtime = new $Util.RuntimeOptions({});
|
|
1064
|
-
return await this.
|
|
1016
|
+
return await this.sendChatappMessageWithOptions(request, runtime);
|
|
1065
1017
|
}
|
|
1066
1018
|
}
|
|
1067
1019
|
exports.default = Client;
|