@wildix/xbees-conversations-client 1.1.0 → 1.1.1
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 +12 -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 +6 -0
- package/dist-cjs/models/models_0.js +77 -12
- package/dist-cjs/protocols/Aws_restJson1.js +230 -2
- package/dist-es/Conversations.js +12 -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 +6 -0
- package/dist-es/models/models_0.js +74 -11
- package/dist-es/protocols/Aws_restJson1.js +216 -1
- package/dist-types/Conversations.d.ts +42 -0
- package/dist-types/ConversationsClient.d.ts +8 -2
- 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 +6 -0
- package/dist-types/models/models_0.d.ts +466 -84
- package/dist-types/protocols/Aws_restJson1.d.ts +54 -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 +2 -2
|
@@ -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");
|
|
@@ -196,6 +197,22 @@ const se_DescribeEventCommand = async (input, context) => {
|
|
|
196
197
|
return b.build();
|
|
197
198
|
};
|
|
198
199
|
exports.se_DescribeEventCommand = se_DescribeEventCommand;
|
|
200
|
+
const se_GetActionTriggerResultCommand = async (input, context) => {
|
|
201
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
202
|
+
const headers = {};
|
|
203
|
+
b.bp("/v2/conversations/triggers/{triggerId}/result");
|
|
204
|
+
b.p('triggerId', () => input.triggerId, '{triggerId}', false);
|
|
205
|
+
const query = (0, smithy_client_1.map)({
|
|
206
|
+
[_u]: [, input[_uI]],
|
|
207
|
+
});
|
|
208
|
+
let body;
|
|
209
|
+
b.m("GET")
|
|
210
|
+
.h(headers)
|
|
211
|
+
.q(query)
|
|
212
|
+
.b(body);
|
|
213
|
+
return b.build();
|
|
214
|
+
};
|
|
215
|
+
exports.se_GetActionTriggerResultCommand = se_GetActionTriggerResultCommand;
|
|
199
216
|
const se_GetChannelCommand = async (input, context) => {
|
|
200
217
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
201
218
|
const headers = {};
|
|
@@ -501,6 +518,23 @@ const se_ListMessagesCommand = async (input, context) => {
|
|
|
501
518
|
return b.build();
|
|
502
519
|
};
|
|
503
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;
|
|
504
538
|
const se_MarkReadCommand = async (input, context) => {
|
|
505
539
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
506
540
|
const headers = {};
|
|
@@ -576,6 +610,7 @@ const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
576
610
|
let body;
|
|
577
611
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
578
612
|
'set': _ => (0, smithy_client_1._json)(_),
|
|
613
|
+
'silent': [],
|
|
579
614
|
'unset': _ => (0, smithy_client_1._json)(_),
|
|
580
615
|
}));
|
|
581
616
|
b.m("PATCH")
|
|
@@ -602,6 +637,30 @@ const se_PinChannelCommand = async (input, context) => {
|
|
|
602
637
|
return b.build();
|
|
603
638
|
};
|
|
604
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
|
+
'expiresAt': [],
|
|
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;
|
|
605
664
|
const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
|
|
606
665
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
607
666
|
const headers = {
|
|
@@ -618,6 +677,24 @@ const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
|
|
|
618
677
|
return b.build();
|
|
619
678
|
};
|
|
620
679
|
exports.se_ScheduleExternalFlagAdjustmentJobCommand = se_ScheduleExternalFlagAdjustmentJobCommand;
|
|
680
|
+
const se_SendActionTriggerResultCommand = async (input, context) => {
|
|
681
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
682
|
+
const headers = {
|
|
683
|
+
'content-type': 'application/json',
|
|
684
|
+
};
|
|
685
|
+
b.bp("/v2/conversations/triggers/{triggerId}/result");
|
|
686
|
+
b.p('triggerId', () => input.triggerId, '{triggerId}', false);
|
|
687
|
+
let body;
|
|
688
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
689
|
+
'result': _ => (0, smithy_client_1._json)(_),
|
|
690
|
+
'status': [],
|
|
691
|
+
}));
|
|
692
|
+
b.m("POST")
|
|
693
|
+
.h(headers)
|
|
694
|
+
.b(body);
|
|
695
|
+
return b.build();
|
|
696
|
+
};
|
|
697
|
+
exports.se_SendActionTriggerResultCommand = se_SendActionTriggerResultCommand;
|
|
621
698
|
const se_SendGiphyCommand = async (input, context) => {
|
|
622
699
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
623
700
|
const headers = {
|
|
@@ -653,6 +730,7 @@ const se_SendMessageCommand = async (input, context) => {
|
|
|
653
730
|
let body;
|
|
654
731
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
655
732
|
'attachments': _ => (0, smithy_client_1._json)(_),
|
|
733
|
+
'elements': _ => (0, smithy_client_1._json)(_),
|
|
656
734
|
'forward': _ => (0, smithy_client_1._json)(_),
|
|
657
735
|
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
658
736
|
'messageId': [],
|
|
@@ -754,6 +832,24 @@ const se_TagChannelCommand = async (input, context) => {
|
|
|
754
832
|
return b.build();
|
|
755
833
|
};
|
|
756
834
|
exports.se_TagChannelCommand = se_TagChannelCommand;
|
|
835
|
+
const se_TriggerMessageActionCommand = async (input, context) => {
|
|
836
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
837
|
+
const headers = {};
|
|
838
|
+
b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/actions/{actionId}/trigger");
|
|
839
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
840
|
+
b.p('messageId', () => input.messageId, '{messageId}', false);
|
|
841
|
+
b.p('actionId', () => input.actionId, '{actionId}', false);
|
|
842
|
+
const query = (0, smithy_client_1.map)({
|
|
843
|
+
[_u]: [, input[_uI]],
|
|
844
|
+
});
|
|
845
|
+
let body;
|
|
846
|
+
b.m("POST")
|
|
847
|
+
.h(headers)
|
|
848
|
+
.q(query)
|
|
849
|
+
.b(body);
|
|
850
|
+
return b.build();
|
|
851
|
+
};
|
|
852
|
+
exports.se_TriggerMessageActionCommand = se_TriggerMessageActionCommand;
|
|
757
853
|
const se_UnpinChannelCommand = async (input, context) => {
|
|
758
854
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
759
855
|
const headers = {};
|
|
@@ -770,6 +866,24 @@ const se_UnpinChannelCommand = async (input, context) => {
|
|
|
770
866
|
return b.build();
|
|
771
867
|
};
|
|
772
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;
|
|
773
887
|
const se_UntagChannelCommand = async (input, context) => {
|
|
774
888
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
775
889
|
const headers = {
|
|
@@ -853,9 +967,11 @@ const se_UpdateMessageCommand = async (input, context) => {
|
|
|
853
967
|
let body;
|
|
854
968
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
855
969
|
'attachments': _ => (0, smithy_client_1._json)(_),
|
|
970
|
+
'elements': _ => (0, smithy_client_1._json)(_),
|
|
856
971
|
'forward': _ => (0, smithy_client_1._json)(_),
|
|
857
972
|
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
858
973
|
'quote': _ => (0, smithy_client_1._json)(_),
|
|
974
|
+
'silent': [],
|
|
859
975
|
'text': [],
|
|
860
976
|
}));
|
|
861
977
|
b.m("PUT")
|
|
@@ -1013,6 +1129,7 @@ const de_DescribeEventCommand = async (output, context) => {
|
|
|
1013
1129
|
});
|
|
1014
1130
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1015
1131
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1132
|
+
'WebhookChatActionTriggeredEvent': smithy_client_1._json,
|
|
1016
1133
|
'WebhookChatChannelCreatedEvent': smithy_client_1._json,
|
|
1017
1134
|
'WebhookChatChannelUpdatedEvent': smithy_client_1._json,
|
|
1018
1135
|
'WebhookChatMemberAddedEvent': smithy_client_1._json,
|
|
@@ -1027,6 +1144,22 @@ const de_DescribeEventCommand = async (output, context) => {
|
|
|
1027
1144
|
return contents;
|
|
1028
1145
|
};
|
|
1029
1146
|
exports.de_DescribeEventCommand = de_DescribeEventCommand;
|
|
1147
|
+
const de_GetActionTriggerResultCommand = async (output, context) => {
|
|
1148
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1149
|
+
return de_CommandError(output, context);
|
|
1150
|
+
}
|
|
1151
|
+
const contents = (0, smithy_client_1.map)({
|
|
1152
|
+
$metadata: deserializeMetadata(output),
|
|
1153
|
+
});
|
|
1154
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1155
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1156
|
+
'result': smithy_client_1._json,
|
|
1157
|
+
'status': smithy_client_1.expectString,
|
|
1158
|
+
});
|
|
1159
|
+
Object.assign(contents, doc);
|
|
1160
|
+
return contents;
|
|
1161
|
+
};
|
|
1162
|
+
exports.de_GetActionTriggerResultCommand = de_GetActionTriggerResultCommand;
|
|
1030
1163
|
const de_GetChannelCommand = async (output, context) => {
|
|
1031
1164
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1032
1165
|
return de_CommandError(output, context);
|
|
@@ -1292,6 +1425,21 @@ const de_ListMessagesCommand = async (output, context) => {
|
|
|
1292
1425
|
return contents;
|
|
1293
1426
|
};
|
|
1294
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;
|
|
1295
1443
|
const de_MarkReadCommand = async (output, context) => {
|
|
1296
1444
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1297
1445
|
return de_CommandError(output, context);
|
|
@@ -1355,6 +1503,17 @@ const de_PinChannelCommand = async (output, context) => {
|
|
|
1355
1503
|
return contents;
|
|
1356
1504
|
};
|
|
1357
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;
|
|
1358
1517
|
const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
1359
1518
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1360
1519
|
return de_CommandError(output, context);
|
|
@@ -1366,6 +1525,17 @@ const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
|
1366
1525
|
return contents;
|
|
1367
1526
|
};
|
|
1368
1527
|
exports.de_ScheduleExternalFlagAdjustmentJobCommand = de_ScheduleExternalFlagAdjustmentJobCommand;
|
|
1528
|
+
const de_SendActionTriggerResultCommand = async (output, context) => {
|
|
1529
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1530
|
+
return de_CommandError(output, context);
|
|
1531
|
+
}
|
|
1532
|
+
const contents = (0, smithy_client_1.map)({
|
|
1533
|
+
$metadata: deserializeMetadata(output),
|
|
1534
|
+
});
|
|
1535
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1536
|
+
return contents;
|
|
1537
|
+
};
|
|
1538
|
+
exports.de_SendActionTriggerResultCommand = de_SendActionTriggerResultCommand;
|
|
1369
1539
|
const de_SendGiphyCommand = async (output, context) => {
|
|
1370
1540
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1371
1541
|
return de_CommandError(output, context);
|
|
@@ -1451,6 +1621,21 @@ const de_TagChannelCommand = async (output, context) => {
|
|
|
1451
1621
|
return contents;
|
|
1452
1622
|
};
|
|
1453
1623
|
exports.de_TagChannelCommand = de_TagChannelCommand;
|
|
1624
|
+
const de_TriggerMessageActionCommand = async (output, context) => {
|
|
1625
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1626
|
+
return de_CommandError(output, context);
|
|
1627
|
+
}
|
|
1628
|
+
const contents = (0, smithy_client_1.map)({
|
|
1629
|
+
$metadata: deserializeMetadata(output),
|
|
1630
|
+
});
|
|
1631
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1632
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1633
|
+
'triggerId': smithy_client_1.expectString,
|
|
1634
|
+
});
|
|
1635
|
+
Object.assign(contents, doc);
|
|
1636
|
+
return contents;
|
|
1637
|
+
};
|
|
1638
|
+
exports.de_TriggerMessageActionCommand = de_TriggerMessageActionCommand;
|
|
1454
1639
|
const de_UnpinChannelCommand = async (output, context) => {
|
|
1455
1640
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1456
1641
|
return de_CommandError(output, context);
|
|
@@ -1462,6 +1647,17 @@ const de_UnpinChannelCommand = async (output, context) => {
|
|
|
1462
1647
|
return contents;
|
|
1463
1648
|
};
|
|
1464
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;
|
|
1465
1661
|
const de_UntagChannelCommand = async (output, context) => {
|
|
1466
1662
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1467
1663
|
return de_CommandError(output, context);
|
|
@@ -1568,6 +1764,9 @@ const de_CommandError = async (output, context) => {
|
|
|
1568
1764
|
case "MessageNotFoundException":
|
|
1569
1765
|
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
1570
1766
|
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
1767
|
+
case "TriggerNotFoundException":
|
|
1768
|
+
case "wildix.xbees.conversations#TriggerNotFoundException":
|
|
1769
|
+
throw await de_TriggerNotFoundExceptionRes(parsedOutput, context);
|
|
1571
1770
|
case "FileNotFoundException":
|
|
1572
1771
|
case "wildix.xbees.conversations#FileNotFoundException":
|
|
1573
1772
|
throw await de_FileNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -1586,6 +1785,9 @@ const de_CommandError = async (output, context) => {
|
|
|
1586
1785
|
case "TaggedChannelsLimitReachedException":
|
|
1587
1786
|
case "wildix.xbees.conversations#TaggedChannelsLimitReachedException":
|
|
1588
1787
|
throw await de_TaggedChannelsLimitReachedExceptionRes(parsedOutput, context);
|
|
1788
|
+
case "MessageActionNotFoundException":
|
|
1789
|
+
case "wildix.xbees.conversations#MessageActionNotFoundException":
|
|
1790
|
+
throw await de_MessageActionNotFoundExceptionRes(parsedOutput, context);
|
|
1589
1791
|
default:
|
|
1590
1792
|
const parsedBody = parsedOutput.body;
|
|
1591
1793
|
return throwDefaultError({
|
|
@@ -1731,6 +1933,19 @@ const de_MemberNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
1731
1933
|
});
|
|
1732
1934
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1733
1935
|
};
|
|
1936
|
+
const de_MessageActionNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1937
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1938
|
+
const data = parsedOutput.body;
|
|
1939
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1940
|
+
'message': smithy_client_1.expectString,
|
|
1941
|
+
});
|
|
1942
|
+
Object.assign(contents, doc);
|
|
1943
|
+
const exception = new models_0_1.MessageActionNotFoundException({
|
|
1944
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1945
|
+
...contents
|
|
1946
|
+
});
|
|
1947
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1948
|
+
};
|
|
1734
1949
|
const de_MessageNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1735
1950
|
const contents = (0, smithy_client_1.map)({});
|
|
1736
1951
|
const data = parsedOutput.body;
|
|
@@ -1796,6 +2011,19 @@ const de_TagsLimitReachedExceptionRes = async (parsedOutput, context) => {
|
|
|
1796
2011
|
});
|
|
1797
2012
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1798
2013
|
};
|
|
2014
|
+
const de_TriggerNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
2015
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2016
|
+
const data = parsedOutput.body;
|
|
2017
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2018
|
+
'message': smithy_client_1.expectString,
|
|
2019
|
+
});
|
|
2020
|
+
Object.assign(contents, doc);
|
|
2021
|
+
const exception = new models_0_1.TriggerNotFoundException({
|
|
2022
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2023
|
+
...contents
|
|
2024
|
+
});
|
|
2025
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2026
|
+
};
|
|
1799
2027
|
const deserializeMetadata = (output) => ({
|
|
1800
2028
|
httpStatusCode: output.statusCode,
|
|
1801
2029
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/Conversations.js
CHANGED
|
@@ -9,6 +9,7 @@ import { DeleteInboxTagCommand, } from "./commands/DeleteInboxTagCommand";
|
|
|
9
9
|
import { DeleteMessageCommand, } from "./commands/DeleteMessageCommand";
|
|
10
10
|
import { DeleteMessageReactionCommand, } from "./commands/DeleteMessageReactionCommand";
|
|
11
11
|
import { DescribeEventCommand, } from "./commands/DescribeEventCommand";
|
|
12
|
+
import { GetActionTriggerResultCommand, } from "./commands/GetActionTriggerResultCommand";
|
|
12
13
|
import { GetChannelCommand, } from "./commands/GetChannelCommand";
|
|
13
14
|
import { GetChannelMemberCommand, } from "./commands/GetChannelMemberCommand";
|
|
14
15
|
import { GetDirectChannelIdCommand, } from "./commands/GetDirectChannelIdCommand";
|
|
@@ -27,12 +28,15 @@ import { ListInboxTaggedChannelsCommand, } from "./commands/ListInboxTaggedChann
|
|
|
27
28
|
import { ListInboxTagsCommand, } from "./commands/ListInboxTagsCommand";
|
|
28
29
|
import { ListMessageReactionsCommand, } from "./commands/ListMessageReactionsCommand";
|
|
29
30
|
import { ListMessagesCommand, } from "./commands/ListMessagesCommand";
|
|
31
|
+
import { ListPinnedMessagesCommand, } from "./commands/ListPinnedMessagesCommand";
|
|
30
32
|
import { MarkReadCommand, } from "./commands/MarkReadCommand";
|
|
31
33
|
import { MarkUnreadCommand, } from "./commands/MarkUnreadCommand";
|
|
32
34
|
import { PartialUpdateChannelCommand, } from "./commands/PartialUpdateChannelCommand";
|
|
33
35
|
import { PartialUpdateMessageCommand, } from "./commands/PartialUpdateMessageCommand";
|
|
34
36
|
import { PinChannelCommand, } from "./commands/PinChannelCommand";
|
|
37
|
+
import { PinMessageCommand, } from "./commands/PinMessageCommand";
|
|
35
38
|
import { ScheduleExternalFlagAdjustmentJobCommand, } from "./commands/ScheduleExternalFlagAdjustmentJobCommand";
|
|
39
|
+
import { SendActionTriggerResultCommand, } from "./commands/SendActionTriggerResultCommand";
|
|
36
40
|
import { SendGiphyCommand, } from "./commands/SendGiphyCommand";
|
|
37
41
|
import { SendMessageCommand, } from "./commands/SendMessageCommand";
|
|
38
42
|
import { SendMessageReactionCommand, } from "./commands/SendMessageReactionCommand";
|
|
@@ -40,7 +44,9 @@ import { SendTypingStartCommand, } from "./commands/SendTypingStartCommand";
|
|
|
40
44
|
import { SendTypingStopCommand, } from "./commands/SendTypingStopCommand";
|
|
41
45
|
import { ShowChannelCommand, } from "./commands/ShowChannelCommand";
|
|
42
46
|
import { TagChannelCommand, } from "./commands/TagChannelCommand";
|
|
47
|
+
import { TriggerMessageActionCommand, } from "./commands/TriggerMessageActionCommand";
|
|
43
48
|
import { UnpinChannelCommand, } from "./commands/UnpinChannelCommand";
|
|
49
|
+
import { UnpinMessageCommand, } from "./commands/UnpinMessageCommand";
|
|
44
50
|
import { UntagChannelCommand, } from "./commands/UntagChannelCommand";
|
|
45
51
|
import { UpdateChannelCommand, } from "./commands/UpdateChannelCommand";
|
|
46
52
|
import { UpdateInboxTagCommand, } from "./commands/UpdateInboxTagCommand";
|
|
@@ -58,6 +64,7 @@ const commands = {
|
|
|
58
64
|
DeleteMessageCommand,
|
|
59
65
|
DeleteMessageReactionCommand,
|
|
60
66
|
DescribeEventCommand,
|
|
67
|
+
GetActionTriggerResultCommand,
|
|
61
68
|
GetChannelCommand,
|
|
62
69
|
GetChannelMemberCommand,
|
|
63
70
|
GetDirectChannelIdCommand,
|
|
@@ -76,12 +83,15 @@ const commands = {
|
|
|
76
83
|
ListInboxTagsCommand,
|
|
77
84
|
ListMessageReactionsCommand,
|
|
78
85
|
ListMessagesCommand,
|
|
86
|
+
ListPinnedMessagesCommand,
|
|
79
87
|
MarkReadCommand,
|
|
80
88
|
MarkUnreadCommand,
|
|
81
89
|
PartialUpdateChannelCommand,
|
|
82
90
|
PartialUpdateMessageCommand,
|
|
83
91
|
PinChannelCommand,
|
|
92
|
+
PinMessageCommand,
|
|
84
93
|
ScheduleExternalFlagAdjustmentJobCommand,
|
|
94
|
+
SendActionTriggerResultCommand,
|
|
85
95
|
SendGiphyCommand,
|
|
86
96
|
SendMessageCommand,
|
|
87
97
|
SendMessageReactionCommand,
|
|
@@ -89,7 +99,9 @@ const commands = {
|
|
|
89
99
|
SendTypingStopCommand,
|
|
90
100
|
ShowChannelCommand,
|
|
91
101
|
TagChannelCommand,
|
|
102
|
+
TriggerMessageActionCommand,
|
|
92
103
|
UnpinChannelCommand,
|
|
104
|
+
UnpinMessageCommand,
|
|
93
105
|
UntagChannelCommand,
|
|
94
106
|
UpdateChannelCommand,
|
|
95
107
|
UpdateInboxTagCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetActionTriggerResultCommand, se_GetActionTriggerResultCommand, } 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 GetActionTriggerResultCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "GetActionTriggerResult", {})
|
|
12
|
+
.n("ConversationsClient", "GetActionTriggerResultCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetActionTriggerResultCommand)
|
|
15
|
+
.de(de_GetActionTriggerResultCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -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_SendActionTriggerResultCommand, se_SendActionTriggerResultCommand, } 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 SendActionTriggerResultCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "SendActionTriggerResult", {})
|
|
12
|
+
.n("ConversationsClient", "SendActionTriggerResultCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_SendActionTriggerResultCommand)
|
|
15
|
+
.de(de_SendActionTriggerResultCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_TriggerMessageActionCommand, se_TriggerMessageActionCommand, } 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 TriggerMessageActionCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Conversations", "TriggerMessageAction", {})
|
|
12
|
+
.n("ConversationsClient", "TriggerMessageActionCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_TriggerMessageActionCommand)
|
|
15
|
+
.de(de_TriggerMessageActionCommand)
|
|
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
|
+
}
|
|
@@ -8,6 +8,7 @@ export * from "./DeleteInboxTagCommand";
|
|
|
8
8
|
export * from "./DeleteMessageCommand";
|
|
9
9
|
export * from "./DeleteMessageReactionCommand";
|
|
10
10
|
export * from "./DescribeEventCommand";
|
|
11
|
+
export * from "./GetActionTriggerResultCommand";
|
|
11
12
|
export * from "./GetChannelCommand";
|
|
12
13
|
export * from "./GetChannelMemberCommand";
|
|
13
14
|
export * from "./GetDirectChannelIdCommand";
|
|
@@ -26,12 +27,15 @@ export * from "./ListInboxTaggedChannelsCommand";
|
|
|
26
27
|
export * from "./ListInboxTagsCommand";
|
|
27
28
|
export * from "./ListMessageReactionsCommand";
|
|
28
29
|
export * from "./ListMessagesCommand";
|
|
30
|
+
export * from "./ListPinnedMessagesCommand";
|
|
29
31
|
export * from "./MarkReadCommand";
|
|
30
32
|
export * from "./MarkUnreadCommand";
|
|
31
33
|
export * from "./PartialUpdateChannelCommand";
|
|
32
34
|
export * from "./PartialUpdateMessageCommand";
|
|
33
35
|
export * from "./PinChannelCommand";
|
|
36
|
+
export * from "./PinMessageCommand";
|
|
34
37
|
export * from "./ScheduleExternalFlagAdjustmentJobCommand";
|
|
38
|
+
export * from "./SendActionTriggerResultCommand";
|
|
35
39
|
export * from "./SendGiphyCommand";
|
|
36
40
|
export * from "./SendMessageCommand";
|
|
37
41
|
export * from "./SendMessageReactionCommand";
|
|
@@ -39,7 +43,9 @@ export * from "./SendTypingStartCommand";
|
|
|
39
43
|
export * from "./SendTypingStopCommand";
|
|
40
44
|
export * from "./ShowChannelCommand";
|
|
41
45
|
export * from "./TagChannelCommand";
|
|
46
|
+
export * from "./TriggerMessageActionCommand";
|
|
42
47
|
export * from "./UnpinChannelCommand";
|
|
48
|
+
export * from "./UnpinMessageCommand";
|
|
43
49
|
export * from "./UntagChannelCommand";
|
|
44
50
|
export * from "./UpdateChannelCommand";
|
|
45
51
|
export * from "./UpdateInboxTagCommand";
|