@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/src/client.ts
CHANGED
|
@@ -10,30 +10,52 @@ import * as $tea from '@alicloud/tea-typescript';
|
|
|
10
10
|
|
|
11
11
|
export class CheckChatappContactsRequest extends $tea.Model {
|
|
12
12
|
channelType?: string;
|
|
13
|
-
contacts?: string;
|
|
13
|
+
contacts?: string[];
|
|
14
|
+
custWabaId?: string;
|
|
14
15
|
from?: string;
|
|
15
|
-
ownerId?: number;
|
|
16
|
-
resourceOwnerAccount?: string;
|
|
17
|
-
resourceOwnerId?: number;
|
|
18
16
|
static names(): { [key: string]: string } {
|
|
19
17
|
return {
|
|
20
18
|
channelType: 'ChannelType',
|
|
21
19
|
contacts: 'Contacts',
|
|
20
|
+
custWabaId: 'CustWabaId',
|
|
22
21
|
from: 'From',
|
|
23
|
-
ownerId: 'OwnerId',
|
|
24
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
25
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
26
22
|
};
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
static types(): { [key: string]: any } {
|
|
30
26
|
return {
|
|
31
27
|
channelType: 'string',
|
|
32
|
-
contacts: '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',
|
|
33
58
|
from: 'string',
|
|
34
|
-
ownerId: 'number',
|
|
35
|
-
resourceOwnerAccount: 'string',
|
|
36
|
-
resourceOwnerId: 'number',
|
|
37
59
|
};
|
|
38
60
|
}
|
|
39
61
|
|
|
@@ -72,10 +94,12 @@ export class CheckChatappContactsResponseBody extends $tea.Model {
|
|
|
72
94
|
|
|
73
95
|
export class CheckChatappContactsResponse extends $tea.Model {
|
|
74
96
|
headers: { [key: string]: string };
|
|
97
|
+
statusCode: number;
|
|
75
98
|
body: CheckChatappContactsResponseBody;
|
|
76
99
|
static names(): { [key: string]: string } {
|
|
77
100
|
return {
|
|
78
101
|
headers: 'headers',
|
|
102
|
+
statusCode: 'statusCode',
|
|
79
103
|
body: 'body',
|
|
80
104
|
};
|
|
81
105
|
}
|
|
@@ -83,6 +107,7 @@ export class CheckChatappContactsResponse extends $tea.Model {
|
|
|
83
107
|
static types(): { [key: string]: any } {
|
|
84
108
|
return {
|
|
85
109
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
110
|
+
statusCode: 'number',
|
|
86
111
|
body: CheckChatappContactsResponseBody,
|
|
87
112
|
};
|
|
88
113
|
}
|
|
@@ -92,82 +117,35 @@ export class CheckChatappContactsResponse extends $tea.Model {
|
|
|
92
117
|
}
|
|
93
118
|
}
|
|
94
119
|
|
|
95
|
-
export class
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return {
|
|
104
|
-
channelType: 'ChannelType',
|
|
105
|
-
contacts: 'Contacts',
|
|
106
|
-
from: 'From',
|
|
107
|
-
ownerId: 'OwnerId',
|
|
108
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
109
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
static types(): { [key: string]: any } {
|
|
114
|
-
return {
|
|
115
|
-
channelType: 'string',
|
|
116
|
-
contacts: 'string',
|
|
117
|
-
from: 'string',
|
|
118
|
-
ownerId: 'number',
|
|
119
|
-
resourceOwnerAccount: 'string',
|
|
120
|
-
resourceOwnerId: 'number',
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
constructor(map?: { [key: string]: any }) {
|
|
125
|
-
super(map);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export class CheckContactsResponseBody extends $tea.Model {
|
|
130
|
-
contacts?: CheckContactsResponseBodyContacts[];
|
|
131
|
-
requestId?: string;
|
|
132
|
-
resultCode?: string;
|
|
133
|
-
resultMessage?: string;
|
|
134
|
-
static names(): { [key: string]: string } {
|
|
135
|
-
return {
|
|
136
|
-
contacts: 'Contacts',
|
|
137
|
-
requestId: 'RequestId',
|
|
138
|
-
resultCode: 'ResultCode',
|
|
139
|
-
resultMessage: 'ResultMessage',
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
static types(): { [key: string]: any } {
|
|
144
|
-
return {
|
|
145
|
-
contacts: { 'type': 'array', 'itemType': CheckContactsResponseBodyContacts },
|
|
146
|
-
requestId: 'string',
|
|
147
|
-
resultCode: 'string',
|
|
148
|
-
resultMessage: 'string',
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
constructor(map?: { [key: string]: any }) {
|
|
153
|
-
super(map);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export class CheckContactsResponse extends $tea.Model {
|
|
158
|
-
headers: { [key: string]: string };
|
|
159
|
-
body: CheckContactsResponseBody;
|
|
120
|
+
export class CreateChatappTemplateRequest extends $tea.Model {
|
|
121
|
+
category?: string;
|
|
122
|
+
components?: CreateChatappTemplateRequestComponents[];
|
|
123
|
+
custWabaId?: string;
|
|
124
|
+
example?: { [key: string]: string };
|
|
125
|
+
language?: string;
|
|
126
|
+
name?: string;
|
|
127
|
+
templateType?: string;
|
|
160
128
|
static names(): { [key: string]: string } {
|
|
161
129
|
return {
|
|
162
|
-
|
|
163
|
-
|
|
130
|
+
category: 'Category',
|
|
131
|
+
components: 'Components',
|
|
132
|
+
custWabaId: 'CustWabaId',
|
|
133
|
+
example: 'Example',
|
|
134
|
+
language: 'Language',
|
|
135
|
+
name: 'Name',
|
|
136
|
+
templateType: 'TemplateType',
|
|
164
137
|
};
|
|
165
138
|
}
|
|
166
139
|
|
|
167
140
|
static types(): { [key: string]: any } {
|
|
168
141
|
return {
|
|
169
|
-
|
|
170
|
-
|
|
142
|
+
category: 'string',
|
|
143
|
+
components: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponents },
|
|
144
|
+
custWabaId: 'string',
|
|
145
|
+
example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
146
|
+
language: 'string',
|
|
147
|
+
name: 'string',
|
|
148
|
+
templateType: 'string',
|
|
171
149
|
};
|
|
172
150
|
}
|
|
173
151
|
|
|
@@ -176,26 +154,22 @@ export class CheckContactsResponse extends $tea.Model {
|
|
|
176
154
|
}
|
|
177
155
|
}
|
|
178
156
|
|
|
179
|
-
export class
|
|
157
|
+
export class CreateChatappTemplateShrinkRequest extends $tea.Model {
|
|
180
158
|
category?: string;
|
|
181
|
-
|
|
182
|
-
|
|
159
|
+
componentsShrink?: string;
|
|
160
|
+
custWabaId?: string;
|
|
161
|
+
exampleShrink?: string;
|
|
183
162
|
language?: string;
|
|
184
163
|
name?: string;
|
|
185
|
-
ownerId?: number;
|
|
186
|
-
resourceOwnerAccount?: string;
|
|
187
|
-
resourceOwnerId?: number;
|
|
188
164
|
templateType?: string;
|
|
189
165
|
static names(): { [key: string]: string } {
|
|
190
166
|
return {
|
|
191
167
|
category: 'Category',
|
|
192
|
-
|
|
193
|
-
|
|
168
|
+
componentsShrink: 'Components',
|
|
169
|
+
custWabaId: 'CustWabaId',
|
|
170
|
+
exampleShrink: 'Example',
|
|
194
171
|
language: 'Language',
|
|
195
172
|
name: 'Name',
|
|
196
|
-
ownerId: 'OwnerId',
|
|
197
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
198
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
199
173
|
templateType: 'TemplateType',
|
|
200
174
|
};
|
|
201
175
|
}
|
|
@@ -203,13 +177,11 @@ export class CreateChatappTemplateRequest extends $tea.Model {
|
|
|
203
177
|
static types(): { [key: string]: any } {
|
|
204
178
|
return {
|
|
205
179
|
category: 'string',
|
|
206
|
-
|
|
207
|
-
|
|
180
|
+
componentsShrink: 'string',
|
|
181
|
+
custWabaId: 'string',
|
|
182
|
+
exampleShrink: 'string',
|
|
208
183
|
language: 'string',
|
|
209
184
|
name: 'string',
|
|
210
|
-
ownerId: 'number',
|
|
211
|
-
resourceOwnerAccount: 'string',
|
|
212
|
-
resourceOwnerId: 'number',
|
|
213
185
|
templateType: 'string',
|
|
214
186
|
};
|
|
215
187
|
}
|
|
@@ -221,7 +193,7 @@ export class CreateChatappTemplateRequest extends $tea.Model {
|
|
|
221
193
|
|
|
222
194
|
export class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
223
195
|
code?: string;
|
|
224
|
-
data?:
|
|
196
|
+
data?: CreateChatappTemplateResponseBodyData;
|
|
225
197
|
message?: string;
|
|
226
198
|
requestId?: string;
|
|
227
199
|
static names(): { [key: string]: string } {
|
|
@@ -236,7 +208,7 @@ export class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
|
236
208
|
static types(): { [key: string]: any } {
|
|
237
209
|
return {
|
|
238
210
|
code: 'string',
|
|
239
|
-
data:
|
|
211
|
+
data: CreateChatappTemplateResponseBodyData,
|
|
240
212
|
message: 'string',
|
|
241
213
|
requestId: 'string',
|
|
242
214
|
};
|
|
@@ -249,10 +221,12 @@ export class CreateChatappTemplateResponseBody extends $tea.Model {
|
|
|
249
221
|
|
|
250
222
|
export class CreateChatappTemplateResponse extends $tea.Model {
|
|
251
223
|
headers: { [key: string]: string };
|
|
224
|
+
statusCode: number;
|
|
252
225
|
body: CreateChatappTemplateResponseBody;
|
|
253
226
|
static names(): { [key: string]: string } {
|
|
254
227
|
return {
|
|
255
228
|
headers: 'headers',
|
|
229
|
+
statusCode: 'statusCode',
|
|
256
230
|
body: 'body',
|
|
257
231
|
};
|
|
258
232
|
}
|
|
@@ -260,6 +234,7 @@ export class CreateChatappTemplateResponse extends $tea.Model {
|
|
|
260
234
|
static types(): { [key: string]: any } {
|
|
261
235
|
return {
|
|
262
236
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
237
|
+
statusCode: 'number',
|
|
263
238
|
body: CreateChatappTemplateResponseBody,
|
|
264
239
|
};
|
|
265
240
|
}
|
|
@@ -270,24 +245,18 @@ export class CreateChatappTemplateResponse extends $tea.Model {
|
|
|
270
245
|
}
|
|
271
246
|
|
|
272
247
|
export class DeleteChatappTemplateRequest extends $tea.Model {
|
|
273
|
-
|
|
274
|
-
resourceOwnerAccount?: string;
|
|
275
|
-
resourceOwnerId?: number;
|
|
248
|
+
custWabaId?: string;
|
|
276
249
|
templateCode?: string;
|
|
277
250
|
static names(): { [key: string]: string } {
|
|
278
251
|
return {
|
|
279
|
-
|
|
280
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
281
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
252
|
+
custWabaId: 'CustWabaId',
|
|
282
253
|
templateCode: 'TemplateCode',
|
|
283
254
|
};
|
|
284
255
|
}
|
|
285
256
|
|
|
286
257
|
static types(): { [key: string]: any } {
|
|
287
258
|
return {
|
|
288
|
-
|
|
289
|
-
resourceOwnerAccount: 'string',
|
|
290
|
-
resourceOwnerId: 'number',
|
|
259
|
+
custWabaId: 'string',
|
|
291
260
|
templateCode: 'string',
|
|
292
261
|
};
|
|
293
262
|
}
|
|
@@ -324,10 +293,12 @@ export class DeleteChatappTemplateResponseBody extends $tea.Model {
|
|
|
324
293
|
|
|
325
294
|
export class DeleteChatappTemplateResponse extends $tea.Model {
|
|
326
295
|
headers: { [key: string]: string };
|
|
296
|
+
statusCode: number;
|
|
327
297
|
body: DeleteChatappTemplateResponseBody;
|
|
328
298
|
static names(): { [key: string]: string } {
|
|
329
299
|
return {
|
|
330
300
|
headers: 'headers',
|
|
301
|
+
statusCode: 'statusCode',
|
|
331
302
|
body: 'body',
|
|
332
303
|
};
|
|
333
304
|
}
|
|
@@ -335,6 +306,7 @@ export class DeleteChatappTemplateResponse extends $tea.Model {
|
|
|
335
306
|
static types(): { [key: string]: any } {
|
|
336
307
|
return {
|
|
337
308
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
309
|
+
statusCode: 'number',
|
|
338
310
|
body: DeleteChatappTemplateResponseBody,
|
|
339
311
|
};
|
|
340
312
|
}
|
|
@@ -345,27 +317,21 @@ export class DeleteChatappTemplateResponse extends $tea.Model {
|
|
|
345
317
|
}
|
|
346
318
|
|
|
347
319
|
export class GetChatappTemplateDetailRequest extends $tea.Model {
|
|
320
|
+
custWabaId?: string;
|
|
348
321
|
language?: string;
|
|
349
|
-
ownerId?: number;
|
|
350
|
-
resourceOwnerAccount?: string;
|
|
351
|
-
resourceOwnerId?: number;
|
|
352
322
|
templateCode?: string;
|
|
353
323
|
static names(): { [key: string]: string } {
|
|
354
324
|
return {
|
|
325
|
+
custWabaId: 'CustWabaId',
|
|
355
326
|
language: 'Language',
|
|
356
|
-
ownerId: 'OwnerId',
|
|
357
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
358
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
359
327
|
templateCode: 'TemplateCode',
|
|
360
328
|
};
|
|
361
329
|
}
|
|
362
330
|
|
|
363
331
|
static types(): { [key: string]: any } {
|
|
364
332
|
return {
|
|
333
|
+
custWabaId: 'string',
|
|
365
334
|
language: 'string',
|
|
366
|
-
ownerId: 'number',
|
|
367
|
-
resourceOwnerAccount: 'string',
|
|
368
|
-
resourceOwnerId: 'number',
|
|
369
335
|
templateCode: 'string',
|
|
370
336
|
};
|
|
371
337
|
}
|
|
@@ -377,7 +343,7 @@ export class GetChatappTemplateDetailRequest extends $tea.Model {
|
|
|
377
343
|
|
|
378
344
|
export class GetChatappTemplateDetailResponseBody extends $tea.Model {
|
|
379
345
|
code?: string;
|
|
380
|
-
data?:
|
|
346
|
+
data?: GetChatappTemplateDetailResponseBodyData;
|
|
381
347
|
message?: string;
|
|
382
348
|
requestId?: string;
|
|
383
349
|
static names(): { [key: string]: string } {
|
|
@@ -392,7 +358,7 @@ export class GetChatappTemplateDetailResponseBody extends $tea.Model {
|
|
|
392
358
|
static types(): { [key: string]: any } {
|
|
393
359
|
return {
|
|
394
360
|
code: 'string',
|
|
395
|
-
data:
|
|
361
|
+
data: GetChatappTemplateDetailResponseBodyData,
|
|
396
362
|
message: 'string',
|
|
397
363
|
requestId: 'string',
|
|
398
364
|
};
|
|
@@ -405,10 +371,12 @@ export class GetChatappTemplateDetailResponseBody extends $tea.Model {
|
|
|
405
371
|
|
|
406
372
|
export class GetChatappTemplateDetailResponse extends $tea.Model {
|
|
407
373
|
headers: { [key: string]: string };
|
|
374
|
+
statusCode: number;
|
|
408
375
|
body: GetChatappTemplateDetailResponseBody;
|
|
409
376
|
static names(): { [key: string]: string } {
|
|
410
377
|
return {
|
|
411
378
|
headers: 'headers',
|
|
379
|
+
statusCode: 'statusCode',
|
|
412
380
|
body: 'body',
|
|
413
381
|
};
|
|
414
382
|
}
|
|
@@ -416,6 +384,7 @@ export class GetChatappTemplateDetailResponse extends $tea.Model {
|
|
|
416
384
|
static types(): { [key: string]: any } {
|
|
417
385
|
return {
|
|
418
386
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
387
|
+
statusCode: 'number',
|
|
419
388
|
body: GetChatappTemplateDetailResponseBody,
|
|
420
389
|
};
|
|
421
390
|
}
|
|
@@ -427,33 +396,58 @@ export class GetChatappTemplateDetailResponse extends $tea.Model {
|
|
|
427
396
|
|
|
428
397
|
export class ListChatappTemplateRequest extends $tea.Model {
|
|
429
398
|
auditStatus?: string;
|
|
399
|
+
custWabaId?: string;
|
|
430
400
|
language?: string;
|
|
431
401
|
name?: string;
|
|
432
|
-
|
|
433
|
-
page?: string;
|
|
434
|
-
resourceOwnerAccount?: string;
|
|
435
|
-
resourceOwnerId?: number;
|
|
402
|
+
page?: ListChatappTemplateRequestPage;
|
|
436
403
|
static names(): { [key: string]: string } {
|
|
437
404
|
return {
|
|
438
405
|
auditStatus: 'AuditStatus',
|
|
406
|
+
custWabaId: 'CustWabaId',
|
|
439
407
|
language: 'Language',
|
|
440
408
|
name: 'Name',
|
|
441
|
-
ownerId: 'OwnerId',
|
|
442
409
|
page: 'Page',
|
|
443
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
444
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
445
410
|
};
|
|
446
411
|
}
|
|
447
412
|
|
|
448
413
|
static types(): { [key: string]: any } {
|
|
449
414
|
return {
|
|
450
415
|
auditStatus: 'string',
|
|
416
|
+
custWabaId: 'string',
|
|
417
|
+
language: 'string',
|
|
418
|
+
name: 'string',
|
|
419
|
+
page: ListChatappTemplateRequestPage,
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
constructor(map?: { [key: string]: any }) {
|
|
424
|
+
super(map);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export class ListChatappTemplateShrinkRequest extends $tea.Model {
|
|
429
|
+
auditStatus?: string;
|
|
430
|
+
custWabaId?: string;
|
|
431
|
+
language?: string;
|
|
432
|
+
name?: string;
|
|
433
|
+
pageShrink?: string;
|
|
434
|
+
static names(): { [key: string]: string } {
|
|
435
|
+
return {
|
|
436
|
+
auditStatus: 'AuditStatus',
|
|
437
|
+
custWabaId: 'CustWabaId',
|
|
438
|
+
language: 'Language',
|
|
439
|
+
name: 'Name',
|
|
440
|
+
pageShrink: 'Page',
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
static types(): { [key: string]: any } {
|
|
445
|
+
return {
|
|
446
|
+
auditStatus: 'string',
|
|
447
|
+
custWabaId: 'string',
|
|
451
448
|
language: 'string',
|
|
452
449
|
name: 'string',
|
|
453
|
-
|
|
454
|
-
page: 'string',
|
|
455
|
-
resourceOwnerAccount: 'string',
|
|
456
|
-
resourceOwnerId: 'number',
|
|
450
|
+
pageShrink: 'string',
|
|
457
451
|
};
|
|
458
452
|
}
|
|
459
453
|
|
|
@@ -492,10 +486,12 @@ export class ListChatappTemplateResponseBody extends $tea.Model {
|
|
|
492
486
|
|
|
493
487
|
export class ListChatappTemplateResponse extends $tea.Model {
|
|
494
488
|
headers: { [key: string]: string };
|
|
489
|
+
statusCode: number;
|
|
495
490
|
body: ListChatappTemplateResponseBody;
|
|
496
491
|
static names(): { [key: string]: string } {
|
|
497
492
|
return {
|
|
498
493
|
headers: 'headers',
|
|
494
|
+
statusCode: 'statusCode',
|
|
499
495
|
body: 'body',
|
|
500
496
|
};
|
|
501
497
|
}
|
|
@@ -503,6 +499,7 @@ export class ListChatappTemplateResponse extends $tea.Model {
|
|
|
503
499
|
static types(): { [key: string]: any } {
|
|
504
500
|
return {
|
|
505
501
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
502
|
+
statusCode: 'number',
|
|
506
503
|
body: ListChatappTemplateResponseBody,
|
|
507
504
|
};
|
|
508
505
|
}
|
|
@@ -515,28 +512,24 @@ export class ListChatappTemplateResponse extends $tea.Model {
|
|
|
515
512
|
export class SendChatappMessageRequest extends $tea.Model {
|
|
516
513
|
channelType?: string;
|
|
517
514
|
content?: string;
|
|
515
|
+
custWabaId?: string;
|
|
518
516
|
from?: string;
|
|
519
517
|
language?: string;
|
|
520
518
|
messageType?: string;
|
|
521
|
-
|
|
522
|
-
payload?: string;
|
|
523
|
-
resourceOwnerAccount?: string;
|
|
524
|
-
resourceOwnerId?: number;
|
|
519
|
+
payload?: string[];
|
|
525
520
|
templateCode?: string;
|
|
526
|
-
templateParams?: string;
|
|
521
|
+
templateParams?: { [key: string]: string };
|
|
527
522
|
to?: string;
|
|
528
523
|
type?: string;
|
|
529
524
|
static names(): { [key: string]: string } {
|
|
530
525
|
return {
|
|
531
526
|
channelType: 'ChannelType',
|
|
532
527
|
content: 'Content',
|
|
528
|
+
custWabaId: 'CustWabaId',
|
|
533
529
|
from: 'From',
|
|
534
530
|
language: 'Language',
|
|
535
531
|
messageType: 'MessageType',
|
|
536
|
-
ownerId: 'OwnerId',
|
|
537
532
|
payload: 'Payload',
|
|
538
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
539
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
540
533
|
templateCode: 'TemplateCode',
|
|
541
534
|
templateParams: 'TemplateParams',
|
|
542
535
|
to: 'To',
|
|
@@ -548,15 +541,62 @@ export class SendChatappMessageRequest extends $tea.Model {
|
|
|
548
541
|
return {
|
|
549
542
|
channelType: 'string',
|
|
550
543
|
content: 'string',
|
|
544
|
+
custWabaId: 'string',
|
|
551
545
|
from: 'string',
|
|
552
546
|
language: 'string',
|
|
553
547
|
messageType: 'string',
|
|
554
|
-
|
|
555
|
-
payload: 'string',
|
|
556
|
-
resourceOwnerAccount: 'string',
|
|
557
|
-
resourceOwnerId: 'number',
|
|
548
|
+
payload: { 'type': 'array', 'itemType': 'string' },
|
|
558
549
|
templateCode: 'string',
|
|
559
|
-
templateParams: 'string',
|
|
550
|
+
templateParams: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
551
|
+
to: 'string',
|
|
552
|
+
type: 'string',
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
constructor(map?: { [key: string]: any }) {
|
|
557
|
+
super(map);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
export class SendChatappMessageShrinkRequest extends $tea.Model {
|
|
562
|
+
channelType?: string;
|
|
563
|
+
content?: string;
|
|
564
|
+
custWabaId?: string;
|
|
565
|
+
from?: string;
|
|
566
|
+
language?: string;
|
|
567
|
+
messageType?: string;
|
|
568
|
+
payloadShrink?: string;
|
|
569
|
+
templateCode?: string;
|
|
570
|
+
templateParamsShrink?: string;
|
|
571
|
+
to?: string;
|
|
572
|
+
type?: string;
|
|
573
|
+
static names(): { [key: string]: string } {
|
|
574
|
+
return {
|
|
575
|
+
channelType: 'ChannelType',
|
|
576
|
+
content: 'Content',
|
|
577
|
+
custWabaId: 'CustWabaId',
|
|
578
|
+
from: 'From',
|
|
579
|
+
language: 'Language',
|
|
580
|
+
messageType: 'MessageType',
|
|
581
|
+
payloadShrink: 'Payload',
|
|
582
|
+
templateCode: 'TemplateCode',
|
|
583
|
+
templateParamsShrink: 'TemplateParams',
|
|
584
|
+
to: 'To',
|
|
585
|
+
type: 'Type',
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
static types(): { [key: string]: any } {
|
|
590
|
+
return {
|
|
591
|
+
channelType: 'string',
|
|
592
|
+
content: 'string',
|
|
593
|
+
custWabaId: 'string',
|
|
594
|
+
from: 'string',
|
|
595
|
+
language: 'string',
|
|
596
|
+
messageType: 'string',
|
|
597
|
+
payloadShrink: 'string',
|
|
598
|
+
templateCode: 'string',
|
|
599
|
+
templateParamsShrink: 'string',
|
|
560
600
|
to: 'string',
|
|
561
601
|
type: 'string',
|
|
562
602
|
};
|
|
@@ -569,14 +609,14 @@ export class SendChatappMessageRequest extends $tea.Model {
|
|
|
569
609
|
|
|
570
610
|
export class SendChatappMessageResponseBody extends $tea.Model {
|
|
571
611
|
code?: string;
|
|
572
|
-
data?: string;
|
|
573
612
|
message?: string;
|
|
613
|
+
messageId?: string;
|
|
574
614
|
requestId?: string;
|
|
575
615
|
static names(): { [key: string]: string } {
|
|
576
616
|
return {
|
|
577
617
|
code: 'Code',
|
|
578
|
-
data: 'Data',
|
|
579
618
|
message: 'Message',
|
|
619
|
+
messageId: 'MessageId',
|
|
580
620
|
requestId: 'RequestId',
|
|
581
621
|
};
|
|
582
622
|
}
|
|
@@ -584,8 +624,8 @@ export class SendChatappMessageResponseBody extends $tea.Model {
|
|
|
584
624
|
static types(): { [key: string]: any } {
|
|
585
625
|
return {
|
|
586
626
|
code: 'string',
|
|
587
|
-
data: 'string',
|
|
588
627
|
message: 'string',
|
|
628
|
+
messageId: 'string',
|
|
589
629
|
requestId: 'string',
|
|
590
630
|
};
|
|
591
631
|
}
|
|
@@ -597,10 +637,12 @@ export class SendChatappMessageResponseBody extends $tea.Model {
|
|
|
597
637
|
|
|
598
638
|
export class SendChatappMessageResponse extends $tea.Model {
|
|
599
639
|
headers: { [key: string]: string };
|
|
640
|
+
statusCode: number;
|
|
600
641
|
body: SendChatappMessageResponseBody;
|
|
601
642
|
static names(): { [key: string]: string } {
|
|
602
643
|
return {
|
|
603
644
|
headers: 'headers',
|
|
645
|
+
statusCode: 'statusCode',
|
|
604
646
|
body: 'body',
|
|
605
647
|
};
|
|
606
648
|
}
|
|
@@ -608,6 +650,7 @@ export class SendChatappMessageResponse extends $tea.Model {
|
|
|
608
650
|
static types(): { [key: string]: any } {
|
|
609
651
|
return {
|
|
610
652
|
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
653
|
+
statusCode: 'number',
|
|
611
654
|
body: SendChatappMessageResponseBody,
|
|
612
655
|
};
|
|
613
656
|
}
|
|
@@ -617,62 +660,51 @@ export class SendChatappMessageResponse extends $tea.Model {
|
|
|
617
660
|
}
|
|
618
661
|
}
|
|
619
662
|
|
|
620
|
-
export class
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
663
|
+
export class CheckChatappContactsResponseBodyData extends $tea.Model {
|
|
664
|
+
phoneNumber?: string;
|
|
665
|
+
status?: string;
|
|
666
|
+
static names(): { [key: string]: string } {
|
|
667
|
+
return {
|
|
668
|
+
phoneNumber: 'PhoneNumber',
|
|
669
|
+
status: 'Status',
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
static types(): { [key: string]: any } {
|
|
674
|
+
return {
|
|
675
|
+
phoneNumber: 'string',
|
|
676
|
+
status: 'string',
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
constructor(map?: { [key: string]: any }) {
|
|
681
|
+
super(map);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export class CreateChatappTemplateRequestComponentsButtons extends $tea.Model {
|
|
686
|
+
phoneNumber?: string;
|
|
634
687
|
text?: string;
|
|
635
|
-
to?: string;
|
|
636
688
|
type?: string;
|
|
689
|
+
url?: string;
|
|
690
|
+
urlType?: string;
|
|
637
691
|
static names(): { [key: string]: string } {
|
|
638
692
|
return {
|
|
639
|
-
|
|
640
|
-
channelType: 'ChannelType',
|
|
641
|
-
fileName: 'FileName',
|
|
642
|
-
from: 'From',
|
|
643
|
-
link: 'Link',
|
|
644
|
-
messageType: 'MessageType',
|
|
645
|
-
ownerId: 'OwnerId',
|
|
646
|
-
resourceOwnerAccount: 'ResourceOwnerAccount',
|
|
647
|
-
resourceOwnerId: 'ResourceOwnerId',
|
|
648
|
-
templateBodyParams: 'TemplateBodyParams',
|
|
649
|
-
templateButtonParams: 'TemplateButtonParams',
|
|
650
|
-
templateCode: 'TemplateCode',
|
|
651
|
-
templateHeaderParams: 'TemplateHeaderParams',
|
|
693
|
+
phoneNumber: 'PhoneNumber',
|
|
652
694
|
text: 'Text',
|
|
653
|
-
to: 'To',
|
|
654
695
|
type: 'Type',
|
|
696
|
+
url: 'Url',
|
|
697
|
+
urlType: 'UrlType',
|
|
655
698
|
};
|
|
656
699
|
}
|
|
657
700
|
|
|
658
701
|
static types(): { [key: string]: any } {
|
|
659
702
|
return {
|
|
660
|
-
|
|
661
|
-
channelType: 'string',
|
|
662
|
-
fileName: 'string',
|
|
663
|
-
from: 'string',
|
|
664
|
-
link: 'string',
|
|
665
|
-
messageType: 'string',
|
|
666
|
-
ownerId: 'number',
|
|
667
|
-
resourceOwnerAccount: 'string',
|
|
668
|
-
resourceOwnerId: 'number',
|
|
669
|
-
templateBodyParams: 'string',
|
|
670
|
-
templateButtonParams: 'string',
|
|
671
|
-
templateCode: 'string',
|
|
672
|
-
templateHeaderParams: 'string',
|
|
703
|
+
phoneNumber: 'string',
|
|
673
704
|
text: 'string',
|
|
674
|
-
to: 'string',
|
|
675
705
|
type: 'string',
|
|
706
|
+
url: 'string',
|
|
707
|
+
urlType: 'string',
|
|
676
708
|
};
|
|
677
709
|
}
|
|
678
710
|
|
|
@@ -681,26 +713,35 @@ export class SendMessageRequest extends $tea.Model {
|
|
|
681
713
|
}
|
|
682
714
|
}
|
|
683
715
|
|
|
684
|
-
export class
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
716
|
+
export class CreateChatappTemplateRequestComponents extends $tea.Model {
|
|
717
|
+
buttons?: CreateChatappTemplateRequestComponentsButtons[];
|
|
718
|
+
caption?: string;
|
|
719
|
+
fileName?: string;
|
|
720
|
+
format?: string;
|
|
721
|
+
text?: string;
|
|
722
|
+
type?: string;
|
|
723
|
+
url?: string;
|
|
689
724
|
static names(): { [key: string]: string } {
|
|
690
725
|
return {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
726
|
+
buttons: 'Buttons',
|
|
727
|
+
caption: 'Caption',
|
|
728
|
+
fileName: 'FileName',
|
|
729
|
+
format: 'Format',
|
|
730
|
+
text: 'Text',
|
|
731
|
+
type: 'Type',
|
|
732
|
+
url: 'Url',
|
|
695
733
|
};
|
|
696
734
|
}
|
|
697
735
|
|
|
698
736
|
static types(): { [key: string]: any } {
|
|
699
737
|
return {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
738
|
+
buttons: { 'type': 'array', 'itemType': CreateChatappTemplateRequestComponentsButtons },
|
|
739
|
+
caption: 'string',
|
|
740
|
+
fileName: 'string',
|
|
741
|
+
format: 'string',
|
|
742
|
+
text: 'string',
|
|
743
|
+
type: 'string',
|
|
744
|
+
url: 'string',
|
|
704
745
|
};
|
|
705
746
|
}
|
|
706
747
|
|
|
@@ -709,20 +750,20 @@ export class SendMessageResponseBody extends $tea.Model {
|
|
|
709
750
|
}
|
|
710
751
|
}
|
|
711
752
|
|
|
712
|
-
export class
|
|
713
|
-
|
|
714
|
-
|
|
753
|
+
export class CreateChatappTemplateResponseBodyData extends $tea.Model {
|
|
754
|
+
templateCode?: string;
|
|
755
|
+
templateName?: string;
|
|
715
756
|
static names(): { [key: string]: string } {
|
|
716
757
|
return {
|
|
717
|
-
|
|
718
|
-
|
|
758
|
+
templateCode: 'TemplateCode',
|
|
759
|
+
templateName: 'TemplateName',
|
|
719
760
|
};
|
|
720
761
|
}
|
|
721
762
|
|
|
722
763
|
static types(): { [key: string]: any } {
|
|
723
764
|
return {
|
|
724
|
-
|
|
725
|
-
|
|
765
|
+
templateCode: 'string',
|
|
766
|
+
templateName: 'string',
|
|
726
767
|
};
|
|
727
768
|
}
|
|
728
769
|
|
|
@@ -731,20 +772,29 @@ export class SendMessageResponse extends $tea.Model {
|
|
|
731
772
|
}
|
|
732
773
|
}
|
|
733
774
|
|
|
734
|
-
export class
|
|
775
|
+
export class GetChatappTemplateDetailResponseBodyDataComponentsButtons extends $tea.Model {
|
|
735
776
|
phoneNumber?: string;
|
|
736
|
-
|
|
777
|
+
text?: string;
|
|
778
|
+
type?: string;
|
|
779
|
+
url?: string;
|
|
780
|
+
urlType?: string;
|
|
737
781
|
static names(): { [key: string]: string } {
|
|
738
782
|
return {
|
|
739
783
|
phoneNumber: 'PhoneNumber',
|
|
740
|
-
|
|
784
|
+
text: 'Text',
|
|
785
|
+
type: 'Type',
|
|
786
|
+
url: 'Url',
|
|
787
|
+
urlType: 'UrlType',
|
|
741
788
|
};
|
|
742
789
|
}
|
|
743
790
|
|
|
744
791
|
static types(): { [key: string]: any } {
|
|
745
792
|
return {
|
|
746
793
|
phoneNumber: 'string',
|
|
747
|
-
|
|
794
|
+
text: 'string',
|
|
795
|
+
type: 'string',
|
|
796
|
+
url: 'string',
|
|
797
|
+
urlType: 'string',
|
|
748
798
|
};
|
|
749
799
|
}
|
|
750
800
|
|
|
@@ -753,20 +803,35 @@ export class CheckChatappContactsResponseBodyData extends $tea.Model {
|
|
|
753
803
|
}
|
|
754
804
|
}
|
|
755
805
|
|
|
756
|
-
export class
|
|
757
|
-
|
|
758
|
-
|
|
806
|
+
export class GetChatappTemplateDetailResponseBodyDataComponents extends $tea.Model {
|
|
807
|
+
buttons?: GetChatappTemplateDetailResponseBodyDataComponentsButtons[];
|
|
808
|
+
caption?: string;
|
|
809
|
+
fileName?: string;
|
|
810
|
+
format?: string;
|
|
811
|
+
text?: string;
|
|
812
|
+
type?: string;
|
|
813
|
+
url?: string;
|
|
759
814
|
static names(): { [key: string]: string } {
|
|
760
815
|
return {
|
|
761
|
-
|
|
762
|
-
|
|
816
|
+
buttons: 'Buttons',
|
|
817
|
+
caption: 'Caption',
|
|
818
|
+
fileName: 'FileName',
|
|
819
|
+
format: 'Format',
|
|
820
|
+
text: 'Text',
|
|
821
|
+
type: 'Type',
|
|
822
|
+
url: 'Url',
|
|
763
823
|
};
|
|
764
824
|
}
|
|
765
825
|
|
|
766
826
|
static types(): { [key: string]: any } {
|
|
767
827
|
return {
|
|
768
|
-
|
|
769
|
-
|
|
828
|
+
buttons: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponentsButtons },
|
|
829
|
+
caption: 'string',
|
|
830
|
+
fileName: 'string',
|
|
831
|
+
format: 'string',
|
|
832
|
+
text: 'string',
|
|
833
|
+
type: 'string',
|
|
834
|
+
url: 'string',
|
|
770
835
|
};
|
|
771
836
|
}
|
|
772
837
|
|
|
@@ -775,19 +840,23 @@ export class CheckContactsResponseBodyContacts extends $tea.Model {
|
|
|
775
840
|
}
|
|
776
841
|
}
|
|
777
842
|
|
|
778
|
-
export class
|
|
843
|
+
export class GetChatappTemplateDetailResponseBodyData extends $tea.Model {
|
|
779
844
|
auditStatus?: string;
|
|
780
845
|
category?: string;
|
|
846
|
+
components?: GetChatappTemplateDetailResponseBodyDataComponents[];
|
|
847
|
+
example?: { [key: string]: string };
|
|
781
848
|
language?: string;
|
|
849
|
+
name?: string;
|
|
782
850
|
templateCode?: string;
|
|
783
|
-
templateName?: string;
|
|
784
851
|
static names(): { [key: string]: string } {
|
|
785
852
|
return {
|
|
786
853
|
auditStatus: 'AuditStatus',
|
|
787
854
|
category: 'Category',
|
|
855
|
+
components: 'Components',
|
|
856
|
+
example: 'Example',
|
|
788
857
|
language: 'Language',
|
|
858
|
+
name: 'Name',
|
|
789
859
|
templateCode: 'TemplateCode',
|
|
790
|
-
templateName: 'TemplateName',
|
|
791
860
|
};
|
|
792
861
|
}
|
|
793
862
|
|
|
@@ -795,9 +864,11 @@ export class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
|
|
|
795
864
|
return {
|
|
796
865
|
auditStatus: 'string',
|
|
797
866
|
category: 'string',
|
|
867
|
+
components: { 'type': 'array', 'itemType': GetChatappTemplateDetailResponseBodyDataComponents },
|
|
868
|
+
example: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
798
869
|
language: 'string',
|
|
870
|
+
name: 'string',
|
|
799
871
|
templateCode: 'string',
|
|
800
|
-
templateName: 'string',
|
|
801
872
|
};
|
|
802
873
|
}
|
|
803
874
|
|
|
@@ -806,23 +877,51 @@ export class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
|
|
|
806
877
|
}
|
|
807
878
|
}
|
|
808
879
|
|
|
809
|
-
export class
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
toId?: string;
|
|
880
|
+
export class ListChatappTemplateRequestPage extends $tea.Model {
|
|
881
|
+
index?: number;
|
|
882
|
+
size?: number;
|
|
813
883
|
static names(): { [key: string]: string } {
|
|
814
884
|
return {
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
toId: 'ToId',
|
|
885
|
+
index: 'Index',
|
|
886
|
+
size: 'Size',
|
|
818
887
|
};
|
|
819
888
|
}
|
|
820
889
|
|
|
821
890
|
static types(): { [key: string]: any } {
|
|
822
891
|
return {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
892
|
+
index: 'number',
|
|
893
|
+
size: 'number',
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
constructor(map?: { [key: string]: any }) {
|
|
898
|
+
super(map);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export class ListChatappTemplateResponseBodyListTemplate extends $tea.Model {
|
|
903
|
+
auditStatus?: string;
|
|
904
|
+
category?: string;
|
|
905
|
+
language?: string;
|
|
906
|
+
templateCode?: string;
|
|
907
|
+
templateName?: string;
|
|
908
|
+
static names(): { [key: string]: string } {
|
|
909
|
+
return {
|
|
910
|
+
auditStatus: 'AuditStatus',
|
|
911
|
+
category: 'Category',
|
|
912
|
+
language: 'Language',
|
|
913
|
+
templateCode: 'TemplateCode',
|
|
914
|
+
templateName: 'TemplateName',
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
static types(): { [key: string]: any } {
|
|
919
|
+
return {
|
|
920
|
+
auditStatus: 'string',
|
|
921
|
+
category: 'string',
|
|
922
|
+
language: 'string',
|
|
923
|
+
templateCode: 'string',
|
|
924
|
+
templateName: 'string',
|
|
826
925
|
};
|
|
827
926
|
}
|
|
828
927
|
|
|
@@ -854,35 +953,33 @@ export default class Client extends OpenApi {
|
|
|
854
953
|
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
855
954
|
}
|
|
856
955
|
|
|
857
|
-
async checkChatappContactsWithOptions(
|
|
858
|
-
Util.validateModel(
|
|
859
|
-
let
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
if (!Util.isUnset(request.contacts)) {
|
|
865
|
-
query["Contacts"] = request.contacts;
|
|
956
|
+
async checkChatappContactsWithOptions(tmpReq: CheckChatappContactsRequest, runtime: $Util.RuntimeOptions): Promise<CheckChatappContactsResponse> {
|
|
957
|
+
Util.validateModel(tmpReq);
|
|
958
|
+
let request = new CheckChatappContactsShrinkRequest({ });
|
|
959
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
960
|
+
if (!Util.isUnset(tmpReq.contacts)) {
|
|
961
|
+
request.contactsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.contacts, "Contacts", "json");
|
|
866
962
|
}
|
|
867
963
|
|
|
868
|
-
|
|
869
|
-
|
|
964
|
+
let body : {[key: string ]: any} = { };
|
|
965
|
+
if (!Util.isUnset(request.channelType)) {
|
|
966
|
+
body["ChannelType"] = request.channelType;
|
|
870
967
|
}
|
|
871
968
|
|
|
872
|
-
if (!Util.isUnset(request.
|
|
873
|
-
|
|
969
|
+
if (!Util.isUnset(request.contactsShrink)) {
|
|
970
|
+
body["Contacts"] = request.contactsShrink;
|
|
874
971
|
}
|
|
875
972
|
|
|
876
|
-
if (!Util.isUnset(request.
|
|
877
|
-
|
|
973
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
974
|
+
body["CustWabaId"] = request.custWabaId;
|
|
878
975
|
}
|
|
879
976
|
|
|
880
|
-
if (!Util.isUnset(request.
|
|
881
|
-
|
|
977
|
+
if (!Util.isUnset(request.from)) {
|
|
978
|
+
body["From"] = request.from;
|
|
882
979
|
}
|
|
883
980
|
|
|
884
981
|
let req = new $OpenApi.OpenApiRequest({
|
|
885
|
-
|
|
982
|
+
body: OpenApiUtil.parseToMap(body),
|
|
886
983
|
});
|
|
887
984
|
let params = new $OpenApi.Params({
|
|
888
985
|
action: "CheckChatappContacts",
|
|
@@ -903,98 +1000,49 @@ export default class Client extends OpenApi {
|
|
|
903
1000
|
return await this.checkChatappContactsWithOptions(request, runtime);
|
|
904
1001
|
}
|
|
905
1002
|
|
|
906
|
-
async
|
|
907
|
-
Util.validateModel(
|
|
908
|
-
let
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
914
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1003
|
+
async createChatappTemplateWithOptions(tmpReq: CreateChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<CreateChatappTemplateResponse> {
|
|
1004
|
+
Util.validateModel(tmpReq);
|
|
1005
|
+
let request = new CreateChatappTemplateShrinkRequest({ });
|
|
1006
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1007
|
+
if (!Util.isUnset(tmpReq.components)) {
|
|
1008
|
+
request.componentsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.components, "Components", "json");
|
|
915
1009
|
}
|
|
916
1010
|
|
|
917
|
-
if (!Util.isUnset(
|
|
918
|
-
|
|
1011
|
+
if (!Util.isUnset(tmpReq.example)) {
|
|
1012
|
+
request.exampleShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.example, "Example", "json");
|
|
919
1013
|
}
|
|
920
1014
|
|
|
921
1015
|
let body : {[key: string ]: any} = { };
|
|
922
|
-
if (!Util.isUnset(request.
|
|
923
|
-
body["
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
if (!Util.isUnset(request.contacts)) {
|
|
927
|
-
body["Contacts"] = request.contacts;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
if (!Util.isUnset(request.from)) {
|
|
931
|
-
body["From"] = request.from;
|
|
1016
|
+
if (!Util.isUnset(request.category)) {
|
|
1017
|
+
body["Category"] = request.category;
|
|
932
1018
|
}
|
|
933
1019
|
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
body: OpenApiUtil.parseToMap(body),
|
|
937
|
-
});
|
|
938
|
-
let params = new $OpenApi.Params({
|
|
939
|
-
action: "CheckContacts",
|
|
940
|
-
version: "2020-06-06",
|
|
941
|
-
protocol: "HTTPS",
|
|
942
|
-
pathname: "/",
|
|
943
|
-
method: "POST",
|
|
944
|
-
authType: "AK",
|
|
945
|
-
style: "RPC",
|
|
946
|
-
reqBodyType: "formData",
|
|
947
|
-
bodyType: "json",
|
|
948
|
-
});
|
|
949
|
-
return $tea.cast<CheckContactsResponse>(await this.callApi(params, req, runtime), new CheckContactsResponse({}));
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
async checkContacts(request: CheckContactsRequest): Promise<CheckContactsResponse> {
|
|
953
|
-
let runtime = new $Util.RuntimeOptions({ });
|
|
954
|
-
return await this.checkContactsWithOptions(request, runtime);
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
async createChatappTemplateWithOptions(request: CreateChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<CreateChatappTemplateResponse> {
|
|
958
|
-
Util.validateModel(request);
|
|
959
|
-
let query = { };
|
|
960
|
-
if (!Util.isUnset(request.category)) {
|
|
961
|
-
query["Category"] = request.category;
|
|
1020
|
+
if (!Util.isUnset(request.componentsShrink)) {
|
|
1021
|
+
body["Components"] = request.componentsShrink;
|
|
962
1022
|
}
|
|
963
1023
|
|
|
964
|
-
if (!Util.isUnset(request.
|
|
965
|
-
|
|
1024
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1025
|
+
body["CustWabaId"] = request.custWabaId;
|
|
966
1026
|
}
|
|
967
1027
|
|
|
968
|
-
if (!Util.isUnset(request.
|
|
969
|
-
|
|
1028
|
+
if (!Util.isUnset(request.exampleShrink)) {
|
|
1029
|
+
body["Example"] = request.exampleShrink;
|
|
970
1030
|
}
|
|
971
1031
|
|
|
972
1032
|
if (!Util.isUnset(request.language)) {
|
|
973
|
-
|
|
1033
|
+
body["Language"] = request.language;
|
|
974
1034
|
}
|
|
975
1035
|
|
|
976
1036
|
if (!Util.isUnset(request.name)) {
|
|
977
|
-
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
if (!Util.isUnset(request.ownerId)) {
|
|
981
|
-
query["OwnerId"] = request.ownerId;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
985
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
989
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1037
|
+
body["Name"] = request.name;
|
|
990
1038
|
}
|
|
991
1039
|
|
|
992
1040
|
if (!Util.isUnset(request.templateType)) {
|
|
993
|
-
|
|
1041
|
+
body["TemplateType"] = request.templateType;
|
|
994
1042
|
}
|
|
995
1043
|
|
|
996
1044
|
let req = new $OpenApi.OpenApiRequest({
|
|
997
|
-
|
|
1045
|
+
body: OpenApiUtil.parseToMap(body),
|
|
998
1046
|
});
|
|
999
1047
|
let params = new $OpenApi.Params({
|
|
1000
1048
|
action: "CreateChatappTemplate",
|
|
@@ -1018,16 +1066,8 @@ export default class Client extends OpenApi {
|
|
|
1018
1066
|
async deleteChatappTemplateWithOptions(request: DeleteChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<DeleteChatappTemplateResponse> {
|
|
1019
1067
|
Util.validateModel(request);
|
|
1020
1068
|
let query = { };
|
|
1021
|
-
if (!Util.isUnset(request.
|
|
1022
|
-
query["
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
1026
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
1030
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1069
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1070
|
+
query["CustWabaId"] = request.custWabaId;
|
|
1031
1071
|
}
|
|
1032
1072
|
|
|
1033
1073
|
if (!Util.isUnset(request.templateCode)) {
|
|
@@ -1059,20 +1099,12 @@ export default class Client extends OpenApi {
|
|
|
1059
1099
|
async getChatappTemplateDetailWithOptions(request: GetChatappTemplateDetailRequest, runtime: $Util.RuntimeOptions): Promise<GetChatappTemplateDetailResponse> {
|
|
1060
1100
|
Util.validateModel(request);
|
|
1061
1101
|
let query = { };
|
|
1062
|
-
if (!Util.isUnset(request.
|
|
1063
|
-
query["
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
if (!Util.isUnset(request.ownerId)) {
|
|
1067
|
-
query["OwnerId"] = request.ownerId;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
1071
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1102
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1103
|
+
query["CustWabaId"] = request.custWabaId;
|
|
1072
1104
|
}
|
|
1073
1105
|
|
|
1074
|
-
if (!Util.isUnset(request.
|
|
1075
|
-
query["
|
|
1106
|
+
if (!Util.isUnset(request.language)) {
|
|
1107
|
+
query["Language"] = request.language;
|
|
1076
1108
|
}
|
|
1077
1109
|
|
|
1078
1110
|
if (!Util.isUnset(request.templateCode)) {
|
|
@@ -1101,13 +1133,23 @@ export default class Client extends OpenApi {
|
|
|
1101
1133
|
return await this.getChatappTemplateDetailWithOptions(request, runtime);
|
|
1102
1134
|
}
|
|
1103
1135
|
|
|
1104
|
-
async listChatappTemplateWithOptions(
|
|
1105
|
-
Util.validateModel(
|
|
1136
|
+
async listChatappTemplateWithOptions(tmpReq: ListChatappTemplateRequest, runtime: $Util.RuntimeOptions): Promise<ListChatappTemplateResponse> {
|
|
1137
|
+
Util.validateModel(tmpReq);
|
|
1138
|
+
let request = new ListChatappTemplateShrinkRequest({ });
|
|
1139
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1140
|
+
if (!Util.isUnset($tea.toMap(tmpReq.page))) {
|
|
1141
|
+
request.pageShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle($tea.toMap(tmpReq.page), "Page", "json");
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1106
1144
|
let query = { };
|
|
1107
1145
|
if (!Util.isUnset(request.auditStatus)) {
|
|
1108
1146
|
query["AuditStatus"] = request.auditStatus;
|
|
1109
1147
|
}
|
|
1110
1148
|
|
|
1149
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1150
|
+
query["CustWabaId"] = request.custWabaId;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1111
1153
|
if (!Util.isUnset(request.language)) {
|
|
1112
1154
|
query["Language"] = request.language;
|
|
1113
1155
|
}
|
|
@@ -1116,20 +1158,8 @@ export default class Client extends OpenApi {
|
|
|
1116
1158
|
query["Name"] = request.name;
|
|
1117
1159
|
}
|
|
1118
1160
|
|
|
1119
|
-
if (!Util.isUnset(request.
|
|
1120
|
-
query["
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
if (!Util.isUnset(request.page)) {
|
|
1124
|
-
query["Page"] = request.page;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
1128
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
1132
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1161
|
+
if (!Util.isUnset(request.pageShrink)) {
|
|
1162
|
+
query["Page"] = request.pageShrink;
|
|
1133
1163
|
}
|
|
1134
1164
|
|
|
1135
1165
|
let req = new $OpenApi.OpenApiRequest({
|
|
@@ -1154,141 +1184,54 @@ export default class Client extends OpenApi {
|
|
|
1154
1184
|
return await this.listChatappTemplateWithOptions(request, runtime);
|
|
1155
1185
|
}
|
|
1156
1186
|
|
|
1157
|
-
async sendChatappMessageWithOptions(
|
|
1158
|
-
Util.validateModel(
|
|
1159
|
-
let
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
if (!Util.isUnset(request.content)) {
|
|
1165
|
-
query["Content"] = request.content;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
if (!Util.isUnset(request.from)) {
|
|
1169
|
-
query["From"] = request.from;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
if (!Util.isUnset(request.language)) {
|
|
1173
|
-
query["Language"] = request.language;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
if (!Util.isUnset(request.messageType)) {
|
|
1177
|
-
query["MessageType"] = request.messageType;
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
if (!Util.isUnset(request.ownerId)) {
|
|
1181
|
-
query["OwnerId"] = request.ownerId;
|
|
1187
|
+
async sendChatappMessageWithOptions(tmpReq: SendChatappMessageRequest, runtime: $Util.RuntimeOptions): Promise<SendChatappMessageResponse> {
|
|
1188
|
+
Util.validateModel(tmpReq);
|
|
1189
|
+
let request = new SendChatappMessageShrinkRequest({ });
|
|
1190
|
+
OpenApiUtil.convert(tmpReq, request);
|
|
1191
|
+
if (!Util.isUnset(tmpReq.payload)) {
|
|
1192
|
+
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, "Payload", "json");
|
|
1182
1193
|
}
|
|
1183
1194
|
|
|
1184
|
-
if (!Util.isUnset(
|
|
1185
|
-
|
|
1195
|
+
if (!Util.isUnset(tmpReq.templateParams)) {
|
|
1196
|
+
request.templateParamsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.templateParams, "TemplateParams", "json");
|
|
1186
1197
|
}
|
|
1187
1198
|
|
|
1188
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
1189
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
if (!Util.isUnset(request.resourceOwnerId)) {
|
|
1193
|
-
query["ResourceOwnerId"] = request.resourceOwnerId;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
if (!Util.isUnset(request.templateCode)) {
|
|
1197
|
-
query["TemplateCode"] = request.templateCode;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
if (!Util.isUnset(request.templateParams)) {
|
|
1201
|
-
query["TemplateParams"] = request.templateParams;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
if (!Util.isUnset(request.to)) {
|
|
1205
|
-
query["To"] = request.to;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
if (!Util.isUnset(request.type)) {
|
|
1209
|
-
query["Type"] = request.type;
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
let req = new $OpenApi.OpenApiRequest({
|
|
1213
|
-
query: OpenApiUtil.query(query),
|
|
1214
|
-
});
|
|
1215
|
-
let params = new $OpenApi.Params({
|
|
1216
|
-
action: "SendChatappMessage",
|
|
1217
|
-
version: "2020-06-06",
|
|
1218
|
-
protocol: "HTTPS",
|
|
1219
|
-
pathname: "/",
|
|
1220
|
-
method: "POST",
|
|
1221
|
-
authType: "AK",
|
|
1222
|
-
style: "RPC",
|
|
1223
|
-
reqBodyType: "formData",
|
|
1224
|
-
bodyType: "json",
|
|
1225
|
-
});
|
|
1226
|
-
return $tea.cast<SendChatappMessageResponse>(await this.callApi(params, req, runtime), new SendChatappMessageResponse({}));
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
async sendChatappMessage(request: SendChatappMessageRequest): Promise<SendChatappMessageResponse> {
|
|
1230
|
-
let runtime = new $Util.RuntimeOptions({ });
|
|
1231
|
-
return await this.sendChatappMessageWithOptions(request, runtime);
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
async sendMessageWithOptions(request: SendMessageRequest, runtime: $Util.RuntimeOptions): Promise<SendMessageResponse> {
|
|
1235
|
-
Util.validateModel(request);
|
|
1236
1199
|
let query = { };
|
|
1237
|
-
if (!Util.isUnset(request.
|
|
1238
|
-
query["
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
if (!Util.isUnset(request.resourceOwnerAccount)) {
|
|
1242
|
-
query["ResourceOwnerAccount"] = request.resourceOwnerAccount;
|
|
1200
|
+
if (!Util.isUnset(request.content)) {
|
|
1201
|
+
query["Content"] = request.content;
|
|
1243
1202
|
}
|
|
1244
1203
|
|
|
1245
|
-
if (!Util.isUnset(request.
|
|
1246
|
-
query["
|
|
1204
|
+
if (!Util.isUnset(request.payloadShrink)) {
|
|
1205
|
+
query["Payload"] = request.payloadShrink;
|
|
1247
1206
|
}
|
|
1248
1207
|
|
|
1249
1208
|
let body : {[key: string ]: any} = { };
|
|
1250
|
-
if (!Util.isUnset(request.caption)) {
|
|
1251
|
-
body["Caption"] = request.caption;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
1209
|
if (!Util.isUnset(request.channelType)) {
|
|
1255
1210
|
body["ChannelType"] = request.channelType;
|
|
1256
1211
|
}
|
|
1257
1212
|
|
|
1258
|
-
if (!Util.isUnset(request.
|
|
1259
|
-
body["
|
|
1213
|
+
if (!Util.isUnset(request.custWabaId)) {
|
|
1214
|
+
body["CustWabaId"] = request.custWabaId;
|
|
1260
1215
|
}
|
|
1261
1216
|
|
|
1262
1217
|
if (!Util.isUnset(request.from)) {
|
|
1263
1218
|
body["From"] = request.from;
|
|
1264
1219
|
}
|
|
1265
1220
|
|
|
1266
|
-
if (!Util.isUnset(request.
|
|
1267
|
-
body["
|
|
1221
|
+
if (!Util.isUnset(request.language)) {
|
|
1222
|
+
body["Language"] = request.language;
|
|
1268
1223
|
}
|
|
1269
1224
|
|
|
1270
1225
|
if (!Util.isUnset(request.messageType)) {
|
|
1271
1226
|
body["MessageType"] = request.messageType;
|
|
1272
1227
|
}
|
|
1273
1228
|
|
|
1274
|
-
if (!Util.isUnset(request.templateBodyParams)) {
|
|
1275
|
-
body["TemplateBodyParams"] = request.templateBodyParams;
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
if (!Util.isUnset(request.templateButtonParams)) {
|
|
1279
|
-
body["TemplateButtonParams"] = request.templateButtonParams;
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
1229
|
if (!Util.isUnset(request.templateCode)) {
|
|
1283
1230
|
body["TemplateCode"] = request.templateCode;
|
|
1284
1231
|
}
|
|
1285
1232
|
|
|
1286
|
-
if (!Util.isUnset(request.
|
|
1287
|
-
body["
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
if (!Util.isUnset(request.text)) {
|
|
1291
|
-
body["Text"] = request.text;
|
|
1233
|
+
if (!Util.isUnset(request.templateParamsShrink)) {
|
|
1234
|
+
body["TemplateParams"] = request.templateParamsShrink;
|
|
1292
1235
|
}
|
|
1293
1236
|
|
|
1294
1237
|
if (!Util.isUnset(request.to)) {
|
|
@@ -1304,7 +1247,7 @@ export default class Client extends OpenApi {
|
|
|
1304
1247
|
body: OpenApiUtil.parseToMap(body),
|
|
1305
1248
|
});
|
|
1306
1249
|
let params = new $OpenApi.Params({
|
|
1307
|
-
action: "
|
|
1250
|
+
action: "SendChatappMessage",
|
|
1308
1251
|
version: "2020-06-06",
|
|
1309
1252
|
protocol: "HTTPS",
|
|
1310
1253
|
pathname: "/",
|
|
@@ -1314,12 +1257,12 @@ export default class Client extends OpenApi {
|
|
|
1314
1257
|
reqBodyType: "formData",
|
|
1315
1258
|
bodyType: "json",
|
|
1316
1259
|
});
|
|
1317
|
-
return $tea.cast<
|
|
1260
|
+
return $tea.cast<SendChatappMessageResponse>(await this.callApi(params, req, runtime), new SendChatappMessageResponse({}));
|
|
1318
1261
|
}
|
|
1319
1262
|
|
|
1320
|
-
async
|
|
1263
|
+
async sendChatappMessage(request: SendChatappMessageRequest): Promise<SendChatappMessageResponse> {
|
|
1321
1264
|
let runtime = new $Util.RuntimeOptions({ });
|
|
1322
|
-
return await this.
|
|
1265
|
+
return await this.sendChatappMessageWithOptions(request, runtime);
|
|
1323
1266
|
}
|
|
1324
1267
|
|
|
1325
1268
|
}
|