@wildix/xbees-conversations-client 1.1.0 → 1.1.2
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 +14 -0
- package/dist-cjs/commands/CreateKiteChannelCommand.js +21 -0
- package/dist-cjs/commands/GetActionTriggerResultCommand.js +21 -0
- package/dist-cjs/commands/ListPinnedMessagesCommand.js +21 -0
- package/dist-cjs/commands/PinMessageCommand.js +21 -0
- package/dist-cjs/commands/SendActionTriggerResultCommand.js +21 -0
- package/dist-cjs/commands/TriggerMessageActionCommand.js +21 -0
- package/dist-cjs/commands/UnpinMessageCommand.js +21 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/models/models_0.js +107 -12
- package/dist-cjs/protocols/Aws_restJson1.js +302 -2
- package/dist-es/Conversations.js +14 -0
- package/dist-es/commands/CreateKiteChannelCommand.js +17 -0
- package/dist-es/commands/GetActionTriggerResultCommand.js +17 -0
- package/dist-es/commands/ListPinnedMessagesCommand.js +17 -0
- package/dist-es/commands/PinMessageCommand.js +17 -0
- package/dist-es/commands/SendActionTriggerResultCommand.js +17 -0
- package/dist-es/commands/TriggerMessageActionCommand.js +17 -0
- package/dist-es/commands/UnpinMessageCommand.js +17 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/models/models_0.js +102 -11
- package/dist-es/protocols/Aws_restJson1.js +286 -1
- package/dist-types/Conversations.d.ts +49 -0
- package/dist-types/ConversationsClient.d.ts +9 -2
- package/dist-types/commands/CreateKiteChannelCommand.d.ts +240 -0
- package/dist-types/commands/DescribeEventCommand.d.ts +144 -9
- package/dist-types/commands/GetActionTriggerResultCommand.d.ts +70 -0
- package/dist-types/commands/GetMessageCommand.d.ts +24 -0
- package/dist-types/commands/ListMessagesCommand.d.ts +24 -0
- package/dist-types/commands/ListPinnedMessagesCommand.d.ts +224 -0
- package/dist-types/commands/PartialUpdateMessageCommand.d.ts +53 -1
- package/dist-types/commands/PinMessageCommand.d.ts +73 -0
- package/dist-types/commands/SendActionTriggerResultCommand.d.ts +68 -0
- package/dist-types/commands/SendGiphyCommand.d.ts +24 -0
- package/dist-types/commands/SendMessageCommand.d.ts +48 -0
- package/dist-types/commands/TriggerMessageActionCommand.d.ts +75 -0
- package/dist-types/commands/UnpinMessageCommand.d.ts +71 -0
- package/dist-types/commands/UpdateMessageCommand.d.ts +49 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/models/models_0.d.ts +578 -102
- package/dist-types/protocols/Aws_restJson1.d.ts +63 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_UnpinMessageCommand, se_UnpinMessageCommand, } 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 UnpinMessageCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "UnpinMessage", {})
|
|
12
|
+
.n("ConversationsClient", "UnpinMessageCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_UnpinMessageCommand)
|
|
15
|
+
.de(de_UnpinMessageCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -2,12 +2,14 @@ export * from "./AddChannelMemberCommand";
|
|
|
2
2
|
export * from "./AddChannelMembersCommand";
|
|
3
3
|
export * from "./CreateGroupChannelCommand";
|
|
4
4
|
export * from "./CreateInboxTagCommand";
|
|
5
|
+
export * from "./CreateKiteChannelCommand";
|
|
5
6
|
export * from "./DeleteChannelCommand";
|
|
6
7
|
export * from "./DeleteChannelMemberCommand";
|
|
7
8
|
export * from "./DeleteInboxTagCommand";
|
|
8
9
|
export * from "./DeleteMessageCommand";
|
|
9
10
|
export * from "./DeleteMessageReactionCommand";
|
|
10
11
|
export * from "./DescribeEventCommand";
|
|
12
|
+
export * from "./GetActionTriggerResultCommand";
|
|
11
13
|
export * from "./GetChannelCommand";
|
|
12
14
|
export * from "./GetChannelMemberCommand";
|
|
13
15
|
export * from "./GetDirectChannelIdCommand";
|
|
@@ -26,12 +28,15 @@ export * from "./ListInboxTaggedChannelsCommand";
|
|
|
26
28
|
export * from "./ListInboxTagsCommand";
|
|
27
29
|
export * from "./ListMessageReactionsCommand";
|
|
28
30
|
export * from "./ListMessagesCommand";
|
|
31
|
+
export * from "./ListPinnedMessagesCommand";
|
|
29
32
|
export * from "./MarkReadCommand";
|
|
30
33
|
export * from "./MarkUnreadCommand";
|
|
31
34
|
export * from "./PartialUpdateChannelCommand";
|
|
32
35
|
export * from "./PartialUpdateMessageCommand";
|
|
33
36
|
export * from "./PinChannelCommand";
|
|
37
|
+
export * from "./PinMessageCommand";
|
|
34
38
|
export * from "./ScheduleExternalFlagAdjustmentJobCommand";
|
|
39
|
+
export * from "./SendActionTriggerResultCommand";
|
|
35
40
|
export * from "./SendGiphyCommand";
|
|
36
41
|
export * from "./SendMessageCommand";
|
|
37
42
|
export * from "./SendMessageReactionCommand";
|
|
@@ -39,7 +44,9 @@ export * from "./SendTypingStartCommand";
|
|
|
39
44
|
export * from "./SendTypingStopCommand";
|
|
40
45
|
export * from "./ShowChannelCommand";
|
|
41
46
|
export * from "./TagChannelCommand";
|
|
47
|
+
export * from "./TriggerMessageActionCommand";
|
|
42
48
|
export * from "./UnpinChannelCommand";
|
|
49
|
+
export * from "./UnpinMessageCommand";
|
|
43
50
|
export * from "./UntagChannelCommand";
|
|
44
51
|
export * from "./UpdateChannelCommand";
|
|
45
52
|
export * from "./UpdateInboxTagCommand";
|
|
@@ -60,6 +60,34 @@ export const ChannelType = {
|
|
|
60
60
|
DIRECT: "direct",
|
|
61
61
|
GROUP: "group",
|
|
62
62
|
};
|
|
63
|
+
export var ButtonHandler;
|
|
64
|
+
(function (ButtonHandler) {
|
|
65
|
+
ButtonHandler.visit = (value, visitor) => {
|
|
66
|
+
if (value.link !== undefined)
|
|
67
|
+
return visitor.link(value.link);
|
|
68
|
+
if (value.reply !== undefined)
|
|
69
|
+
return visitor.reply(value.reply);
|
|
70
|
+
if (value.action !== undefined)
|
|
71
|
+
return visitor.action(value.action);
|
|
72
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
73
|
+
};
|
|
74
|
+
})(ButtonHandler || (ButtonHandler = {}));
|
|
75
|
+
export const ButtonVariant = {
|
|
76
|
+
CONTAINED: "contained",
|
|
77
|
+
OUTLINED: "outlined",
|
|
78
|
+
};
|
|
79
|
+
export var ActionElement;
|
|
80
|
+
(function (ActionElement) {
|
|
81
|
+
ActionElement.visit = (value, visitor) => {
|
|
82
|
+
if (value.button !== undefined)
|
|
83
|
+
return visitor.button(value.button);
|
|
84
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
85
|
+
};
|
|
86
|
+
})(ActionElement || (ActionElement = {}));
|
|
87
|
+
export const ActionTriggerStatus = {
|
|
88
|
+
COMPLETED: "completed",
|
|
89
|
+
PENDING: "pending",
|
|
90
|
+
};
|
|
63
91
|
export const ChannelMemberRole = {
|
|
64
92
|
MEMBER: "member",
|
|
65
93
|
SUPERVISOR: "supervisor",
|
|
@@ -128,6 +156,42 @@ export class TagsLimitReachedException extends __BaseException {
|
|
|
128
156
|
Object.setPrototypeOf(this, TagsLimitReachedException.prototype);
|
|
129
157
|
}
|
|
130
158
|
}
|
|
159
|
+
export var Element;
|
|
160
|
+
(function (Element) {
|
|
161
|
+
Element.visit = (value, visitor) => {
|
|
162
|
+
if (value.actions !== undefined)
|
|
163
|
+
return visitor.actions(value.actions);
|
|
164
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
165
|
+
};
|
|
166
|
+
})(Element || (Element = {}));
|
|
167
|
+
export const TargetNotEligibleReason = {
|
|
168
|
+
NO_LICENSE: "no_license",
|
|
169
|
+
};
|
|
170
|
+
export class TargetNotEligibleException extends __BaseException {
|
|
171
|
+
constructor(opts) {
|
|
172
|
+
super({
|
|
173
|
+
name: "TargetNotEligibleException",
|
|
174
|
+
$fault: "client",
|
|
175
|
+
...opts
|
|
176
|
+
});
|
|
177
|
+
this.name = "TargetNotEligibleException";
|
|
178
|
+
this.$fault = "client";
|
|
179
|
+
Object.setPrototypeOf(this, TargetNotEligibleException.prototype);
|
|
180
|
+
this.reason = opts.reason;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
export class TargetNotFoundException extends __BaseException {
|
|
184
|
+
constructor(opts) {
|
|
185
|
+
super({
|
|
186
|
+
name: "TargetNotFoundException",
|
|
187
|
+
$fault: "client",
|
|
188
|
+
...opts
|
|
189
|
+
});
|
|
190
|
+
this.name = "TargetNotFoundException";
|
|
191
|
+
this.$fault = "client";
|
|
192
|
+
Object.setPrototypeOf(this, TargetNotFoundException.prototype);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
131
195
|
export class MemberNotFoundException extends __BaseException {
|
|
132
196
|
constructor(opts) {
|
|
133
197
|
super({
|
|
@@ -163,17 +227,6 @@ export const ReactionType = {
|
|
|
163
227
|
THUMBSUP: "thumbsup",
|
|
164
228
|
WHITE_CHECK_MARK: "white_check_mark",
|
|
165
229
|
};
|
|
166
|
-
export const WebhookEventType = {
|
|
167
|
-
CHANNEL_CREATED: "chat:channel:created",
|
|
168
|
-
CHANNEL_UPDATED: "chat:channel:updated",
|
|
169
|
-
MEMBER_ADDED: "chat:member:added",
|
|
170
|
-
MEMBER_REMOVED: "chat:member:removed",
|
|
171
|
-
MESSAGE_DELETED: "chat:message:deleted",
|
|
172
|
-
MESSAGE_NEW: "chat:message:new",
|
|
173
|
-
MESSAGE_UPDATED: "chat:message:updated",
|
|
174
|
-
REACTION_DELETED: "chat:reaction:deleted",
|
|
175
|
-
REACTION_NEW: "chat:reaction:new",
|
|
176
|
-
};
|
|
177
230
|
export const MessageSmsStatus = {
|
|
178
231
|
DELIVERED: "delivered",
|
|
179
232
|
ERROR: "error",
|
|
@@ -190,6 +243,30 @@ export const MessageWhatsAppStatus = {
|
|
|
190
243
|
SENT: "sent",
|
|
191
244
|
TRYING: "trying",
|
|
192
245
|
};
|
|
246
|
+
export const WebhookEventType = {
|
|
247
|
+
ACTION_TRIGGERED: "chat:action:triggered",
|
|
248
|
+
CHANNEL_CREATED: "chat:channel:created",
|
|
249
|
+
CHANNEL_UPDATED: "chat:channel:updated",
|
|
250
|
+
MEMBER_ADDED: "chat:member:added",
|
|
251
|
+
MEMBER_REMOVED: "chat:member:removed",
|
|
252
|
+
MESSAGE_DELETED: "chat:message:deleted",
|
|
253
|
+
MESSAGE_NEW: "chat:message:new",
|
|
254
|
+
MESSAGE_UPDATED: "chat:message:updated",
|
|
255
|
+
REACTION_DELETED: "chat:reaction:deleted",
|
|
256
|
+
REACTION_NEW: "chat:reaction:new",
|
|
257
|
+
};
|
|
258
|
+
export class TriggerNotFoundException extends __BaseException {
|
|
259
|
+
constructor(opts) {
|
|
260
|
+
super({
|
|
261
|
+
name: "TriggerNotFoundException",
|
|
262
|
+
$fault: "client",
|
|
263
|
+
...opts
|
|
264
|
+
});
|
|
265
|
+
this.name = "TriggerNotFoundException";
|
|
266
|
+
this.$fault = "client";
|
|
267
|
+
Object.setPrototypeOf(this, TriggerNotFoundException.prototype);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
193
270
|
export class TagNotFoundException extends __BaseException {
|
|
194
271
|
constructor(opts) {
|
|
195
272
|
super({
|
|
@@ -224,7 +301,9 @@ export const GroupChannelUnsetOptions = {
|
|
|
224
301
|
};
|
|
225
302
|
export const MessageUnsetFields = {
|
|
226
303
|
ATTACHMENTS: "attachments",
|
|
304
|
+
ELEMENTS: "elements",
|
|
227
305
|
FORWARD: "forward",
|
|
306
|
+
MENTIONS: "mentions",
|
|
228
307
|
QUOTE: "quote",
|
|
229
308
|
TEXT: "text",
|
|
230
309
|
};
|
|
@@ -264,3 +343,15 @@ export class TaggedChannelsLimitReachedException extends __BaseException {
|
|
|
264
343
|
Object.setPrototypeOf(this, TaggedChannelsLimitReachedException.prototype);
|
|
265
344
|
}
|
|
266
345
|
}
|
|
346
|
+
export class MessageActionNotFoundException extends __BaseException {
|
|
347
|
+
constructor(opts) {
|
|
348
|
+
super({
|
|
349
|
+
name: "MessageActionNotFoundException",
|
|
350
|
+
$fault: "client",
|
|
351
|
+
...opts
|
|
352
|
+
});
|
|
353
|
+
this.name = "MessageActionNotFoundException";
|
|
354
|
+
this.$fault = "client";
|
|
355
|
+
Object.setPrototypeOf(this, MessageActionNotFoundException.prototype);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConversationsServiceException as __BaseException } from "../models/ConversationsServiceException";
|
|
2
|
-
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, FileNotFoundException, ForbiddenException, MarkUnreadChannelsLimitReachedException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, PinnedChannelsLimitReachedException, RateLimitExceededException, TagNotFoundException, TaggedChannelsLimitReachedException, TagsLimitReachedException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, FileNotFoundException, ForbiddenException, MarkUnreadChannelsLimitReachedException, MemberAlreadyExistException, MemberNotFoundException, MessageActionNotFoundException, MessageNotFoundException, PinnedChannelsLimitReachedException, RateLimitExceededException, TagNotFoundException, TaggedChannelsLimitReachedException, TagsLimitReachedException, TargetNotEligibleException, TargetNotFoundException, TriggerNotFoundException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
4
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_AddChannelMemberCommand = async (input, context) => {
|
|
@@ -93,6 +93,29 @@ export const se_CreateInboxTagCommand = async (input, context) => {
|
|
|
93
93
|
.b(body);
|
|
94
94
|
return b.build();
|
|
95
95
|
};
|
|
96
|
+
export const se_CreateKiteChannelCommand = async (input, context) => {
|
|
97
|
+
const b = rb(input, context);
|
|
98
|
+
const headers = {
|
|
99
|
+
'content-type': 'application/json',
|
|
100
|
+
};
|
|
101
|
+
b.bp("/v2/conversations/kite");
|
|
102
|
+
const query = map({
|
|
103
|
+
[_u]: [, input[_uI]],
|
|
104
|
+
});
|
|
105
|
+
let body;
|
|
106
|
+
body = JSON.stringify(take(input, {
|
|
107
|
+
'channelId': [],
|
|
108
|
+
'initialMessage': _ => _json(_),
|
|
109
|
+
'targetId': [],
|
|
110
|
+
'targetRouteId': [],
|
|
111
|
+
'welcomeMessages': _ => _json(_),
|
|
112
|
+
}));
|
|
113
|
+
b.m("POST")
|
|
114
|
+
.h(headers)
|
|
115
|
+
.q(query)
|
|
116
|
+
.b(body);
|
|
117
|
+
return b.build();
|
|
118
|
+
};
|
|
96
119
|
export const se_DeleteChannelCommand = async (input, context) => {
|
|
97
120
|
const b = rb(input, context);
|
|
98
121
|
const headers = {};
|
|
@@ -182,6 +205,21 @@ export const se_DescribeEventCommand = async (input, context) => {
|
|
|
182
205
|
.b(body);
|
|
183
206
|
return b.build();
|
|
184
207
|
};
|
|
208
|
+
export const se_GetActionTriggerResultCommand = async (input, context) => {
|
|
209
|
+
const b = rb(input, context);
|
|
210
|
+
const headers = {};
|
|
211
|
+
b.bp("/v2/conversations/triggers/{triggerId}/result");
|
|
212
|
+
b.p('triggerId', () => input.triggerId, '{triggerId}', false);
|
|
213
|
+
const query = map({
|
|
214
|
+
[_u]: [, input[_uI]],
|
|
215
|
+
});
|
|
216
|
+
let body;
|
|
217
|
+
b.m("GET")
|
|
218
|
+
.h(headers)
|
|
219
|
+
.q(query)
|
|
220
|
+
.b(body);
|
|
221
|
+
return b.build();
|
|
222
|
+
};
|
|
185
223
|
export const se_GetChannelCommand = async (input, context) => {
|
|
186
224
|
const b = rb(input, context);
|
|
187
225
|
const headers = {};
|
|
@@ -469,6 +507,22 @@ export const se_ListMessagesCommand = async (input, context) => {
|
|
|
469
507
|
.b(body);
|
|
470
508
|
return b.build();
|
|
471
509
|
};
|
|
510
|
+
export const se_ListPinnedMessagesCommand = async (input, context) => {
|
|
511
|
+
const b = rb(input, context);
|
|
512
|
+
const headers = {};
|
|
513
|
+
b.bp("/v2/conversations/channels/{channelId}/pinned_messages");
|
|
514
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
515
|
+
const query = map({
|
|
516
|
+
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
517
|
+
[_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
|
|
518
|
+
});
|
|
519
|
+
let body;
|
|
520
|
+
b.m("GET")
|
|
521
|
+
.h(headers)
|
|
522
|
+
.q(query)
|
|
523
|
+
.b(body);
|
|
524
|
+
return b.build();
|
|
525
|
+
};
|
|
472
526
|
export const se_MarkReadCommand = async (input, context) => {
|
|
473
527
|
const b = rb(input, context);
|
|
474
528
|
const headers = {};
|
|
@@ -541,6 +595,7 @@ export const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
541
595
|
let body;
|
|
542
596
|
body = JSON.stringify(take(input, {
|
|
543
597
|
'set': _ => _json(_),
|
|
598
|
+
'silent': [],
|
|
544
599
|
'unset': _ => _json(_),
|
|
545
600
|
}));
|
|
546
601
|
b.m("PATCH")
|
|
@@ -565,6 +620,29 @@ export const se_PinChannelCommand = async (input, context) => {
|
|
|
565
620
|
.b(body);
|
|
566
621
|
return b.build();
|
|
567
622
|
};
|
|
623
|
+
export const se_PinMessageCommand = async (input, context) => {
|
|
624
|
+
const b = rb(input, context);
|
|
625
|
+
const headers = {
|
|
626
|
+
'content-type': 'application/json',
|
|
627
|
+
};
|
|
628
|
+
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/pin");
|
|
629
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
630
|
+
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
631
|
+
const query = map({
|
|
632
|
+
[_u]: [, input[_uI]],
|
|
633
|
+
});
|
|
634
|
+
let body;
|
|
635
|
+
body = JSON.stringify(take(input, {
|
|
636
|
+
'expiresAfter': [],
|
|
637
|
+
'expiresAt': [],
|
|
638
|
+
'silent': [],
|
|
639
|
+
}));
|
|
640
|
+
b.m("PUT")
|
|
641
|
+
.h(headers)
|
|
642
|
+
.q(query)
|
|
643
|
+
.b(body);
|
|
644
|
+
return b.build();
|
|
645
|
+
};
|
|
568
646
|
export const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
|
|
569
647
|
const b = rb(input, context);
|
|
570
648
|
const headers = {
|
|
@@ -580,6 +658,23 @@ export const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context
|
|
|
580
658
|
.b(body);
|
|
581
659
|
return b.build();
|
|
582
660
|
};
|
|
661
|
+
export const se_SendActionTriggerResultCommand = async (input, context) => {
|
|
662
|
+
const b = rb(input, context);
|
|
663
|
+
const headers = {
|
|
664
|
+
'content-type': 'application/json',
|
|
665
|
+
};
|
|
666
|
+
b.bp("/v2/conversations/triggers/{triggerId}/result");
|
|
667
|
+
b.p('triggerId', () => input.triggerId, '{triggerId}', false);
|
|
668
|
+
let body;
|
|
669
|
+
body = JSON.stringify(take(input, {
|
|
670
|
+
'result': _ => _json(_),
|
|
671
|
+
'status': [],
|
|
672
|
+
}));
|
|
673
|
+
b.m("POST")
|
|
674
|
+
.h(headers)
|
|
675
|
+
.b(body);
|
|
676
|
+
return b.build();
|
|
677
|
+
};
|
|
583
678
|
export const se_SendGiphyCommand = async (input, context) => {
|
|
584
679
|
const b = rb(input, context);
|
|
585
680
|
const headers = {
|
|
@@ -614,6 +709,7 @@ export const se_SendMessageCommand = async (input, context) => {
|
|
|
614
709
|
let body;
|
|
615
710
|
body = JSON.stringify(take(input, {
|
|
616
711
|
'attachments': _ => _json(_),
|
|
712
|
+
'elements': _ => _json(_),
|
|
617
713
|
'forward': _ => _json(_),
|
|
618
714
|
'mentions': _ => _json(_),
|
|
619
715
|
'messageId': [],
|
|
@@ -709,6 +805,23 @@ export const se_TagChannelCommand = async (input, context) => {
|
|
|
709
805
|
.b(body);
|
|
710
806
|
return b.build();
|
|
711
807
|
};
|
|
808
|
+
export const se_TriggerMessageActionCommand = async (input, context) => {
|
|
809
|
+
const b = rb(input, context);
|
|
810
|
+
const headers = {};
|
|
811
|
+
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/actions/{actionId}/trigger");
|
|
812
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
813
|
+
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
814
|
+
b.p('actionId', () => input.actionId, '{actionId}', false);
|
|
815
|
+
const query = map({
|
|
816
|
+
[_u]: [, input[_uI]],
|
|
817
|
+
});
|
|
818
|
+
let body;
|
|
819
|
+
b.m("POST")
|
|
820
|
+
.h(headers)
|
|
821
|
+
.q(query)
|
|
822
|
+
.b(body);
|
|
823
|
+
return b.build();
|
|
824
|
+
};
|
|
712
825
|
export const se_UnpinChannelCommand = async (input, context) => {
|
|
713
826
|
const b = rb(input, context);
|
|
714
827
|
const headers = {};
|
|
@@ -724,6 +837,23 @@ export const se_UnpinChannelCommand = async (input, context) => {
|
|
|
724
837
|
.b(body);
|
|
725
838
|
return b.build();
|
|
726
839
|
};
|
|
840
|
+
export const se_UnpinMessageCommand = async (input, context) => {
|
|
841
|
+
const b = rb(input, context);
|
|
842
|
+
const headers = {};
|
|
843
|
+
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/pin");
|
|
844
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
845
|
+
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
846
|
+
const query = map({
|
|
847
|
+
[_u]: [, input[_uI]],
|
|
848
|
+
[_s]: [() => input.silent !== void 0, () => (input[_s].toString())],
|
|
849
|
+
});
|
|
850
|
+
let body;
|
|
851
|
+
b.m("DELETE")
|
|
852
|
+
.h(headers)
|
|
853
|
+
.q(query)
|
|
854
|
+
.b(body);
|
|
855
|
+
return b.build();
|
|
856
|
+
};
|
|
727
857
|
export const se_UntagChannelCommand = async (input, context) => {
|
|
728
858
|
const b = rb(input, context);
|
|
729
859
|
const headers = {
|
|
@@ -804,9 +934,11 @@ export const se_UpdateMessageCommand = async (input, context) => {
|
|
|
804
934
|
let body;
|
|
805
935
|
body = JSON.stringify(take(input, {
|
|
806
936
|
'attachments': _ => _json(_),
|
|
937
|
+
'elements': _ => _json(_),
|
|
807
938
|
'forward': _ => _json(_),
|
|
808
939
|
'mentions': _ => _json(_),
|
|
809
940
|
'quote': _ => _json(_),
|
|
941
|
+
'silent': [],
|
|
810
942
|
'text': [],
|
|
811
943
|
}));
|
|
812
944
|
b.m("PUT")
|
|
@@ -894,6 +1026,20 @@ export const de_CreateInboxTagCommand = async (output, context) => {
|
|
|
894
1026
|
Object.assign(contents, doc);
|
|
895
1027
|
return contents;
|
|
896
1028
|
};
|
|
1029
|
+
export const de_CreateKiteChannelCommand = async (output, context) => {
|
|
1030
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1031
|
+
return de_CommandError(output, context);
|
|
1032
|
+
}
|
|
1033
|
+
const contents = map({
|
|
1034
|
+
$metadata: deserializeMetadata(output),
|
|
1035
|
+
});
|
|
1036
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1037
|
+
const doc = take(data, {
|
|
1038
|
+
'channel': _json,
|
|
1039
|
+
});
|
|
1040
|
+
Object.assign(contents, doc);
|
|
1041
|
+
return contents;
|
|
1042
|
+
};
|
|
897
1043
|
export const de_DeleteChannelCommand = async (output, context) => {
|
|
898
1044
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
899
1045
|
return de_CommandError(output, context);
|
|
@@ -953,6 +1099,7 @@ export const de_DescribeEventCommand = async (output, context) => {
|
|
|
953
1099
|
});
|
|
954
1100
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
955
1101
|
const doc = take(data, {
|
|
1102
|
+
'WebhookChatActionTriggeredEvent': _json,
|
|
956
1103
|
'WebhookChatChannelCreatedEvent': _json,
|
|
957
1104
|
'WebhookChatChannelUpdatedEvent': _json,
|
|
958
1105
|
'WebhookChatMemberAddedEvent': _json,
|
|
@@ -966,6 +1113,21 @@ export const de_DescribeEventCommand = async (output, context) => {
|
|
|
966
1113
|
Object.assign(contents, doc);
|
|
967
1114
|
return contents;
|
|
968
1115
|
};
|
|
1116
|
+
export const de_GetActionTriggerResultCommand = async (output, context) => {
|
|
1117
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1118
|
+
return de_CommandError(output, context);
|
|
1119
|
+
}
|
|
1120
|
+
const contents = map({
|
|
1121
|
+
$metadata: deserializeMetadata(output),
|
|
1122
|
+
});
|
|
1123
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1124
|
+
const doc = take(data, {
|
|
1125
|
+
'result': _json,
|
|
1126
|
+
'status': __expectString,
|
|
1127
|
+
});
|
|
1128
|
+
Object.assign(contents, doc);
|
|
1129
|
+
return contents;
|
|
1130
|
+
};
|
|
969
1131
|
export const de_GetChannelCommand = async (output, context) => {
|
|
970
1132
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
971
1133
|
return de_CommandError(output, context);
|
|
@@ -1213,6 +1375,20 @@ export const de_ListMessagesCommand = async (output, context) => {
|
|
|
1213
1375
|
Object.assign(contents, doc);
|
|
1214
1376
|
return contents;
|
|
1215
1377
|
};
|
|
1378
|
+
export const de_ListPinnedMessagesCommand = async (output, context) => {
|
|
1379
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1380
|
+
return de_CommandError(output, context);
|
|
1381
|
+
}
|
|
1382
|
+
const contents = map({
|
|
1383
|
+
$metadata: deserializeMetadata(output),
|
|
1384
|
+
});
|
|
1385
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1386
|
+
const doc = take(data, {
|
|
1387
|
+
'messages': _json,
|
|
1388
|
+
});
|
|
1389
|
+
Object.assign(contents, doc);
|
|
1390
|
+
return contents;
|
|
1391
|
+
};
|
|
1216
1392
|
export const de_MarkReadCommand = async (output, context) => {
|
|
1217
1393
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1218
1394
|
return de_CommandError(output, context);
|
|
@@ -1271,6 +1447,16 @@ export const de_PinChannelCommand = async (output, context) => {
|
|
|
1271
1447
|
await collectBody(output.body, context);
|
|
1272
1448
|
return contents;
|
|
1273
1449
|
};
|
|
1450
|
+
export const de_PinMessageCommand = async (output, context) => {
|
|
1451
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1452
|
+
return de_CommandError(output, context);
|
|
1453
|
+
}
|
|
1454
|
+
const contents = map({
|
|
1455
|
+
$metadata: deserializeMetadata(output),
|
|
1456
|
+
});
|
|
1457
|
+
await collectBody(output.body, context);
|
|
1458
|
+
return contents;
|
|
1459
|
+
};
|
|
1274
1460
|
export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
1275
1461
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1276
1462
|
return de_CommandError(output, context);
|
|
@@ -1281,6 +1467,16 @@ export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, contex
|
|
|
1281
1467
|
await collectBody(output.body, context);
|
|
1282
1468
|
return contents;
|
|
1283
1469
|
};
|
|
1470
|
+
export const de_SendActionTriggerResultCommand = async (output, context) => {
|
|
1471
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1472
|
+
return de_CommandError(output, context);
|
|
1473
|
+
}
|
|
1474
|
+
const contents = map({
|
|
1475
|
+
$metadata: deserializeMetadata(output),
|
|
1476
|
+
});
|
|
1477
|
+
await collectBody(output.body, context);
|
|
1478
|
+
return contents;
|
|
1479
|
+
};
|
|
1284
1480
|
export const de_SendGiphyCommand = async (output, context) => {
|
|
1285
1481
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1286
1482
|
return de_CommandError(output, context);
|
|
@@ -1359,6 +1555,20 @@ export const de_TagChannelCommand = async (output, context) => {
|
|
|
1359
1555
|
await collectBody(output.body, context);
|
|
1360
1556
|
return contents;
|
|
1361
1557
|
};
|
|
1558
|
+
export const de_TriggerMessageActionCommand = async (output, context) => {
|
|
1559
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1560
|
+
return de_CommandError(output, context);
|
|
1561
|
+
}
|
|
1562
|
+
const contents = map({
|
|
1563
|
+
$metadata: deserializeMetadata(output),
|
|
1564
|
+
});
|
|
1565
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1566
|
+
const doc = take(data, {
|
|
1567
|
+
'triggerId': __expectString,
|
|
1568
|
+
});
|
|
1569
|
+
Object.assign(contents, doc);
|
|
1570
|
+
return contents;
|
|
1571
|
+
};
|
|
1362
1572
|
export const de_UnpinChannelCommand = async (output, context) => {
|
|
1363
1573
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1364
1574
|
return de_CommandError(output, context);
|
|
@@ -1369,6 +1579,16 @@ export const de_UnpinChannelCommand = async (output, context) => {
|
|
|
1369
1579
|
await collectBody(output.body, context);
|
|
1370
1580
|
return contents;
|
|
1371
1581
|
};
|
|
1582
|
+
export const de_UnpinMessageCommand = async (output, context) => {
|
|
1583
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1584
|
+
return de_CommandError(output, context);
|
|
1585
|
+
}
|
|
1586
|
+
const contents = map({
|
|
1587
|
+
$metadata: deserializeMetadata(output),
|
|
1588
|
+
});
|
|
1589
|
+
await collectBody(output.body, context);
|
|
1590
|
+
return contents;
|
|
1591
|
+
};
|
|
1372
1592
|
export const de_UntagChannelCommand = async (output, context) => {
|
|
1373
1593
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1374
1594
|
return de_CommandError(output, context);
|
|
@@ -1464,12 +1684,21 @@ const de_CommandError = async (output, context) => {
|
|
|
1464
1684
|
case "TagsLimitReachedException":
|
|
1465
1685
|
case "wildix.xbees.conversations#TagsLimitReachedException":
|
|
1466
1686
|
throw await de_TagsLimitReachedExceptionRes(parsedOutput, context);
|
|
1687
|
+
case "TargetNotEligibleException":
|
|
1688
|
+
case "wildix.xbees.conversations#TargetNotEligibleException":
|
|
1689
|
+
throw await de_TargetNotEligibleExceptionRes(parsedOutput, context);
|
|
1690
|
+
case "TargetNotFoundException":
|
|
1691
|
+
case "wildix.xbees.conversations#TargetNotFoundException":
|
|
1692
|
+
throw await de_TargetNotFoundExceptionRes(parsedOutput, context);
|
|
1467
1693
|
case "MemberNotFoundException":
|
|
1468
1694
|
case "wildix.xbees.conversations#MemberNotFoundException":
|
|
1469
1695
|
throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
|
|
1470
1696
|
case "MessageNotFoundException":
|
|
1471
1697
|
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
1472
1698
|
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
1699
|
+
case "TriggerNotFoundException":
|
|
1700
|
+
case "wildix.xbees.conversations#TriggerNotFoundException":
|
|
1701
|
+
throw await de_TriggerNotFoundExceptionRes(parsedOutput, context);
|
|
1473
1702
|
case "FileNotFoundException":
|
|
1474
1703
|
case "wildix.xbees.conversations#FileNotFoundException":
|
|
1475
1704
|
throw await de_FileNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -1488,6 +1717,9 @@ const de_CommandError = async (output, context) => {
|
|
|
1488
1717
|
case "TaggedChannelsLimitReachedException":
|
|
1489
1718
|
case "wildix.xbees.conversations#TaggedChannelsLimitReachedException":
|
|
1490
1719
|
throw await de_TaggedChannelsLimitReachedExceptionRes(parsedOutput, context);
|
|
1720
|
+
case "MessageActionNotFoundException":
|
|
1721
|
+
case "wildix.xbees.conversations#MessageActionNotFoundException":
|
|
1722
|
+
throw await de_MessageActionNotFoundExceptionRes(parsedOutput, context);
|
|
1491
1723
|
default:
|
|
1492
1724
|
const parsedBody = parsedOutput.body;
|
|
1493
1725
|
return throwDefaultError({
|
|
@@ -1633,6 +1865,19 @@ const de_MemberNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
1633
1865
|
});
|
|
1634
1866
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1635
1867
|
};
|
|
1868
|
+
const de_MessageActionNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1869
|
+
const contents = map({});
|
|
1870
|
+
const data = parsedOutput.body;
|
|
1871
|
+
const doc = take(data, {
|
|
1872
|
+
'message': __expectString,
|
|
1873
|
+
});
|
|
1874
|
+
Object.assign(contents, doc);
|
|
1875
|
+
const exception = new MessageActionNotFoundException({
|
|
1876
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1877
|
+
...contents
|
|
1878
|
+
});
|
|
1879
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1880
|
+
};
|
|
1636
1881
|
const de_MessageNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1637
1882
|
const contents = map({});
|
|
1638
1883
|
const data = parsedOutput.body;
|
|
@@ -1698,6 +1943,46 @@ const de_TagsLimitReachedExceptionRes = async (parsedOutput, context) => {
|
|
|
1698
1943
|
});
|
|
1699
1944
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1700
1945
|
};
|
|
1946
|
+
const de_TargetNotEligibleExceptionRes = async (parsedOutput, context) => {
|
|
1947
|
+
const contents = map({});
|
|
1948
|
+
const data = parsedOutput.body;
|
|
1949
|
+
const doc = take(data, {
|
|
1950
|
+
'message': __expectString,
|
|
1951
|
+
'reason': __expectString,
|
|
1952
|
+
});
|
|
1953
|
+
Object.assign(contents, doc);
|
|
1954
|
+
const exception = new TargetNotEligibleException({
|
|
1955
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1956
|
+
...contents
|
|
1957
|
+
});
|
|
1958
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1959
|
+
};
|
|
1960
|
+
const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1961
|
+
const contents = map({});
|
|
1962
|
+
const data = parsedOutput.body;
|
|
1963
|
+
const doc = take(data, {
|
|
1964
|
+
'message': __expectString,
|
|
1965
|
+
});
|
|
1966
|
+
Object.assign(contents, doc);
|
|
1967
|
+
const exception = new TargetNotFoundException({
|
|
1968
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1969
|
+
...contents
|
|
1970
|
+
});
|
|
1971
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1972
|
+
};
|
|
1973
|
+
const de_TriggerNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1974
|
+
const contents = map({});
|
|
1975
|
+
const data = parsedOutput.body;
|
|
1976
|
+
const doc = take(data, {
|
|
1977
|
+
'message': __expectString,
|
|
1978
|
+
});
|
|
1979
|
+
Object.assign(contents, doc);
|
|
1980
|
+
const exception = new TriggerNotFoundException({
|
|
1981
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1982
|
+
...contents
|
|
1983
|
+
});
|
|
1984
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1985
|
+
};
|
|
1701
1986
|
const deserializeMetadata = (output) => ({
|
|
1702
1987
|
httpStatusCode: output.statusCode,
|
|
1703
1988
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|