@wildix/xbees-conversations-client 1.1.14 → 1.1.16
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-cjs/Conversations.js +16 -0
- package/dist-cjs/commands/GetOrCreateSmsChannelCommand.js +21 -0
- package/dist-cjs/commands/GetOrCreateTelephonyChannelCommand.js +21 -0
- package/dist-cjs/commands/GetOrCreateWhatsAppChannelCommand.js +21 -0
- package/dist-cjs/commands/GetSmsChannelIdCommand.js +21 -0
- package/dist-cjs/commands/GetTelephonyChannelIdCommand.js +21 -0
- package/dist-cjs/commands/GetWhatsAppChannelIdCommand.js +21 -0
- package/dist-cjs/commands/ListChannelMembersReadStatusCommand.js +21 -0
- package/dist-cjs/commands/SendTemplateMessageCommand.js +21 -0
- package/dist-cjs/commands/index.js +8 -0
- package/dist-cjs/protocols/Aws_restJson1.js +292 -3
- package/dist-es/Conversations.js +16 -0
- package/dist-es/commands/GetOrCreateSmsChannelCommand.js +17 -0
- package/dist-es/commands/GetOrCreateTelephonyChannelCommand.js +17 -0
- package/dist-es/commands/GetOrCreateWhatsAppChannelCommand.js +17 -0
- package/dist-es/commands/GetSmsChannelIdCommand.js +17 -0
- package/dist-es/commands/GetTelephonyChannelIdCommand.js +17 -0
- package/dist-es/commands/GetWhatsAppChannelIdCommand.js +17 -0
- package/dist-es/commands/ListChannelMembersReadStatusCommand.js +17 -0
- package/dist-es/commands/SendTemplateMessageCommand.js +17 -0
- package/dist-es/commands/index.js +8 -0
- package/dist-es/protocols/Aws_restJson1.js +273 -0
- package/dist-types/Conversations.d.ts +62 -0
- package/dist-types/ConversationsClient.d.ts +10 -2
- package/dist-types/commands/AssignChannelCommand.d.ts +4 -1
- package/dist-types/commands/GetOrCreateSmsChannelCommand.d.ts +151 -0
- package/dist-types/commands/GetOrCreateTelephonyChannelCommand.d.ts +151 -0
- package/dist-types/commands/GetOrCreateWhatsAppChannelCommand.d.ts +151 -0
- package/dist-types/commands/GetSmsChannelIdCommand.d.ts +81 -0
- package/dist-types/commands/GetTelephonyChannelIdCommand.d.ts +81 -0
- package/dist-types/commands/GetWhatsAppChannelIdCommand.d.ts +81 -0
- package/dist-types/commands/ListChannelMembersReadStatusCommand.d.ts +103 -0
- package/dist-types/commands/SendTemplateMessageCommand.d.ts +363 -0
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/models/models_0.d.ts +267 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +72 -0
- package/package.json +5 -5
package/dist-es/Conversations.js
CHANGED
|
@@ -19,13 +19,20 @@ import { GetFilePresignedDownloadUrlCommand, } from "./commands/GetFilePresigned
|
|
|
19
19
|
import { GetInboxStateCommand, } from "./commands/GetInboxStateCommand";
|
|
20
20
|
import { GetMessageCommand, } from "./commands/GetMessageCommand";
|
|
21
21
|
import { GetOrCreateDirectChannelCommand, } from "./commands/GetOrCreateDirectChannelCommand";
|
|
22
|
+
import { GetOrCreateSmsChannelCommand, } from "./commands/GetOrCreateSmsChannelCommand";
|
|
23
|
+
import { GetOrCreateTelephonyChannelCommand, } from "./commands/GetOrCreateTelephonyChannelCommand";
|
|
24
|
+
import { GetOrCreateWhatsAppChannelCommand, } from "./commands/GetOrCreateWhatsAppChannelCommand";
|
|
25
|
+
import { GetSmsChannelIdCommand, } from "./commands/GetSmsChannelIdCommand";
|
|
26
|
+
import { GetTelephonyChannelIdCommand, } from "./commands/GetTelephonyChannelIdCommand";
|
|
22
27
|
import { GetTokenCommand, } from "./commands/GetTokenCommand";
|
|
23
28
|
import { GetUploadedFileInfoCommand, } from "./commands/GetUploadedFileInfoCommand";
|
|
29
|
+
import { GetWhatsAppChannelIdCommand, } from "./commands/GetWhatsAppChannelIdCommand";
|
|
24
30
|
import { HideChannelCommand, } from "./commands/HideChannelCommand";
|
|
25
31
|
import { InviteCommand, } from "./commands/InviteCommand";
|
|
26
32
|
import { JoinChannelCommand, } from "./commands/JoinChannelCommand";
|
|
27
33
|
import { LeaveChannelCommand, } from "./commands/LeaveChannelCommand";
|
|
28
34
|
import { ListChannelMembersCommand, } from "./commands/ListChannelMembersCommand";
|
|
35
|
+
import { ListChannelMembersReadStatusCommand, } from "./commands/ListChannelMembersReadStatusCommand";
|
|
29
36
|
import { ListChannelsCommand, } from "./commands/ListChannelsCommand";
|
|
30
37
|
import { ListInboxTaggedChannelsCommand, } from "./commands/ListInboxTaggedChannelsCommand";
|
|
31
38
|
import { ListInboxTagsCommand, } from "./commands/ListInboxTagsCommand";
|
|
@@ -44,6 +51,7 @@ import { SendActionTriggerResultCommand, } from "./commands/SendActionTriggerRes
|
|
|
44
51
|
import { SendGiphyCommand, } from "./commands/SendGiphyCommand";
|
|
45
52
|
import { SendMessageCommand, } from "./commands/SendMessageCommand";
|
|
46
53
|
import { SendMessageReactionCommand, } from "./commands/SendMessageReactionCommand";
|
|
54
|
+
import { SendTemplateMessageCommand, } from "./commands/SendTemplateMessageCommand";
|
|
47
55
|
import { SendTypingStartCommand, } from "./commands/SendTypingStartCommand";
|
|
48
56
|
import { SendTypingStopCommand, } from "./commands/SendTypingStopCommand";
|
|
49
57
|
import { ShowChannelCommand, } from "./commands/ShowChannelCommand";
|
|
@@ -78,13 +86,20 @@ const commands = {
|
|
|
78
86
|
GetInboxStateCommand,
|
|
79
87
|
GetMessageCommand,
|
|
80
88
|
GetOrCreateDirectChannelCommand,
|
|
89
|
+
GetOrCreateSmsChannelCommand,
|
|
90
|
+
GetOrCreateTelephonyChannelCommand,
|
|
91
|
+
GetOrCreateWhatsAppChannelCommand,
|
|
92
|
+
GetSmsChannelIdCommand,
|
|
93
|
+
GetTelephonyChannelIdCommand,
|
|
81
94
|
GetTokenCommand,
|
|
82
95
|
GetUploadedFileInfoCommand,
|
|
96
|
+
GetWhatsAppChannelIdCommand,
|
|
83
97
|
HideChannelCommand,
|
|
84
98
|
InviteCommand,
|
|
85
99
|
JoinChannelCommand,
|
|
86
100
|
LeaveChannelCommand,
|
|
87
101
|
ListChannelMembersCommand,
|
|
102
|
+
ListChannelMembersReadStatusCommand,
|
|
88
103
|
ListChannelsCommand,
|
|
89
104
|
ListInboxTaggedChannelsCommand,
|
|
90
105
|
ListInboxTagsCommand,
|
|
@@ -103,6 +118,7 @@ const commands = {
|
|
|
103
118
|
SendGiphyCommand,
|
|
104
119
|
SendMessageCommand,
|
|
105
120
|
SendMessageReactionCommand,
|
|
121
|
+
SendTemplateMessageCommand,
|
|
106
122
|
SendTypingStartCommand,
|
|
107
123
|
SendTypingStopCommand,
|
|
108
124
|
ShowChannelCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetOrCreateSmsChannelCommand, se_GetOrCreateSmsChannelCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class GetOrCreateSmsChannelCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "GetOrCreateSmsChannel", {})
|
|
12
|
+
.n("ConversationsClient", "GetOrCreateSmsChannelCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetOrCreateSmsChannelCommand)
|
|
15
|
+
.de(de_GetOrCreateSmsChannelCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetOrCreateTelephonyChannelCommand, se_GetOrCreateTelephonyChannelCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class GetOrCreateTelephonyChannelCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "GetOrCreateTelephonyChannel", {})
|
|
12
|
+
.n("ConversationsClient", "GetOrCreateTelephonyChannelCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetOrCreateTelephonyChannelCommand)
|
|
15
|
+
.de(de_GetOrCreateTelephonyChannelCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetOrCreateWhatsAppChannelCommand, se_GetOrCreateWhatsAppChannelCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class GetOrCreateWhatsAppChannelCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "GetOrCreateWhatsAppChannel", {})
|
|
12
|
+
.n("ConversationsClient", "GetOrCreateWhatsAppChannelCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetOrCreateWhatsAppChannelCommand)
|
|
15
|
+
.de(de_GetOrCreateWhatsAppChannelCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetSmsChannelIdCommand, se_GetSmsChannelIdCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class GetSmsChannelIdCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "GetSmsChannelId", {})
|
|
12
|
+
.n("ConversationsClient", "GetSmsChannelIdCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetSmsChannelIdCommand)
|
|
15
|
+
.de(de_GetSmsChannelIdCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetTelephonyChannelIdCommand, se_GetTelephonyChannelIdCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class GetTelephonyChannelIdCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "GetTelephonyChannelId", {})
|
|
12
|
+
.n("ConversationsClient", "GetTelephonyChannelIdCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetTelephonyChannelIdCommand)
|
|
15
|
+
.de(de_GetTelephonyChannelIdCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetWhatsAppChannelIdCommand, se_GetWhatsAppChannelIdCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class GetWhatsAppChannelIdCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "GetWhatsAppChannelId", {})
|
|
12
|
+
.n("ConversationsClient", "GetWhatsAppChannelIdCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetWhatsAppChannelIdCommand)
|
|
15
|
+
.de(de_GetWhatsAppChannelIdCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_ListChannelMembersReadStatusCommand, se_ListChannelMembersReadStatusCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class ListChannelMembersReadStatusCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "ListChannelMembersReadStatus", {})
|
|
12
|
+
.n("ConversationsClient", "ListChannelMembersReadStatusCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_ListChannelMembersReadStatusCommand)
|
|
15
|
+
.de(de_ListChannelMembersReadStatusCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_SendTemplateMessageCommand, se_SendTemplateMessageCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class SendTemplateMessageCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "SendTemplateMessage", {})
|
|
12
|
+
.n("ConversationsClient", "SendTemplateMessageCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_SendTemplateMessageCommand)
|
|
15
|
+
.de(de_SendTemplateMessageCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -18,13 +18,20 @@ export * from "./GetFilePresignedDownloadUrlCommand";
|
|
|
18
18
|
export * from "./GetInboxStateCommand";
|
|
19
19
|
export * from "./GetMessageCommand";
|
|
20
20
|
export * from "./GetOrCreateDirectChannelCommand";
|
|
21
|
+
export * from "./GetOrCreateSmsChannelCommand";
|
|
22
|
+
export * from "./GetOrCreateTelephonyChannelCommand";
|
|
23
|
+
export * from "./GetOrCreateWhatsAppChannelCommand";
|
|
24
|
+
export * from "./GetSmsChannelIdCommand";
|
|
25
|
+
export * from "./GetTelephonyChannelIdCommand";
|
|
21
26
|
export * from "./GetTokenCommand";
|
|
22
27
|
export * from "./GetUploadedFileInfoCommand";
|
|
28
|
+
export * from "./GetWhatsAppChannelIdCommand";
|
|
23
29
|
export * from "./HideChannelCommand";
|
|
24
30
|
export * from "./InviteCommand";
|
|
25
31
|
export * from "./JoinChannelCommand";
|
|
26
32
|
export * from "./LeaveChannelCommand";
|
|
27
33
|
export * from "./ListChannelMembersCommand";
|
|
34
|
+
export * from "./ListChannelMembersReadStatusCommand";
|
|
28
35
|
export * from "./ListChannelsCommand";
|
|
29
36
|
export * from "./ListInboxTaggedChannelsCommand";
|
|
30
37
|
export * from "./ListInboxTagsCommand";
|
|
@@ -43,6 +50,7 @@ export * from "./SendActionTriggerResultCommand";
|
|
|
43
50
|
export * from "./SendGiphyCommand";
|
|
44
51
|
export * from "./SendMessageCommand";
|
|
45
52
|
export * from "./SendMessageReactionCommand";
|
|
53
|
+
export * from "./SendTemplateMessageCommand";
|
|
46
54
|
export * from "./SendTypingStartCommand";
|
|
47
55
|
export * from "./SendTypingStopCommand";
|
|
48
56
|
export * from "./ShowChannelCommand";
|
|
@@ -351,6 +351,111 @@ export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
|
351
351
|
.b(body);
|
|
352
352
|
return b.build();
|
|
353
353
|
};
|
|
354
|
+
export const se_GetOrCreateSmsChannelCommand = async (input, context) => {
|
|
355
|
+
const b = rb(input, context);
|
|
356
|
+
const headers = {
|
|
357
|
+
'content-type': 'application/json',
|
|
358
|
+
};
|
|
359
|
+
b.bp("/v2/conversations/sms/get_or_create_channel");
|
|
360
|
+
const query = map({
|
|
361
|
+
[_u]: [, input[_uI]],
|
|
362
|
+
});
|
|
363
|
+
let body;
|
|
364
|
+
body = JSON.stringify(take(input, {
|
|
365
|
+
'recipientId': [],
|
|
366
|
+
'recipientNumber': [],
|
|
367
|
+
'serviceUri': [],
|
|
368
|
+
}));
|
|
369
|
+
b.m("POST")
|
|
370
|
+
.h(headers)
|
|
371
|
+
.q(query)
|
|
372
|
+
.b(body);
|
|
373
|
+
return b.build();
|
|
374
|
+
};
|
|
375
|
+
export const se_GetOrCreateTelephonyChannelCommand = async (input, context) => {
|
|
376
|
+
const b = rb(input, context);
|
|
377
|
+
const headers = {
|
|
378
|
+
'content-type': 'application/json',
|
|
379
|
+
};
|
|
380
|
+
b.bp("/v2/conversations/telephony/get_or_create_channel");
|
|
381
|
+
const query = map({
|
|
382
|
+
[_u]: [, input[_uI]],
|
|
383
|
+
});
|
|
384
|
+
let body;
|
|
385
|
+
body = JSON.stringify(take(input, {
|
|
386
|
+
'recipientId': [],
|
|
387
|
+
'recipientNumber': [],
|
|
388
|
+
'serviceUri': [],
|
|
389
|
+
}));
|
|
390
|
+
b.m("POST")
|
|
391
|
+
.h(headers)
|
|
392
|
+
.q(query)
|
|
393
|
+
.b(body);
|
|
394
|
+
return b.build();
|
|
395
|
+
};
|
|
396
|
+
export const se_GetOrCreateWhatsAppChannelCommand = async (input, context) => {
|
|
397
|
+
const b = rb(input, context);
|
|
398
|
+
const headers = {
|
|
399
|
+
'content-type': 'application/json',
|
|
400
|
+
};
|
|
401
|
+
b.bp("/v2/conversations/whatsapp/get_or_create_channel");
|
|
402
|
+
const query = map({
|
|
403
|
+
[_u]: [, input[_uI]],
|
|
404
|
+
});
|
|
405
|
+
let body;
|
|
406
|
+
body = JSON.stringify(take(input, {
|
|
407
|
+
'recipientId': [],
|
|
408
|
+
'recipientNumber': [],
|
|
409
|
+
'serviceUri': [],
|
|
410
|
+
}));
|
|
411
|
+
b.m("POST")
|
|
412
|
+
.h(headers)
|
|
413
|
+
.q(query)
|
|
414
|
+
.b(body);
|
|
415
|
+
return b.build();
|
|
416
|
+
};
|
|
417
|
+
export const se_GetSmsChannelIdCommand = async (input, context) => {
|
|
418
|
+
const b = rb(input, context);
|
|
419
|
+
const headers = {
|
|
420
|
+
'content-type': 'application/json',
|
|
421
|
+
};
|
|
422
|
+
b.bp("/v2/conversations/sms/get_channel_id");
|
|
423
|
+
const query = map({
|
|
424
|
+
[_u]: [, input[_uI]],
|
|
425
|
+
});
|
|
426
|
+
let body;
|
|
427
|
+
body = JSON.stringify(take(input, {
|
|
428
|
+
'recipientId': [],
|
|
429
|
+
'recipientNumber': [],
|
|
430
|
+
'serviceUri': [],
|
|
431
|
+
}));
|
|
432
|
+
b.m("POST")
|
|
433
|
+
.h(headers)
|
|
434
|
+
.q(query)
|
|
435
|
+
.b(body);
|
|
436
|
+
return b.build();
|
|
437
|
+
};
|
|
438
|
+
export const se_GetTelephonyChannelIdCommand = async (input, context) => {
|
|
439
|
+
const b = rb(input, context);
|
|
440
|
+
const headers = {
|
|
441
|
+
'content-type': 'application/json',
|
|
442
|
+
};
|
|
443
|
+
b.bp("/v2/conversations/telephony/get_channel_id");
|
|
444
|
+
const query = map({
|
|
445
|
+
[_u]: [, input[_uI]],
|
|
446
|
+
});
|
|
447
|
+
let body;
|
|
448
|
+
body = JSON.stringify(take(input, {
|
|
449
|
+
'recipientId': [],
|
|
450
|
+
'recipientNumber': [],
|
|
451
|
+
'serviceUri': [],
|
|
452
|
+
}));
|
|
453
|
+
b.m("POST")
|
|
454
|
+
.h(headers)
|
|
455
|
+
.q(query)
|
|
456
|
+
.b(body);
|
|
457
|
+
return b.build();
|
|
458
|
+
};
|
|
354
459
|
export const se_GetTokenCommand = async (input, context) => {
|
|
355
460
|
const b = rb(input, context);
|
|
356
461
|
const headers = {};
|
|
@@ -377,6 +482,27 @@ export const se_GetUploadedFileInfoCommand = async (input, context) => {
|
|
|
377
482
|
.b(body);
|
|
378
483
|
return b.build();
|
|
379
484
|
};
|
|
485
|
+
export const se_GetWhatsAppChannelIdCommand = async (input, context) => {
|
|
486
|
+
const b = rb(input, context);
|
|
487
|
+
const headers = {
|
|
488
|
+
'content-type': 'application/json',
|
|
489
|
+
};
|
|
490
|
+
b.bp("/v2/conversations/whatsapp/get_channel_id");
|
|
491
|
+
const query = map({
|
|
492
|
+
[_u]: [, input[_uI]],
|
|
493
|
+
});
|
|
494
|
+
let body;
|
|
495
|
+
body = JSON.stringify(take(input, {
|
|
496
|
+
'recipientId': [],
|
|
497
|
+
'recipientNumber': [],
|
|
498
|
+
'serviceUri': [],
|
|
499
|
+
}));
|
|
500
|
+
b.m("POST")
|
|
501
|
+
.h(headers)
|
|
502
|
+
.q(query)
|
|
503
|
+
.b(body);
|
|
504
|
+
return b.build();
|
|
505
|
+
};
|
|
380
506
|
export const se_HideChannelCommand = async (input, context) => {
|
|
381
507
|
const b = rb(input, context);
|
|
382
508
|
const headers = {};
|
|
@@ -463,6 +589,17 @@ export const se_ListChannelMembersCommand = async (input, context) => {
|
|
|
463
589
|
.b(body);
|
|
464
590
|
return b.build();
|
|
465
591
|
};
|
|
592
|
+
export const se_ListChannelMembersReadStatusCommand = async (input, context) => {
|
|
593
|
+
const b = rb(input, context);
|
|
594
|
+
const headers = {};
|
|
595
|
+
b.bp("/v2/conversations/channels/{channelId}/read");
|
|
596
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
597
|
+
let body;
|
|
598
|
+
b.m("GET")
|
|
599
|
+
.h(headers)
|
|
600
|
+
.b(body);
|
|
601
|
+
return b.build();
|
|
602
|
+
};
|
|
466
603
|
export const se_ListChannelsCommand = async (input, context) => {
|
|
467
604
|
const b = rb(input, context);
|
|
468
605
|
const headers = {};
|
|
@@ -800,6 +937,30 @@ export const se_SendMessageReactionCommand = async (input, context) => {
|
|
|
800
937
|
.b(body);
|
|
801
938
|
return b.build();
|
|
802
939
|
};
|
|
940
|
+
export const se_SendTemplateMessageCommand = async (input, context) => {
|
|
941
|
+
const b = rb(input, context);
|
|
942
|
+
const headers = {
|
|
943
|
+
'content-type': 'application/json',
|
|
944
|
+
};
|
|
945
|
+
b.bp("/v2/conversations/channels/{channelId}/send_template_message");
|
|
946
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
947
|
+
let body;
|
|
948
|
+
body = JSON.stringify(take(input, {
|
|
949
|
+
'attachments': _ => _json(_),
|
|
950
|
+
'elements': _ => _json(_),
|
|
951
|
+
'forward': _ => _json(_),
|
|
952
|
+
'mentions': _ => _json(_),
|
|
953
|
+
'messageId': [],
|
|
954
|
+
'quote': _ => _json(_),
|
|
955
|
+
'template': _ => _json(_),
|
|
956
|
+
'text': [],
|
|
957
|
+
'userId': [],
|
|
958
|
+
}));
|
|
959
|
+
b.m("POST")
|
|
960
|
+
.h(headers)
|
|
961
|
+
.b(body);
|
|
962
|
+
return b.build();
|
|
963
|
+
};
|
|
803
964
|
export const se_SendTypingStartCommand = async (input, context) => {
|
|
804
965
|
const b = rb(input, context);
|
|
805
966
|
const headers = {};
|
|
@@ -1301,6 +1462,76 @@ export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
|
|
|
1301
1462
|
Object.assign(contents, doc);
|
|
1302
1463
|
return contents;
|
|
1303
1464
|
};
|
|
1465
|
+
export const de_GetOrCreateSmsChannelCommand = async (output, context) => {
|
|
1466
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1467
|
+
return de_CommandError(output, context);
|
|
1468
|
+
}
|
|
1469
|
+
const contents = map({
|
|
1470
|
+
$metadata: deserializeMetadata(output),
|
|
1471
|
+
});
|
|
1472
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1473
|
+
const doc = take(data, {
|
|
1474
|
+
'channel': _json,
|
|
1475
|
+
});
|
|
1476
|
+
Object.assign(contents, doc);
|
|
1477
|
+
return contents;
|
|
1478
|
+
};
|
|
1479
|
+
export const de_GetOrCreateTelephonyChannelCommand = async (output, context) => {
|
|
1480
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1481
|
+
return de_CommandError(output, context);
|
|
1482
|
+
}
|
|
1483
|
+
const contents = map({
|
|
1484
|
+
$metadata: deserializeMetadata(output),
|
|
1485
|
+
});
|
|
1486
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1487
|
+
const doc = take(data, {
|
|
1488
|
+
'channel': _json,
|
|
1489
|
+
});
|
|
1490
|
+
Object.assign(contents, doc);
|
|
1491
|
+
return contents;
|
|
1492
|
+
};
|
|
1493
|
+
export const de_GetOrCreateWhatsAppChannelCommand = async (output, context) => {
|
|
1494
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1495
|
+
return de_CommandError(output, context);
|
|
1496
|
+
}
|
|
1497
|
+
const contents = map({
|
|
1498
|
+
$metadata: deserializeMetadata(output),
|
|
1499
|
+
});
|
|
1500
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1501
|
+
const doc = take(data, {
|
|
1502
|
+
'channel': _json,
|
|
1503
|
+
});
|
|
1504
|
+
Object.assign(contents, doc);
|
|
1505
|
+
return contents;
|
|
1506
|
+
};
|
|
1507
|
+
export const de_GetSmsChannelIdCommand = async (output, context) => {
|
|
1508
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1509
|
+
return de_CommandError(output, context);
|
|
1510
|
+
}
|
|
1511
|
+
const contents = map({
|
|
1512
|
+
$metadata: deserializeMetadata(output),
|
|
1513
|
+
});
|
|
1514
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1515
|
+
const doc = take(data, {
|
|
1516
|
+
'channelId': __expectString,
|
|
1517
|
+
});
|
|
1518
|
+
Object.assign(contents, doc);
|
|
1519
|
+
return contents;
|
|
1520
|
+
};
|
|
1521
|
+
export const de_GetTelephonyChannelIdCommand = async (output, context) => {
|
|
1522
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1523
|
+
return de_CommandError(output, context);
|
|
1524
|
+
}
|
|
1525
|
+
const contents = map({
|
|
1526
|
+
$metadata: deserializeMetadata(output),
|
|
1527
|
+
});
|
|
1528
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1529
|
+
const doc = take(data, {
|
|
1530
|
+
'channelId': __expectString,
|
|
1531
|
+
});
|
|
1532
|
+
Object.assign(contents, doc);
|
|
1533
|
+
return contents;
|
|
1534
|
+
};
|
|
1304
1535
|
export const de_GetTokenCommand = async (output, context) => {
|
|
1305
1536
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1306
1537
|
return de_CommandError(output, context);
|
|
@@ -1330,6 +1561,20 @@ export const de_GetUploadedFileInfoCommand = async (output, context) => {
|
|
|
1330
1561
|
Object.assign(contents, doc);
|
|
1331
1562
|
return contents;
|
|
1332
1563
|
};
|
|
1564
|
+
export const de_GetWhatsAppChannelIdCommand = async (output, context) => {
|
|
1565
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1566
|
+
return de_CommandError(output, context);
|
|
1567
|
+
}
|
|
1568
|
+
const contents = map({
|
|
1569
|
+
$metadata: deserializeMetadata(output),
|
|
1570
|
+
});
|
|
1571
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1572
|
+
const doc = take(data, {
|
|
1573
|
+
'channelId': __expectString,
|
|
1574
|
+
});
|
|
1575
|
+
Object.assign(contents, doc);
|
|
1576
|
+
return contents;
|
|
1577
|
+
};
|
|
1333
1578
|
export const de_HideChannelCommand = async (output, context) => {
|
|
1334
1579
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1335
1580
|
return de_CommandError(output, context);
|
|
@@ -1393,6 +1638,20 @@ export const de_ListChannelMembersCommand = async (output, context) => {
|
|
|
1393
1638
|
Object.assign(contents, doc);
|
|
1394
1639
|
return contents;
|
|
1395
1640
|
};
|
|
1641
|
+
export const de_ListChannelMembersReadStatusCommand = async (output, context) => {
|
|
1642
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1643
|
+
return de_CommandError(output, context);
|
|
1644
|
+
}
|
|
1645
|
+
const contents = map({
|
|
1646
|
+
$metadata: deserializeMetadata(output),
|
|
1647
|
+
});
|
|
1648
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1649
|
+
const doc = take(data, {
|
|
1650
|
+
'members': _json,
|
|
1651
|
+
});
|
|
1652
|
+
Object.assign(contents, doc);
|
|
1653
|
+
return contents;
|
|
1654
|
+
};
|
|
1396
1655
|
export const de_ListChannelsCommand = async (output, context) => {
|
|
1397
1656
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1398
1657
|
return de_CommandError(output, context);
|
|
@@ -1617,6 +1876,20 @@ export const de_SendMessageReactionCommand = async (output, context) => {
|
|
|
1617
1876
|
await collectBody(output.body, context);
|
|
1618
1877
|
return contents;
|
|
1619
1878
|
};
|
|
1879
|
+
export const de_SendTemplateMessageCommand = async (output, context) => {
|
|
1880
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1881
|
+
return de_CommandError(output, context);
|
|
1882
|
+
}
|
|
1883
|
+
const contents = map({
|
|
1884
|
+
$metadata: deserializeMetadata(output),
|
|
1885
|
+
});
|
|
1886
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1887
|
+
const doc = take(data, {
|
|
1888
|
+
'message': _json,
|
|
1889
|
+
});
|
|
1890
|
+
Object.assign(contents, doc);
|
|
1891
|
+
return contents;
|
|
1892
|
+
};
|
|
1620
1893
|
export const de_SendTypingStartCommand = async (output, context) => {
|
|
1621
1894
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1622
1895
|
return de_CommandError(output, context);
|