@wildix/xbees-conversations-client 1.0.62 → 1.0.64
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 +6 -0
- package/dist-cjs/commands/ListPinnedMessagesCommand.js +21 -0
- package/dist-cjs/commands/PinMessageCommand.js +21 -0
- package/dist-cjs/commands/UnpinMessageCommand.js +21 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/models/models_0.js +13 -13
- package/dist-cjs/protocols/Aws_restJson1.js +102 -2
- package/dist-es/Conversations.js +6 -0
- package/dist-es/commands/ListPinnedMessagesCommand.js +17 -0
- package/dist-es/commands/PinMessageCommand.js +17 -0
- package/dist-es/commands/UnpinMessageCommand.js +17 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/models/models_0.js +12 -12
- package/dist-es/protocols/Aws_restJson1.js +93 -0
- package/dist-types/Conversations.d.ts +21 -0
- package/dist-types/ConversationsClient.d.ts +5 -2
- package/dist-types/commands/DescribeEventCommand.d.ts +15 -0
- package/dist-types/commands/ListPinnedMessagesCommand.d.ts +261 -0
- package/dist-types/commands/PartialUpdateMessageCommand.d.ts +1 -0
- package/dist-types/commands/PinMessageCommand.d.ts +73 -0
- package/dist-types/commands/UnpinMessageCommand.d.ts +71 -0
- package/dist-types/commands/UpdateMessageCommand.d.ts +1 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +210 -85
- package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
- package/package.json +1 -1
|
@@ -31,11 +31,13 @@ const ListInboxTaggedChannelsCommand_1 = require("./commands/ListInboxTaggedChan
|
|
|
31
31
|
const ListInboxTagsCommand_1 = require("./commands/ListInboxTagsCommand");
|
|
32
32
|
const ListMessageReactionsCommand_1 = require("./commands/ListMessageReactionsCommand");
|
|
33
33
|
const ListMessagesCommand_1 = require("./commands/ListMessagesCommand");
|
|
34
|
+
const ListPinnedMessagesCommand_1 = require("./commands/ListPinnedMessagesCommand");
|
|
34
35
|
const MarkReadCommand_1 = require("./commands/MarkReadCommand");
|
|
35
36
|
const MarkUnreadCommand_1 = require("./commands/MarkUnreadCommand");
|
|
36
37
|
const PartialUpdateChannelCommand_1 = require("./commands/PartialUpdateChannelCommand");
|
|
37
38
|
const PartialUpdateMessageCommand_1 = require("./commands/PartialUpdateMessageCommand");
|
|
38
39
|
const PinChannelCommand_1 = require("./commands/PinChannelCommand");
|
|
40
|
+
const PinMessageCommand_1 = require("./commands/PinMessageCommand");
|
|
39
41
|
const ScheduleExternalFlagAdjustmentJobCommand_1 = require("./commands/ScheduleExternalFlagAdjustmentJobCommand");
|
|
40
42
|
const SendActionTriggerResultCommand_1 = require("./commands/SendActionTriggerResultCommand");
|
|
41
43
|
const SendGiphyCommand_1 = require("./commands/SendGiphyCommand");
|
|
@@ -47,6 +49,7 @@ const ShowChannelCommand_1 = require("./commands/ShowChannelCommand");
|
|
|
47
49
|
const TagChannelCommand_1 = require("./commands/TagChannelCommand");
|
|
48
50
|
const TriggerMessageActionCommand_1 = require("./commands/TriggerMessageActionCommand");
|
|
49
51
|
const UnpinChannelCommand_1 = require("./commands/UnpinChannelCommand");
|
|
52
|
+
const UnpinMessageCommand_1 = require("./commands/UnpinMessageCommand");
|
|
50
53
|
const UntagChannelCommand_1 = require("./commands/UntagChannelCommand");
|
|
51
54
|
const UpdateChannelCommand_1 = require("./commands/UpdateChannelCommand");
|
|
52
55
|
const UpdateInboxTagCommand_1 = require("./commands/UpdateInboxTagCommand");
|
|
@@ -83,11 +86,13 @@ const commands = {
|
|
|
83
86
|
ListInboxTagsCommand: ListInboxTagsCommand_1.ListInboxTagsCommand,
|
|
84
87
|
ListMessageReactionsCommand: ListMessageReactionsCommand_1.ListMessageReactionsCommand,
|
|
85
88
|
ListMessagesCommand: ListMessagesCommand_1.ListMessagesCommand,
|
|
89
|
+
ListPinnedMessagesCommand: ListPinnedMessagesCommand_1.ListPinnedMessagesCommand,
|
|
86
90
|
MarkReadCommand: MarkReadCommand_1.MarkReadCommand,
|
|
87
91
|
MarkUnreadCommand: MarkUnreadCommand_1.MarkUnreadCommand,
|
|
88
92
|
PartialUpdateChannelCommand: PartialUpdateChannelCommand_1.PartialUpdateChannelCommand,
|
|
89
93
|
PartialUpdateMessageCommand: PartialUpdateMessageCommand_1.PartialUpdateMessageCommand,
|
|
90
94
|
PinChannelCommand: PinChannelCommand_1.PinChannelCommand,
|
|
95
|
+
PinMessageCommand: PinMessageCommand_1.PinMessageCommand,
|
|
91
96
|
ScheduleExternalFlagAdjustmentJobCommand: ScheduleExternalFlagAdjustmentJobCommand_1.ScheduleExternalFlagAdjustmentJobCommand,
|
|
92
97
|
SendActionTriggerResultCommand: SendActionTriggerResultCommand_1.SendActionTriggerResultCommand,
|
|
93
98
|
SendGiphyCommand: SendGiphyCommand_1.SendGiphyCommand,
|
|
@@ -99,6 +104,7 @@ const commands = {
|
|
|
99
104
|
TagChannelCommand: TagChannelCommand_1.TagChannelCommand,
|
|
100
105
|
TriggerMessageActionCommand: TriggerMessageActionCommand_1.TriggerMessageActionCommand,
|
|
101
106
|
UnpinChannelCommand: UnpinChannelCommand_1.UnpinChannelCommand,
|
|
107
|
+
UnpinMessageCommand: UnpinMessageCommand_1.UnpinMessageCommand,
|
|
102
108
|
UntagChannelCommand: UntagChannelCommand_1.UntagChannelCommand,
|
|
103
109
|
UpdateChannelCommand: UpdateChannelCommand_1.UpdateChannelCommand,
|
|
104
110
|
UpdateInboxTagCommand: UpdateInboxTagCommand_1.UpdateInboxTagCommand,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListPinnedMessagesCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class ListPinnedMessagesCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("Conversations", "ListPinnedMessages", {})
|
|
15
|
+
.n("ConversationsClient", "ListPinnedMessagesCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_ListPinnedMessagesCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_ListPinnedMessagesCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.ListPinnedMessagesCommand = ListPinnedMessagesCommand;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PinMessageCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class PinMessageCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("Conversations", "PinMessage", {})
|
|
15
|
+
.n("ConversationsClient", "PinMessageCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_PinMessageCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_PinMessageCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.PinMessageCommand = PinMessageCommand;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnpinMessageCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class UnpinMessageCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("Conversations", "UnpinMessage", {})
|
|
15
|
+
.n("ConversationsClient", "UnpinMessageCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_UnpinMessageCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_UnpinMessageCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.UnpinMessageCommand = UnpinMessageCommand;
|
|
@@ -30,11 +30,13 @@ tslib_1.__exportStar(require("./ListInboxTaggedChannelsCommand"), exports);
|
|
|
30
30
|
tslib_1.__exportStar(require("./ListInboxTagsCommand"), exports);
|
|
31
31
|
tslib_1.__exportStar(require("./ListMessageReactionsCommand"), exports);
|
|
32
32
|
tslib_1.__exportStar(require("./ListMessagesCommand"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./ListPinnedMessagesCommand"), exports);
|
|
33
34
|
tslib_1.__exportStar(require("./MarkReadCommand"), exports);
|
|
34
35
|
tslib_1.__exportStar(require("./MarkUnreadCommand"), exports);
|
|
35
36
|
tslib_1.__exportStar(require("./PartialUpdateChannelCommand"), exports);
|
|
36
37
|
tslib_1.__exportStar(require("./PartialUpdateMessageCommand"), exports);
|
|
37
38
|
tslib_1.__exportStar(require("./PinChannelCommand"), exports);
|
|
39
|
+
tslib_1.__exportStar(require("./PinMessageCommand"), exports);
|
|
38
40
|
tslib_1.__exportStar(require("./ScheduleExternalFlagAdjustmentJobCommand"), exports);
|
|
39
41
|
tslib_1.__exportStar(require("./SendActionTriggerResultCommand"), exports);
|
|
40
42
|
tslib_1.__exportStar(require("./SendGiphyCommand"), exports);
|
|
@@ -46,6 +48,7 @@ tslib_1.__exportStar(require("./ShowChannelCommand"), exports);
|
|
|
46
48
|
tslib_1.__exportStar(require("./TagChannelCommand"), exports);
|
|
47
49
|
tslib_1.__exportStar(require("./TriggerMessageActionCommand"), exports);
|
|
48
50
|
tslib_1.__exportStar(require("./UnpinChannelCommand"), exports);
|
|
51
|
+
tslib_1.__exportStar(require("./UnpinMessageCommand"), exports);
|
|
49
52
|
tslib_1.__exportStar(require("./UntagChannelCommand"), exports);
|
|
50
53
|
tslib_1.__exportStar(require("./UpdateChannelCommand"), exports);
|
|
51
54
|
tslib_1.__exportStar(require("./UpdateInboxTagCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageActionNotFoundException = exports.TaggedChannelsLimitReachedException = exports.ConversationsServiceException = exports.PinnedChannelsLimitReachedException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.MarkUnreadChannelsLimitReachedException = exports.TagNotFoundException = exports.FileNotFoundException = exports.TriggerNotFoundException = exports.
|
|
3
|
+
exports.MessageActionNotFoundException = exports.TaggedChannelsLimitReachedException = exports.ConversationsServiceException = exports.PinnedChannelsLimitReachedException = exports.MessageUnsetFields = exports.GroupChannelUnsetOptions = exports.MarkUnreadChannelsLimitReachedException = exports.TagNotFoundException = exports.FileNotFoundException = exports.TriggerNotFoundException = exports.WebhookEventType = exports.MessageWhatsAppStatus = exports.MessageType = exports.MessageSmsStatus = exports.Element = exports.ReactionType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.TagsLimitReachedException = exports.ConversationFileCategory = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ActionTriggerStatus = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ChannelType = exports.RateLimitExceededException = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
4
4
|
const ConversationsServiceException_1 = require("./ConversationsServiceException");
|
|
5
5
|
class ValidationException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -191,18 +191,6 @@ exports.ReactionType = {
|
|
|
191
191
|
THUMBSUP: "thumbsup",
|
|
192
192
|
WHITE_CHECK_MARK: "white_check_mark",
|
|
193
193
|
};
|
|
194
|
-
exports.WebhookEventType = {
|
|
195
|
-
ACTION_TRIGGERED: "chat:action:triggered",
|
|
196
|
-
CHANNEL_CREATED: "chat:channel:created",
|
|
197
|
-
CHANNEL_UPDATED: "chat:channel:updated",
|
|
198
|
-
MEMBER_ADDED: "chat:member:added",
|
|
199
|
-
MEMBER_REMOVED: "chat:member:removed",
|
|
200
|
-
MESSAGE_DELETED: "chat:message:deleted",
|
|
201
|
-
MESSAGE_NEW: "chat:message:new",
|
|
202
|
-
MESSAGE_UPDATED: "chat:message:updated",
|
|
203
|
-
REACTION_DELETED: "chat:reaction:deleted",
|
|
204
|
-
REACTION_NEW: "chat:reaction:new",
|
|
205
|
-
};
|
|
206
194
|
var Element;
|
|
207
195
|
(function (Element) {
|
|
208
196
|
Element.visit = (value, visitor) => {
|
|
@@ -237,6 +225,18 @@ exports.MessageWhatsAppStatus = {
|
|
|
237
225
|
SENT: "sent",
|
|
238
226
|
TRYING: "trying",
|
|
239
227
|
};
|
|
228
|
+
exports.WebhookEventType = {
|
|
229
|
+
ACTION_TRIGGERED: "chat:action:triggered",
|
|
230
|
+
CHANNEL_CREATED: "chat:channel:created",
|
|
231
|
+
CHANNEL_UPDATED: "chat:channel:updated",
|
|
232
|
+
MEMBER_ADDED: "chat:member:added",
|
|
233
|
+
MEMBER_REMOVED: "chat:member:removed",
|
|
234
|
+
MESSAGE_DELETED: "chat:message:deleted",
|
|
235
|
+
MESSAGE_NEW: "chat:message:new",
|
|
236
|
+
MESSAGE_UPDATED: "chat:message:updated",
|
|
237
|
+
REACTION_DELETED: "chat:reaction:deleted",
|
|
238
|
+
REACTION_NEW: "chat:reaction:new",
|
|
239
|
+
};
|
|
240
240
|
class TriggerNotFoundException extends ConversationsServiceException_1.ConversationsServiceException {
|
|
241
241
|
constructor(opts) {
|
|
242
242
|
super({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.se_UpdateChannelCommand = exports.se_UntagChannelCommand = exports.se_UnpinMessageCommand = exports.se_UnpinChannelCommand = exports.se_TriggerMessageActionCommand = exports.se_TagChannelCommand = exports.se_ShowChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = exports.se_SendGiphyCommand = exports.se_SendActionTriggerResultCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_PinMessageCommand = exports.se_PinChannelCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MarkUnreadCommand = exports.se_MarkReadCommand = exports.se_ListPinnedMessagesCommand = exports.se_ListMessagesCommand = exports.se_ListMessageReactionsCommand = exports.se_ListInboxTagsCommand = exports.se_ListInboxTaggedChannelsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_HideChannelCommand = exports.se_GetUploadedFileInfoCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetInboxStateCommand = exports.se_GetFilePresignedDownloadUrlCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_GetActionTriggerResultCommand = exports.se_DescribeEventCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteInboxTagCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateInboxTagCommand = exports.se_CreateGroupChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
|
|
4
|
+
exports.de_UnpinChannelCommand = exports.de_TriggerMessageActionCommand = exports.de_TagChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_SendActionTriggerResultCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PinMessageCommand = exports.de_PinChannelCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkUnreadCommand = exports.de_MarkReadCommand = exports.de_ListPinnedMessagesCommand = exports.de_ListMessagesCommand = exports.de_ListMessageReactionsCommand = exports.de_ListInboxTagsCommand = exports.de_ListInboxTaggedChannelsCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_HideChannelCommand = exports.de_GetUploadedFileInfoCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = exports.de_GetInboxStateCommand = exports.de_GetFilePresignedDownloadUrlCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_GetActionTriggerResultCommand = exports.de_DescribeEventCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteInboxTagCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateInboxTagCommand = exports.de_CreateGroupChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UploadFileCommand = exports.se_UpdateMessageCommand = exports.se_UpdateInboxTagCommand = void 0;
|
|
5
|
+
exports.de_UploadFileCommand = exports.de_UpdateMessageCommand = exports.de_UpdateInboxTagCommand = exports.de_UpdateChannelCommand = exports.de_UntagChannelCommand = exports.de_UnpinMessageCommand = void 0;
|
|
5
6
|
const ConversationsServiceException_1 = require("../models/ConversationsServiceException");
|
|
6
7
|
const models_0_1 = require("../models/models_0");
|
|
7
8
|
const core_1 = require("@smithy/core");
|
|
@@ -517,6 +518,23 @@ const se_ListMessagesCommand = async (input, context) => {
|
|
|
517
518
|
return b.build();
|
|
518
519
|
};
|
|
519
520
|
exports.se_ListMessagesCommand = se_ListMessagesCommand;
|
|
521
|
+
const se_ListPinnedMessagesCommand = async (input, context) => {
|
|
522
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
523
|
+
const headers = {};
|
|
524
|
+
b.bp("/v2/conversations/channels/{channelId}/pinned_messages");
|
|
525
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
526
|
+
const query = (0, smithy_client_1.map)({
|
|
527
|
+
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
528
|
+
[_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
|
|
529
|
+
});
|
|
530
|
+
let body;
|
|
531
|
+
b.m("GET")
|
|
532
|
+
.h(headers)
|
|
533
|
+
.q(query)
|
|
534
|
+
.b(body);
|
|
535
|
+
return b.build();
|
|
536
|
+
};
|
|
537
|
+
exports.se_ListPinnedMessagesCommand = se_ListPinnedMessagesCommand;
|
|
520
538
|
const se_MarkReadCommand = async (input, context) => {
|
|
521
539
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
522
540
|
const headers = {};
|
|
@@ -592,6 +610,7 @@ const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
592
610
|
let body;
|
|
593
611
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
594
612
|
'set': _ => (0, smithy_client_1._json)(_),
|
|
613
|
+
'silent': [],
|
|
595
614
|
'unset': _ => (0, smithy_client_1._json)(_),
|
|
596
615
|
}));
|
|
597
616
|
b.m("PATCH")
|
|
@@ -618,6 +637,30 @@ const se_PinChannelCommand = async (input, context) => {
|
|
|
618
637
|
return b.build();
|
|
619
638
|
};
|
|
620
639
|
exports.se_PinChannelCommand = se_PinChannelCommand;
|
|
640
|
+
const se_PinMessageCommand = async (input, context) => {
|
|
641
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
642
|
+
const headers = {
|
|
643
|
+
'content-type': 'application/json',
|
|
644
|
+
};
|
|
645
|
+
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/pin");
|
|
646
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
647
|
+
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
648
|
+
const query = (0, smithy_client_1.map)({
|
|
649
|
+
[_u]: [, input[_uI]],
|
|
650
|
+
});
|
|
651
|
+
let body;
|
|
652
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
653
|
+
'expiresAfter': [],
|
|
654
|
+
'expiresTill': [],
|
|
655
|
+
'silent': [],
|
|
656
|
+
}));
|
|
657
|
+
b.m("PUT")
|
|
658
|
+
.h(headers)
|
|
659
|
+
.q(query)
|
|
660
|
+
.b(body);
|
|
661
|
+
return b.build();
|
|
662
|
+
};
|
|
663
|
+
exports.se_PinMessageCommand = se_PinMessageCommand;
|
|
621
664
|
const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
|
|
622
665
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
623
666
|
const headers = {
|
|
@@ -823,6 +866,24 @@ const se_UnpinChannelCommand = async (input, context) => {
|
|
|
823
866
|
return b.build();
|
|
824
867
|
};
|
|
825
868
|
exports.se_UnpinChannelCommand = se_UnpinChannelCommand;
|
|
869
|
+
const se_UnpinMessageCommand = async (input, context) => {
|
|
870
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
871
|
+
const headers = {};
|
|
872
|
+
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/pin");
|
|
873
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
874
|
+
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
875
|
+
const query = (0, smithy_client_1.map)({
|
|
876
|
+
[_u]: [, input[_uI]],
|
|
877
|
+
[_s]: [() => input.silent !== void 0, () => (input[_s].toString())],
|
|
878
|
+
});
|
|
879
|
+
let body;
|
|
880
|
+
b.m("DELETE")
|
|
881
|
+
.h(headers)
|
|
882
|
+
.q(query)
|
|
883
|
+
.b(body);
|
|
884
|
+
return b.build();
|
|
885
|
+
};
|
|
886
|
+
exports.se_UnpinMessageCommand = se_UnpinMessageCommand;
|
|
826
887
|
const se_UntagChannelCommand = async (input, context) => {
|
|
827
888
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
828
889
|
const headers = {
|
|
@@ -910,6 +971,7 @@ const se_UpdateMessageCommand = async (input, context) => {
|
|
|
910
971
|
'forward': _ => (0, smithy_client_1._json)(_),
|
|
911
972
|
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
912
973
|
'quote': _ => (0, smithy_client_1._json)(_),
|
|
974
|
+
'silent': [],
|
|
913
975
|
'text': [],
|
|
914
976
|
}));
|
|
915
977
|
b.m("PUT")
|
|
@@ -1067,6 +1129,7 @@ const de_DescribeEventCommand = async (output, context) => {
|
|
|
1067
1129
|
});
|
|
1068
1130
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1069
1131
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1132
|
+
'WebhookChatActionTriggeredEvent': smithy_client_1._json,
|
|
1070
1133
|
'WebhookChatChannelCreatedEvent': smithy_client_1._json,
|
|
1071
1134
|
'WebhookChatChannelUpdatedEvent': smithy_client_1._json,
|
|
1072
1135
|
'WebhookChatMemberAddedEvent': smithy_client_1._json,
|
|
@@ -1362,6 +1425,21 @@ const de_ListMessagesCommand = async (output, context) => {
|
|
|
1362
1425
|
return contents;
|
|
1363
1426
|
};
|
|
1364
1427
|
exports.de_ListMessagesCommand = de_ListMessagesCommand;
|
|
1428
|
+
const de_ListPinnedMessagesCommand = async (output, context) => {
|
|
1429
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1430
|
+
return de_CommandError(output, context);
|
|
1431
|
+
}
|
|
1432
|
+
const contents = (0, smithy_client_1.map)({
|
|
1433
|
+
$metadata: deserializeMetadata(output),
|
|
1434
|
+
});
|
|
1435
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1436
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1437
|
+
'messages': smithy_client_1._json,
|
|
1438
|
+
});
|
|
1439
|
+
Object.assign(contents, doc);
|
|
1440
|
+
return contents;
|
|
1441
|
+
};
|
|
1442
|
+
exports.de_ListPinnedMessagesCommand = de_ListPinnedMessagesCommand;
|
|
1365
1443
|
const de_MarkReadCommand = async (output, context) => {
|
|
1366
1444
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1367
1445
|
return de_CommandError(output, context);
|
|
@@ -1425,6 +1503,17 @@ const de_PinChannelCommand = async (output, context) => {
|
|
|
1425
1503
|
return contents;
|
|
1426
1504
|
};
|
|
1427
1505
|
exports.de_PinChannelCommand = de_PinChannelCommand;
|
|
1506
|
+
const de_PinMessageCommand = async (output, context) => {
|
|
1507
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1508
|
+
return de_CommandError(output, context);
|
|
1509
|
+
}
|
|
1510
|
+
const contents = (0, smithy_client_1.map)({
|
|
1511
|
+
$metadata: deserializeMetadata(output),
|
|
1512
|
+
});
|
|
1513
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1514
|
+
return contents;
|
|
1515
|
+
};
|
|
1516
|
+
exports.de_PinMessageCommand = de_PinMessageCommand;
|
|
1428
1517
|
const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
1429
1518
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1430
1519
|
return de_CommandError(output, context);
|
|
@@ -1558,6 +1647,17 @@ const de_UnpinChannelCommand = async (output, context) => {
|
|
|
1558
1647
|
return contents;
|
|
1559
1648
|
};
|
|
1560
1649
|
exports.de_UnpinChannelCommand = de_UnpinChannelCommand;
|
|
1650
|
+
const de_UnpinMessageCommand = async (output, context) => {
|
|
1651
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1652
|
+
return de_CommandError(output, context);
|
|
1653
|
+
}
|
|
1654
|
+
const contents = (0, smithy_client_1.map)({
|
|
1655
|
+
$metadata: deserializeMetadata(output),
|
|
1656
|
+
});
|
|
1657
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1658
|
+
return contents;
|
|
1659
|
+
};
|
|
1660
|
+
exports.de_UnpinMessageCommand = de_UnpinMessageCommand;
|
|
1561
1661
|
const de_UntagChannelCommand = async (output, context) => {
|
|
1562
1662
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1563
1663
|
return de_CommandError(output, context);
|
package/dist-es/Conversations.js
CHANGED
|
@@ -28,11 +28,13 @@ import { ListInboxTaggedChannelsCommand, } from "./commands/ListInboxTaggedChann
|
|
|
28
28
|
import { ListInboxTagsCommand, } from "./commands/ListInboxTagsCommand";
|
|
29
29
|
import { ListMessageReactionsCommand, } from "./commands/ListMessageReactionsCommand";
|
|
30
30
|
import { ListMessagesCommand, } from "./commands/ListMessagesCommand";
|
|
31
|
+
import { ListPinnedMessagesCommand, } from "./commands/ListPinnedMessagesCommand";
|
|
31
32
|
import { MarkReadCommand, } from "./commands/MarkReadCommand";
|
|
32
33
|
import { MarkUnreadCommand, } from "./commands/MarkUnreadCommand";
|
|
33
34
|
import { PartialUpdateChannelCommand, } from "./commands/PartialUpdateChannelCommand";
|
|
34
35
|
import { PartialUpdateMessageCommand, } from "./commands/PartialUpdateMessageCommand";
|
|
35
36
|
import { PinChannelCommand, } from "./commands/PinChannelCommand";
|
|
37
|
+
import { PinMessageCommand, } from "./commands/PinMessageCommand";
|
|
36
38
|
import { ScheduleExternalFlagAdjustmentJobCommand, } from "./commands/ScheduleExternalFlagAdjustmentJobCommand";
|
|
37
39
|
import { SendActionTriggerResultCommand, } from "./commands/SendActionTriggerResultCommand";
|
|
38
40
|
import { SendGiphyCommand, } from "./commands/SendGiphyCommand";
|
|
@@ -44,6 +46,7 @@ import { ShowChannelCommand, } from "./commands/ShowChannelCommand";
|
|
|
44
46
|
import { TagChannelCommand, } from "./commands/TagChannelCommand";
|
|
45
47
|
import { TriggerMessageActionCommand, } from "./commands/TriggerMessageActionCommand";
|
|
46
48
|
import { UnpinChannelCommand, } from "./commands/UnpinChannelCommand";
|
|
49
|
+
import { UnpinMessageCommand, } from "./commands/UnpinMessageCommand";
|
|
47
50
|
import { UntagChannelCommand, } from "./commands/UntagChannelCommand";
|
|
48
51
|
import { UpdateChannelCommand, } from "./commands/UpdateChannelCommand";
|
|
49
52
|
import { UpdateInboxTagCommand, } from "./commands/UpdateInboxTagCommand";
|
|
@@ -80,11 +83,13 @@ const commands = {
|
|
|
80
83
|
ListInboxTagsCommand,
|
|
81
84
|
ListMessageReactionsCommand,
|
|
82
85
|
ListMessagesCommand,
|
|
86
|
+
ListPinnedMessagesCommand,
|
|
83
87
|
MarkReadCommand,
|
|
84
88
|
MarkUnreadCommand,
|
|
85
89
|
PartialUpdateChannelCommand,
|
|
86
90
|
PartialUpdateMessageCommand,
|
|
87
91
|
PinChannelCommand,
|
|
92
|
+
PinMessageCommand,
|
|
88
93
|
ScheduleExternalFlagAdjustmentJobCommand,
|
|
89
94
|
SendActionTriggerResultCommand,
|
|
90
95
|
SendGiphyCommand,
|
|
@@ -96,6 +101,7 @@ const commands = {
|
|
|
96
101
|
TagChannelCommand,
|
|
97
102
|
TriggerMessageActionCommand,
|
|
98
103
|
UnpinChannelCommand,
|
|
104
|
+
UnpinMessageCommand,
|
|
99
105
|
UntagChannelCommand,
|
|
100
106
|
UpdateChannelCommand,
|
|
101
107
|
UpdateInboxTagCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_ListPinnedMessagesCommand, se_ListPinnedMessagesCommand, } 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 ListPinnedMessagesCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "ListPinnedMessages", {})
|
|
12
|
+
.n("ConversationsClient", "ListPinnedMessagesCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_ListPinnedMessagesCommand)
|
|
15
|
+
.de(de_ListPinnedMessagesCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_PinMessageCommand, se_PinMessageCommand, } 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 PinMessageCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "PinMessage", {})
|
|
12
|
+
.n("ConversationsClient", "PinMessageCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_PinMessageCommand)
|
|
15
|
+
.de(de_PinMessageCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -27,11 +27,13 @@ export * from "./ListInboxTaggedChannelsCommand";
|
|
|
27
27
|
export * from "./ListInboxTagsCommand";
|
|
28
28
|
export * from "./ListMessageReactionsCommand";
|
|
29
29
|
export * from "./ListMessagesCommand";
|
|
30
|
+
export * from "./ListPinnedMessagesCommand";
|
|
30
31
|
export * from "./MarkReadCommand";
|
|
31
32
|
export * from "./MarkUnreadCommand";
|
|
32
33
|
export * from "./PartialUpdateChannelCommand";
|
|
33
34
|
export * from "./PartialUpdateMessageCommand";
|
|
34
35
|
export * from "./PinChannelCommand";
|
|
36
|
+
export * from "./PinMessageCommand";
|
|
35
37
|
export * from "./ScheduleExternalFlagAdjustmentJobCommand";
|
|
36
38
|
export * from "./SendActionTriggerResultCommand";
|
|
37
39
|
export * from "./SendGiphyCommand";
|
|
@@ -43,6 +45,7 @@ export * from "./ShowChannelCommand";
|
|
|
43
45
|
export * from "./TagChannelCommand";
|
|
44
46
|
export * from "./TriggerMessageActionCommand";
|
|
45
47
|
export * from "./UnpinChannelCommand";
|
|
48
|
+
export * from "./UnpinMessageCommand";
|
|
46
49
|
export * from "./UntagChannelCommand";
|
|
47
50
|
export * from "./UpdateChannelCommand";
|
|
48
51
|
export * from "./UpdateInboxTagCommand";
|
|
@@ -179,18 +179,6 @@ export const ReactionType = {
|
|
|
179
179
|
THUMBSUP: "thumbsup",
|
|
180
180
|
WHITE_CHECK_MARK: "white_check_mark",
|
|
181
181
|
};
|
|
182
|
-
export const WebhookEventType = {
|
|
183
|
-
ACTION_TRIGGERED: "chat:action:triggered",
|
|
184
|
-
CHANNEL_CREATED: "chat:channel:created",
|
|
185
|
-
CHANNEL_UPDATED: "chat:channel:updated",
|
|
186
|
-
MEMBER_ADDED: "chat:member:added",
|
|
187
|
-
MEMBER_REMOVED: "chat:member:removed",
|
|
188
|
-
MESSAGE_DELETED: "chat:message:deleted",
|
|
189
|
-
MESSAGE_NEW: "chat:message:new",
|
|
190
|
-
MESSAGE_UPDATED: "chat:message:updated",
|
|
191
|
-
REACTION_DELETED: "chat:reaction:deleted",
|
|
192
|
-
REACTION_NEW: "chat:reaction:new",
|
|
193
|
-
};
|
|
194
182
|
export var Element;
|
|
195
183
|
(function (Element) {
|
|
196
184
|
Element.visit = (value, visitor) => {
|
|
@@ -225,6 +213,18 @@ export const MessageWhatsAppStatus = {
|
|
|
225
213
|
SENT: "sent",
|
|
226
214
|
TRYING: "trying",
|
|
227
215
|
};
|
|
216
|
+
export const WebhookEventType = {
|
|
217
|
+
ACTION_TRIGGERED: "chat:action:triggered",
|
|
218
|
+
CHANNEL_CREATED: "chat:channel:created",
|
|
219
|
+
CHANNEL_UPDATED: "chat:channel:updated",
|
|
220
|
+
MEMBER_ADDED: "chat:member:added",
|
|
221
|
+
MEMBER_REMOVED: "chat:member:removed",
|
|
222
|
+
MESSAGE_DELETED: "chat:message:deleted",
|
|
223
|
+
MESSAGE_NEW: "chat:message:new",
|
|
224
|
+
MESSAGE_UPDATED: "chat:message:updated",
|
|
225
|
+
REACTION_DELETED: "chat:reaction:deleted",
|
|
226
|
+
REACTION_NEW: "chat:reaction:new",
|
|
227
|
+
};
|
|
228
228
|
export class TriggerNotFoundException extends __BaseException {
|
|
229
229
|
constructor(opts) {
|
|
230
230
|
super({
|