@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,19 +1,18 @@
|
|
|
1
1
|
import { ConversationsServiceException as __BaseException } from "../models/ConversationsServiceException";
|
|
2
|
-
import { ChannelNotFoundException, ConversationsServiceException, ForbiddenException, MemberNotFoundException, MessageNotFoundException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, ForbiddenException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { HttpRequest as __HttpRequest, } from "@smithy/protocol-http";
|
|
4
4
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, resolvedPath as __resolvedPath, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
-
export const
|
|
5
|
+
export const se_AddChannelMemberCommand = async (input, context) => {
|
|
6
6
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
7
|
const headers = {
|
|
8
8
|
'content-type': 'application/json',
|
|
9
9
|
};
|
|
10
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels";
|
|
11
|
-
|
|
12
|
-
"user": [, input.userId],
|
|
13
|
-
});
|
|
10
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
|
|
11
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
14
12
|
let body;
|
|
15
13
|
body = JSON.stringify(take(input, {
|
|
16
|
-
'
|
|
14
|
+
'memberId': [],
|
|
15
|
+
'memberToInvite': _ => _json(_),
|
|
17
16
|
}));
|
|
18
17
|
return new __HttpRequest({
|
|
19
18
|
protocol,
|
|
@@ -22,23 +21,51 @@ export const se_CreateChannelCommand = async (input, context) => {
|
|
|
22
21
|
method: "POST",
|
|
23
22
|
headers,
|
|
24
23
|
path: resolvedPath,
|
|
25
|
-
query,
|
|
26
24
|
body,
|
|
27
25
|
});
|
|
28
26
|
};
|
|
29
|
-
export const
|
|
27
|
+
export const se_AddChannelMembersCommand = async (input, context) => {
|
|
30
28
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
31
29
|
const headers = {
|
|
32
30
|
'content-type': 'application/json',
|
|
33
31
|
};
|
|
34
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/
|
|
32
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
|
|
35
33
|
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
34
|
+
let body;
|
|
35
|
+
body = JSON.stringify(take(input, {
|
|
36
|
+
'members': _ => _json(_),
|
|
37
|
+
'membersToInvite': _ => _json(_),
|
|
38
|
+
}));
|
|
39
|
+
return new __HttpRequest({
|
|
40
|
+
protocol,
|
|
41
|
+
hostname,
|
|
42
|
+
port,
|
|
43
|
+
method: "PUT",
|
|
44
|
+
headers,
|
|
45
|
+
path: resolvedPath,
|
|
46
|
+
body,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
export const se_CreateGroupChannelCommand = async (input, context) => {
|
|
50
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
51
|
+
const headers = {
|
|
52
|
+
'content-type': 'application/json',
|
|
53
|
+
};
|
|
54
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/group";
|
|
36
55
|
const query = map({
|
|
37
56
|
"user": [, input.userId],
|
|
38
57
|
});
|
|
39
58
|
let body;
|
|
40
59
|
body = JSON.stringify(take(input, {
|
|
41
|
-
'
|
|
60
|
+
'access': [],
|
|
61
|
+
'broadcast': [],
|
|
62
|
+
'channelId': [],
|
|
63
|
+
'description': [],
|
|
64
|
+
'members': _ => _json(_),
|
|
65
|
+
'membersToInvite': _ => _json(_),
|
|
66
|
+
'picture': [],
|
|
67
|
+
'pictureColor': [],
|
|
68
|
+
'subject': [],
|
|
42
69
|
}));
|
|
43
70
|
return new __HttpRequest({
|
|
44
71
|
protocol,
|
|
@@ -67,6 +94,27 @@ export const se_DeleteChannelCommand = async (input, context) => {
|
|
|
67
94
|
body,
|
|
68
95
|
});
|
|
69
96
|
};
|
|
97
|
+
export const se_DeleteChannelMemberCommand = async (input, context) => {
|
|
98
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
99
|
+
const headers = {};
|
|
100
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members/{memberId}";
|
|
101
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
102
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'memberId', () => input.memberId, '{memberId}', false);
|
|
103
|
+
const query = map({
|
|
104
|
+
"silent": [() => input.silent !== void 0, () => (input.silent.toString())],
|
|
105
|
+
});
|
|
106
|
+
let body;
|
|
107
|
+
return new __HttpRequest({
|
|
108
|
+
protocol,
|
|
109
|
+
hostname,
|
|
110
|
+
port,
|
|
111
|
+
method: "DELETE",
|
|
112
|
+
headers,
|
|
113
|
+
path: resolvedPath,
|
|
114
|
+
query,
|
|
115
|
+
body,
|
|
116
|
+
});
|
|
117
|
+
};
|
|
70
118
|
export const se_DeleteMessageCommand = async (input, context) => {
|
|
71
119
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
72
120
|
const headers = {};
|
|
@@ -84,6 +132,28 @@ export const se_DeleteMessageCommand = async (input, context) => {
|
|
|
84
132
|
body,
|
|
85
133
|
});
|
|
86
134
|
};
|
|
135
|
+
export const se_DeleteMessageReactionCommand = async (input, context) => {
|
|
136
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
137
|
+
const headers = {};
|
|
138
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions/{reactionType}";
|
|
139
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
140
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
141
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'reactionType', () => input.reactionType, '{reactionType}', false);
|
|
142
|
+
const query = map({
|
|
143
|
+
"user": [, input.userId],
|
|
144
|
+
});
|
|
145
|
+
let body;
|
|
146
|
+
return new __HttpRequest({
|
|
147
|
+
protocol,
|
|
148
|
+
hostname,
|
|
149
|
+
port,
|
|
150
|
+
method: "DELETE",
|
|
151
|
+
headers,
|
|
152
|
+
path: resolvedPath,
|
|
153
|
+
query,
|
|
154
|
+
body,
|
|
155
|
+
});
|
|
156
|
+
};
|
|
87
157
|
export const se_GetChannelCommand = async (input, context) => {
|
|
88
158
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
89
159
|
const headers = {};
|
|
@@ -117,6 +187,31 @@ export const se_GetChannelMemberCommand = async (input, context) => {
|
|
|
117
187
|
body,
|
|
118
188
|
});
|
|
119
189
|
};
|
|
190
|
+
export const se_GetDirectChannelIdCommand = async (input, context) => {
|
|
191
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
192
|
+
const headers = {
|
|
193
|
+
'content-type': 'application/json',
|
|
194
|
+
};
|
|
195
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_channel_id";
|
|
196
|
+
const query = map({
|
|
197
|
+
"user": [, input.userId],
|
|
198
|
+
});
|
|
199
|
+
let body;
|
|
200
|
+
body = JSON.stringify(take(input, {
|
|
201
|
+
'participantId': [],
|
|
202
|
+
'participantToInvite': _ => _json(_),
|
|
203
|
+
}));
|
|
204
|
+
return new __HttpRequest({
|
|
205
|
+
protocol,
|
|
206
|
+
hostname,
|
|
207
|
+
port,
|
|
208
|
+
method: "POST",
|
|
209
|
+
headers,
|
|
210
|
+
path: resolvedPath,
|
|
211
|
+
query,
|
|
212
|
+
body,
|
|
213
|
+
});
|
|
214
|
+
};
|
|
120
215
|
export const se_GetMessageCommand = async (input, context) => {
|
|
121
216
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
122
217
|
const headers = {};
|
|
@@ -134,15 +229,112 @@ export const se_GetMessageCommand = async (input, context) => {
|
|
|
134
229
|
body,
|
|
135
230
|
});
|
|
136
231
|
};
|
|
137
|
-
export const
|
|
232
|
+
export const se_GetMessageReactionsCommand = async (input, context) => {
|
|
138
233
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
139
234
|
const headers = {};
|
|
235
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
|
|
236
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
237
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
238
|
+
const query = map({
|
|
239
|
+
"limit": [() => input.limit !== void 0, () => (input.limit.toString())],
|
|
240
|
+
"offset": [() => input.offset !== void 0, () => (input.offset.toString())],
|
|
241
|
+
});
|
|
242
|
+
let body;
|
|
243
|
+
return new __HttpRequest({
|
|
244
|
+
protocol,
|
|
245
|
+
hostname,
|
|
246
|
+
port,
|
|
247
|
+
method: "GET",
|
|
248
|
+
headers,
|
|
249
|
+
path: resolvedPath,
|
|
250
|
+
query,
|
|
251
|
+
body,
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
|
|
255
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
256
|
+
const headers = {
|
|
257
|
+
'content-type': 'application/json',
|
|
258
|
+
};
|
|
259
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_or_create_channel";
|
|
260
|
+
const query = map({
|
|
261
|
+
"user": [, input.userId],
|
|
262
|
+
});
|
|
263
|
+
let body;
|
|
264
|
+
body = JSON.stringify(take(input, {
|
|
265
|
+
'memberId': [],
|
|
266
|
+
'memberToInvite': _ => _json(_),
|
|
267
|
+
}));
|
|
268
|
+
return new __HttpRequest({
|
|
269
|
+
protocol,
|
|
270
|
+
hostname,
|
|
271
|
+
port,
|
|
272
|
+
method: "POST",
|
|
273
|
+
headers,
|
|
274
|
+
path: resolvedPath,
|
|
275
|
+
query,
|
|
276
|
+
body,
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
export const se_InviteCommand = async (input, context) => {
|
|
280
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
281
|
+
const headers = {
|
|
282
|
+
'content-type': 'application/json',
|
|
283
|
+
};
|
|
284
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/invite";
|
|
285
|
+
let body;
|
|
286
|
+
body = JSON.stringify(take(input, {
|
|
287
|
+
'invitees': _ => _json(_),
|
|
288
|
+
}));
|
|
289
|
+
return new __HttpRequest({
|
|
290
|
+
protocol,
|
|
291
|
+
hostname,
|
|
292
|
+
port,
|
|
293
|
+
method: "POST",
|
|
294
|
+
headers,
|
|
295
|
+
path: resolvedPath,
|
|
296
|
+
body,
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
export const se_JoinChannelCommand = async (input, context) => {
|
|
300
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
301
|
+
const headers = {
|
|
302
|
+
'content-type': 'application/json',
|
|
303
|
+
};
|
|
140
304
|
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/join";
|
|
141
305
|
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
142
306
|
const query = map({
|
|
143
307
|
"user": [, input.userId],
|
|
144
308
|
});
|
|
145
309
|
let body;
|
|
310
|
+
body = JSON.stringify(take(input, {
|
|
311
|
+
'silent': [],
|
|
312
|
+
}));
|
|
313
|
+
return new __HttpRequest({
|
|
314
|
+
protocol,
|
|
315
|
+
hostname,
|
|
316
|
+
port,
|
|
317
|
+
method: "POST",
|
|
318
|
+
headers,
|
|
319
|
+
path: resolvedPath,
|
|
320
|
+
query,
|
|
321
|
+
body,
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
export const se_LeaveChannelCommand = async (input, context) => {
|
|
325
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
326
|
+
const headers = {
|
|
327
|
+
'content-type': 'application/json',
|
|
328
|
+
};
|
|
329
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/leave";
|
|
330
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
331
|
+
const query = map({
|
|
332
|
+
"user": [, input.userId],
|
|
333
|
+
});
|
|
334
|
+
let body;
|
|
335
|
+
body = JSON.stringify(take(input, {
|
|
336
|
+
'silent': [],
|
|
337
|
+
}));
|
|
146
338
|
return new __HttpRequest({
|
|
147
339
|
protocol,
|
|
148
340
|
hostname,
|
|
@@ -154,6 +346,27 @@ export const se_JoinChannelCommand = async (input, context) => {
|
|
|
154
346
|
body,
|
|
155
347
|
});
|
|
156
348
|
};
|
|
349
|
+
export const se_ListChannelMembersCommand = async (input, context) => {
|
|
350
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
351
|
+
const headers = {};
|
|
352
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
|
|
353
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
354
|
+
const query = map({
|
|
355
|
+
"limit": [() => input.limit !== void 0, () => (input.limit.toString())],
|
|
356
|
+
"offset": [() => input.offset !== void 0, () => (input.offset.toString())],
|
|
357
|
+
});
|
|
358
|
+
let body;
|
|
359
|
+
return new __HttpRequest({
|
|
360
|
+
protocol,
|
|
361
|
+
hostname,
|
|
362
|
+
port,
|
|
363
|
+
method: "GET",
|
|
364
|
+
headers,
|
|
365
|
+
path: resolvedPath,
|
|
366
|
+
query,
|
|
367
|
+
body,
|
|
368
|
+
});
|
|
369
|
+
};
|
|
157
370
|
export const se_ListChannelsCommand = async (input, context) => {
|
|
158
371
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
159
372
|
const headers = {};
|
|
@@ -191,6 +404,26 @@ export const se_ListMessagesCommand = async (input, context) => {
|
|
|
191
404
|
body,
|
|
192
405
|
});
|
|
193
406
|
};
|
|
407
|
+
export const se_MarkReadCommand = async (input, context) => {
|
|
408
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
409
|
+
const headers = {};
|
|
410
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/read";
|
|
411
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
412
|
+
const query = map({
|
|
413
|
+
"user": [, input.userId],
|
|
414
|
+
});
|
|
415
|
+
let body;
|
|
416
|
+
return new __HttpRequest({
|
|
417
|
+
protocol,
|
|
418
|
+
hostname,
|
|
419
|
+
port,
|
|
420
|
+
method: "POST",
|
|
421
|
+
headers,
|
|
422
|
+
path: resolvedPath,
|
|
423
|
+
query,
|
|
424
|
+
body,
|
|
425
|
+
});
|
|
426
|
+
};
|
|
194
427
|
export const se_PartialUpdateChannelCommand = async (input, context) => {
|
|
195
428
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
196
429
|
const headers = {
|
|
@@ -225,12 +458,9 @@ export const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
225
458
|
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
|
|
226
459
|
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
227
460
|
resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
228
|
-
const query = map({
|
|
229
|
-
"user": [, input.userId],
|
|
230
|
-
});
|
|
231
461
|
let body;
|
|
232
462
|
body = JSON.stringify(take(input, {
|
|
233
|
-
'set': _ =>
|
|
463
|
+
'set': _ => se_PartialUpdateMessageSetInput(_, context),
|
|
234
464
|
'unset': _ => _json(_),
|
|
235
465
|
}));
|
|
236
466
|
return new __HttpRequest({
|
|
@@ -240,7 +470,6 @@ export const se_PartialUpdateMessageCommand = async (input, context) => {
|
|
|
240
470
|
method: "PATCH",
|
|
241
471
|
headers,
|
|
242
472
|
path: resolvedPath,
|
|
243
|
-
query,
|
|
244
473
|
body,
|
|
245
474
|
});
|
|
246
475
|
};
|
|
@@ -264,78 +493,850 @@ export const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context
|
|
|
264
493
|
body,
|
|
265
494
|
});
|
|
266
495
|
};
|
|
267
|
-
export const
|
|
496
|
+
export const se_SendGiphyCommand = async (input, context) => {
|
|
268
497
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
269
498
|
const headers = {
|
|
270
499
|
'content-type': 'application/json',
|
|
271
500
|
};
|
|
272
|
-
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
|
|
501
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_giphy";
|
|
273
502
|
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
274
503
|
const query = map({
|
|
275
504
|
"user": [, input.userId],
|
|
276
505
|
});
|
|
277
506
|
let body;
|
|
278
507
|
body = JSON.stringify(take(input, {
|
|
279
|
-
'
|
|
508
|
+
'giphy': _ => _json(_),
|
|
509
|
+
'messageId': [],
|
|
280
510
|
}));
|
|
281
511
|
return new __HttpRequest({
|
|
282
512
|
protocol,
|
|
283
513
|
hostname,
|
|
284
514
|
port,
|
|
285
|
-
method: "
|
|
515
|
+
method: "POST",
|
|
516
|
+
headers,
|
|
517
|
+
path: resolvedPath,
|
|
518
|
+
query,
|
|
519
|
+
body,
|
|
520
|
+
});
|
|
521
|
+
};
|
|
522
|
+
export const se_SendMessageCommand = async (input, context) => {
|
|
523
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
524
|
+
const headers = {
|
|
525
|
+
'content-type': 'application/json',
|
|
526
|
+
};
|
|
527
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages";
|
|
528
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
529
|
+
const query = map({
|
|
530
|
+
"user": [, input.userId],
|
|
531
|
+
});
|
|
532
|
+
let body;
|
|
533
|
+
body = JSON.stringify(take(input, {
|
|
534
|
+
'attachments': _ => _json(_),
|
|
535
|
+
'forward': _ => _json(_),
|
|
536
|
+
'mentions': _ => _json(_),
|
|
537
|
+
'messageId': [],
|
|
538
|
+
'quote': _ => se_Message(_, context),
|
|
539
|
+
'text': [],
|
|
540
|
+
}));
|
|
541
|
+
return new __HttpRequest({
|
|
542
|
+
protocol,
|
|
543
|
+
hostname,
|
|
544
|
+
port,
|
|
545
|
+
method: "POST",
|
|
286
546
|
headers,
|
|
287
547
|
path: resolvedPath,
|
|
288
548
|
query,
|
|
289
549
|
body,
|
|
290
550
|
});
|
|
291
551
|
};
|
|
292
|
-
export const
|
|
293
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
294
|
-
const headers = {
|
|
295
|
-
'content-type': 'application/json',
|
|
552
|
+
export const se_SendMessageReactionCommand = async (input, context) => {
|
|
553
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
554
|
+
const headers = {
|
|
555
|
+
'content-type': 'application/json',
|
|
556
|
+
};
|
|
557
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
|
|
558
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
559
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
560
|
+
const query = map({
|
|
561
|
+
"user": [, input.userId],
|
|
562
|
+
});
|
|
563
|
+
let body;
|
|
564
|
+
body = JSON.stringify(take(input, {
|
|
565
|
+
'reactionType': [],
|
|
566
|
+
}));
|
|
567
|
+
return new __HttpRequest({
|
|
568
|
+
protocol,
|
|
569
|
+
hostname,
|
|
570
|
+
port,
|
|
571
|
+
method: "POST",
|
|
572
|
+
headers,
|
|
573
|
+
path: resolvedPath,
|
|
574
|
+
query,
|
|
575
|
+
body,
|
|
576
|
+
});
|
|
577
|
+
};
|
|
578
|
+
export const se_SendSystemMessageCommand = async (input, context) => {
|
|
579
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
580
|
+
const headers = {
|
|
581
|
+
'content-type': 'application/json',
|
|
582
|
+
};
|
|
583
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_system_message";
|
|
584
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
585
|
+
const query = map({
|
|
586
|
+
"user": [, input.userId],
|
|
587
|
+
});
|
|
588
|
+
let body;
|
|
589
|
+
body = JSON.stringify(take(input, {
|
|
590
|
+
'messageId': [],
|
|
591
|
+
}));
|
|
592
|
+
return new __HttpRequest({
|
|
593
|
+
protocol,
|
|
594
|
+
hostname,
|
|
595
|
+
port,
|
|
596
|
+
method: "POST",
|
|
597
|
+
headers,
|
|
598
|
+
path: resolvedPath,
|
|
599
|
+
query,
|
|
600
|
+
body,
|
|
601
|
+
});
|
|
602
|
+
};
|
|
603
|
+
export const se_SendTypingStartCommand = async (input, context) => {
|
|
604
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
605
|
+
const headers = {};
|
|
606
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_start";
|
|
607
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
608
|
+
const query = map({
|
|
609
|
+
"user": [, input.userId],
|
|
610
|
+
});
|
|
611
|
+
let body;
|
|
612
|
+
return new __HttpRequest({
|
|
613
|
+
protocol,
|
|
614
|
+
hostname,
|
|
615
|
+
port,
|
|
616
|
+
method: "POST",
|
|
617
|
+
headers,
|
|
618
|
+
path: resolvedPath,
|
|
619
|
+
query,
|
|
620
|
+
body,
|
|
621
|
+
});
|
|
622
|
+
};
|
|
623
|
+
export const se_SendTypingStopCommand = async (input, context) => {
|
|
624
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
625
|
+
const headers = {};
|
|
626
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_stop";
|
|
627
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
628
|
+
const query = map({
|
|
629
|
+
"user": [, input.userId],
|
|
630
|
+
});
|
|
631
|
+
let body;
|
|
632
|
+
return new __HttpRequest({
|
|
633
|
+
protocol,
|
|
634
|
+
hostname,
|
|
635
|
+
port,
|
|
636
|
+
method: "POST",
|
|
637
|
+
headers,
|
|
638
|
+
path: resolvedPath,
|
|
639
|
+
query,
|
|
640
|
+
body,
|
|
641
|
+
});
|
|
642
|
+
};
|
|
643
|
+
export const se_UpdateChannelCommand = async (input, context) => {
|
|
644
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
645
|
+
const headers = {
|
|
646
|
+
'content-type': 'application/json',
|
|
647
|
+
};
|
|
648
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
|
|
649
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
650
|
+
const query = map({
|
|
651
|
+
"user": [, input.userId],
|
|
652
|
+
});
|
|
653
|
+
let body;
|
|
654
|
+
body = JSON.stringify(take(input, {
|
|
655
|
+
'access': [],
|
|
656
|
+
'broadcast': [],
|
|
657
|
+
'description': [],
|
|
658
|
+
'picture': [],
|
|
659
|
+
'pictureColor': [],
|
|
660
|
+
'subject': [],
|
|
661
|
+
}));
|
|
662
|
+
return new __HttpRequest({
|
|
663
|
+
protocol,
|
|
664
|
+
hostname,
|
|
665
|
+
port,
|
|
666
|
+
method: "PUT",
|
|
667
|
+
headers,
|
|
668
|
+
path: resolvedPath,
|
|
669
|
+
query,
|
|
670
|
+
body,
|
|
671
|
+
});
|
|
672
|
+
};
|
|
673
|
+
export const se_UpdateMessageCommand = async (input, context) => {
|
|
674
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
675
|
+
const headers = {
|
|
676
|
+
'content-type': 'application/json',
|
|
677
|
+
};
|
|
678
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
|
|
679
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
|
|
680
|
+
resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
|
|
681
|
+
let body;
|
|
682
|
+
body = JSON.stringify(take(input, {
|
|
683
|
+
'attachments': _ => _json(_),
|
|
684
|
+
'forward': _ => _json(_),
|
|
685
|
+
'mentions': _ => _json(_),
|
|
686
|
+
'quote': _ => se_Message(_, context),
|
|
687
|
+
'text': [],
|
|
688
|
+
}));
|
|
689
|
+
return new __HttpRequest({
|
|
690
|
+
protocol,
|
|
691
|
+
hostname,
|
|
692
|
+
port,
|
|
693
|
+
method: "PUT",
|
|
694
|
+
headers,
|
|
695
|
+
path: resolvedPath,
|
|
696
|
+
body,
|
|
697
|
+
});
|
|
698
|
+
};
|
|
699
|
+
export const de_AddChannelMemberCommand = async (output, context) => {
|
|
700
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
701
|
+
return de_AddChannelMemberCommandError(output, context);
|
|
702
|
+
}
|
|
703
|
+
const contents = map({
|
|
704
|
+
$metadata: deserializeMetadata(output),
|
|
705
|
+
});
|
|
706
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
707
|
+
const doc = take(data, {
|
|
708
|
+
'member': _json,
|
|
709
|
+
'user': _json,
|
|
710
|
+
});
|
|
711
|
+
Object.assign(contents, doc);
|
|
712
|
+
return contents;
|
|
713
|
+
};
|
|
714
|
+
const de_AddChannelMemberCommandError = async (output, context) => {
|
|
715
|
+
const parsedOutput = {
|
|
716
|
+
...output,
|
|
717
|
+
body: await parseErrorBody(output.body, context)
|
|
718
|
+
};
|
|
719
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
720
|
+
switch (errorCode) {
|
|
721
|
+
case "ChannelNotFoundException":
|
|
722
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
723
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
724
|
+
case "ForbiddenException":
|
|
725
|
+
case "smithy.framework#ForbiddenException":
|
|
726
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
727
|
+
case "MemberAlreadyExistException":
|
|
728
|
+
case "wildix.xbees.conversations#MemberAlreadyExistException":
|
|
729
|
+
throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
|
|
730
|
+
case "ValidationException":
|
|
731
|
+
case "smithy.framework#ValidationException":
|
|
732
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
733
|
+
default:
|
|
734
|
+
const parsedBody = parsedOutput.body;
|
|
735
|
+
return throwDefaultError({
|
|
736
|
+
output,
|
|
737
|
+
parsedBody,
|
|
738
|
+
errorCode
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
export const de_AddChannelMembersCommand = async (output, context) => {
|
|
743
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
744
|
+
return de_AddChannelMembersCommandError(output, context);
|
|
745
|
+
}
|
|
746
|
+
const contents = map({
|
|
747
|
+
$metadata: deserializeMetadata(output),
|
|
748
|
+
});
|
|
749
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
750
|
+
const doc = take(data, {
|
|
751
|
+
'members': _json,
|
|
752
|
+
'users': _json,
|
|
753
|
+
});
|
|
754
|
+
Object.assign(contents, doc);
|
|
755
|
+
return contents;
|
|
756
|
+
};
|
|
757
|
+
const de_AddChannelMembersCommandError = async (output, context) => {
|
|
758
|
+
const parsedOutput = {
|
|
759
|
+
...output,
|
|
760
|
+
body: await parseErrorBody(output.body, context)
|
|
761
|
+
};
|
|
762
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
763
|
+
switch (errorCode) {
|
|
764
|
+
case "ChannelNotFoundException":
|
|
765
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
766
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
767
|
+
case "ForbiddenException":
|
|
768
|
+
case "smithy.framework#ForbiddenException":
|
|
769
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
770
|
+
case "MemberAlreadyExistException":
|
|
771
|
+
case "wildix.xbees.conversations#MemberAlreadyExistException":
|
|
772
|
+
throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
|
|
773
|
+
case "ValidationException":
|
|
774
|
+
case "smithy.framework#ValidationException":
|
|
775
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
776
|
+
default:
|
|
777
|
+
const parsedBody = parsedOutput.body;
|
|
778
|
+
return throwDefaultError({
|
|
779
|
+
output,
|
|
780
|
+
parsedBody,
|
|
781
|
+
errorCode
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
export const de_CreateGroupChannelCommand = async (output, context) => {
|
|
786
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
787
|
+
return de_CreateGroupChannelCommandError(output, context);
|
|
788
|
+
}
|
|
789
|
+
const contents = map({
|
|
790
|
+
$metadata: deserializeMetadata(output),
|
|
791
|
+
});
|
|
792
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
793
|
+
const doc = take(data, {
|
|
794
|
+
'channel': _json,
|
|
795
|
+
});
|
|
796
|
+
Object.assign(contents, doc);
|
|
797
|
+
return contents;
|
|
798
|
+
};
|
|
799
|
+
const de_CreateGroupChannelCommandError = async (output, context) => {
|
|
800
|
+
const parsedOutput = {
|
|
801
|
+
...output,
|
|
802
|
+
body: await parseErrorBody(output.body, context)
|
|
803
|
+
};
|
|
804
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
805
|
+
switch (errorCode) {
|
|
806
|
+
case "ChannelAlreadyExistException":
|
|
807
|
+
case "wildix.xbees.conversations#ChannelAlreadyExistException":
|
|
808
|
+
throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
|
|
809
|
+
case "ForbiddenException":
|
|
810
|
+
case "smithy.framework#ForbiddenException":
|
|
811
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
812
|
+
case "ValidationException":
|
|
813
|
+
case "smithy.framework#ValidationException":
|
|
814
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
815
|
+
default:
|
|
816
|
+
const parsedBody = parsedOutput.body;
|
|
817
|
+
return throwDefaultError({
|
|
818
|
+
output,
|
|
819
|
+
parsedBody,
|
|
820
|
+
errorCode
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
export const de_DeleteChannelCommand = async (output, context) => {
|
|
825
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
826
|
+
return de_DeleteChannelCommandError(output, context);
|
|
827
|
+
}
|
|
828
|
+
const contents = map({
|
|
829
|
+
$metadata: deserializeMetadata(output),
|
|
830
|
+
});
|
|
831
|
+
await collectBody(output.body, context);
|
|
832
|
+
return contents;
|
|
833
|
+
};
|
|
834
|
+
const de_DeleteChannelCommandError = async (output, context) => {
|
|
835
|
+
const parsedOutput = {
|
|
836
|
+
...output,
|
|
837
|
+
body: await parseErrorBody(output.body, context)
|
|
838
|
+
};
|
|
839
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
840
|
+
switch (errorCode) {
|
|
841
|
+
case "ChannelNotFoundException":
|
|
842
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
843
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
844
|
+
case "ForbiddenException":
|
|
845
|
+
case "smithy.framework#ForbiddenException":
|
|
846
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
847
|
+
case "ValidationException":
|
|
848
|
+
case "smithy.framework#ValidationException":
|
|
849
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
850
|
+
default:
|
|
851
|
+
const parsedBody = parsedOutput.body;
|
|
852
|
+
return throwDefaultError({
|
|
853
|
+
output,
|
|
854
|
+
parsedBody,
|
|
855
|
+
errorCode
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
};
|
|
859
|
+
export const de_DeleteChannelMemberCommand = async (output, context) => {
|
|
860
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
861
|
+
return de_DeleteChannelMemberCommandError(output, context);
|
|
862
|
+
}
|
|
863
|
+
const contents = map({
|
|
864
|
+
$metadata: deserializeMetadata(output),
|
|
865
|
+
});
|
|
866
|
+
await collectBody(output.body, context);
|
|
867
|
+
return contents;
|
|
868
|
+
};
|
|
869
|
+
const de_DeleteChannelMemberCommandError = async (output, context) => {
|
|
870
|
+
const parsedOutput = {
|
|
871
|
+
...output,
|
|
872
|
+
body: await parseErrorBody(output.body, context)
|
|
873
|
+
};
|
|
874
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
875
|
+
switch (errorCode) {
|
|
876
|
+
case "ChannelNotFoundException":
|
|
877
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
878
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
879
|
+
case "ForbiddenException":
|
|
880
|
+
case "smithy.framework#ForbiddenException":
|
|
881
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
882
|
+
case "MemberNotFoundException":
|
|
883
|
+
case "wildix.xbees.conversations#MemberNotFoundException":
|
|
884
|
+
throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
|
|
885
|
+
case "ValidationException":
|
|
886
|
+
case "smithy.framework#ValidationException":
|
|
887
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
888
|
+
default:
|
|
889
|
+
const parsedBody = parsedOutput.body;
|
|
890
|
+
return throwDefaultError({
|
|
891
|
+
output,
|
|
892
|
+
parsedBody,
|
|
893
|
+
errorCode
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
export const de_DeleteMessageCommand = async (output, context) => {
|
|
898
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
899
|
+
return de_DeleteMessageCommandError(output, context);
|
|
900
|
+
}
|
|
901
|
+
const contents = map({
|
|
902
|
+
$metadata: deserializeMetadata(output),
|
|
903
|
+
});
|
|
904
|
+
await collectBody(output.body, context);
|
|
905
|
+
return contents;
|
|
906
|
+
};
|
|
907
|
+
const de_DeleteMessageCommandError = async (output, context) => {
|
|
908
|
+
const parsedOutput = {
|
|
909
|
+
...output,
|
|
910
|
+
body: await parseErrorBody(output.body, context)
|
|
911
|
+
};
|
|
912
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
913
|
+
switch (errorCode) {
|
|
914
|
+
case "ChannelNotFoundException":
|
|
915
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
916
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
917
|
+
case "ForbiddenException":
|
|
918
|
+
case "smithy.framework#ForbiddenException":
|
|
919
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
920
|
+
case "MessageNotFoundException":
|
|
921
|
+
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
922
|
+
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
923
|
+
case "ValidationException":
|
|
924
|
+
case "smithy.framework#ValidationException":
|
|
925
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
926
|
+
default:
|
|
927
|
+
const parsedBody = parsedOutput.body;
|
|
928
|
+
return throwDefaultError({
|
|
929
|
+
output,
|
|
930
|
+
parsedBody,
|
|
931
|
+
errorCode
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
export const de_DeleteMessageReactionCommand = async (output, context) => {
|
|
936
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
937
|
+
return de_DeleteMessageReactionCommandError(output, context);
|
|
938
|
+
}
|
|
939
|
+
const contents = map({
|
|
940
|
+
$metadata: deserializeMetadata(output),
|
|
941
|
+
});
|
|
942
|
+
await collectBody(output.body, context);
|
|
943
|
+
return contents;
|
|
944
|
+
};
|
|
945
|
+
const de_DeleteMessageReactionCommandError = async (output, context) => {
|
|
946
|
+
const parsedOutput = {
|
|
947
|
+
...output,
|
|
948
|
+
body: await parseErrorBody(output.body, context)
|
|
949
|
+
};
|
|
950
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
951
|
+
switch (errorCode) {
|
|
952
|
+
case "ChannelNotFoundException":
|
|
953
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
954
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
955
|
+
case "ForbiddenException":
|
|
956
|
+
case "smithy.framework#ForbiddenException":
|
|
957
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
958
|
+
case "MessageNotFoundException":
|
|
959
|
+
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
960
|
+
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
961
|
+
case "ValidationException":
|
|
962
|
+
case "smithy.framework#ValidationException":
|
|
963
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
964
|
+
default:
|
|
965
|
+
const parsedBody = parsedOutput.body;
|
|
966
|
+
return throwDefaultError({
|
|
967
|
+
output,
|
|
968
|
+
parsedBody,
|
|
969
|
+
errorCode
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
export const de_GetChannelCommand = async (output, context) => {
|
|
974
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
975
|
+
return de_GetChannelCommandError(output, context);
|
|
976
|
+
}
|
|
977
|
+
const contents = map({
|
|
978
|
+
$metadata: deserializeMetadata(output),
|
|
979
|
+
});
|
|
980
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
981
|
+
const doc = take(data, {
|
|
982
|
+
'channel': _json,
|
|
983
|
+
});
|
|
984
|
+
Object.assign(contents, doc);
|
|
985
|
+
return contents;
|
|
986
|
+
};
|
|
987
|
+
const de_GetChannelCommandError = 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 "ValidationException":
|
|
1001
|
+
case "smithy.framework#ValidationException":
|
|
1002
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1003
|
+
default:
|
|
1004
|
+
const parsedBody = parsedOutput.body;
|
|
1005
|
+
return throwDefaultError({
|
|
1006
|
+
output,
|
|
1007
|
+
parsedBody,
|
|
1008
|
+
errorCode
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
};
|
|
1012
|
+
export const de_GetChannelMemberCommand = async (output, context) => {
|
|
1013
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1014
|
+
return de_GetChannelMemberCommandError(output, context);
|
|
1015
|
+
}
|
|
1016
|
+
const contents = map({
|
|
1017
|
+
$metadata: deserializeMetadata(output),
|
|
1018
|
+
});
|
|
1019
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1020
|
+
const doc = take(data, {
|
|
1021
|
+
'member': _json,
|
|
1022
|
+
'user': _json,
|
|
1023
|
+
});
|
|
1024
|
+
Object.assign(contents, doc);
|
|
1025
|
+
return contents;
|
|
1026
|
+
};
|
|
1027
|
+
const de_GetChannelMemberCommandError = async (output, context) => {
|
|
1028
|
+
const parsedOutput = {
|
|
1029
|
+
...output,
|
|
1030
|
+
body: await parseErrorBody(output.body, context)
|
|
1031
|
+
};
|
|
1032
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1033
|
+
switch (errorCode) {
|
|
1034
|
+
case "ChannelNotFoundException":
|
|
1035
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1036
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1037
|
+
case "ForbiddenException":
|
|
1038
|
+
case "smithy.framework#ForbiddenException":
|
|
1039
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1040
|
+
case "MemberNotFoundException":
|
|
1041
|
+
case "wildix.xbees.conversations#MemberNotFoundException":
|
|
1042
|
+
throw await de_MemberNotFoundExceptionRes(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
|
+
export const de_GetDirectChannelIdCommand = async (output, context) => {
|
|
1056
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1057
|
+
return de_GetDirectChannelIdCommandError(output, context);
|
|
1058
|
+
}
|
|
1059
|
+
const contents = map({
|
|
1060
|
+
$metadata: deserializeMetadata(output),
|
|
1061
|
+
});
|
|
1062
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1063
|
+
const doc = take(data, {
|
|
1064
|
+
'channelId': __expectString,
|
|
1065
|
+
});
|
|
1066
|
+
Object.assign(contents, doc);
|
|
1067
|
+
return contents;
|
|
1068
|
+
};
|
|
1069
|
+
const de_GetDirectChannelIdCommandError = async (output, context) => {
|
|
1070
|
+
const parsedOutput = {
|
|
1071
|
+
...output,
|
|
1072
|
+
body: await parseErrorBody(output.body, context)
|
|
1073
|
+
};
|
|
1074
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1075
|
+
switch (errorCode) {
|
|
1076
|
+
case "ForbiddenException":
|
|
1077
|
+
case "smithy.framework#ForbiddenException":
|
|
1078
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1079
|
+
case "ValidationException":
|
|
1080
|
+
case "smithy.framework#ValidationException":
|
|
1081
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1082
|
+
default:
|
|
1083
|
+
const parsedBody = parsedOutput.body;
|
|
1084
|
+
return throwDefaultError({
|
|
1085
|
+
output,
|
|
1086
|
+
parsedBody,
|
|
1087
|
+
errorCode
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
export const de_GetMessageCommand = async (output, context) => {
|
|
1092
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1093
|
+
return de_GetMessageCommandError(output, context);
|
|
1094
|
+
}
|
|
1095
|
+
const contents = map({
|
|
1096
|
+
$metadata: deserializeMetadata(output),
|
|
1097
|
+
});
|
|
1098
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1099
|
+
const doc = take(data, {
|
|
1100
|
+
'message': _ => de_Message(_, context),
|
|
1101
|
+
});
|
|
1102
|
+
Object.assign(contents, doc);
|
|
1103
|
+
return contents;
|
|
1104
|
+
};
|
|
1105
|
+
const de_GetMessageCommandError = async (output, context) => {
|
|
1106
|
+
const parsedOutput = {
|
|
1107
|
+
...output,
|
|
1108
|
+
body: await parseErrorBody(output.body, context)
|
|
1109
|
+
};
|
|
1110
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1111
|
+
switch (errorCode) {
|
|
1112
|
+
case "ChannelNotFoundException":
|
|
1113
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1114
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1115
|
+
case "ForbiddenException":
|
|
1116
|
+
case "smithy.framework#ForbiddenException":
|
|
1117
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1118
|
+
case "ValidationException":
|
|
1119
|
+
case "smithy.framework#ValidationException":
|
|
1120
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1121
|
+
default:
|
|
1122
|
+
const parsedBody = parsedOutput.body;
|
|
1123
|
+
return throwDefaultError({
|
|
1124
|
+
output,
|
|
1125
|
+
parsedBody,
|
|
1126
|
+
errorCode
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
};
|
|
1130
|
+
export const de_GetMessageReactionsCommand = async (output, context) => {
|
|
1131
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1132
|
+
return de_GetMessageReactionsCommandError(output, context);
|
|
1133
|
+
}
|
|
1134
|
+
const contents = map({
|
|
1135
|
+
$metadata: deserializeMetadata(output),
|
|
1136
|
+
});
|
|
1137
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1138
|
+
const doc = take(data, {
|
|
1139
|
+
'reactions': _json,
|
|
1140
|
+
});
|
|
1141
|
+
Object.assign(contents, doc);
|
|
1142
|
+
return contents;
|
|
1143
|
+
};
|
|
1144
|
+
const de_GetMessageReactionsCommandError = async (output, context) => {
|
|
1145
|
+
const parsedOutput = {
|
|
1146
|
+
...output,
|
|
1147
|
+
body: await parseErrorBody(output.body, context)
|
|
1148
|
+
};
|
|
1149
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1150
|
+
switch (errorCode) {
|
|
1151
|
+
case "ChannelNotFoundException":
|
|
1152
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1153
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1154
|
+
case "ForbiddenException":
|
|
1155
|
+
case "smithy.framework#ForbiddenException":
|
|
1156
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1157
|
+
case "ValidationException":
|
|
1158
|
+
case "smithy.framework#ValidationException":
|
|
1159
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1160
|
+
default:
|
|
1161
|
+
const parsedBody = parsedOutput.body;
|
|
1162
|
+
return throwDefaultError({
|
|
1163
|
+
output,
|
|
1164
|
+
parsedBody,
|
|
1165
|
+
errorCode
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
|
|
1170
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1171
|
+
return de_GetOrCreateDirectChannelCommandError(output, context);
|
|
1172
|
+
}
|
|
1173
|
+
const contents = map({
|
|
1174
|
+
$metadata: deserializeMetadata(output),
|
|
1175
|
+
});
|
|
1176
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1177
|
+
const doc = take(data, {
|
|
1178
|
+
'channel': _json,
|
|
1179
|
+
});
|
|
1180
|
+
Object.assign(contents, doc);
|
|
1181
|
+
return contents;
|
|
1182
|
+
};
|
|
1183
|
+
const de_GetOrCreateDirectChannelCommandError = async (output, context) => {
|
|
1184
|
+
const parsedOutput = {
|
|
1185
|
+
...output,
|
|
1186
|
+
body: await parseErrorBody(output.body, context)
|
|
1187
|
+
};
|
|
1188
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1189
|
+
switch (errorCode) {
|
|
1190
|
+
case "ForbiddenException":
|
|
1191
|
+
case "smithy.framework#ForbiddenException":
|
|
1192
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1193
|
+
case "ValidationException":
|
|
1194
|
+
case "smithy.framework#ValidationException":
|
|
1195
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1196
|
+
default:
|
|
1197
|
+
const parsedBody = parsedOutput.body;
|
|
1198
|
+
return throwDefaultError({
|
|
1199
|
+
output,
|
|
1200
|
+
parsedBody,
|
|
1201
|
+
errorCode
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
export const de_InviteCommand = async (output, context) => {
|
|
1206
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1207
|
+
return de_InviteCommandError(output, context);
|
|
1208
|
+
}
|
|
1209
|
+
const contents = map({
|
|
1210
|
+
$metadata: deserializeMetadata(output),
|
|
1211
|
+
});
|
|
1212
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1213
|
+
const doc = take(data, {
|
|
1214
|
+
'users': _json,
|
|
1215
|
+
});
|
|
1216
|
+
Object.assign(contents, doc);
|
|
1217
|
+
return contents;
|
|
1218
|
+
};
|
|
1219
|
+
const de_InviteCommandError = async (output, context) => {
|
|
1220
|
+
const parsedOutput = {
|
|
1221
|
+
...output,
|
|
1222
|
+
body: await parseErrorBody(output.body, context)
|
|
1223
|
+
};
|
|
1224
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1225
|
+
switch (errorCode) {
|
|
1226
|
+
case "ForbiddenException":
|
|
1227
|
+
case "smithy.framework#ForbiddenException":
|
|
1228
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1229
|
+
case "ValidationException":
|
|
1230
|
+
case "smithy.framework#ValidationException":
|
|
1231
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1232
|
+
default:
|
|
1233
|
+
const parsedBody = parsedOutput.body;
|
|
1234
|
+
return throwDefaultError({
|
|
1235
|
+
output,
|
|
1236
|
+
parsedBody,
|
|
1237
|
+
errorCode
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1240
|
+
};
|
|
1241
|
+
export const de_JoinChannelCommand = async (output, context) => {
|
|
1242
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1243
|
+
return de_JoinChannelCommandError(output, context);
|
|
1244
|
+
}
|
|
1245
|
+
const contents = map({
|
|
1246
|
+
$metadata: deserializeMetadata(output),
|
|
1247
|
+
});
|
|
1248
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1249
|
+
const doc = take(data, {
|
|
1250
|
+
'channel': _json,
|
|
1251
|
+
});
|
|
1252
|
+
Object.assign(contents, doc);
|
|
1253
|
+
return contents;
|
|
1254
|
+
};
|
|
1255
|
+
const de_JoinChannelCommandError = async (output, context) => {
|
|
1256
|
+
const parsedOutput = {
|
|
1257
|
+
...output,
|
|
1258
|
+
body: await parseErrorBody(output.body, context)
|
|
1259
|
+
};
|
|
1260
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1261
|
+
switch (errorCode) {
|
|
1262
|
+
case "ChannelNotFoundException":
|
|
1263
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1264
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1265
|
+
case "ForbiddenException":
|
|
1266
|
+
case "smithy.framework#ForbiddenException":
|
|
1267
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1268
|
+
case "ValidationException":
|
|
1269
|
+
case "smithy.framework#ValidationException":
|
|
1270
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1271
|
+
default:
|
|
1272
|
+
const parsedBody = parsedOutput.body;
|
|
1273
|
+
return throwDefaultError({
|
|
1274
|
+
output,
|
|
1275
|
+
parsedBody,
|
|
1276
|
+
errorCode
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
};
|
|
1280
|
+
export const de_LeaveChannelCommand = async (output, context) => {
|
|
1281
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1282
|
+
return de_LeaveChannelCommandError(output, context);
|
|
1283
|
+
}
|
|
1284
|
+
const contents = map({
|
|
1285
|
+
$metadata: deserializeMetadata(output),
|
|
1286
|
+
});
|
|
1287
|
+
await collectBody(output.body, context);
|
|
1288
|
+
return contents;
|
|
1289
|
+
};
|
|
1290
|
+
const de_LeaveChannelCommandError = async (output, context) => {
|
|
1291
|
+
const parsedOutput = {
|
|
1292
|
+
...output,
|
|
1293
|
+
body: await parseErrorBody(output.body, context)
|
|
296
1294
|
};
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
});
|
|
1295
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1296
|
+
switch (errorCode) {
|
|
1297
|
+
case "ChannelNotFoundException":
|
|
1298
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1299
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1300
|
+
case "ForbiddenException":
|
|
1301
|
+
case "smithy.framework#ForbiddenException":
|
|
1302
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1303
|
+
case "ValidationException":
|
|
1304
|
+
case "smithy.framework#ValidationException":
|
|
1305
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1306
|
+
default:
|
|
1307
|
+
const parsedBody = parsedOutput.body;
|
|
1308
|
+
return throwDefaultError({
|
|
1309
|
+
output,
|
|
1310
|
+
parsedBody,
|
|
1311
|
+
errorCode
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
317
1314
|
};
|
|
318
|
-
export const
|
|
1315
|
+
export const de_ListChannelMembersCommand = async (output, context) => {
|
|
319
1316
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
320
|
-
return
|
|
1317
|
+
return de_ListChannelMembersCommandError(output, context);
|
|
321
1318
|
}
|
|
322
1319
|
const contents = map({
|
|
323
1320
|
$metadata: deserializeMetadata(output),
|
|
324
1321
|
});
|
|
325
1322
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
326
1323
|
const doc = take(data, {
|
|
327
|
-
'
|
|
1324
|
+
'members': _json,
|
|
1325
|
+
'users': _json,
|
|
328
1326
|
});
|
|
329
1327
|
Object.assign(contents, doc);
|
|
330
1328
|
return contents;
|
|
331
1329
|
};
|
|
332
|
-
const
|
|
1330
|
+
const de_ListChannelMembersCommandError = async (output, context) => {
|
|
333
1331
|
const parsedOutput = {
|
|
334
1332
|
...output,
|
|
335
1333
|
body: await parseErrorBody(output.body, context)
|
|
336
1334
|
};
|
|
337
1335
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
338
1336
|
switch (errorCode) {
|
|
1337
|
+
case "ChannelNotFoundException":
|
|
1338
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1339
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
339
1340
|
case "ForbiddenException":
|
|
340
1341
|
case "smithy.framework#ForbiddenException":
|
|
341
1342
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
@@ -351,30 +1352,30 @@ const de_CreateChannelCommandError = async (output, context) => {
|
|
|
351
1352
|
});
|
|
352
1353
|
}
|
|
353
1354
|
};
|
|
354
|
-
export const
|
|
1355
|
+
export const de_ListChannelsCommand = async (output, context) => {
|
|
355
1356
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
356
|
-
return
|
|
1357
|
+
return de_ListChannelsCommandError(output, context);
|
|
357
1358
|
}
|
|
358
1359
|
const contents = map({
|
|
359
1360
|
$metadata: deserializeMetadata(output),
|
|
360
1361
|
});
|
|
361
1362
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
362
1363
|
const doc = take(data, {
|
|
363
|
-
'
|
|
1364
|
+
'channels': _json,
|
|
364
1365
|
});
|
|
365
1366
|
Object.assign(contents, doc);
|
|
366
1367
|
return contents;
|
|
367
1368
|
};
|
|
368
|
-
const
|
|
1369
|
+
const de_ListChannelsCommandError = async (output, context) => {
|
|
369
1370
|
const parsedOutput = {
|
|
370
1371
|
...output,
|
|
371
1372
|
body: await parseErrorBody(output.body, context)
|
|
372
1373
|
};
|
|
373
1374
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
374
1375
|
switch (errorCode) {
|
|
375
|
-
case "
|
|
376
|
-
case "
|
|
377
|
-
throw await
|
|
1376
|
+
case "ForbiddenException":
|
|
1377
|
+
case "smithy.framework#ForbiddenException":
|
|
1378
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
378
1379
|
case "ValidationException":
|
|
379
1380
|
case "smithy.framework#ValidationException":
|
|
380
1381
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -387,17 +1388,21 @@ const de_CreateMessageCommandError = async (output, context) => {
|
|
|
387
1388
|
});
|
|
388
1389
|
}
|
|
389
1390
|
};
|
|
390
|
-
export const
|
|
1391
|
+
export const de_ListMessagesCommand = async (output, context) => {
|
|
391
1392
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
392
|
-
return
|
|
1393
|
+
return de_ListMessagesCommandError(output, context);
|
|
393
1394
|
}
|
|
394
1395
|
const contents = map({
|
|
395
1396
|
$metadata: deserializeMetadata(output),
|
|
396
1397
|
});
|
|
397
|
-
await
|
|
1398
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
1399
|
+
const doc = take(data, {
|
|
1400
|
+
'messages': _ => de_MessagesList(_, context),
|
|
1401
|
+
});
|
|
1402
|
+
Object.assign(contents, doc);
|
|
398
1403
|
return contents;
|
|
399
1404
|
};
|
|
400
|
-
const
|
|
1405
|
+
const de_ListMessagesCommandError = async (output, context) => {
|
|
401
1406
|
const parsedOutput = {
|
|
402
1407
|
...output,
|
|
403
1408
|
body: await parseErrorBody(output.body, context)
|
|
@@ -407,6 +1412,9 @@ const de_DeleteChannelCommandError = async (output, context) => {
|
|
|
407
1412
|
case "ChannelNotFoundException":
|
|
408
1413
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
409
1414
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1415
|
+
case "ForbiddenException":
|
|
1416
|
+
case "smithy.framework#ForbiddenException":
|
|
1417
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
410
1418
|
case "ValidationException":
|
|
411
1419
|
case "smithy.framework#ValidationException":
|
|
412
1420
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -419,9 +1427,9 @@ const de_DeleteChannelCommandError = async (output, context) => {
|
|
|
419
1427
|
});
|
|
420
1428
|
}
|
|
421
1429
|
};
|
|
422
|
-
export const
|
|
1430
|
+
export const de_MarkReadCommand = async (output, context) => {
|
|
423
1431
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
424
|
-
return
|
|
1432
|
+
return de_MarkReadCommandError(output, context);
|
|
425
1433
|
}
|
|
426
1434
|
const contents = map({
|
|
427
1435
|
$metadata: deserializeMetadata(output),
|
|
@@ -429,7 +1437,7 @@ export const de_DeleteMessageCommand = async (output, context) => {
|
|
|
429
1437
|
await collectBody(output.body, context);
|
|
430
1438
|
return contents;
|
|
431
1439
|
};
|
|
432
|
-
const
|
|
1440
|
+
const de_MarkReadCommandError = async (output, context) => {
|
|
433
1441
|
const parsedOutput = {
|
|
434
1442
|
...output,
|
|
435
1443
|
body: await parseErrorBody(output.body, context)
|
|
@@ -439,9 +1447,9 @@ const de_DeleteMessageCommandError = async (output, context) => {
|
|
|
439
1447
|
case "ChannelNotFoundException":
|
|
440
1448
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
441
1449
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
442
|
-
case "
|
|
443
|
-
case "
|
|
444
|
-
throw await
|
|
1450
|
+
case "ForbiddenException":
|
|
1451
|
+
case "smithy.framework#ForbiddenException":
|
|
1452
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
445
1453
|
case "ValidationException":
|
|
446
1454
|
case "smithy.framework#ValidationException":
|
|
447
1455
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -454,9 +1462,9 @@ const de_DeleteMessageCommandError = async (output, context) => {
|
|
|
454
1462
|
});
|
|
455
1463
|
}
|
|
456
1464
|
};
|
|
457
|
-
export const
|
|
1465
|
+
export const de_PartialUpdateChannelCommand = async (output, context) => {
|
|
458
1466
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
459
|
-
return
|
|
1467
|
+
return de_PartialUpdateChannelCommandError(output, context);
|
|
460
1468
|
}
|
|
461
1469
|
const contents = map({
|
|
462
1470
|
$metadata: deserializeMetadata(output),
|
|
@@ -468,7 +1476,7 @@ export const de_GetChannelCommand = async (output, context) => {
|
|
|
468
1476
|
Object.assign(contents, doc);
|
|
469
1477
|
return contents;
|
|
470
1478
|
};
|
|
471
|
-
const
|
|
1479
|
+
const de_PartialUpdateChannelCommandError = async (output, context) => {
|
|
472
1480
|
const parsedOutput = {
|
|
473
1481
|
...output,
|
|
474
1482
|
body: await parseErrorBody(output.body, context)
|
|
@@ -478,6 +1486,9 @@ const de_GetChannelCommandError = async (output, context) => {
|
|
|
478
1486
|
case "ChannelNotFoundException":
|
|
479
1487
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
480
1488
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1489
|
+
case "ForbiddenException":
|
|
1490
|
+
case "smithy.framework#ForbiddenException":
|
|
1491
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
481
1492
|
case "ValidationException":
|
|
482
1493
|
case "smithy.framework#ValidationException":
|
|
483
1494
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -490,21 +1501,21 @@ const de_GetChannelCommandError = async (output, context) => {
|
|
|
490
1501
|
});
|
|
491
1502
|
}
|
|
492
1503
|
};
|
|
493
|
-
export const
|
|
1504
|
+
export const de_PartialUpdateMessageCommand = async (output, context) => {
|
|
494
1505
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
495
|
-
return
|
|
1506
|
+
return de_PartialUpdateMessageCommandError(output, context);
|
|
496
1507
|
}
|
|
497
1508
|
const contents = map({
|
|
498
1509
|
$metadata: deserializeMetadata(output),
|
|
499
1510
|
});
|
|
500
1511
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
501
1512
|
const doc = take(data, {
|
|
502
|
-
'
|
|
1513
|
+
'message': _ => de_Message(_, context),
|
|
503
1514
|
});
|
|
504
1515
|
Object.assign(contents, doc);
|
|
505
1516
|
return contents;
|
|
506
1517
|
};
|
|
507
|
-
const
|
|
1518
|
+
const de_PartialUpdateMessageCommandError = async (output, context) => {
|
|
508
1519
|
const parsedOutput = {
|
|
509
1520
|
...output,
|
|
510
1521
|
body: await parseErrorBody(output.body, context)
|
|
@@ -514,9 +1525,12 @@ const de_GetChannelMemberCommandError = async (output, context) => {
|
|
|
514
1525
|
case "ChannelNotFoundException":
|
|
515
1526
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
516
1527
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
517
|
-
case "
|
|
518
|
-
case "
|
|
519
|
-
throw await
|
|
1528
|
+
case "ForbiddenException":
|
|
1529
|
+
case "smithy.framework#ForbiddenException":
|
|
1530
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
1531
|
+
case "MessageNotFoundException":
|
|
1532
|
+
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
1533
|
+
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
520
1534
|
case "ValidationException":
|
|
521
1535
|
case "smithy.framework#ValidationException":
|
|
522
1536
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -529,30 +1543,29 @@ const de_GetChannelMemberCommandError = async (output, context) => {
|
|
|
529
1543
|
});
|
|
530
1544
|
}
|
|
531
1545
|
};
|
|
532
|
-
export const
|
|
1546
|
+
export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
|
|
533
1547
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
534
|
-
return
|
|
1548
|
+
return de_ScheduleExternalFlagAdjustmentJobCommandError(output, context);
|
|
535
1549
|
}
|
|
536
1550
|
const contents = map({
|
|
537
1551
|
$metadata: deserializeMetadata(output),
|
|
538
1552
|
});
|
|
539
|
-
|
|
540
|
-
const doc = take(data, {
|
|
541
|
-
'message': _ => de_Message(_, context),
|
|
542
|
-
});
|
|
543
|
-
Object.assign(contents, doc);
|
|
1553
|
+
await collectBody(output.body, context);
|
|
544
1554
|
return contents;
|
|
545
1555
|
};
|
|
546
|
-
const
|
|
1556
|
+
const de_ScheduleExternalFlagAdjustmentJobCommandError = async (output, context) => {
|
|
547
1557
|
const parsedOutput = {
|
|
548
1558
|
...output,
|
|
549
1559
|
body: await parseErrorBody(output.body, context)
|
|
550
1560
|
};
|
|
551
1561
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
552
1562
|
switch (errorCode) {
|
|
553
|
-
case "
|
|
554
|
-
case "wildix.xbees.conversations#
|
|
555
|
-
throw await
|
|
1563
|
+
case "ConversationsServiceException":
|
|
1564
|
+
case "wildix.xbees.conversations#ConversationsServiceException":
|
|
1565
|
+
throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
|
|
1566
|
+
case "ForbiddenException":
|
|
1567
|
+
case "smithy.framework#ForbiddenException":
|
|
1568
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
556
1569
|
case "ValidationException":
|
|
557
1570
|
case "smithy.framework#ValidationException":
|
|
558
1571
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -565,21 +1578,21 @@ const de_GetMessageCommandError = async (output, context) => {
|
|
|
565
1578
|
});
|
|
566
1579
|
}
|
|
567
1580
|
};
|
|
568
|
-
export const
|
|
1581
|
+
export const de_SendGiphyCommand = async (output, context) => {
|
|
569
1582
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
570
|
-
return
|
|
1583
|
+
return de_SendGiphyCommandError(output, context);
|
|
571
1584
|
}
|
|
572
1585
|
const contents = map({
|
|
573
1586
|
$metadata: deserializeMetadata(output),
|
|
574
1587
|
});
|
|
575
1588
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
576
1589
|
const doc = take(data, {
|
|
577
|
-
'
|
|
1590
|
+
'message': _ => de_Message(_, context),
|
|
578
1591
|
});
|
|
579
1592
|
Object.assign(contents, doc);
|
|
580
1593
|
return contents;
|
|
581
1594
|
};
|
|
582
|
-
const
|
|
1595
|
+
const de_SendGiphyCommandError = async (output, context) => {
|
|
583
1596
|
const parsedOutput = {
|
|
584
1597
|
...output,
|
|
585
1598
|
body: await parseErrorBody(output.body, context)
|
|
@@ -604,27 +1617,33 @@ const de_JoinChannelCommandError = async (output, context) => {
|
|
|
604
1617
|
});
|
|
605
1618
|
}
|
|
606
1619
|
};
|
|
607
|
-
export const
|
|
1620
|
+
export const de_SendMessageCommand = async (output, context) => {
|
|
608
1621
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
609
|
-
return
|
|
1622
|
+
return de_SendMessageCommandError(output, context);
|
|
610
1623
|
}
|
|
611
1624
|
const contents = map({
|
|
612
1625
|
$metadata: deserializeMetadata(output),
|
|
613
1626
|
});
|
|
614
1627
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
615
1628
|
const doc = take(data, {
|
|
616
|
-
'
|
|
1629
|
+
'message': _ => de_Message(_, context),
|
|
617
1630
|
});
|
|
618
1631
|
Object.assign(contents, doc);
|
|
619
1632
|
return contents;
|
|
620
1633
|
};
|
|
621
|
-
const
|
|
1634
|
+
const de_SendMessageCommandError = async (output, context) => {
|
|
622
1635
|
const parsedOutput = {
|
|
623
1636
|
...output,
|
|
624
1637
|
body: await parseErrorBody(output.body, context)
|
|
625
1638
|
};
|
|
626
1639
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
627
1640
|
switch (errorCode) {
|
|
1641
|
+
case "ChannelNotFoundException":
|
|
1642
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1643
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1644
|
+
case "ForbiddenException":
|
|
1645
|
+
case "smithy.framework#ForbiddenException":
|
|
1646
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
628
1647
|
case "ValidationException":
|
|
629
1648
|
case "smithy.framework#ValidationException":
|
|
630
1649
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -637,21 +1656,17 @@ const de_ListChannelsCommandError = async (output, context) => {
|
|
|
637
1656
|
});
|
|
638
1657
|
}
|
|
639
1658
|
};
|
|
640
|
-
export const
|
|
1659
|
+
export const de_SendMessageReactionCommand = async (output, context) => {
|
|
641
1660
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
642
|
-
return
|
|
1661
|
+
return de_SendMessageReactionCommandError(output, context);
|
|
643
1662
|
}
|
|
644
1663
|
const contents = map({
|
|
645
1664
|
$metadata: deserializeMetadata(output),
|
|
646
1665
|
});
|
|
647
|
-
|
|
648
|
-
const doc = take(data, {
|
|
649
|
-
'messages': _ => de_MessagesList(_, context),
|
|
650
|
-
});
|
|
651
|
-
Object.assign(contents, doc);
|
|
1666
|
+
await collectBody(output.body, context);
|
|
652
1667
|
return contents;
|
|
653
1668
|
};
|
|
654
|
-
const
|
|
1669
|
+
const de_SendMessageReactionCommandError = async (output, context) => {
|
|
655
1670
|
const parsedOutput = {
|
|
656
1671
|
...output,
|
|
657
1672
|
body: await parseErrorBody(output.body, context)
|
|
@@ -661,6 +1676,9 @@ const de_ListMessagesCommandError = async (output, context) => {
|
|
|
661
1676
|
case "ChannelNotFoundException":
|
|
662
1677
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
663
1678
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1679
|
+
case "ForbiddenException":
|
|
1680
|
+
case "smithy.framework#ForbiddenException":
|
|
1681
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
664
1682
|
case "ValidationException":
|
|
665
1683
|
case "smithy.framework#ValidationException":
|
|
666
1684
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -673,21 +1691,21 @@ const de_ListMessagesCommandError = async (output, context) => {
|
|
|
673
1691
|
});
|
|
674
1692
|
}
|
|
675
1693
|
};
|
|
676
|
-
export const
|
|
1694
|
+
export const de_SendSystemMessageCommand = async (output, context) => {
|
|
677
1695
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
678
|
-
return
|
|
1696
|
+
return de_SendSystemMessageCommandError(output, context);
|
|
679
1697
|
}
|
|
680
1698
|
const contents = map({
|
|
681
1699
|
$metadata: deserializeMetadata(output),
|
|
682
1700
|
});
|
|
683
1701
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
684
1702
|
const doc = take(data, {
|
|
685
|
-
'
|
|
1703
|
+
'message': _ => de_Message(_, context),
|
|
686
1704
|
});
|
|
687
1705
|
Object.assign(contents, doc);
|
|
688
1706
|
return contents;
|
|
689
1707
|
};
|
|
690
|
-
const
|
|
1708
|
+
const de_SendSystemMessageCommandError = async (output, context) => {
|
|
691
1709
|
const parsedOutput = {
|
|
692
1710
|
...output,
|
|
693
1711
|
body: await parseErrorBody(output.body, context)
|
|
@@ -697,6 +1715,9 @@ const de_PartialUpdateChannelCommandError = async (output, context) => {
|
|
|
697
1715
|
case "ChannelNotFoundException":
|
|
698
1716
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
699
1717
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1718
|
+
case "ForbiddenException":
|
|
1719
|
+
case "smithy.framework#ForbiddenException":
|
|
1720
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
700
1721
|
case "ValidationException":
|
|
701
1722
|
case "smithy.framework#ValidationException":
|
|
702
1723
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -709,21 +1730,17 @@ const de_PartialUpdateChannelCommandError = async (output, context) => {
|
|
|
709
1730
|
});
|
|
710
1731
|
}
|
|
711
1732
|
};
|
|
712
|
-
export const
|
|
1733
|
+
export const de_SendTypingStartCommand = async (output, context) => {
|
|
713
1734
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
714
|
-
return
|
|
1735
|
+
return de_SendTypingStartCommandError(output, context);
|
|
715
1736
|
}
|
|
716
1737
|
const contents = map({
|
|
717
1738
|
$metadata: deserializeMetadata(output),
|
|
718
1739
|
});
|
|
719
|
-
|
|
720
|
-
const doc = take(data, {
|
|
721
|
-
'message': _ => de_Message(_, context),
|
|
722
|
-
});
|
|
723
|
-
Object.assign(contents, doc);
|
|
1740
|
+
await collectBody(output.body, context);
|
|
724
1741
|
return contents;
|
|
725
1742
|
};
|
|
726
|
-
const
|
|
1743
|
+
const de_SendTypingStartCommandError = async (output, context) => {
|
|
727
1744
|
const parsedOutput = {
|
|
728
1745
|
...output,
|
|
729
1746
|
body: await parseErrorBody(output.body, context)
|
|
@@ -733,9 +1750,9 @@ const de_PartialUpdateMessageCommandError = async (output, context) => {
|
|
|
733
1750
|
case "ChannelNotFoundException":
|
|
734
1751
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
735
1752
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
736
|
-
case "
|
|
737
|
-
case "
|
|
738
|
-
throw await
|
|
1753
|
+
case "ForbiddenException":
|
|
1754
|
+
case "smithy.framework#ForbiddenException":
|
|
1755
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
739
1756
|
case "ValidationException":
|
|
740
1757
|
case "smithy.framework#ValidationException":
|
|
741
1758
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -748,9 +1765,9 @@ const de_PartialUpdateMessageCommandError = async (output, context) => {
|
|
|
748
1765
|
});
|
|
749
1766
|
}
|
|
750
1767
|
};
|
|
751
|
-
export const
|
|
1768
|
+
export const de_SendTypingStopCommand = async (output, context) => {
|
|
752
1769
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
753
|
-
return
|
|
1770
|
+
return de_SendTypingStopCommandError(output, context);
|
|
754
1771
|
}
|
|
755
1772
|
const contents = map({
|
|
756
1773
|
$metadata: deserializeMetadata(output),
|
|
@@ -758,16 +1775,16 @@ export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, contex
|
|
|
758
1775
|
await collectBody(output.body, context);
|
|
759
1776
|
return contents;
|
|
760
1777
|
};
|
|
761
|
-
const
|
|
1778
|
+
const de_SendTypingStopCommandError = async (output, context) => {
|
|
762
1779
|
const parsedOutput = {
|
|
763
1780
|
...output,
|
|
764
1781
|
body: await parseErrorBody(output.body, context)
|
|
765
1782
|
};
|
|
766
1783
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
767
1784
|
switch (errorCode) {
|
|
768
|
-
case "
|
|
769
|
-
case "wildix.xbees.conversations#
|
|
770
|
-
throw await
|
|
1785
|
+
case "ChannelNotFoundException":
|
|
1786
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
1787
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
771
1788
|
case "ForbiddenException":
|
|
772
1789
|
case "smithy.framework#ForbiddenException":
|
|
773
1790
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
@@ -807,6 +1824,9 @@ const de_UpdateChannelCommandError = async (output, context) => {
|
|
|
807
1824
|
case "ChannelNotFoundException":
|
|
808
1825
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
809
1826
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1827
|
+
case "ForbiddenException":
|
|
1828
|
+
case "smithy.framework#ForbiddenException":
|
|
1829
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
810
1830
|
case "ValidationException":
|
|
811
1831
|
case "smithy.framework#ValidationException":
|
|
812
1832
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -843,6 +1863,9 @@ const de_UpdateMessageCommandError = async (output, context) => {
|
|
|
843
1863
|
case "ChannelNotFoundException":
|
|
844
1864
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
845
1865
|
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
1866
|
+
case "ForbiddenException":
|
|
1867
|
+
case "smithy.framework#ForbiddenException":
|
|
1868
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
846
1869
|
case "MessageNotFoundException":
|
|
847
1870
|
case "wildix.xbees.conversations#MessageNotFoundException":
|
|
848
1871
|
throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -885,6 +1908,19 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
885
1908
|
});
|
|
886
1909
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
887
1910
|
};
|
|
1911
|
+
const de_ChannelAlreadyExistExceptionRes = async (parsedOutput, context) => {
|
|
1912
|
+
const contents = map({});
|
|
1913
|
+
const data = parsedOutput.body;
|
|
1914
|
+
const doc = take(data, {
|
|
1915
|
+
'message': __expectString,
|
|
1916
|
+
});
|
|
1917
|
+
Object.assign(contents, doc);
|
|
1918
|
+
const exception = new ChannelAlreadyExistException({
|
|
1919
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1920
|
+
...contents
|
|
1921
|
+
});
|
|
1922
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1923
|
+
};
|
|
888
1924
|
const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
889
1925
|
const contents = map({});
|
|
890
1926
|
const data = parsedOutput.body;
|
|
@@ -911,6 +1947,19 @@ const de_ConversationsServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
911
1947
|
});
|
|
912
1948
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
913
1949
|
};
|
|
1950
|
+
const de_MemberAlreadyExistExceptionRes = async (parsedOutput, context) => {
|
|
1951
|
+
const contents = map({});
|
|
1952
|
+
const data = parsedOutput.body;
|
|
1953
|
+
const doc = take(data, {
|
|
1954
|
+
'message': __expectString,
|
|
1955
|
+
});
|
|
1956
|
+
Object.assign(contents, doc);
|
|
1957
|
+
const exception = new MemberAlreadyExistException({
|
|
1958
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1959
|
+
...contents
|
|
1960
|
+
});
|
|
1961
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1962
|
+
};
|
|
914
1963
|
const de_MemberNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
915
1964
|
const contents = map({});
|
|
916
1965
|
const data = parsedOutput.body;
|
|
@@ -960,35 +2009,12 @@ const se_Message = (input, context) => {
|
|
|
960
2009
|
'user': _json,
|
|
961
2010
|
});
|
|
962
2011
|
};
|
|
963
|
-
const
|
|
964
|
-
return take(input, {
|
|
965
|
-
'attachments': _json,
|
|
966
|
-
'event': [],
|
|
967
|
-
'forward': _json,
|
|
968
|
-
'giphy': _json,
|
|
969
|
-
'mentions': _json,
|
|
970
|
-
'messageId': [],
|
|
971
|
-
'quote': _ => se_Message(_, context),
|
|
972
|
-
'silent': [],
|
|
973
|
-
'sms': [],
|
|
974
|
-
'smsStatus': [],
|
|
975
|
-
'text': [],
|
|
976
|
-
'type': [],
|
|
977
|
-
});
|
|
978
|
-
};
|
|
979
|
-
const se_MessageUpdateFields = (input, context) => {
|
|
2012
|
+
const se_PartialUpdateMessageSetInput = (input, context) => {
|
|
980
2013
|
return take(input, {
|
|
981
2014
|
'attachments': _json,
|
|
982
|
-
'event': [],
|
|
983
2015
|
'forward': _json,
|
|
984
|
-
'giphy': _json,
|
|
985
|
-
'mentions': _json,
|
|
986
2016
|
'quote': _ => se_Message(_, context),
|
|
987
|
-
'silent': [],
|
|
988
|
-
'sms': [],
|
|
989
|
-
'smsStatus': [],
|
|
990
2017
|
'text': [],
|
|
991
|
-
'type': [],
|
|
992
2018
|
});
|
|
993
2019
|
};
|
|
994
2020
|
const de_Message = (output, context) => {
|