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