@wildix/xbees-conversations-client 1.0.30 → 1.0.31
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 +36 -4
- package/dist-cjs/commands/AddChannelMemberCommand.js +41 -0
- package/dist-cjs/commands/AddChannelMembersCommand.js +41 -0
- package/dist-cjs/commands/CreateGroupChannelCommand.js +41 -0
- package/dist-cjs/commands/DeleteChannelMemberCommand.js +41 -0
- package/dist-cjs/commands/DeleteMessageReactionCommand.js +41 -0
- package/dist-cjs/commands/GetDirectChannelIdCommand.js +41 -0
- package/dist-cjs/commands/GetMessageReactionsCommand.js +41 -0
- package/dist-cjs/commands/GetOrCreateDirectChannelCommand.js +41 -0
- package/dist-cjs/commands/InviteCommand.js +41 -0
- package/dist-cjs/commands/{CreateChannelCommand.js → LeaveChannelCommand.js} +7 -7
- package/dist-cjs/commands/ListChannelMembersCommand.js +41 -0
- package/dist-cjs/commands/MarkReadCommand.js +41 -0
- package/dist-cjs/commands/SendGiphyCommand.js +41 -0
- package/dist-cjs/commands/SendMessageCommand.js +41 -0
- package/dist-cjs/commands/SendMessageReactionCommand.js +41 -0
- package/dist-cjs/commands/SendSystemMessageCommand.js +41 -0
- package/dist-cjs/commands/SendTypingStartCommand.js +41 -0
- package/dist-cjs/commands/{CreateMessageCommand.js → SendTypingStopCommand.js} +7 -7
- package/dist-cjs/commands/index.js +18 -2
- package/dist-cjs/models/models_0.js +71 -52
- package/dist-cjs/protocols/Aws_restJson1.js +1204 -145
- package/dist-es/Conversations.js +36 -4
- package/dist-es/commands/AddChannelMemberCommand.js +37 -0
- package/dist-es/commands/AddChannelMembersCommand.js +37 -0
- package/dist-es/commands/CreateGroupChannelCommand.js +37 -0
- package/dist-es/commands/DeleteChannelMemberCommand.js +37 -0
- package/dist-es/commands/DeleteMessageReactionCommand.js +37 -0
- package/dist-es/commands/GetDirectChannelIdCommand.js +37 -0
- package/dist-es/commands/GetMessageReactionsCommand.js +37 -0
- package/dist-es/commands/GetOrCreateDirectChannelCommand.js +37 -0
- package/dist-es/commands/{CreateChannelCommand.js → InviteCommand.js} +6 -6
- package/dist-es/commands/{CreateMessageCommand.js → LeaveChannelCommand.js} +6 -6
- package/dist-es/commands/ListChannelMembersCommand.js +37 -0
- package/dist-es/commands/MarkReadCommand.js +37 -0
- package/dist-es/commands/SendGiphyCommand.js +37 -0
- package/dist-es/commands/SendMessageCommand.js +37 -0
- package/dist-es/commands/SendMessageReactionCommand.js +37 -0
- package/dist-es/commands/SendSystemMessageCommand.js +37 -0
- package/dist-es/commands/SendTypingStartCommand.js +37 -0
- package/dist-es/commands/SendTypingStopCommand.js +37 -0
- package/dist-es/commands/index.js +18 -2
- package/dist-es/models/models_0.js +67 -50
- package/dist-es/protocols/Aws_restJson1.js +1174 -148
- package/dist-types/Conversations.d.ts +122 -10
- package/dist-types/ConversationsClient.d.ts +20 -4
- package/dist-types/commands/AddChannelMemberCommand.d.ts +105 -0
- package/dist-types/commands/AddChannelMembersCommand.d.ts +113 -0
- package/dist-types/commands/{CreateChannelCommand.d.ts → CreateGroupChannelCommand.d.ts} +37 -79
- package/dist-types/commands/DeleteChannelCommand.d.ts +2 -0
- package/dist-types/commands/DeleteChannelMemberCommand.d.ts +79 -0
- package/dist-types/commands/DeleteMessageCommand.d.ts +2 -0
- package/dist-types/commands/DeleteMessageReactionCommand.d.ts +80 -0
- package/dist-types/commands/GetChannelCommand.d.ts +2 -0
- package/dist-types/commands/GetChannelMemberCommand.d.ts +17 -0
- package/dist-types/commands/GetDirectChannelIdCommand.d.ts +82 -0
- package/dist-types/commands/GetMessageCommand.d.ts +23 -21
- package/dist-types/commands/GetMessageReactionsCommand.d.ts +101 -0
- package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +144 -0
- package/dist-types/commands/InviteCommand.d.ts +98 -0
- package/dist-types/commands/JoinChannelCommand.d.ts +1 -0
- package/dist-types/commands/LeaveChannelCommand.d.ts +77 -0
- package/dist-types/commands/ListChannelMembersCommand.d.ts +102 -0
- package/dist-types/commands/ListChannelsCommand.d.ts +2 -0
- package/dist-types/commands/ListMessagesCommand.d.ts +23 -21
- package/dist-types/commands/MarkReadCommand.d.ts +76 -0
- package/dist-types/commands/PartialUpdateChannelCommand.d.ts +5 -52
- package/dist-types/commands/PartialUpdateMessageCommand.d.ts +46 -54
- package/dist-types/commands/SendGiphyCommand.d.ts +220 -0
- package/dist-types/commands/{CreateMessageCommand.d.ts → SendMessageCommand.d.ts} +137 -143
- package/dist-types/commands/SendMessageReactionCommand.d.ts +78 -0
- package/dist-types/commands/SendSystemMessageCommand.d.ts +213 -0
- package/dist-types/commands/SendTypingStartCommand.d.ts +76 -0
- package/dist-types/commands/SendTypingStopCommand.d.ts +76 -0
- package/dist-types/commands/UpdateChannelCommand.d.ts +8 -57
- package/dist-types/commands/UpdateMessageCommand.d.ts +118 -125
- package/dist-types/commands/index.d.ts +18 -2
- package/dist-types/models/models_0.d.ts +450 -172
- package/dist-types/protocols/Aws_restJson1.d.ts +154 -10
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.de_ListMessagesCommand = exports.de_ListChannelsCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageReactionsCommand = 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_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendSystemMessageCommand = 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_ListChannelsCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageReactionsCommand = 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_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendSystemMessageCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkReadCommand = void 0;
|
|
4
5
|
const ConversationsServiceException_1 = require("../models/ConversationsServiceException");
|
|
5
6
|
const models_0_1 = require("../models/models_0");
|
|
6
7
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
7
8
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
|
-
const
|
|
9
|
+
const se_AddChannelMemberCommand = async (input, context) => {
|
|
9
10
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
11
|
const headers = {
|
|
11
12
|
'content-type': 'application/json',
|
|
12
13
|
};
|
|
13
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels";
|
|
14
|
-
|
|
15
|
-
"user": [, input.userId],
|
|
16
|
-
});
|
|
14
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
|
|
15
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
17
16
|
let body;
|
|
18
17
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
19
|
-
'
|
|
18
|
+
'memberId': [],
|
|
19
|
+
'memberToInvite': _ => (0, smithy_client_1._json)(_),
|
|
20
20
|
}));
|
|
21
21
|
return new protocol_http_1.HttpRequest({
|
|
22
22
|
protocol,
|
|
@@ -25,24 +25,53 @@ const se_CreateChannelCommand = async (input, context) => {
|
|
|
25
25
|
method: "POST",
|
|
26
26
|
headers,
|
|
27
27
|
path: resolvedPath,
|
|
28
|
-
query,
|
|
29
28
|
body,
|
|
30
29
|
});
|
|
31
30
|
};
|
|
32
|
-
exports.
|
|
33
|
-
const
|
|
31
|
+
exports.se_AddChannelMemberCommand = se_AddChannelMemberCommand;
|
|
32
|
+
const se_AddChannelMembersCommand = async (input, context) => {
|
|
34
33
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
35
34
|
const headers = {
|
|
36
35
|
'content-type': 'application/json',
|
|
37
36
|
};
|
|
38
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/
|
|
37
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
|
|
39
38
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
39
|
+
let body;
|
|
40
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
41
|
+
'members': _ => (0, smithy_client_1._json)(_),
|
|
42
|
+
'membersToInvite': _ => (0, smithy_client_1._json)(_),
|
|
43
|
+
}));
|
|
44
|
+
return new protocol_http_1.HttpRequest({
|
|
45
|
+
protocol,
|
|
46
|
+
hostname,
|
|
47
|
+
port,
|
|
48
|
+
method: "PUT",
|
|
49
|
+
headers,
|
|
50
|
+
path: resolvedPath,
|
|
51
|
+
body,
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
exports.se_AddChannelMembersCommand = se_AddChannelMembersCommand;
|
|
55
|
+
const se_CreateGroupChannelCommand = async (input, context) => {
|
|
56
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
57
|
+
const headers = {
|
|
58
|
+
'content-type': 'application/json',
|
|
59
|
+
};
|
|
60
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/group";
|
|
40
61
|
const query = (0, smithy_client_1.map)({
|
|
41
62
|
"user": [, input.userId],
|
|
42
63
|
});
|
|
43
64
|
let body;
|
|
44
65
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
45
|
-
'
|
|
66
|
+
'access': [],
|
|
67
|
+
'broadcast': [],
|
|
68
|
+
'channelId': [],
|
|
69
|
+
'description': [],
|
|
70
|
+
'members': _ => (0, smithy_client_1._json)(_),
|
|
71
|
+
'membersToInvite': _ => (0, smithy_client_1._json)(_),
|
|
72
|
+
'picture': [],
|
|
73
|
+
'pictureColor': [],
|
|
74
|
+
'subject': [],
|
|
46
75
|
}));
|
|
47
76
|
return new protocol_http_1.HttpRequest({
|
|
48
77
|
protocol,
|
|
@@ -55,7 +84,7 @@ const se_CreateMessageCommand = async (input, context) => {
|
|
|
55
84
|
body,
|
|
56
85
|
});
|
|
57
86
|
};
|
|
58
|
-
exports.
|
|
87
|
+
exports.se_CreateGroupChannelCommand = se_CreateGroupChannelCommand;
|
|
59
88
|
const se_DeleteChannelCommand = async (input, context) => {
|
|
60
89
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
61
90
|
const headers = {};
|
|
@@ -73,6 +102,28 @@ const se_DeleteChannelCommand = async (input, context) => {
|
|
|
73
102
|
});
|
|
74
103
|
};
|
|
75
104
|
exports.se_DeleteChannelCommand = se_DeleteChannelCommand;
|
|
105
|
+
const se_DeleteChannelMemberCommand = async (input, context) => {
|
|
106
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
107
|
+
const headers = {};
|
|
108
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members/{memberId}";
|
|
109
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
110
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'memberId', () => input.memberId, '{memberId}', false);
|
|
111
|
+
const query = (0, smithy_client_1.map)({
|
|
112
|
+
"silent": [() => input.silent !== void 0, () => (input.silent.toString())],
|
|
113
|
+
});
|
|
114
|
+
let body;
|
|
115
|
+
return new protocol_http_1.HttpRequest({
|
|
116
|
+
protocol,
|
|
117
|
+
hostname,
|
|
118
|
+
port,
|
|
119
|
+
method: "DELETE",
|
|
120
|
+
headers,
|
|
121
|
+
path: resolvedPath,
|
|
122
|
+
query,
|
|
123
|
+
body,
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
exports.se_DeleteChannelMemberCommand = se_DeleteChannelMemberCommand;
|
|
76
127
|
const se_DeleteMessageCommand = async (input, context) => {
|
|
77
128
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
78
129
|
const headers = {};
|
|
@@ -91,6 +142,29 @@ const se_DeleteMessageCommand = async (input, context) => {
|
|
|
91
142
|
});
|
|
92
143
|
};
|
|
93
144
|
exports.se_DeleteMessageCommand = se_DeleteMessageCommand;
|
|
145
|
+
const se_DeleteMessageReactionCommand = async (input, context) => {
|
|
146
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
147
|
+
const headers = {};
|
|
148
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions/{reactionType}";
|
|
149
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
150
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
151
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'reactionType', () => input.reactionType, '{reactionType}', false);
|
|
152
|
+
const query = (0, smithy_client_1.map)({
|
|
153
|
+
"user": [, input.userId],
|
|
154
|
+
});
|
|
155
|
+
let body;
|
|
156
|
+
return new protocol_http_1.HttpRequest({
|
|
157
|
+
protocol,
|
|
158
|
+
hostname,
|
|
159
|
+
port,
|
|
160
|
+
method: "DELETE",
|
|
161
|
+
headers,
|
|
162
|
+
path: resolvedPath,
|
|
163
|
+
query,
|
|
164
|
+
body,
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
exports.se_DeleteMessageReactionCommand = se_DeleteMessageReactionCommand;
|
|
94
168
|
const se_GetChannelCommand = async (input, context) => {
|
|
95
169
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
96
170
|
const headers = {};
|
|
@@ -126,6 +200,32 @@ const se_GetChannelMemberCommand = async (input, context) => {
|
|
|
126
200
|
});
|
|
127
201
|
};
|
|
128
202
|
exports.se_GetChannelMemberCommand = se_GetChannelMemberCommand;
|
|
203
|
+
const se_GetDirectChannelIdCommand = async (input, context) => {
|
|
204
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
205
|
+
const headers = {
|
|
206
|
+
'content-type': 'application/json',
|
|
207
|
+
};
|
|
208
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_channel_id";
|
|
209
|
+
const query = (0, smithy_client_1.map)({
|
|
210
|
+
"user": [, input.userId],
|
|
211
|
+
});
|
|
212
|
+
let body;
|
|
213
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
214
|
+
'participantId': [],
|
|
215
|
+
'participantToInvite': _ => (0, smithy_client_1._json)(_),
|
|
216
|
+
}));
|
|
217
|
+
return new protocol_http_1.HttpRequest({
|
|
218
|
+
protocol,
|
|
219
|
+
hostname,
|
|
220
|
+
port,
|
|
221
|
+
method: "POST",
|
|
222
|
+
headers,
|
|
223
|
+
path: resolvedPath,
|
|
224
|
+
query,
|
|
225
|
+
body,
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
exports.se_GetDirectChannelIdCommand = se_GetDirectChannelIdCommand;
|
|
129
229
|
const se_GetMessageCommand = async (input, context) => {
|
|
130
230
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
131
231
|
const headers = {};
|
|
@@ -144,15 +244,90 @@ const se_GetMessageCommand = async (input, context) => {
|
|
|
144
244
|
});
|
|
145
245
|
};
|
|
146
246
|
exports.se_GetMessageCommand = se_GetMessageCommand;
|
|
147
|
-
const
|
|
247
|
+
const se_GetMessageReactionsCommand = async (input, context) => {
|
|
148
248
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
149
249
|
const headers = {};
|
|
250
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
|
|
251
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
252
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
253
|
+
const query = (0, smithy_client_1.map)({
|
|
254
|
+
"limit": [() => input.limit !== void 0, () => (input.limit.toString())],
|
|
255
|
+
"offset": [() => input.offset !== void 0, () => (input.offset.toString())],
|
|
256
|
+
});
|
|
257
|
+
let body;
|
|
258
|
+
return new protocol_http_1.HttpRequest({
|
|
259
|
+
protocol,
|
|
260
|
+
hostname,
|
|
261
|
+
port,
|
|
262
|
+
method: "GET",
|
|
263
|
+
headers,
|
|
264
|
+
path: resolvedPath,
|
|
265
|
+
query,
|
|
266
|
+
body,
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
exports.se_GetMessageReactionsCommand = se_GetMessageReactionsCommand;
|
|
270
|
+
const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
271
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
272
|
+
const headers = {
|
|
273
|
+
'content-type': 'application/json',
|
|
274
|
+
};
|
|
275
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_or_create_channel";
|
|
276
|
+
const query = (0, smithy_client_1.map)({
|
|
277
|
+
"user": [, input.userId],
|
|
278
|
+
});
|
|
279
|
+
let body;
|
|
280
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
281
|
+
'memberId': [],
|
|
282
|
+
'memberToInvite': _ => (0, smithy_client_1._json)(_),
|
|
283
|
+
}));
|
|
284
|
+
return new protocol_http_1.HttpRequest({
|
|
285
|
+
protocol,
|
|
286
|
+
hostname,
|
|
287
|
+
port,
|
|
288
|
+
method: "POST",
|
|
289
|
+
headers,
|
|
290
|
+
path: resolvedPath,
|
|
291
|
+
query,
|
|
292
|
+
body,
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
exports.se_GetOrCreateDirectChannelCommand = se_GetOrCreateDirectChannelCommand;
|
|
296
|
+
const se_InviteCommand = async (input, context) => {
|
|
297
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
298
|
+
const headers = {
|
|
299
|
+
'content-type': 'application/json',
|
|
300
|
+
};
|
|
301
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/invite";
|
|
302
|
+
let body;
|
|
303
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
304
|
+
'invitees': _ => (0, smithy_client_1._json)(_),
|
|
305
|
+
}));
|
|
306
|
+
return new protocol_http_1.HttpRequest({
|
|
307
|
+
protocol,
|
|
308
|
+
hostname,
|
|
309
|
+
port,
|
|
310
|
+
method: "POST",
|
|
311
|
+
headers,
|
|
312
|
+
path: resolvedPath,
|
|
313
|
+
body,
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
exports.se_InviteCommand = se_InviteCommand;
|
|
317
|
+
const se_JoinChannelCommand = async (input, context) => {
|
|
318
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
319
|
+
const headers = {
|
|
320
|
+
'content-type': 'application/json',
|
|
321
|
+
};
|
|
150
322
|
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/join";
|
|
151
323
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
152
324
|
const query = (0, smithy_client_1.map)({
|
|
153
325
|
"user": [, input.userId],
|
|
154
326
|
});
|
|
155
327
|
let body;
|
|
328
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
329
|
+
'silent': [],
|
|
330
|
+
}));
|
|
156
331
|
return new protocol_http_1.HttpRequest({
|
|
157
332
|
protocol,
|
|
158
333
|
hostname,
|
|
@@ -165,6 +340,54 @@ const se_JoinChannelCommand = async (input, context) => {
|
|
|
165
340
|
});
|
|
166
341
|
};
|
|
167
342
|
exports.se_JoinChannelCommand = se_JoinChannelCommand;
|
|
343
|
+
const se_LeaveChannelCommand = async (input, context) => {
|
|
344
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
345
|
+
const headers = {
|
|
346
|
+
'content-type': 'application/json',
|
|
347
|
+
};
|
|
348
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/leave";
|
|
349
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
350
|
+
const query = (0, smithy_client_1.map)({
|
|
351
|
+
"user": [, input.userId],
|
|
352
|
+
});
|
|
353
|
+
let body;
|
|
354
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
355
|
+
'silent': [],
|
|
356
|
+
}));
|
|
357
|
+
return new protocol_http_1.HttpRequest({
|
|
358
|
+
protocol,
|
|
359
|
+
hostname,
|
|
360
|
+
port,
|
|
361
|
+
method: "POST",
|
|
362
|
+
headers,
|
|
363
|
+
path: resolvedPath,
|
|
364
|
+
query,
|
|
365
|
+
body,
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
exports.se_LeaveChannelCommand = se_LeaveChannelCommand;
|
|
369
|
+
const se_ListChannelMembersCommand = async (input, context) => {
|
|
370
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
371
|
+
const headers = {};
|
|
372
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
|
|
373
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
374
|
+
const query = (0, smithy_client_1.map)({
|
|
375
|
+
"limit": [() => input.limit !== void 0, () => (input.limit.toString())],
|
|
376
|
+
"offset": [() => input.offset !== void 0, () => (input.offset.toString())],
|
|
377
|
+
});
|
|
378
|
+
let body;
|
|
379
|
+
return new protocol_http_1.HttpRequest({
|
|
380
|
+
protocol,
|
|
381
|
+
hostname,
|
|
382
|
+
port,
|
|
383
|
+
method: "GET",
|
|
384
|
+
headers,
|
|
385
|
+
path: resolvedPath,
|
|
386
|
+
query,
|
|
387
|
+
body,
|
|
388
|
+
});
|
|
389
|
+
};
|
|
390
|
+
exports.se_ListChannelMembersCommand = se_ListChannelMembersCommand;
|
|
168
391
|
const se_ListChannelsCommand = async (input, context) => {
|
|
169
392
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
170
393
|
const headers = {};
|
|
@@ -204,6 +427,27 @@ const se_ListMessagesCommand = async (input, context) => {
|
|
|
204
427
|
});
|
|
205
428
|
};
|
|
206
429
|
exports.se_ListMessagesCommand = se_ListMessagesCommand;
|
|
430
|
+
const se_MarkReadCommand = async (input, context) => {
|
|
431
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
432
|
+
const headers = {};
|
|
433
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/read";
|
|
434
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
435
|
+
const query = (0, smithy_client_1.map)({
|
|
436
|
+
"user": [, input.userId],
|
|
437
|
+
});
|
|
438
|
+
let body;
|
|
439
|
+
return new protocol_http_1.HttpRequest({
|
|
440
|
+
protocol,
|
|
441
|
+
hostname,
|
|
442
|
+
port,
|
|
443
|
+
method: "POST",
|
|
444
|
+
headers,
|
|
445
|
+
path: resolvedPath,
|
|
446
|
+
query,
|
|
447
|
+
body,
|
|
448
|
+
});
|
|
449
|
+
};
|
|
450
|
+
exports.se_MarkReadCommand = se_MarkReadCommand;
|
|
207
451
|
const se_PartialUpdateChannelCommand = async (input, context) => {
|
|
208
452
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
209
453
|
const headers = {
|
|
@@ -239,12 +483,9 @@ const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
239
483
|
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
|
|
240
484
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
241
485
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
242
|
-
const query = (0, smithy_client_1.map)({
|
|
243
|
-
"user": [, input.userId],
|
|
244
|
-
});
|
|
245
486
|
let body;
|
|
246
487
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
247
|
-
'set': _ =>
|
|
488
|
+
'set': _ => se_PartialUpdateMessageSetInput(_, context),
|
|
248
489
|
'unset': _ => (0, smithy_client_1._json)(_),
|
|
249
490
|
}));
|
|
250
491
|
return new protocol_http_1.HttpRequest({
|
|
@@ -254,7 +495,6 @@ const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
254
495
|
method: "PATCH",
|
|
255
496
|
headers,
|
|
256
497
|
path: resolvedPath,
|
|
257
|
-
query,
|
|
258
498
|
body,
|
|
259
499
|
});
|
|
260
500
|
};
|
|
@@ -280,38 +520,70 @@ const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
|
|
|
280
520
|
});
|
|
281
521
|
};
|
|
282
522
|
exports.se_ScheduleExternalFlagAdjustmentJobCommand = se_ScheduleExternalFlagAdjustmentJobCommand;
|
|
283
|
-
const
|
|
523
|
+
const se_SendGiphyCommand = async (input, context) => {
|
|
284
524
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
285
525
|
const headers = {
|
|
286
526
|
'content-type': 'application/json',
|
|
287
527
|
};
|
|
288
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
|
|
528
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_giphy";
|
|
289
529
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
290
530
|
const query = (0, smithy_client_1.map)({
|
|
291
531
|
"user": [, input.userId],
|
|
292
532
|
});
|
|
293
533
|
let body;
|
|
294
534
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
295
|
-
'
|
|
535
|
+
'giphy': _ => (0, smithy_client_1._json)(_),
|
|
536
|
+
'messageId': [],
|
|
296
537
|
}));
|
|
297
538
|
return new protocol_http_1.HttpRequest({
|
|
298
539
|
protocol,
|
|
299
540
|
hostname,
|
|
300
541
|
port,
|
|
301
|
-
method: "
|
|
542
|
+
method: "POST",
|
|
302
543
|
headers,
|
|
303
544
|
path: resolvedPath,
|
|
304
545
|
query,
|
|
305
546
|
body,
|
|
306
547
|
});
|
|
307
548
|
};
|
|
308
|
-
exports.
|
|
309
|
-
const
|
|
549
|
+
exports.se_SendGiphyCommand = se_SendGiphyCommand;
|
|
550
|
+
const se_SendMessageCommand = async (input, context) => {
|
|
310
551
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
311
552
|
const headers = {
|
|
312
553
|
'content-type': 'application/json',
|
|
313
554
|
};
|
|
314
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages
|
|
555
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages";
|
|
556
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
557
|
+
const query = (0, smithy_client_1.map)({
|
|
558
|
+
"user": [, input.userId],
|
|
559
|
+
});
|
|
560
|
+
let body;
|
|
561
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
562
|
+
'attachments': _ => (0, smithy_client_1._json)(_),
|
|
563
|
+
'forward': _ => (0, smithy_client_1._json)(_),
|
|
564
|
+
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
565
|
+
'messageId': [],
|
|
566
|
+
'quote': _ => se_Message(_, context),
|
|
567
|
+
'text': [],
|
|
568
|
+
}));
|
|
569
|
+
return new protocol_http_1.HttpRequest({
|
|
570
|
+
protocol,
|
|
571
|
+
hostname,
|
|
572
|
+
port,
|
|
573
|
+
method: "POST",
|
|
574
|
+
headers,
|
|
575
|
+
path: resolvedPath,
|
|
576
|
+
query,
|
|
577
|
+
body,
|
|
578
|
+
});
|
|
579
|
+
};
|
|
580
|
+
exports.se_SendMessageCommand = se_SendMessageCommand;
|
|
581
|
+
const se_SendMessageReactionCommand = async (input, context) => {
|
|
582
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
583
|
+
const headers = {
|
|
584
|
+
'content-type': 'application/json',
|
|
585
|
+
};
|
|
586
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
|
|
315
587
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
316
588
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
317
589
|
const query = (0, smithy_client_1.map)({
|
|
@@ -319,42 +591,804 @@ const se_UpdateMessageCommand = async (input, context) => {
|
|
|
319
591
|
});
|
|
320
592
|
let body;
|
|
321
593
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
322
|
-
'
|
|
594
|
+
'reactionType': [],
|
|
323
595
|
}));
|
|
324
596
|
return new protocol_http_1.HttpRequest({
|
|
325
597
|
protocol,
|
|
326
598
|
hostname,
|
|
327
599
|
port,
|
|
328
|
-
method: "
|
|
600
|
+
method: "POST",
|
|
329
601
|
headers,
|
|
330
602
|
path: resolvedPath,
|
|
331
603
|
query,
|
|
332
604
|
body,
|
|
333
605
|
});
|
|
334
606
|
};
|
|
335
|
-
exports.
|
|
336
|
-
const
|
|
607
|
+
exports.se_SendMessageReactionCommand = se_SendMessageReactionCommand;
|
|
608
|
+
const se_SendSystemMessageCommand = async (input, context) => {
|
|
609
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
610
|
+
const headers = {
|
|
611
|
+
'content-type': 'application/json',
|
|
612
|
+
};
|
|
613
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_system_message";
|
|
614
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
615
|
+
const query = (0, smithy_client_1.map)({
|
|
616
|
+
"user": [, input.userId],
|
|
617
|
+
});
|
|
618
|
+
let body;
|
|
619
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
620
|
+
'messageId': [],
|
|
621
|
+
}));
|
|
622
|
+
return new protocol_http_1.HttpRequest({
|
|
623
|
+
protocol,
|
|
624
|
+
hostname,
|
|
625
|
+
port,
|
|
626
|
+
method: "POST",
|
|
627
|
+
headers,
|
|
628
|
+
path: resolvedPath,
|
|
629
|
+
query,
|
|
630
|
+
body,
|
|
631
|
+
});
|
|
632
|
+
};
|
|
633
|
+
exports.se_SendSystemMessageCommand = se_SendSystemMessageCommand;
|
|
634
|
+
const se_SendTypingStartCommand = async (input, context) => {
|
|
635
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
636
|
+
const headers = {};
|
|
637
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_start";
|
|
638
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
639
|
+
const query = (0, smithy_client_1.map)({
|
|
640
|
+
"user": [, input.userId],
|
|
641
|
+
});
|
|
642
|
+
let body;
|
|
643
|
+
return new protocol_http_1.HttpRequest({
|
|
644
|
+
protocol,
|
|
645
|
+
hostname,
|
|
646
|
+
port,
|
|
647
|
+
method: "POST",
|
|
648
|
+
headers,
|
|
649
|
+
path: resolvedPath,
|
|
650
|
+
query,
|
|
651
|
+
body,
|
|
652
|
+
});
|
|
653
|
+
};
|
|
654
|
+
exports.se_SendTypingStartCommand = se_SendTypingStartCommand;
|
|
655
|
+
const se_SendTypingStopCommand = async (input, context) => {
|
|
656
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
657
|
+
const headers = {};
|
|
658
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_stop";
|
|
659
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
660
|
+
const query = (0, smithy_client_1.map)({
|
|
661
|
+
"user": [, input.userId],
|
|
662
|
+
});
|
|
663
|
+
let body;
|
|
664
|
+
return new protocol_http_1.HttpRequest({
|
|
665
|
+
protocol,
|
|
666
|
+
hostname,
|
|
667
|
+
port,
|
|
668
|
+
method: "POST",
|
|
669
|
+
headers,
|
|
670
|
+
path: resolvedPath,
|
|
671
|
+
query,
|
|
672
|
+
body,
|
|
673
|
+
});
|
|
674
|
+
};
|
|
675
|
+
exports.se_SendTypingStopCommand = se_SendTypingStopCommand;
|
|
676
|
+
const se_UpdateChannelCommand = async (input, context) => {
|
|
677
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
678
|
+
const headers = {
|
|
679
|
+
'content-type': 'application/json',
|
|
680
|
+
};
|
|
681
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
|
|
682
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
683
|
+
const query = (0, smithy_client_1.map)({
|
|
684
|
+
"user": [, input.userId],
|
|
685
|
+
});
|
|
686
|
+
let body;
|
|
687
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
688
|
+
'access': [],
|
|
689
|
+
'broadcast': [],
|
|
690
|
+
'description': [],
|
|
691
|
+
'picture': [],
|
|
692
|
+
'pictureColor': [],
|
|
693
|
+
'subject': [],
|
|
694
|
+
}));
|
|
695
|
+
return new protocol_http_1.HttpRequest({
|
|
696
|
+
protocol,
|
|
697
|
+
hostname,
|
|
698
|
+
port,
|
|
699
|
+
method: "PUT",
|
|
700
|
+
headers,
|
|
701
|
+
path: resolvedPath,
|
|
702
|
+
query,
|
|
703
|
+
body,
|
|
704
|
+
});
|
|
705
|
+
};
|
|
706
|
+
exports.se_UpdateChannelCommand = se_UpdateChannelCommand;
|
|
707
|
+
const se_UpdateMessageCommand = async (input, context) => {
|
|
708
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
709
|
+
const headers = {
|
|
710
|
+
'content-type': 'application/json',
|
|
711
|
+
};
|
|
712
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
|
|
713
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
714
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
715
|
+
let body;
|
|
716
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
717
|
+
'attachments': _ => (0, smithy_client_1._json)(_),
|
|
718
|
+
'forward': _ => (0, smithy_client_1._json)(_),
|
|
719
|
+
'mentions': _ => (0, smithy_client_1._json)(_),
|
|
720
|
+
'quote': _ => se_Message(_, context),
|
|
721
|
+
'text': [],
|
|
722
|
+
}));
|
|
723
|
+
return new protocol_http_1.HttpRequest({
|
|
724
|
+
protocol,
|
|
725
|
+
hostname,
|
|
726
|
+
port,
|
|
727
|
+
method: "PUT",
|
|
728
|
+
headers,
|
|
729
|
+
path: resolvedPath,
|
|
730
|
+
body,
|
|
731
|
+
});
|
|
732
|
+
};
|
|
733
|
+
exports.se_UpdateMessageCommand = se_UpdateMessageCommand;
|
|
734
|
+
const de_AddChannelMemberCommand = async (output, context) => {
|
|
735
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
736
|
+
return de_AddChannelMemberCommandError(output, context);
|
|
737
|
+
}
|
|
738
|
+
const contents = (0, smithy_client_1.map)({
|
|
739
|
+
$metadata: deserializeMetadata(output),
|
|
740
|
+
});
|
|
741
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
742
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
743
|
+
'member': smithy_client_1._json,
|
|
744
|
+
'user': smithy_client_1._json,
|
|
745
|
+
});
|
|
746
|
+
Object.assign(contents, doc);
|
|
747
|
+
return contents;
|
|
748
|
+
};
|
|
749
|
+
exports.de_AddChannelMemberCommand = de_AddChannelMemberCommand;
|
|
750
|
+
const de_AddChannelMemberCommandError = async (output, context) => {
|
|
751
|
+
const parsedOutput = {
|
|
752
|
+
...output,
|
|
753
|
+
body: await parseErrorBody(output.body, context)
|
|
754
|
+
};
|
|
755
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
756
|
+
switch (errorCode) {
|
|
757
|
+
case "ChannelNotFoundException":
|
|
758
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
759
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
760
|
+
case "ForbiddenException":
|
|
761
|
+
case "smithy.framework#ForbiddenException":
|
|
762
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
763
|
+
case "MemberAlreadyExistException":
|
|
764
|
+
case "wildix.xbees.conversations#MemberAlreadyExistException":
|
|
765
|
+
throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
|
|
766
|
+
case "ValidationException":
|
|
767
|
+
case "smithy.framework#ValidationException":
|
|
768
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
769
|
+
default:
|
|
770
|
+
const parsedBody = parsedOutput.body;
|
|
771
|
+
return throwDefaultError({
|
|
772
|
+
output,
|
|
773
|
+
parsedBody,
|
|
774
|
+
errorCode
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
const de_AddChannelMembersCommand = async (output, context) => {
|
|
779
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
780
|
+
return de_AddChannelMembersCommandError(output, context);
|
|
781
|
+
}
|
|
782
|
+
const contents = (0, smithy_client_1.map)({
|
|
783
|
+
$metadata: deserializeMetadata(output),
|
|
784
|
+
});
|
|
785
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
786
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
787
|
+
'members': smithy_client_1._json,
|
|
788
|
+
'users': smithy_client_1._json,
|
|
789
|
+
});
|
|
790
|
+
Object.assign(contents, doc);
|
|
791
|
+
return contents;
|
|
792
|
+
};
|
|
793
|
+
exports.de_AddChannelMembersCommand = de_AddChannelMembersCommand;
|
|
794
|
+
const de_AddChannelMembersCommandError = async (output, context) => {
|
|
795
|
+
const parsedOutput = {
|
|
796
|
+
...output,
|
|
797
|
+
body: await parseErrorBody(output.body, context)
|
|
798
|
+
};
|
|
799
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
800
|
+
switch (errorCode) {
|
|
801
|
+
case "ChannelNotFoundException":
|
|
802
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
803
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
804
|
+
case "ForbiddenException":
|
|
805
|
+
case "smithy.framework#ForbiddenException":
|
|
806
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
807
|
+
case "MemberAlreadyExistException":
|
|
808
|
+
case "wildix.xbees.conversations#MemberAlreadyExistException":
|
|
809
|
+
throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
|
|
810
|
+
case "ValidationException":
|
|
811
|
+
case "smithy.framework#ValidationException":
|
|
812
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
813
|
+
default:
|
|
814
|
+
const parsedBody = parsedOutput.body;
|
|
815
|
+
return throwDefaultError({
|
|
816
|
+
output,
|
|
817
|
+
parsedBody,
|
|
818
|
+
errorCode
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
const de_CreateGroupChannelCommand = async (output, context) => {
|
|
823
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
824
|
+
return de_CreateGroupChannelCommandError(output, context);
|
|
825
|
+
}
|
|
826
|
+
const contents = (0, smithy_client_1.map)({
|
|
827
|
+
$metadata: deserializeMetadata(output),
|
|
828
|
+
});
|
|
829
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
830
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
831
|
+
'channel': smithy_client_1._json,
|
|
832
|
+
});
|
|
833
|
+
Object.assign(contents, doc);
|
|
834
|
+
return contents;
|
|
835
|
+
};
|
|
836
|
+
exports.de_CreateGroupChannelCommand = de_CreateGroupChannelCommand;
|
|
837
|
+
const de_CreateGroupChannelCommandError = async (output, context) => {
|
|
838
|
+
const parsedOutput = {
|
|
839
|
+
...output,
|
|
840
|
+
body: await parseErrorBody(output.body, context)
|
|
841
|
+
};
|
|
842
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
843
|
+
switch (errorCode) {
|
|
844
|
+
case "ChannelAlreadyExistException":
|
|
845
|
+
case "wildix.xbees.conversations#ChannelAlreadyExistException":
|
|
846
|
+
throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
|
|
847
|
+
case "ForbiddenException":
|
|
848
|
+
case "smithy.framework#ForbiddenException":
|
|
849
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
850
|
+
case "ValidationException":
|
|
851
|
+
case "smithy.framework#ValidationException":
|
|
852
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
853
|
+
default:
|
|
854
|
+
const parsedBody = parsedOutput.body;
|
|
855
|
+
return throwDefaultError({
|
|
856
|
+
output,
|
|
857
|
+
parsedBody,
|
|
858
|
+
errorCode
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
const de_DeleteChannelCommand = async (output, context) => {
|
|
863
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
864
|
+
return de_DeleteChannelCommandError(output, context);
|
|
865
|
+
}
|
|
866
|
+
const contents = (0, smithy_client_1.map)({
|
|
867
|
+
$metadata: deserializeMetadata(output),
|
|
868
|
+
});
|
|
869
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
870
|
+
return contents;
|
|
871
|
+
};
|
|
872
|
+
exports.de_DeleteChannelCommand = de_DeleteChannelCommand;
|
|
873
|
+
const de_DeleteChannelCommandError = async (output, context) => {
|
|
874
|
+
const parsedOutput = {
|
|
875
|
+
...output,
|
|
876
|
+
body: await parseErrorBody(output.body, context)
|
|
877
|
+
};
|
|
878
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
879
|
+
switch (errorCode) {
|
|
880
|
+
case "ChannelNotFoundException":
|
|
881
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
882
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
883
|
+
case "ForbiddenException":
|
|
884
|
+
case "smithy.framework#ForbiddenException":
|
|
885
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
886
|
+
case "ValidationException":
|
|
887
|
+
case "smithy.framework#ValidationException":
|
|
888
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
889
|
+
default:
|
|
890
|
+
const parsedBody = parsedOutput.body;
|
|
891
|
+
return throwDefaultError({
|
|
892
|
+
output,
|
|
893
|
+
parsedBody,
|
|
894
|
+
errorCode
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
};
|
|
898
|
+
const de_DeleteChannelMemberCommand = async (output, context) => {
|
|
899
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
900
|
+
return de_DeleteChannelMemberCommandError(output, context);
|
|
901
|
+
}
|
|
902
|
+
const contents = (0, smithy_client_1.map)({
|
|
903
|
+
$metadata: deserializeMetadata(output),
|
|
904
|
+
});
|
|
905
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
906
|
+
return contents;
|
|
907
|
+
};
|
|
908
|
+
exports.de_DeleteChannelMemberCommand = de_DeleteChannelMemberCommand;
|
|
909
|
+
const de_DeleteChannelMemberCommandError = async (output, context) => {
|
|
910
|
+
const parsedOutput = {
|
|
911
|
+
...output,
|
|
912
|
+
body: await parseErrorBody(output.body, context)
|
|
913
|
+
};
|
|
914
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
915
|
+
switch (errorCode) {
|
|
916
|
+
case "ChannelNotFoundException":
|
|
917
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
918
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
919
|
+
case "ForbiddenException":
|
|
920
|
+
case "smithy.framework#ForbiddenException":
|
|
921
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
922
|
+
case "MemberNotFoundException":
|
|
923
|
+
case "wildix.xbees.conversations#MemberNotFoundException":
|
|
924
|
+
throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
|
|
925
|
+
case "ValidationException":
|
|
926
|
+
case "smithy.framework#ValidationException":
|
|
927
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
928
|
+
default:
|
|
929
|
+
const parsedBody = parsedOutput.body;
|
|
930
|
+
return throwDefaultError({
|
|
931
|
+
output,
|
|
932
|
+
parsedBody,
|
|
933
|
+
errorCode
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
const de_DeleteMessageCommand = async (output, context) => {
|
|
938
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
939
|
+
return de_DeleteMessageCommandError(output, context);
|
|
940
|
+
}
|
|
941
|
+
const contents = (0, smithy_client_1.map)({
|
|
942
|
+
$metadata: deserializeMetadata(output),
|
|
943
|
+
});
|
|
944
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
945
|
+
return contents;
|
|
946
|
+
};
|
|
947
|
+
exports.de_DeleteMessageCommand = de_DeleteMessageCommand;
|
|
948
|
+
const de_DeleteMessageCommandError = async (output, context) => {
|
|
949
|
+
const parsedOutput = {
|
|
950
|
+
...output,
|
|
951
|
+
body: await parseErrorBody(output.body, context)
|
|
952
|
+
};
|
|
953
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
954
|
+
switch (errorCode) {
|
|
955
|
+
case "ChannelNotFoundException":
|
|
956
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
957
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
958
|
+
case "ForbiddenException":
|
|
959
|
+
case "smithy.framework#ForbiddenException":
|
|
960
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
961
|
+
case "MessageNotFoundException":
|
|
962
|
+
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
963
|
+
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
964
|
+
case "ValidationException":
|
|
965
|
+
case "smithy.framework#ValidationException":
|
|
966
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
967
|
+
default:
|
|
968
|
+
const parsedBody = parsedOutput.body;
|
|
969
|
+
return throwDefaultError({
|
|
970
|
+
output,
|
|
971
|
+
parsedBody,
|
|
972
|
+
errorCode
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
const de_DeleteMessageReactionCommand = async (output, context) => {
|
|
977
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
978
|
+
return de_DeleteMessageReactionCommandError(output, context);
|
|
979
|
+
}
|
|
980
|
+
const contents = (0, smithy_client_1.map)({
|
|
981
|
+
$metadata: deserializeMetadata(output),
|
|
982
|
+
});
|
|
983
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
984
|
+
return contents;
|
|
985
|
+
};
|
|
986
|
+
exports.de_DeleteMessageReactionCommand = de_DeleteMessageReactionCommand;
|
|
987
|
+
const de_DeleteMessageReactionCommandError = async (output, context) => {
|
|
988
|
+
const parsedOutput = {
|
|
989
|
+
...output,
|
|
990
|
+
body: await parseErrorBody(output.body, context)
|
|
991
|
+
};
|
|
992
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
993
|
+
switch (errorCode) {
|
|
994
|
+
case "ChannelNotFoundException":
|
|
995
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
996
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
997
|
+
case "ForbiddenException":
|
|
998
|
+
case "smithy.framework#ForbiddenException":
|
|
999
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1000
|
+
case "MessageNotFoundException":
|
|
1001
|
+
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
1002
|
+
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
1003
|
+
case "ValidationException":
|
|
1004
|
+
case "smithy.framework#ValidationException":
|
|
1005
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1006
|
+
default:
|
|
1007
|
+
const parsedBody = parsedOutput.body;
|
|
1008
|
+
return throwDefaultError({
|
|
1009
|
+
output,
|
|
1010
|
+
parsedBody,
|
|
1011
|
+
errorCode
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
};
|
|
1015
|
+
const de_GetChannelCommand = async (output, context) => {
|
|
1016
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1017
|
+
return de_GetChannelCommandError(output, context);
|
|
1018
|
+
}
|
|
1019
|
+
const contents = (0, smithy_client_1.map)({
|
|
1020
|
+
$metadata: deserializeMetadata(output),
|
|
1021
|
+
});
|
|
1022
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1023
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1024
|
+
'channel': smithy_client_1._json,
|
|
1025
|
+
});
|
|
1026
|
+
Object.assign(contents, doc);
|
|
1027
|
+
return contents;
|
|
1028
|
+
};
|
|
1029
|
+
exports.de_GetChannelCommand = de_GetChannelCommand;
|
|
1030
|
+
const de_GetChannelCommandError = async (output, context) => {
|
|
1031
|
+
const parsedOutput = {
|
|
1032
|
+
...output,
|
|
1033
|
+
body: await parseErrorBody(output.body, context)
|
|
1034
|
+
};
|
|
1035
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1036
|
+
switch (errorCode) {
|
|
1037
|
+
case "ChannelNotFoundException":
|
|
1038
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1039
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1040
|
+
case "ForbiddenException":
|
|
1041
|
+
case "smithy.framework#ForbiddenException":
|
|
1042
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1043
|
+
case "ValidationException":
|
|
1044
|
+
case "smithy.framework#ValidationException":
|
|
1045
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1046
|
+
default:
|
|
1047
|
+
const parsedBody = parsedOutput.body;
|
|
1048
|
+
return throwDefaultError({
|
|
1049
|
+
output,
|
|
1050
|
+
parsedBody,
|
|
1051
|
+
errorCode
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
const de_GetChannelMemberCommand = async (output, context) => {
|
|
1056
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1057
|
+
return de_GetChannelMemberCommandError(output, context);
|
|
1058
|
+
}
|
|
1059
|
+
const contents = (0, smithy_client_1.map)({
|
|
1060
|
+
$metadata: deserializeMetadata(output),
|
|
1061
|
+
});
|
|
1062
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1063
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1064
|
+
'member': smithy_client_1._json,
|
|
1065
|
+
'user': smithy_client_1._json,
|
|
1066
|
+
});
|
|
1067
|
+
Object.assign(contents, doc);
|
|
1068
|
+
return contents;
|
|
1069
|
+
};
|
|
1070
|
+
exports.de_GetChannelMemberCommand = de_GetChannelMemberCommand;
|
|
1071
|
+
const de_GetChannelMemberCommandError = async (output, context) => {
|
|
1072
|
+
const parsedOutput = {
|
|
1073
|
+
...output,
|
|
1074
|
+
body: await parseErrorBody(output.body, context)
|
|
1075
|
+
};
|
|
1076
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1077
|
+
switch (errorCode) {
|
|
1078
|
+
case "ChannelNotFoundException":
|
|
1079
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1080
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1081
|
+
case "ForbiddenException":
|
|
1082
|
+
case "smithy.framework#ForbiddenException":
|
|
1083
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1084
|
+
case "MemberNotFoundException":
|
|
1085
|
+
case "wildix.xbees.conversations#MemberNotFoundException":
|
|
1086
|
+
throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
|
|
1087
|
+
case "ValidationException":
|
|
1088
|
+
case "smithy.framework#ValidationException":
|
|
1089
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1090
|
+
default:
|
|
1091
|
+
const parsedBody = parsedOutput.body;
|
|
1092
|
+
return throwDefaultError({
|
|
1093
|
+
output,
|
|
1094
|
+
parsedBody,
|
|
1095
|
+
errorCode
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
const de_GetDirectChannelIdCommand = async (output, context) => {
|
|
1100
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1101
|
+
return de_GetDirectChannelIdCommandError(output, context);
|
|
1102
|
+
}
|
|
1103
|
+
const contents = (0, smithy_client_1.map)({
|
|
1104
|
+
$metadata: deserializeMetadata(output),
|
|
1105
|
+
});
|
|
1106
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1107
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1108
|
+
'channelId': smithy_client_1.expectString,
|
|
1109
|
+
});
|
|
1110
|
+
Object.assign(contents, doc);
|
|
1111
|
+
return contents;
|
|
1112
|
+
};
|
|
1113
|
+
exports.de_GetDirectChannelIdCommand = de_GetDirectChannelIdCommand;
|
|
1114
|
+
const de_GetDirectChannelIdCommandError = async (output, context) => {
|
|
1115
|
+
const parsedOutput = {
|
|
1116
|
+
...output,
|
|
1117
|
+
body: await parseErrorBody(output.body, context)
|
|
1118
|
+
};
|
|
1119
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1120
|
+
switch (errorCode) {
|
|
1121
|
+
case "ForbiddenException":
|
|
1122
|
+
case "smithy.framework#ForbiddenException":
|
|
1123
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1124
|
+
case "ValidationException":
|
|
1125
|
+
case "smithy.framework#ValidationException":
|
|
1126
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1127
|
+
default:
|
|
1128
|
+
const parsedBody = parsedOutput.body;
|
|
1129
|
+
return throwDefaultError({
|
|
1130
|
+
output,
|
|
1131
|
+
parsedBody,
|
|
1132
|
+
errorCode
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
const de_GetMessageCommand = async (output, context) => {
|
|
1137
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1138
|
+
return de_GetMessageCommandError(output, context);
|
|
1139
|
+
}
|
|
1140
|
+
const contents = (0, smithy_client_1.map)({
|
|
1141
|
+
$metadata: deserializeMetadata(output),
|
|
1142
|
+
});
|
|
1143
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1144
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1145
|
+
'message': _ => de_Message(_, context),
|
|
1146
|
+
});
|
|
1147
|
+
Object.assign(contents, doc);
|
|
1148
|
+
return contents;
|
|
1149
|
+
};
|
|
1150
|
+
exports.de_GetMessageCommand = de_GetMessageCommand;
|
|
1151
|
+
const de_GetMessageCommandError = async (output, context) => {
|
|
1152
|
+
const parsedOutput = {
|
|
1153
|
+
...output,
|
|
1154
|
+
body: await parseErrorBody(output.body, context)
|
|
1155
|
+
};
|
|
1156
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1157
|
+
switch (errorCode) {
|
|
1158
|
+
case "ChannelNotFoundException":
|
|
1159
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1160
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1161
|
+
case "ForbiddenException":
|
|
1162
|
+
case "smithy.framework#ForbiddenException":
|
|
1163
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1164
|
+
case "ValidationException":
|
|
1165
|
+
case "smithy.framework#ValidationException":
|
|
1166
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1167
|
+
default:
|
|
1168
|
+
const parsedBody = parsedOutput.body;
|
|
1169
|
+
return throwDefaultError({
|
|
1170
|
+
output,
|
|
1171
|
+
parsedBody,
|
|
1172
|
+
errorCode
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
};
|
|
1176
|
+
const de_GetMessageReactionsCommand = async (output, context) => {
|
|
1177
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1178
|
+
return de_GetMessageReactionsCommandError(output, context);
|
|
1179
|
+
}
|
|
1180
|
+
const contents = (0, smithy_client_1.map)({
|
|
1181
|
+
$metadata: deserializeMetadata(output),
|
|
1182
|
+
});
|
|
1183
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1184
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1185
|
+
'reactions': smithy_client_1._json,
|
|
1186
|
+
});
|
|
1187
|
+
Object.assign(contents, doc);
|
|
1188
|
+
return contents;
|
|
1189
|
+
};
|
|
1190
|
+
exports.de_GetMessageReactionsCommand = de_GetMessageReactionsCommand;
|
|
1191
|
+
const de_GetMessageReactionsCommandError = async (output, context) => {
|
|
1192
|
+
const parsedOutput = {
|
|
1193
|
+
...output,
|
|
1194
|
+
body: await parseErrorBody(output.body, context)
|
|
1195
|
+
};
|
|
1196
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1197
|
+
switch (errorCode) {
|
|
1198
|
+
case "ChannelNotFoundException":
|
|
1199
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1200
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1201
|
+
case "ForbiddenException":
|
|
1202
|
+
case "smithy.framework#ForbiddenException":
|
|
1203
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1204
|
+
case "ValidationException":
|
|
1205
|
+
case "smithy.framework#ValidationException":
|
|
1206
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1207
|
+
default:
|
|
1208
|
+
const parsedBody = parsedOutput.body;
|
|
1209
|
+
return throwDefaultError({
|
|
1210
|
+
output,
|
|
1211
|
+
parsedBody,
|
|
1212
|
+
errorCode
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
const de_GetOrCreateDirectChannelCommand = async (output, context) => {
|
|
1217
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1218
|
+
return de_GetOrCreateDirectChannelCommandError(output, context);
|
|
1219
|
+
}
|
|
1220
|
+
const contents = (0, smithy_client_1.map)({
|
|
1221
|
+
$metadata: deserializeMetadata(output),
|
|
1222
|
+
});
|
|
1223
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1224
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1225
|
+
'channel': smithy_client_1._json,
|
|
1226
|
+
});
|
|
1227
|
+
Object.assign(contents, doc);
|
|
1228
|
+
return contents;
|
|
1229
|
+
};
|
|
1230
|
+
exports.de_GetOrCreateDirectChannelCommand = de_GetOrCreateDirectChannelCommand;
|
|
1231
|
+
const de_GetOrCreateDirectChannelCommandError = async (output, context) => {
|
|
1232
|
+
const parsedOutput = {
|
|
1233
|
+
...output,
|
|
1234
|
+
body: await parseErrorBody(output.body, context)
|
|
1235
|
+
};
|
|
1236
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1237
|
+
switch (errorCode) {
|
|
1238
|
+
case "ForbiddenException":
|
|
1239
|
+
case "smithy.framework#ForbiddenException":
|
|
1240
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1241
|
+
case "ValidationException":
|
|
1242
|
+
case "smithy.framework#ValidationException":
|
|
1243
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1244
|
+
default:
|
|
1245
|
+
const parsedBody = parsedOutput.body;
|
|
1246
|
+
return throwDefaultError({
|
|
1247
|
+
output,
|
|
1248
|
+
parsedBody,
|
|
1249
|
+
errorCode
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
const de_InviteCommand = async (output, context) => {
|
|
1254
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1255
|
+
return de_InviteCommandError(output, context);
|
|
1256
|
+
}
|
|
1257
|
+
const contents = (0, smithy_client_1.map)({
|
|
1258
|
+
$metadata: deserializeMetadata(output),
|
|
1259
|
+
});
|
|
1260
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1261
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1262
|
+
'users': smithy_client_1._json,
|
|
1263
|
+
});
|
|
1264
|
+
Object.assign(contents, doc);
|
|
1265
|
+
return contents;
|
|
1266
|
+
};
|
|
1267
|
+
exports.de_InviteCommand = de_InviteCommand;
|
|
1268
|
+
const de_InviteCommandError = async (output, context) => {
|
|
1269
|
+
const parsedOutput = {
|
|
1270
|
+
...output,
|
|
1271
|
+
body: await parseErrorBody(output.body, context)
|
|
1272
|
+
};
|
|
1273
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1274
|
+
switch (errorCode) {
|
|
1275
|
+
case "ForbiddenException":
|
|
1276
|
+
case "smithy.framework#ForbiddenException":
|
|
1277
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1278
|
+
case "ValidationException":
|
|
1279
|
+
case "smithy.framework#ValidationException":
|
|
1280
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1281
|
+
default:
|
|
1282
|
+
const parsedBody = parsedOutput.body;
|
|
1283
|
+
return throwDefaultError({
|
|
1284
|
+
output,
|
|
1285
|
+
parsedBody,
|
|
1286
|
+
errorCode
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
const de_JoinChannelCommand = async (output, context) => {
|
|
1291
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1292
|
+
return de_JoinChannelCommandError(output, context);
|
|
1293
|
+
}
|
|
1294
|
+
const contents = (0, smithy_client_1.map)({
|
|
1295
|
+
$metadata: deserializeMetadata(output),
|
|
1296
|
+
});
|
|
1297
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1298
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1299
|
+
'channel': smithy_client_1._json,
|
|
1300
|
+
});
|
|
1301
|
+
Object.assign(contents, doc);
|
|
1302
|
+
return contents;
|
|
1303
|
+
};
|
|
1304
|
+
exports.de_JoinChannelCommand = de_JoinChannelCommand;
|
|
1305
|
+
const de_JoinChannelCommandError = async (output, context) => {
|
|
1306
|
+
const parsedOutput = {
|
|
1307
|
+
...output,
|
|
1308
|
+
body: await parseErrorBody(output.body, context)
|
|
1309
|
+
};
|
|
1310
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1311
|
+
switch (errorCode) {
|
|
1312
|
+
case "ChannelNotFoundException":
|
|
1313
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1314
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1315
|
+
case "ForbiddenException":
|
|
1316
|
+
case "smithy.framework#ForbiddenException":
|
|
1317
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1318
|
+
case "ValidationException":
|
|
1319
|
+
case "smithy.framework#ValidationException":
|
|
1320
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1321
|
+
default:
|
|
1322
|
+
const parsedBody = parsedOutput.body;
|
|
1323
|
+
return throwDefaultError({
|
|
1324
|
+
output,
|
|
1325
|
+
parsedBody,
|
|
1326
|
+
errorCode
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
const de_LeaveChannelCommand = async (output, context) => {
|
|
1331
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1332
|
+
return de_LeaveChannelCommandError(output, context);
|
|
1333
|
+
}
|
|
1334
|
+
const contents = (0, smithy_client_1.map)({
|
|
1335
|
+
$metadata: deserializeMetadata(output),
|
|
1336
|
+
});
|
|
1337
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1338
|
+
return contents;
|
|
1339
|
+
};
|
|
1340
|
+
exports.de_LeaveChannelCommand = de_LeaveChannelCommand;
|
|
1341
|
+
const de_LeaveChannelCommandError = async (output, context) => {
|
|
1342
|
+
const parsedOutput = {
|
|
1343
|
+
...output,
|
|
1344
|
+
body: await parseErrorBody(output.body, context)
|
|
1345
|
+
};
|
|
1346
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1347
|
+
switch (errorCode) {
|
|
1348
|
+
case "ChannelNotFoundException":
|
|
1349
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1350
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1351
|
+
case "ForbiddenException":
|
|
1352
|
+
case "smithy.framework#ForbiddenException":
|
|
1353
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1354
|
+
case "ValidationException":
|
|
1355
|
+
case "smithy.framework#ValidationException":
|
|
1356
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1357
|
+
default:
|
|
1358
|
+
const parsedBody = parsedOutput.body;
|
|
1359
|
+
return throwDefaultError({
|
|
1360
|
+
output,
|
|
1361
|
+
parsedBody,
|
|
1362
|
+
errorCode
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
};
|
|
1366
|
+
const de_ListChannelMembersCommand = async (output, context) => {
|
|
337
1367
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
338
|
-
return
|
|
1368
|
+
return de_ListChannelMembersCommandError(output, context);
|
|
339
1369
|
}
|
|
340
1370
|
const contents = (0, smithy_client_1.map)({
|
|
341
1371
|
$metadata: deserializeMetadata(output),
|
|
342
1372
|
});
|
|
343
1373
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
344
1374
|
const doc = (0, smithy_client_1.take)(data, {
|
|
345
|
-
'
|
|
1375
|
+
'members': smithy_client_1._json,
|
|
1376
|
+
'users': smithy_client_1._json,
|
|
346
1377
|
});
|
|
347
1378
|
Object.assign(contents, doc);
|
|
348
1379
|
return contents;
|
|
349
1380
|
};
|
|
350
|
-
exports.
|
|
351
|
-
const
|
|
1381
|
+
exports.de_ListChannelMembersCommand = de_ListChannelMembersCommand;
|
|
1382
|
+
const de_ListChannelMembersCommandError = async (output, context) => {
|
|
352
1383
|
const parsedOutput = {
|
|
353
1384
|
...output,
|
|
354
1385
|
body: await parseErrorBody(output.body, context)
|
|
355
1386
|
};
|
|
356
1387
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
357
1388
|
switch (errorCode) {
|
|
1389
|
+
case "ChannelNotFoundException":
|
|
1390
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1391
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
358
1392
|
case "ForbiddenException":
|
|
359
1393
|
case "smithy.framework#ForbiddenException":
|
|
360
1394
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
@@ -370,31 +1404,31 @@ const de_CreateChannelCommandError = async (output, context) => {
|
|
|
370
1404
|
});
|
|
371
1405
|
}
|
|
372
1406
|
};
|
|
373
|
-
const
|
|
1407
|
+
const de_ListChannelsCommand = async (output, context) => {
|
|
374
1408
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
375
|
-
return
|
|
1409
|
+
return de_ListChannelsCommandError(output, context);
|
|
376
1410
|
}
|
|
377
1411
|
const contents = (0, smithy_client_1.map)({
|
|
378
1412
|
$metadata: deserializeMetadata(output),
|
|
379
1413
|
});
|
|
380
1414
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
381
1415
|
const doc = (0, smithy_client_1.take)(data, {
|
|
382
|
-
'
|
|
1416
|
+
'channels': smithy_client_1._json,
|
|
383
1417
|
});
|
|
384
1418
|
Object.assign(contents, doc);
|
|
385
1419
|
return contents;
|
|
386
1420
|
};
|
|
387
|
-
exports.
|
|
388
|
-
const
|
|
1421
|
+
exports.de_ListChannelsCommand = de_ListChannelsCommand;
|
|
1422
|
+
const de_ListChannelsCommandError = async (output, context) => {
|
|
389
1423
|
const parsedOutput = {
|
|
390
1424
|
...output,
|
|
391
1425
|
body: await parseErrorBody(output.body, context)
|
|
392
1426
|
};
|
|
393
1427
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
394
1428
|
switch (errorCode) {
|
|
395
|
-
case "
|
|
396
|
-
case "
|
|
397
|
-
throw await
|
|
1429
|
+
case "ForbiddenException":
|
|
1430
|
+
case "smithy.framework#ForbiddenException":
|
|
1431
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
398
1432
|
case "ValidationException":
|
|
399
1433
|
case "smithy.framework#ValidationException":
|
|
400
1434
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -407,18 +1441,22 @@ const de_CreateMessageCommandError = async (output, context) => {
|
|
|
407
1441
|
});
|
|
408
1442
|
}
|
|
409
1443
|
};
|
|
410
|
-
const
|
|
1444
|
+
const de_ListMessagesCommand = async (output, context) => {
|
|
411
1445
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
412
|
-
return
|
|
1446
|
+
return de_ListMessagesCommandError(output, context);
|
|
413
1447
|
}
|
|
414
1448
|
const contents = (0, smithy_client_1.map)({
|
|
415
1449
|
$metadata: deserializeMetadata(output),
|
|
416
1450
|
});
|
|
417
|
-
|
|
1451
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
1452
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1453
|
+
'messages': _ => de_MessagesList(_, context),
|
|
1454
|
+
});
|
|
1455
|
+
Object.assign(contents, doc);
|
|
418
1456
|
return contents;
|
|
419
1457
|
};
|
|
420
|
-
exports.
|
|
421
|
-
const
|
|
1458
|
+
exports.de_ListMessagesCommand = de_ListMessagesCommand;
|
|
1459
|
+
const de_ListMessagesCommandError = async (output, context) => {
|
|
422
1460
|
const parsedOutput = {
|
|
423
1461
|
...output,
|
|
424
1462
|
body: await parseErrorBody(output.body, context)
|
|
@@ -428,6 +1466,9 @@ const de_DeleteChannelCommandError = async (output, context) => {
|
|
|
428
1466
|
case "ChannelNotFoundException":
|
|
429
1467
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
430
1468
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1469
|
+
case "ForbiddenException":
|
|
1470
|
+
case "smithy.framework#ForbiddenException":
|
|
1471
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
431
1472
|
case "ValidationException":
|
|
432
1473
|
case "smithy.framework#ValidationException":
|
|
433
1474
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -440,9 +1481,9 @@ const de_DeleteChannelCommandError = async (output, context) => {
|
|
|
440
1481
|
});
|
|
441
1482
|
}
|
|
442
1483
|
};
|
|
443
|
-
const
|
|
1484
|
+
const de_MarkReadCommand = async (output, context) => {
|
|
444
1485
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
445
|
-
return
|
|
1486
|
+
return de_MarkReadCommandError(output, context);
|
|
446
1487
|
}
|
|
447
1488
|
const contents = (0, smithy_client_1.map)({
|
|
448
1489
|
$metadata: deserializeMetadata(output),
|
|
@@ -450,8 +1491,8 @@ const de_DeleteMessageCommand = async (output, context) => {
|
|
|
450
1491
|
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
451
1492
|
return contents;
|
|
452
1493
|
};
|
|
453
|
-
exports.
|
|
454
|
-
const
|
|
1494
|
+
exports.de_MarkReadCommand = de_MarkReadCommand;
|
|
1495
|
+
const de_MarkReadCommandError = async (output, context) => {
|
|
455
1496
|
const parsedOutput = {
|
|
456
1497
|
...output,
|
|
457
1498
|
body: await parseErrorBody(output.body, context)
|
|
@@ -461,9 +1502,9 @@ const de_DeleteMessageCommandError = async (output, context) => {
|
|
|
461
1502
|
case "ChannelNotFoundException":
|
|
462
1503
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
463
1504
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
464
|
-
case "
|
|
465
|
-
case "
|
|
466
|
-
throw await
|
|
1505
|
+
case "ForbiddenException":
|
|
1506
|
+
case "smithy.framework#ForbiddenException":
|
|
1507
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
467
1508
|
case "ValidationException":
|
|
468
1509
|
case "smithy.framework#ValidationException":
|
|
469
1510
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -476,9 +1517,9 @@ const de_DeleteMessageCommandError = async (output, context) => {
|
|
|
476
1517
|
});
|
|
477
1518
|
}
|
|
478
1519
|
};
|
|
479
|
-
const
|
|
1520
|
+
const de_PartialUpdateChannelCommand = async (output, context) => {
|
|
480
1521
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
481
|
-
return
|
|
1522
|
+
return de_PartialUpdateChannelCommandError(output, context);
|
|
482
1523
|
}
|
|
483
1524
|
const contents = (0, smithy_client_1.map)({
|
|
484
1525
|
$metadata: deserializeMetadata(output),
|
|
@@ -490,8 +1531,8 @@ const de_GetChannelCommand = async (output, context) => {
|
|
|
490
1531
|
Object.assign(contents, doc);
|
|
491
1532
|
return contents;
|
|
492
1533
|
};
|
|
493
|
-
exports.
|
|
494
|
-
const
|
|
1534
|
+
exports.de_PartialUpdateChannelCommand = de_PartialUpdateChannelCommand;
|
|
1535
|
+
const de_PartialUpdateChannelCommandError = async (output, context) => {
|
|
495
1536
|
const parsedOutput = {
|
|
496
1537
|
...output,
|
|
497
1538
|
body: await parseErrorBody(output.body, context)
|
|
@@ -501,6 +1542,9 @@ const de_GetChannelCommandError = async (output, context) => {
|
|
|
501
1542
|
case "ChannelNotFoundException":
|
|
502
1543
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
503
1544
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1545
|
+
case "ForbiddenException":
|
|
1546
|
+
case "smithy.framework#ForbiddenException":
|
|
1547
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
504
1548
|
case "ValidationException":
|
|
505
1549
|
case "smithy.framework#ValidationException":
|
|
506
1550
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -513,22 +1557,22 @@ const de_GetChannelCommandError = async (output, context) => {
|
|
|
513
1557
|
});
|
|
514
1558
|
}
|
|
515
1559
|
};
|
|
516
|
-
const
|
|
1560
|
+
const de_PartialUpdateMessageCommand = async (output, context) => {
|
|
517
1561
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
518
|
-
return
|
|
1562
|
+
return de_PartialUpdateMessageCommandError(output, context);
|
|
519
1563
|
}
|
|
520
1564
|
const contents = (0, smithy_client_1.map)({
|
|
521
1565
|
$metadata: deserializeMetadata(output),
|
|
522
1566
|
});
|
|
523
1567
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
524
1568
|
const doc = (0, smithy_client_1.take)(data, {
|
|
525
|
-
'
|
|
1569
|
+
'message': _ => de_Message(_, context),
|
|
526
1570
|
});
|
|
527
1571
|
Object.assign(contents, doc);
|
|
528
1572
|
return contents;
|
|
529
1573
|
};
|
|
530
|
-
exports.
|
|
531
|
-
const
|
|
1574
|
+
exports.de_PartialUpdateMessageCommand = de_PartialUpdateMessageCommand;
|
|
1575
|
+
const de_PartialUpdateMessageCommandError = async (output, context) => {
|
|
532
1576
|
const parsedOutput = {
|
|
533
1577
|
...output,
|
|
534
1578
|
body: await parseErrorBody(output.body, context)
|
|
@@ -538,9 +1582,12 @@ const de_GetChannelMemberCommandError = async (output, context) => {
|
|
|
538
1582
|
case "ChannelNotFoundException":
|
|
539
1583
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
540
1584
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
541
|
-
case "
|
|
542
|
-
case "
|
|
543
|
-
throw await
|
|
1585
|
+
case "ForbiddenException":
|
|
1586
|
+
case "smithy.framework#ForbiddenException":
|
|
1587
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1588
|
+
case "MessageNotFoundException":
|
|
1589
|
+
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
1590
|
+
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
544
1591
|
case "ValidationException":
|
|
545
1592
|
case "smithy.framework#ValidationException":
|
|
546
1593
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -553,31 +1600,30 @@ const de_GetChannelMemberCommandError = async (output, context) => {
|
|
|
553
1600
|
});
|
|
554
1601
|
}
|
|
555
1602
|
};
|
|
556
|
-
const
|
|
1603
|
+
const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
557
1604
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
558
|
-
return
|
|
1605
|
+
return de_ScheduleExternalFlagAdjustmentJobCommandError(output, context);
|
|
559
1606
|
}
|
|
560
1607
|
const contents = (0, smithy_client_1.map)({
|
|
561
1608
|
$metadata: deserializeMetadata(output),
|
|
562
1609
|
});
|
|
563
|
-
|
|
564
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
565
|
-
'message': _ => de_Message(_, context),
|
|
566
|
-
});
|
|
567
|
-
Object.assign(contents, doc);
|
|
1610
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
568
1611
|
return contents;
|
|
569
1612
|
};
|
|
570
|
-
exports.
|
|
571
|
-
const
|
|
1613
|
+
exports.de_ScheduleExternalFlagAdjustmentJobCommand = de_ScheduleExternalFlagAdjustmentJobCommand;
|
|
1614
|
+
const de_ScheduleExternalFlagAdjustmentJobCommandError = async (output, context) => {
|
|
572
1615
|
const parsedOutput = {
|
|
573
1616
|
...output,
|
|
574
1617
|
body: await parseErrorBody(output.body, context)
|
|
575
1618
|
};
|
|
576
1619
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
577
1620
|
switch (errorCode) {
|
|
578
|
-
case "
|
|
579
|
-
case "wildix.xbees.conversations#
|
|
580
|
-
throw await
|
|
1621
|
+
case "ConversationsServiceException":
|
|
1622
|
+
case "wildix.xbees.conversations#ConversationsServiceException":
|
|
1623
|
+
throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
|
|
1624
|
+
case "ForbiddenException":
|
|
1625
|
+
case "smithy.framework#ForbiddenException":
|
|
1626
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
581
1627
|
case "ValidationException":
|
|
582
1628
|
case "smithy.framework#ValidationException":
|
|
583
1629
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -590,22 +1636,22 @@ const de_GetMessageCommandError = async (output, context) => {
|
|
|
590
1636
|
});
|
|
591
1637
|
}
|
|
592
1638
|
};
|
|
593
|
-
const
|
|
1639
|
+
const de_SendGiphyCommand = async (output, context) => {
|
|
594
1640
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
595
|
-
return
|
|
1641
|
+
return de_SendGiphyCommandError(output, context);
|
|
596
1642
|
}
|
|
597
1643
|
const contents = (0, smithy_client_1.map)({
|
|
598
1644
|
$metadata: deserializeMetadata(output),
|
|
599
1645
|
});
|
|
600
1646
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
601
1647
|
const doc = (0, smithy_client_1.take)(data, {
|
|
602
|
-
'
|
|
1648
|
+
'message': _ => de_Message(_, context),
|
|
603
1649
|
});
|
|
604
1650
|
Object.assign(contents, doc);
|
|
605
1651
|
return contents;
|
|
606
1652
|
};
|
|
607
|
-
exports.
|
|
608
|
-
const
|
|
1653
|
+
exports.de_SendGiphyCommand = de_SendGiphyCommand;
|
|
1654
|
+
const de_SendGiphyCommandError = async (output, context) => {
|
|
609
1655
|
const parsedOutput = {
|
|
610
1656
|
...output,
|
|
611
1657
|
body: await parseErrorBody(output.body, context)
|
|
@@ -630,28 +1676,34 @@ const de_JoinChannelCommandError = async (output, context) => {
|
|
|
630
1676
|
});
|
|
631
1677
|
}
|
|
632
1678
|
};
|
|
633
|
-
const
|
|
1679
|
+
const de_SendMessageCommand = async (output, context) => {
|
|
634
1680
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
635
|
-
return
|
|
1681
|
+
return de_SendMessageCommandError(output, context);
|
|
636
1682
|
}
|
|
637
1683
|
const contents = (0, smithy_client_1.map)({
|
|
638
1684
|
$metadata: deserializeMetadata(output),
|
|
639
1685
|
});
|
|
640
1686
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
641
1687
|
const doc = (0, smithy_client_1.take)(data, {
|
|
642
|
-
'
|
|
1688
|
+
'message': _ => de_Message(_, context),
|
|
643
1689
|
});
|
|
644
1690
|
Object.assign(contents, doc);
|
|
645
1691
|
return contents;
|
|
646
1692
|
};
|
|
647
|
-
exports.
|
|
648
|
-
const
|
|
1693
|
+
exports.de_SendMessageCommand = de_SendMessageCommand;
|
|
1694
|
+
const de_SendMessageCommandError = async (output, context) => {
|
|
649
1695
|
const parsedOutput = {
|
|
650
1696
|
...output,
|
|
651
1697
|
body: await parseErrorBody(output.body, context)
|
|
652
1698
|
};
|
|
653
1699
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
654
1700
|
switch (errorCode) {
|
|
1701
|
+
case "ChannelNotFoundException":
|
|
1702
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1703
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1704
|
+
case "ForbiddenException":
|
|
1705
|
+
case "smithy.framework#ForbiddenException":
|
|
1706
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
655
1707
|
case "ValidationException":
|
|
656
1708
|
case "smithy.framework#ValidationException":
|
|
657
1709
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -664,22 +1716,18 @@ const de_ListChannelsCommandError = async (output, context) => {
|
|
|
664
1716
|
});
|
|
665
1717
|
}
|
|
666
1718
|
};
|
|
667
|
-
const
|
|
1719
|
+
const de_SendMessageReactionCommand = async (output, context) => {
|
|
668
1720
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
669
|
-
return
|
|
1721
|
+
return de_SendMessageReactionCommandError(output, context);
|
|
670
1722
|
}
|
|
671
1723
|
const contents = (0, smithy_client_1.map)({
|
|
672
1724
|
$metadata: deserializeMetadata(output),
|
|
673
1725
|
});
|
|
674
|
-
|
|
675
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
676
|
-
'messages': _ => de_MessagesList(_, context),
|
|
677
|
-
});
|
|
678
|
-
Object.assign(contents, doc);
|
|
1726
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
679
1727
|
return contents;
|
|
680
1728
|
};
|
|
681
|
-
exports.
|
|
682
|
-
const
|
|
1729
|
+
exports.de_SendMessageReactionCommand = de_SendMessageReactionCommand;
|
|
1730
|
+
const de_SendMessageReactionCommandError = async (output, context) => {
|
|
683
1731
|
const parsedOutput = {
|
|
684
1732
|
...output,
|
|
685
1733
|
body: await parseErrorBody(output.body, context)
|
|
@@ -689,6 +1737,9 @@ const de_ListMessagesCommandError = async (output, context) => {
|
|
|
689
1737
|
case "ChannelNotFoundException":
|
|
690
1738
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
691
1739
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1740
|
+
case "ForbiddenException":
|
|
1741
|
+
case "smithy.framework#ForbiddenException":
|
|
1742
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
692
1743
|
case "ValidationException":
|
|
693
1744
|
case "smithy.framework#ValidationException":
|
|
694
1745
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -701,22 +1752,22 @@ const de_ListMessagesCommandError = async (output, context) => {
|
|
|
701
1752
|
});
|
|
702
1753
|
}
|
|
703
1754
|
};
|
|
704
|
-
const
|
|
1755
|
+
const de_SendSystemMessageCommand = async (output, context) => {
|
|
705
1756
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
706
|
-
return
|
|
1757
|
+
return de_SendSystemMessageCommandError(output, context);
|
|
707
1758
|
}
|
|
708
1759
|
const contents = (0, smithy_client_1.map)({
|
|
709
1760
|
$metadata: deserializeMetadata(output),
|
|
710
1761
|
});
|
|
711
1762
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
712
1763
|
const doc = (0, smithy_client_1.take)(data, {
|
|
713
|
-
'
|
|
1764
|
+
'message': _ => de_Message(_, context),
|
|
714
1765
|
});
|
|
715
1766
|
Object.assign(contents, doc);
|
|
716
1767
|
return contents;
|
|
717
1768
|
};
|
|
718
|
-
exports.
|
|
719
|
-
const
|
|
1769
|
+
exports.de_SendSystemMessageCommand = de_SendSystemMessageCommand;
|
|
1770
|
+
const de_SendSystemMessageCommandError = async (output, context) => {
|
|
720
1771
|
const parsedOutput = {
|
|
721
1772
|
...output,
|
|
722
1773
|
body: await parseErrorBody(output.body, context)
|
|
@@ -726,6 +1777,9 @@ const de_PartialUpdateChannelCommandError = async (output, context) => {
|
|
|
726
1777
|
case "ChannelNotFoundException":
|
|
727
1778
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
728
1779
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1780
|
+
case "ForbiddenException":
|
|
1781
|
+
case "smithy.framework#ForbiddenException":
|
|
1782
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
729
1783
|
case "ValidationException":
|
|
730
1784
|
case "smithy.framework#ValidationException":
|
|
731
1785
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -738,22 +1792,18 @@ const de_PartialUpdateChannelCommandError = async (output, context) => {
|
|
|
738
1792
|
});
|
|
739
1793
|
}
|
|
740
1794
|
};
|
|
741
|
-
const
|
|
1795
|
+
const de_SendTypingStartCommand = async (output, context) => {
|
|
742
1796
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
743
|
-
return
|
|
1797
|
+
return de_SendTypingStartCommandError(output, context);
|
|
744
1798
|
}
|
|
745
1799
|
const contents = (0, smithy_client_1.map)({
|
|
746
1800
|
$metadata: deserializeMetadata(output),
|
|
747
1801
|
});
|
|
748
|
-
|
|
749
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
750
|
-
'message': _ => de_Message(_, context),
|
|
751
|
-
});
|
|
752
|
-
Object.assign(contents, doc);
|
|
1802
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
753
1803
|
return contents;
|
|
754
1804
|
};
|
|
755
|
-
exports.
|
|
756
|
-
const
|
|
1805
|
+
exports.de_SendTypingStartCommand = de_SendTypingStartCommand;
|
|
1806
|
+
const de_SendTypingStartCommandError = async (output, context) => {
|
|
757
1807
|
const parsedOutput = {
|
|
758
1808
|
...output,
|
|
759
1809
|
body: await parseErrorBody(output.body, context)
|
|
@@ -763,9 +1813,9 @@ const de_PartialUpdateMessageCommandError = async (output, context) => {
|
|
|
763
1813
|
case "ChannelNotFoundException":
|
|
764
1814
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
765
1815
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
766
|
-
case "
|
|
767
|
-
case "
|
|
768
|
-
throw await
|
|
1816
|
+
case "ForbiddenException":
|
|
1817
|
+
case "smithy.framework#ForbiddenException":
|
|
1818
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
769
1819
|
case "ValidationException":
|
|
770
1820
|
case "smithy.framework#ValidationException":
|
|
771
1821
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -778,9 +1828,9 @@ const de_PartialUpdateMessageCommandError = async (output, context) => {
|
|
|
778
1828
|
});
|
|
779
1829
|
}
|
|
780
1830
|
};
|
|
781
|
-
const
|
|
1831
|
+
const de_SendTypingStopCommand = async (output, context) => {
|
|
782
1832
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
783
|
-
return
|
|
1833
|
+
return de_SendTypingStopCommandError(output, context);
|
|
784
1834
|
}
|
|
785
1835
|
const contents = (0, smithy_client_1.map)({
|
|
786
1836
|
$metadata: deserializeMetadata(output),
|
|
@@ -788,17 +1838,17 @@ const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
|
788
1838
|
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
789
1839
|
return contents;
|
|
790
1840
|
};
|
|
791
|
-
exports.
|
|
792
|
-
const
|
|
1841
|
+
exports.de_SendTypingStopCommand = de_SendTypingStopCommand;
|
|
1842
|
+
const de_SendTypingStopCommandError = async (output, context) => {
|
|
793
1843
|
const parsedOutput = {
|
|
794
1844
|
...output,
|
|
795
1845
|
body: await parseErrorBody(output.body, context)
|
|
796
1846
|
};
|
|
797
1847
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
798
1848
|
switch (errorCode) {
|
|
799
|
-
case "
|
|
800
|
-
case "wildix.xbees.conversations#
|
|
801
|
-
throw await
|
|
1849
|
+
case "ChannelNotFoundException":
|
|
1850
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1851
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
802
1852
|
case "ForbiddenException":
|
|
803
1853
|
case "smithy.framework#ForbiddenException":
|
|
804
1854
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
@@ -839,6 +1889,9 @@ const de_UpdateChannelCommandError = async (output, context) => {
|
|
|
839
1889
|
case "ChannelNotFoundException":
|
|
840
1890
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
841
1891
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1892
|
+
case "ForbiddenException":
|
|
1893
|
+
case "smithy.framework#ForbiddenException":
|
|
1894
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
842
1895
|
case "ValidationException":
|
|
843
1896
|
case "smithy.framework#ValidationException":
|
|
844
1897
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -876,6 +1929,9 @@ const de_UpdateMessageCommandError = async (output, context) => {
|
|
|
876
1929
|
case "ChannelNotFoundException":
|
|
877
1930
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
878
1931
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1932
|
+
case "ForbiddenException":
|
|
1933
|
+
case "smithy.framework#ForbiddenException":
|
|
1934
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
879
1935
|
case "MessageNotFoundException":
|
|
880
1936
|
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
881
1937
|
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -918,6 +1974,19 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
918
1974
|
});
|
|
919
1975
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
920
1976
|
};
|
|
1977
|
+
const de_ChannelAlreadyExistExceptionRes = async (parsedOutput, context) => {
|
|
1978
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1979
|
+
const data = parsedOutput.body;
|
|
1980
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1981
|
+
'message': smithy_client_1.expectString,
|
|
1982
|
+
});
|
|
1983
|
+
Object.assign(contents, doc);
|
|
1984
|
+
const exception = new models_0_1.ChannelAlreadyExistException({
|
|
1985
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1986
|
+
...contents
|
|
1987
|
+
});
|
|
1988
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1989
|
+
};
|
|
921
1990
|
const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
922
1991
|
const contents = (0, smithy_client_1.map)({});
|
|
923
1992
|
const data = parsedOutput.body;
|
|
@@ -944,6 +2013,19 @@ const de_ConversationsServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
944
2013
|
});
|
|
945
2014
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
946
2015
|
};
|
|
2016
|
+
const de_MemberAlreadyExistExceptionRes = async (parsedOutput, context) => {
|
|
2017
|
+
const contents = (0, smithy_client_1.map)({});
|
|
2018
|
+
const data = parsedOutput.body;
|
|
2019
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
2020
|
+
'message': smithy_client_1.expectString,
|
|
2021
|
+
});
|
|
2022
|
+
Object.assign(contents, doc);
|
|
2023
|
+
const exception = new models_0_1.MemberAlreadyExistException({
|
|
2024
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2025
|
+
...contents
|
|
2026
|
+
});
|
|
2027
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2028
|
+
};
|
|
947
2029
|
const de_MemberNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
948
2030
|
const contents = (0, smithy_client_1.map)({});
|
|
949
2031
|
const data = parsedOutput.body;
|
|
@@ -993,35 +2075,12 @@ const se_Message = (input, context) => {
|
|
|
993
2075
|
'user': smithy_client_1._json,
|
|
994
2076
|
});
|
|
995
2077
|
};
|
|
996
|
-
const
|
|
997
|
-
return (0, smithy_client_1.take)(input, {
|
|
998
|
-
'attachments': smithy_client_1._json,
|
|
999
|
-
'event': [],
|
|
1000
|
-
'forward': smithy_client_1._json,
|
|
1001
|
-
'giphy': smithy_client_1._json,
|
|
1002
|
-
'mentions': smithy_client_1._json,
|
|
1003
|
-
'messageId': [],
|
|
1004
|
-
'quote': _ => se_Message(_, context),
|
|
1005
|
-
'silent': [],
|
|
1006
|
-
'sms': [],
|
|
1007
|
-
'smsStatus': [],
|
|
1008
|
-
'text': [],
|
|
1009
|
-
'type': [],
|
|
1010
|
-
});
|
|
1011
|
-
};
|
|
1012
|
-
const se_MessageUpdateFields = (input, context) => {
|
|
2078
|
+
const se_PartialUpdateMessageSetInput = (input, context) => {
|
|
1013
2079
|
return (0, smithy_client_1.take)(input, {
|
|
1014
2080
|
'attachments': smithy_client_1._json,
|
|
1015
|
-
'event': [],
|
|
1016
2081
|
'forward': smithy_client_1._json,
|
|
1017
|
-
'giphy': smithy_client_1._json,
|
|
1018
|
-
'mentions': smithy_client_1._json,
|
|
1019
2082
|
'quote': _ => se_Message(_, context),
|
|
1020
|
-
'silent': [],
|
|
1021
|
-
'sms': [],
|
|
1022
|
-
'smsStatus': [],
|
|
1023
2083
|
'text': [],
|
|
1024
|
-
'type': [],
|
|
1025
2084
|
});
|
|
1026
2085
|
};
|
|
1027
2086
|
const de_Message = (output, context) => {
|