@wildix/xbees-conversations-client 1.0.33 → 1.0.35
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 +4 -2
- package/dist-cjs/commands/{SendSystemMessageCommand.js → HideChannelCommand.js} +7 -7
- package/dist-cjs/commands/ShowChannelCommand.js +41 -0
- package/dist-cjs/commands/index.js +2 -1
- package/dist-cjs/protocols/Aws_restJson1.js +102 -104
- package/dist-es/Conversations.js +4 -2
- package/dist-es/commands/{SendSystemMessageCommand.js → HideChannelCommand.js} +6 -6
- package/dist-es/commands/ShowChannelCommand.js +37 -0
- package/dist-es/commands/index.js +2 -1
- package/dist-es/protocols/Aws_restJson1.js +93 -97
- package/dist-types/Conversations.d.ts +14 -7
- package/dist-types/ConversationsClient.d.ts +4 -3
- package/dist-types/commands/AddChannelMemberCommand.d.ts +1 -0
- package/dist-types/commands/AddChannelMembersCommand.d.ts +1 -0
- package/dist-types/commands/GetMessageCommand.d.ts +27 -45
- package/dist-types/commands/HideChannelCommand.d.ts +140 -0
- package/dist-types/commands/ListMessagesCommand.d.ts +27 -45
- package/dist-types/commands/PartialUpdateMessageCommand.d.ts +61 -134
- package/dist-types/commands/SendGiphyCommand.d.ts +27 -45
- package/dist-types/commands/SendMessageCommand.d.ts +61 -134
- package/dist-types/commands/ShowChannelCommand.d.ts +140 -0
- package/dist-types/commands/UpdateMessageCommand.d.ts +61 -134
- package/dist-types/commands/index.d.ts +2 -1
- package/dist-types/models/models_0.d.ts +141 -112
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -9
- package/package.json +1 -1
- package/dist-types/commands/SendSystemMessageCommand.d.ts +0 -213
|
@@ -14,6 +14,7 @@ const GetChannelMemberCommand_1 = require("./commands/GetChannelMemberCommand");
|
|
|
14
14
|
const GetDirectChannelIdCommand_1 = require("./commands/GetDirectChannelIdCommand");
|
|
15
15
|
const GetMessageCommand_1 = require("./commands/GetMessageCommand");
|
|
16
16
|
const GetOrCreateDirectChannelCommand_1 = require("./commands/GetOrCreateDirectChannelCommand");
|
|
17
|
+
const HideChannelCommand_1 = require("./commands/HideChannelCommand");
|
|
17
18
|
const InviteCommand_1 = require("./commands/InviteCommand");
|
|
18
19
|
const JoinChannelCommand_1 = require("./commands/JoinChannelCommand");
|
|
19
20
|
const LeaveChannelCommand_1 = require("./commands/LeaveChannelCommand");
|
|
@@ -28,9 +29,9 @@ const ScheduleExternalFlagAdjustmentJobCommand_1 = require("./commands/ScheduleE
|
|
|
28
29
|
const SendGiphyCommand_1 = require("./commands/SendGiphyCommand");
|
|
29
30
|
const SendMessageCommand_1 = require("./commands/SendMessageCommand");
|
|
30
31
|
const SendMessageReactionCommand_1 = require("./commands/SendMessageReactionCommand");
|
|
31
|
-
const SendSystemMessageCommand_1 = require("./commands/SendSystemMessageCommand");
|
|
32
32
|
const SendTypingStartCommand_1 = require("./commands/SendTypingStartCommand");
|
|
33
33
|
const SendTypingStopCommand_1 = require("./commands/SendTypingStopCommand");
|
|
34
|
+
const ShowChannelCommand_1 = require("./commands/ShowChannelCommand");
|
|
34
35
|
const UpdateChannelCommand_1 = require("./commands/UpdateChannelCommand");
|
|
35
36
|
const UpdateMessageCommand_1 = require("./commands/UpdateMessageCommand");
|
|
36
37
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
@@ -47,6 +48,7 @@ const commands = {
|
|
|
47
48
|
GetDirectChannelIdCommand: GetDirectChannelIdCommand_1.GetDirectChannelIdCommand,
|
|
48
49
|
GetMessageCommand: GetMessageCommand_1.GetMessageCommand,
|
|
49
50
|
GetOrCreateDirectChannelCommand: GetOrCreateDirectChannelCommand_1.GetOrCreateDirectChannelCommand,
|
|
51
|
+
HideChannelCommand: HideChannelCommand_1.HideChannelCommand,
|
|
50
52
|
InviteCommand: InviteCommand_1.InviteCommand,
|
|
51
53
|
JoinChannelCommand: JoinChannelCommand_1.JoinChannelCommand,
|
|
52
54
|
LeaveChannelCommand: LeaveChannelCommand_1.LeaveChannelCommand,
|
|
@@ -61,9 +63,9 @@ const commands = {
|
|
|
61
63
|
SendGiphyCommand: SendGiphyCommand_1.SendGiphyCommand,
|
|
62
64
|
SendMessageCommand: SendMessageCommand_1.SendMessageCommand,
|
|
63
65
|
SendMessageReactionCommand: SendMessageReactionCommand_1.SendMessageReactionCommand,
|
|
64
|
-
SendSystemMessageCommand: SendSystemMessageCommand_1.SendSystemMessageCommand,
|
|
65
66
|
SendTypingStartCommand: SendTypingStartCommand_1.SendTypingStartCommand,
|
|
66
67
|
SendTypingStopCommand: SendTypingStopCommand_1.SendTypingStopCommand,
|
|
68
|
+
ShowChannelCommand: ShowChannelCommand_1.ShowChannelCommand,
|
|
67
69
|
UpdateChannelCommand: UpdateChannelCommand_1.UpdateChannelCommand,
|
|
68
70
|
UpdateMessageCommand: UpdateMessageCommand_1.UpdateMessageCommand,
|
|
69
71
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.HideChannelCommand = exports.$Command = void 0;
|
|
4
4
|
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
5
|
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
7
|
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
8
|
const types_1 = require("@smithy/types");
|
|
9
|
-
class
|
|
9
|
+
class HideChannelCommand extends smithy_client_1.Command {
|
|
10
10
|
constructor(input) {
|
|
11
11
|
super();
|
|
12
12
|
this.input = input;
|
|
@@ -16,7 +16,7 @@ class SendSystemMessageCommand extends smithy_client_1.Command {
|
|
|
16
16
|
const stack = clientStack.concat(this.middlewareStack);
|
|
17
17
|
const { logger } = configuration;
|
|
18
18
|
const clientName = "ConversationsClient";
|
|
19
|
-
const commandName = "
|
|
19
|
+
const commandName = "HideChannelCommand";
|
|
20
20
|
const handlerExecutionContext = {
|
|
21
21
|
logger,
|
|
22
22
|
clientName,
|
|
@@ -25,17 +25,17 @@ class SendSystemMessageCommand extends smithy_client_1.Command {
|
|
|
25
25
|
outputFilterSensitiveLog: (_) => _,
|
|
26
26
|
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
27
|
service: "Conversations",
|
|
28
|
-
operation: "
|
|
28
|
+
operation: "HideChannel",
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
const { requestHandler } = configuration;
|
|
32
32
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
33
|
}
|
|
34
34
|
serialize(input, context) {
|
|
35
|
-
return (0, Aws_restJson1_1.
|
|
35
|
+
return (0, Aws_restJson1_1.se_HideChannelCommand)(input, context);
|
|
36
36
|
}
|
|
37
37
|
deserialize(output, context) {
|
|
38
|
-
return (0, Aws_restJson1_1.
|
|
38
|
+
return (0, Aws_restJson1_1.de_HideChannelCommand)(output, context);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
exports.
|
|
41
|
+
exports.HideChannelCommand = HideChannelCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShowChannelCommand = 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
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class ShowChannelCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "ConversationsClient";
|
|
19
|
+
const commandName = "ShowChannelCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "Conversations",
|
|
28
|
+
operation: "ShowChannel",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_ShowChannelCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_ShowChannelCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ShowChannelCommand = ShowChannelCommand;
|
|
@@ -13,6 +13,7 @@ tslib_1.__exportStar(require("./GetChannelMemberCommand"), exports);
|
|
|
13
13
|
tslib_1.__exportStar(require("./GetDirectChannelIdCommand"), exports);
|
|
14
14
|
tslib_1.__exportStar(require("./GetMessageCommand"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./GetOrCreateDirectChannelCommand"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./HideChannelCommand"), exports);
|
|
16
17
|
tslib_1.__exportStar(require("./InviteCommand"), exports);
|
|
17
18
|
tslib_1.__exportStar(require("./JoinChannelCommand"), exports);
|
|
18
19
|
tslib_1.__exportStar(require("./LeaveChannelCommand"), exports);
|
|
@@ -27,8 +28,8 @@ tslib_1.__exportStar(require("./ScheduleExternalFlagAdjustmentJobCommand"), expo
|
|
|
27
28
|
tslib_1.__exportStar(require("./SendGiphyCommand"), exports);
|
|
28
29
|
tslib_1.__exportStar(require("./SendMessageCommand"), exports);
|
|
29
30
|
tslib_1.__exportStar(require("./SendMessageReactionCommand"), exports);
|
|
30
|
-
tslib_1.__exportStar(require("./SendSystemMessageCommand"), exports);
|
|
31
31
|
tslib_1.__exportStar(require("./SendTypingStartCommand"), exports);
|
|
32
32
|
tslib_1.__exportStar(require("./SendTypingStopCommand"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./ShowChannelCommand"), exports);
|
|
33
34
|
tslib_1.__exportStar(require("./UpdateChannelCommand"), exports);
|
|
34
35
|
tslib_1.__exportStar(require("./UpdateMessageCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.
|
|
3
|
+
exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_HideChannelCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateGroupChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UpdateMessageCommand = exports.se_UpdateChannelCommand = exports.se_ShowChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = exports.se_SendGiphyCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MarkReadCommand = exports.se_ListMessagesCommand = exports.se_ListMessageReactionsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_HideChannelCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateGroupChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
|
|
4
|
+
exports.de_UpdateMessageCommand = exports.de_UpdateChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkReadCommand = exports.de_ListMessagesCommand = exports.de_ListMessageReactionsCommand = void 0;
|
|
5
5
|
const ConversationsServiceException_1 = require("../models/ConversationsServiceException");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
@@ -17,6 +17,7 @@ const se_AddChannelMemberCommand = async (input, context) => {
|
|
|
17
17
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
18
18
|
'memberId': [],
|
|
19
19
|
'memberToInvite': _ => (0, smithy_client_1._json)(_),
|
|
20
|
+
'silent': [],
|
|
20
21
|
}));
|
|
21
22
|
return new protocol_http_1.HttpRequest({
|
|
22
23
|
protocol,
|
|
@@ -40,6 +41,7 @@ const se_AddChannelMembersCommand = async (input, context) => {
|
|
|
40
41
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
41
42
|
'members': _ => (0, smithy_client_1._json)(_),
|
|
42
43
|
'membersToInvite': _ => (0, smithy_client_1._json)(_),
|
|
44
|
+
'silent': [],
|
|
43
45
|
}));
|
|
44
46
|
return new protocol_http_1.HttpRequest({
|
|
45
47
|
protocol,
|
|
@@ -274,6 +276,27 @@ const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
|
274
276
|
});
|
|
275
277
|
};
|
|
276
278
|
exports.se_GetOrCreateDirectChannelCommand = se_GetOrCreateDirectChannelCommand;
|
|
279
|
+
const se_HideChannelCommand = async (input, context) => {
|
|
280
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
281
|
+
const headers = {};
|
|
282
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/hide";
|
|
283
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
284
|
+
const query = (0, smithy_client_1.map)({
|
|
285
|
+
"user": [, input.userId],
|
|
286
|
+
});
|
|
287
|
+
let body;
|
|
288
|
+
return new protocol_http_1.HttpRequest({
|
|
289
|
+
protocol,
|
|
290
|
+
hostname,
|
|
291
|
+
port,
|
|
292
|
+
method: "POST",
|
|
293
|
+
headers,
|
|
294
|
+
path: resolvedPath,
|
|
295
|
+
query,
|
|
296
|
+
body,
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
exports.se_HideChannelCommand = se_HideChannelCommand;
|
|
277
300
|
const se_InviteCommand = async (input, context) => {
|
|
278
301
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
279
302
|
const headers = {
|
|
@@ -494,7 +517,7 @@ const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
494
517
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
495
518
|
let body;
|
|
496
519
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
497
|
-
'set': _ =>
|
|
520
|
+
'set': _ => (0, smithy_client_1._json)(_),
|
|
498
521
|
'unset': _ => (0, smithy_client_1._json)(_),
|
|
499
522
|
}));
|
|
500
523
|
return new protocol_http_1.HttpRequest({
|
|
@@ -572,7 +595,7 @@ const se_SendMessageCommand = async (input, context) => {
|
|
|
572
595
|
'forward': _ => (0, smithy_client_1._json)(_),
|
|
573
596
|
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
574
597
|
'messageId': [],
|
|
575
|
-
'quote': _ =>
|
|
598
|
+
'quote': _ => (0, smithy_client_1._json)(_),
|
|
576
599
|
'text': [],
|
|
577
600
|
}));
|
|
578
601
|
return new protocol_http_1.HttpRequest({
|
|
@@ -614,20 +637,15 @@ const se_SendMessageReactionCommand = async (input, context) => {
|
|
|
614
637
|
});
|
|
615
638
|
};
|
|
616
639
|
exports.se_SendMessageReactionCommand = se_SendMessageReactionCommand;
|
|
617
|
-
const
|
|
640
|
+
const se_SendTypingStartCommand = async (input, context) => {
|
|
618
641
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
619
|
-
const headers = {
|
|
620
|
-
|
|
621
|
-
};
|
|
622
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_system_message";
|
|
642
|
+
const headers = {};
|
|
643
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_start";
|
|
623
644
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
624
645
|
const query = (0, smithy_client_1.map)({
|
|
625
646
|
"user": [, input.userId],
|
|
626
647
|
});
|
|
627
648
|
let body;
|
|
628
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
629
|
-
'messageId': [],
|
|
630
|
-
}));
|
|
631
649
|
return new protocol_http_1.HttpRequest({
|
|
632
650
|
protocol,
|
|
633
651
|
hostname,
|
|
@@ -639,11 +657,11 @@ const se_SendSystemMessageCommand = async (input, context) => {
|
|
|
639
657
|
body,
|
|
640
658
|
});
|
|
641
659
|
};
|
|
642
|
-
exports.
|
|
643
|
-
const
|
|
660
|
+
exports.se_SendTypingStartCommand = se_SendTypingStartCommand;
|
|
661
|
+
const se_SendTypingStopCommand = async (input, context) => {
|
|
644
662
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
645
663
|
const headers = {};
|
|
646
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/
|
|
664
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_stop";
|
|
647
665
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
648
666
|
const query = (0, smithy_client_1.map)({
|
|
649
667
|
"user": [, input.userId],
|
|
@@ -660,11 +678,11 @@ const se_SendTypingStartCommand = async (input, context) => {
|
|
|
660
678
|
body,
|
|
661
679
|
});
|
|
662
680
|
};
|
|
663
|
-
exports.
|
|
664
|
-
const
|
|
681
|
+
exports.se_SendTypingStopCommand = se_SendTypingStopCommand;
|
|
682
|
+
const se_ShowChannelCommand = async (input, context) => {
|
|
665
683
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
666
684
|
const headers = {};
|
|
667
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/
|
|
685
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/show";
|
|
668
686
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
669
687
|
const query = (0, smithy_client_1.map)({
|
|
670
688
|
"user": [, input.userId],
|
|
@@ -681,7 +699,7 @@ const se_SendTypingStopCommand = async (input, context) => {
|
|
|
681
699
|
body,
|
|
682
700
|
});
|
|
683
701
|
};
|
|
684
|
-
exports.
|
|
702
|
+
exports.se_ShowChannelCommand = se_ShowChannelCommand;
|
|
685
703
|
const se_UpdateChannelCommand = async (input, context) => {
|
|
686
704
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
687
705
|
const headers = {
|
|
@@ -726,7 +744,7 @@ const se_UpdateMessageCommand = async (input, context) => {
|
|
|
726
744
|
'attachments': _ => (0, smithy_client_1._json)(_),
|
|
727
745
|
'forward': _ => (0, smithy_client_1._json)(_),
|
|
728
746
|
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
729
|
-
'quote': _ =>
|
|
747
|
+
'quote': _ => (0, smithy_client_1._json)(_),
|
|
730
748
|
'text': [],
|
|
731
749
|
}));
|
|
732
750
|
return new protocol_http_1.HttpRequest({
|
|
@@ -1151,7 +1169,7 @@ const de_GetMessageCommand = async (output, context) => {
|
|
|
1151
1169
|
});
|
|
1152
1170
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1153
1171
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1154
|
-
'message':
|
|
1172
|
+
'message': smithy_client_1._json,
|
|
1155
1173
|
});
|
|
1156
1174
|
Object.assign(contents, doc);
|
|
1157
1175
|
return contents;
|
|
@@ -1219,6 +1237,46 @@ const de_GetOrCreateDirectChannelCommandError = async (output, context) => {
|
|
|
1219
1237
|
});
|
|
1220
1238
|
}
|
|
1221
1239
|
};
|
|
1240
|
+
const de_HideChannelCommand = async (output, context) => {
|
|
1241
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1242
|
+
return de_HideChannelCommandError(output, context);
|
|
1243
|
+
}
|
|
1244
|
+
const contents = (0, smithy_client_1.map)({
|
|
1245
|
+
$metadata: deserializeMetadata(output),
|
|
1246
|
+
});
|
|
1247
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1248
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1249
|
+
'channel': smithy_client_1._json,
|
|
1250
|
+
});
|
|
1251
|
+
Object.assign(contents, doc);
|
|
1252
|
+
return contents;
|
|
1253
|
+
};
|
|
1254
|
+
exports.de_HideChannelCommand = de_HideChannelCommand;
|
|
1255
|
+
const de_HideChannelCommandError = async (output, context) => {
|
|
1256
|
+
const parsedOutput = {
|
|
1257
|
+
...output,
|
|
1258
|
+
body: await parseErrorBody(output.body, context)
|
|
1259
|
+
};
|
|
1260
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1261
|
+
switch (errorCode) {
|
|
1262
|
+
case "ChannelNotFoundException":
|
|
1263
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1264
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1265
|
+
case "ForbiddenException":
|
|
1266
|
+
case "smithy.framework#ForbiddenException":
|
|
1267
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1268
|
+
case "ValidationException":
|
|
1269
|
+
case "smithy.framework#ValidationException":
|
|
1270
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1271
|
+
default:
|
|
1272
|
+
const parsedBody = parsedOutput.body;
|
|
1273
|
+
return throwDefaultError({
|
|
1274
|
+
output,
|
|
1275
|
+
parsedBody,
|
|
1276
|
+
errorCode
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
};
|
|
1222
1280
|
const de_InviteCommand = async (output, context) => {
|
|
1223
1281
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1224
1282
|
return de_InviteCommandError(output, context);
|
|
@@ -1459,7 +1517,7 @@ const de_ListMessagesCommand = async (output, context) => {
|
|
|
1459
1517
|
});
|
|
1460
1518
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1461
1519
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1462
|
-
'messages':
|
|
1520
|
+
'messages': smithy_client_1._json,
|
|
1463
1521
|
});
|
|
1464
1522
|
Object.assign(contents, doc);
|
|
1465
1523
|
return contents;
|
|
@@ -1575,7 +1633,7 @@ const de_PartialUpdateMessageCommand = async (output, context) => {
|
|
|
1575
1633
|
});
|
|
1576
1634
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1577
1635
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1578
|
-
'message':
|
|
1636
|
+
'message': smithy_client_1._json,
|
|
1579
1637
|
});
|
|
1580
1638
|
Object.assign(contents, doc);
|
|
1581
1639
|
return contents;
|
|
@@ -1654,7 +1712,7 @@ const de_SendGiphyCommand = async (output, context) => {
|
|
|
1654
1712
|
});
|
|
1655
1713
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1656
1714
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1657
|
-
'message':
|
|
1715
|
+
'message': smithy_client_1._json,
|
|
1658
1716
|
});
|
|
1659
1717
|
Object.assign(contents, doc);
|
|
1660
1718
|
return contents;
|
|
@@ -1694,7 +1752,7 @@ const de_SendMessageCommand = async (output, context) => {
|
|
|
1694
1752
|
});
|
|
1695
1753
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1696
1754
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1697
|
-
'message':
|
|
1755
|
+
'message': smithy_client_1._json,
|
|
1698
1756
|
});
|
|
1699
1757
|
Object.assign(contents, doc);
|
|
1700
1758
|
return contents;
|
|
@@ -1761,22 +1819,18 @@ const de_SendMessageReactionCommandError = async (output, context) => {
|
|
|
1761
1819
|
});
|
|
1762
1820
|
}
|
|
1763
1821
|
};
|
|
1764
|
-
const
|
|
1822
|
+
const de_SendTypingStartCommand = async (output, context) => {
|
|
1765
1823
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1766
|
-
return
|
|
1824
|
+
return de_SendTypingStartCommandError(output, context);
|
|
1767
1825
|
}
|
|
1768
1826
|
const contents = (0, smithy_client_1.map)({
|
|
1769
1827
|
$metadata: deserializeMetadata(output),
|
|
1770
1828
|
});
|
|
1771
|
-
|
|
1772
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1773
|
-
'message': _ => de_Message(_, context),
|
|
1774
|
-
});
|
|
1775
|
-
Object.assign(contents, doc);
|
|
1829
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1776
1830
|
return contents;
|
|
1777
1831
|
};
|
|
1778
|
-
exports.
|
|
1779
|
-
const
|
|
1832
|
+
exports.de_SendTypingStartCommand = de_SendTypingStartCommand;
|
|
1833
|
+
const de_SendTypingStartCommandError = async (output, context) => {
|
|
1780
1834
|
const parsedOutput = {
|
|
1781
1835
|
...output,
|
|
1782
1836
|
body: await parseErrorBody(output.body, context)
|
|
@@ -1801,9 +1855,9 @@ const de_SendSystemMessageCommandError = async (output, context) => {
|
|
|
1801
1855
|
});
|
|
1802
1856
|
}
|
|
1803
1857
|
};
|
|
1804
|
-
const
|
|
1858
|
+
const de_SendTypingStopCommand = async (output, context) => {
|
|
1805
1859
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1806
|
-
return
|
|
1860
|
+
return de_SendTypingStopCommandError(output, context);
|
|
1807
1861
|
}
|
|
1808
1862
|
const contents = (0, smithy_client_1.map)({
|
|
1809
1863
|
$metadata: deserializeMetadata(output),
|
|
@@ -1811,8 +1865,8 @@ const de_SendTypingStartCommand = async (output, context) => {
|
|
|
1811
1865
|
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1812
1866
|
return contents;
|
|
1813
1867
|
};
|
|
1814
|
-
exports.
|
|
1815
|
-
const
|
|
1868
|
+
exports.de_SendTypingStopCommand = de_SendTypingStopCommand;
|
|
1869
|
+
const de_SendTypingStopCommandError = async (output, context) => {
|
|
1816
1870
|
const parsedOutput = {
|
|
1817
1871
|
...output,
|
|
1818
1872
|
body: await parseErrorBody(output.body, context)
|
|
@@ -1837,18 +1891,22 @@ const de_SendTypingStartCommandError = async (output, context) => {
|
|
|
1837
1891
|
});
|
|
1838
1892
|
}
|
|
1839
1893
|
};
|
|
1840
|
-
const
|
|
1894
|
+
const de_ShowChannelCommand = async (output, context) => {
|
|
1841
1895
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1842
|
-
return
|
|
1896
|
+
return de_ShowChannelCommandError(output, context);
|
|
1843
1897
|
}
|
|
1844
1898
|
const contents = (0, smithy_client_1.map)({
|
|
1845
1899
|
$metadata: deserializeMetadata(output),
|
|
1846
1900
|
});
|
|
1847
|
-
|
|
1901
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1902
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1903
|
+
'channel': smithy_client_1._json,
|
|
1904
|
+
});
|
|
1905
|
+
Object.assign(contents, doc);
|
|
1848
1906
|
return contents;
|
|
1849
1907
|
};
|
|
1850
|
-
exports.
|
|
1851
|
-
const
|
|
1908
|
+
exports.de_ShowChannelCommand = de_ShowChannelCommand;
|
|
1909
|
+
const de_ShowChannelCommandError = async (output, context) => {
|
|
1852
1910
|
const parsedOutput = {
|
|
1853
1911
|
...output,
|
|
1854
1912
|
body: await parseErrorBody(output.body, context)
|
|
@@ -1922,7 +1980,7 @@ const de_UpdateMessageCommand = async (output, context) => {
|
|
|
1922
1980
|
});
|
|
1923
1981
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1924
1982
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1925
|
-
'message':
|
|
1983
|
+
'message': smithy_client_1._json,
|
|
1926
1984
|
});
|
|
1927
1985
|
Object.assign(contents, doc);
|
|
1928
1986
|
return contents;
|
|
@@ -2061,66 +2119,6 @@ const de_MessageNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
2061
2119
|
});
|
|
2062
2120
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2063
2121
|
};
|
|
2064
|
-
const se_Message = (input, context) => {
|
|
2065
|
-
return (0, smithy_client_1.take)(input, {
|
|
2066
|
-
'attachments': smithy_client_1._json,
|
|
2067
|
-
'channelId': [],
|
|
2068
|
-
'createdAt': [],
|
|
2069
|
-
'edit': [],
|
|
2070
|
-
'event': [],
|
|
2071
|
-
'forward': smithy_client_1._json,
|
|
2072
|
-
'giphy': smithy_client_1._json,
|
|
2073
|
-
'latestReactions': smithy_client_1._json,
|
|
2074
|
-
'mentions': smithy_client_1._json,
|
|
2075
|
-
'messageId': [],
|
|
2076
|
-
'quote': _ => se_Message(_, context),
|
|
2077
|
-
'reactionCounts': smithy_client_1._json,
|
|
2078
|
-
'silent': [],
|
|
2079
|
-
'sms': [],
|
|
2080
|
-
'smsStatus': [],
|
|
2081
|
-
'text': [],
|
|
2082
|
-
'type': [],
|
|
2083
|
-
'updatedAt': [],
|
|
2084
|
-
'user': smithy_client_1._json,
|
|
2085
|
-
});
|
|
2086
|
-
};
|
|
2087
|
-
const se_PartialUpdateMessageSetInput = (input, context) => {
|
|
2088
|
-
return (0, smithy_client_1.take)(input, {
|
|
2089
|
-
'attachments': smithy_client_1._json,
|
|
2090
|
-
'forward': smithy_client_1._json,
|
|
2091
|
-
'quote': _ => se_Message(_, context),
|
|
2092
|
-
'text': [],
|
|
2093
|
-
});
|
|
2094
|
-
};
|
|
2095
|
-
const de_Message = (output, context) => {
|
|
2096
|
-
return (0, smithy_client_1.take)(output, {
|
|
2097
|
-
'attachments': smithy_client_1._json,
|
|
2098
|
-
'channelId': smithy_client_1.expectString,
|
|
2099
|
-
'createdAt': smithy_client_1.expectString,
|
|
2100
|
-
'edit': smithy_client_1.expectBoolean,
|
|
2101
|
-
'event': smithy_client_1.expectString,
|
|
2102
|
-
'forward': smithy_client_1._json,
|
|
2103
|
-
'giphy': smithy_client_1._json,
|
|
2104
|
-
'latestReactions': smithy_client_1._json,
|
|
2105
|
-
'mentions': smithy_client_1._json,
|
|
2106
|
-
'messageId': smithy_client_1.expectString,
|
|
2107
|
-
'quote': (_) => de_Message(_, context),
|
|
2108
|
-
'reactionCounts': smithy_client_1._json,
|
|
2109
|
-
'silent': smithy_client_1.expectBoolean,
|
|
2110
|
-
'sms': smithy_client_1.expectBoolean,
|
|
2111
|
-
'smsStatus': smithy_client_1.expectString,
|
|
2112
|
-
'text': smithy_client_1.expectString,
|
|
2113
|
-
'type': smithy_client_1.expectString,
|
|
2114
|
-
'updatedAt': smithy_client_1.expectString,
|
|
2115
|
-
'user': smithy_client_1._json,
|
|
2116
|
-
});
|
|
2117
|
-
};
|
|
2118
|
-
const de_MessagesList = (output, context) => {
|
|
2119
|
-
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
2120
|
-
return de_Message(entry, context);
|
|
2121
|
-
});
|
|
2122
|
-
return retVal;
|
|
2123
|
-
};
|
|
2124
2122
|
const deserializeMetadata = (output) => ({
|
|
2125
2123
|
httpStatusCode: output.statusCode,
|
|
2126
2124
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/Conversations.js
CHANGED
|
@@ -11,6 +11,7 @@ import { GetChannelMemberCommand, } from "./commands/GetChannelMemberCommand";
|
|
|
11
11
|
import { GetDirectChannelIdCommand, } from "./commands/GetDirectChannelIdCommand";
|
|
12
12
|
import { GetMessageCommand, } from "./commands/GetMessageCommand";
|
|
13
13
|
import { GetOrCreateDirectChannelCommand, } from "./commands/GetOrCreateDirectChannelCommand";
|
|
14
|
+
import { HideChannelCommand, } from "./commands/HideChannelCommand";
|
|
14
15
|
import { InviteCommand, } from "./commands/InviteCommand";
|
|
15
16
|
import { JoinChannelCommand, } from "./commands/JoinChannelCommand";
|
|
16
17
|
import { LeaveChannelCommand, } from "./commands/LeaveChannelCommand";
|
|
@@ -25,9 +26,9 @@ import { ScheduleExternalFlagAdjustmentJobCommand, } from "./commands/ScheduleEx
|
|
|
25
26
|
import { SendGiphyCommand, } from "./commands/SendGiphyCommand";
|
|
26
27
|
import { SendMessageCommand, } from "./commands/SendMessageCommand";
|
|
27
28
|
import { SendMessageReactionCommand, } from "./commands/SendMessageReactionCommand";
|
|
28
|
-
import { SendSystemMessageCommand, } from "./commands/SendSystemMessageCommand";
|
|
29
29
|
import { SendTypingStartCommand, } from "./commands/SendTypingStartCommand";
|
|
30
30
|
import { SendTypingStopCommand, } from "./commands/SendTypingStopCommand";
|
|
31
|
+
import { ShowChannelCommand, } from "./commands/ShowChannelCommand";
|
|
31
32
|
import { UpdateChannelCommand, } from "./commands/UpdateChannelCommand";
|
|
32
33
|
import { UpdateMessageCommand, } from "./commands/UpdateMessageCommand";
|
|
33
34
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
@@ -44,6 +45,7 @@ const commands = {
|
|
|
44
45
|
GetDirectChannelIdCommand,
|
|
45
46
|
GetMessageCommand,
|
|
46
47
|
GetOrCreateDirectChannelCommand,
|
|
48
|
+
HideChannelCommand,
|
|
47
49
|
InviteCommand,
|
|
48
50
|
JoinChannelCommand,
|
|
49
51
|
LeaveChannelCommand,
|
|
@@ -58,9 +60,9 @@ const commands = {
|
|
|
58
60
|
SendGiphyCommand,
|
|
59
61
|
SendMessageCommand,
|
|
60
62
|
SendMessageReactionCommand,
|
|
61
|
-
SendSystemMessageCommand,
|
|
62
63
|
SendTypingStartCommand,
|
|
63
64
|
SendTypingStopCommand,
|
|
65
|
+
ShowChannelCommand,
|
|
64
66
|
UpdateChannelCommand,
|
|
65
67
|
UpdateMessageCommand,
|
|
66
68
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { de_HideChannelCommand, se_HideChannelCommand, } from "../protocols/Aws_restJson1";
|
|
2
2
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
4
|
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
5
|
export { $Command };
|
|
6
|
-
export class
|
|
6
|
+
export class HideChannelCommand extends $Command {
|
|
7
7
|
constructor(input) {
|
|
8
8
|
super();
|
|
9
9
|
this.input = input;
|
|
@@ -13,7 +13,7 @@ export class SendSystemMessageCommand extends $Command {
|
|
|
13
13
|
const stack = clientStack.concat(this.middlewareStack);
|
|
14
14
|
const { logger } = configuration;
|
|
15
15
|
const clientName = "ConversationsClient";
|
|
16
|
-
const commandName = "
|
|
16
|
+
const commandName = "HideChannelCommand";
|
|
17
17
|
const handlerExecutionContext = {
|
|
18
18
|
logger,
|
|
19
19
|
clientName,
|
|
@@ -22,16 +22,16 @@ export class SendSystemMessageCommand extends $Command {
|
|
|
22
22
|
outputFilterSensitiveLog: (_) => _,
|
|
23
23
|
[SMITHY_CONTEXT_KEY]: {
|
|
24
24
|
service: "Conversations",
|
|
25
|
-
operation: "
|
|
25
|
+
operation: "HideChannel",
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
const { requestHandler } = configuration;
|
|
29
29
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
30
|
}
|
|
31
31
|
serialize(input, context) {
|
|
32
|
-
return
|
|
32
|
+
return se_HideChannelCommand(input, context);
|
|
33
33
|
}
|
|
34
34
|
deserialize(output, context) {
|
|
35
|
-
return
|
|
35
|
+
return de_HideChannelCommand(output, context);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { de_ShowChannelCommand, se_ShowChannelCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ShowChannelCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
12
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
13
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
14
|
+
const { logger } = configuration;
|
|
15
|
+
const clientName = "ConversationsClient";
|
|
16
|
+
const commandName = "ShowChannelCommand";
|
|
17
|
+
const handlerExecutionContext = {
|
|
18
|
+
logger,
|
|
19
|
+
clientName,
|
|
20
|
+
commandName,
|
|
21
|
+
inputFilterSensitiveLog: (_) => _,
|
|
22
|
+
outputFilterSensitiveLog: (_) => _,
|
|
23
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
24
|
+
service: "Conversations",
|
|
25
|
+
operation: "ShowChannel",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const { requestHandler } = configuration;
|
|
29
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
30
|
+
}
|
|
31
|
+
serialize(input, context) {
|
|
32
|
+
return se_ShowChannelCommand(input, context);
|
|
33
|
+
}
|
|
34
|
+
deserialize(output, context) {
|
|
35
|
+
return de_ShowChannelCommand(output, context);
|
|
36
|
+
}
|
|
37
|
+
}
|