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