@wildix/xbees-conversations-client 1.0.34 → 1.0.36

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.
Files changed (114) hide show
  1. package/dist-cjs/ConversationsClient.js +7 -3
  2. package/dist-cjs/commands/AddChannelMemberCommand.js +12 -32
  3. package/dist-cjs/commands/AddChannelMembersCommand.js +12 -32
  4. package/dist-cjs/commands/CreateGroupChannelCommand.js +12 -32
  5. package/dist-cjs/commands/DeleteChannelCommand.js +12 -32
  6. package/dist-cjs/commands/DeleteChannelMemberCommand.js +12 -32
  7. package/dist-cjs/commands/DeleteMessageCommand.js +12 -32
  8. package/dist-cjs/commands/DeleteMessageReactionCommand.js +12 -32
  9. package/dist-cjs/commands/GetChannelCommand.js +12 -32
  10. package/dist-cjs/commands/GetChannelMemberCommand.js +12 -32
  11. package/dist-cjs/commands/GetDirectChannelIdCommand.js +12 -32
  12. package/dist-cjs/commands/GetMessageCommand.js +12 -32
  13. package/dist-cjs/commands/GetOrCreateDirectChannelCommand.js +12 -32
  14. package/dist-cjs/commands/HideChannelCommand.js +12 -32
  15. package/dist-cjs/commands/InviteCommand.js +12 -32
  16. package/dist-cjs/commands/JoinChannelCommand.js +12 -32
  17. package/dist-cjs/commands/LeaveChannelCommand.js +12 -32
  18. package/dist-cjs/commands/ListChannelMembersCommand.js +12 -32
  19. package/dist-cjs/commands/ListChannelsCommand.js +12 -32
  20. package/dist-cjs/commands/ListMessageReactionsCommand.js +12 -32
  21. package/dist-cjs/commands/ListMessagesCommand.js +12 -32
  22. package/dist-cjs/commands/MarkReadCommand.js +12 -32
  23. package/dist-cjs/commands/PartialUpdateChannelCommand.js +12 -32
  24. package/dist-cjs/commands/PartialUpdateMessageCommand.js +12 -32
  25. package/dist-cjs/commands/ScheduleExternalFlagAdjustmentJobCommand.js +12 -32
  26. package/dist-cjs/commands/SendGiphyCommand.js +12 -32
  27. package/dist-cjs/commands/SendMessageCommand.js +12 -32
  28. package/dist-cjs/commands/SendMessageReactionCommand.js +12 -32
  29. package/dist-cjs/commands/SendTypingStartCommand.js +12 -32
  30. package/dist-cjs/commands/SendTypingStopCommand.js +12 -32
  31. package/dist-cjs/commands/ShowChannelCommand.js +12 -32
  32. package/dist-cjs/commands/UpdateChannelCommand.js +12 -32
  33. package/dist-cjs/commands/UpdateMessageCommand.js +12 -32
  34. package/dist-cjs/protocols/Aws_restJson1.js +337 -1270
  35. package/dist-cjs/runtimeConfig.browser.js +5 -1
  36. package/dist-cjs/runtimeConfig.js +5 -1
  37. package/dist-cjs/runtimeConfig.shared.js +13 -11
  38. package/dist-es/ConversationsClient.js +7 -3
  39. package/dist-es/commands/AddChannelMemberCommand.js +12 -32
  40. package/dist-es/commands/AddChannelMembersCommand.js +12 -32
  41. package/dist-es/commands/CreateGroupChannelCommand.js +12 -32
  42. package/dist-es/commands/DeleteChannelCommand.js +12 -32
  43. package/dist-es/commands/DeleteChannelMemberCommand.js +12 -32
  44. package/dist-es/commands/DeleteMessageCommand.js +12 -32
  45. package/dist-es/commands/DeleteMessageReactionCommand.js +12 -32
  46. package/dist-es/commands/GetChannelCommand.js +12 -32
  47. package/dist-es/commands/GetChannelMemberCommand.js +12 -32
  48. package/dist-es/commands/GetDirectChannelIdCommand.js +12 -32
  49. package/dist-es/commands/GetMessageCommand.js +12 -32
  50. package/dist-es/commands/GetOrCreateDirectChannelCommand.js +12 -32
  51. package/dist-es/commands/HideChannelCommand.js +12 -32
  52. package/dist-es/commands/InviteCommand.js +12 -32
  53. package/dist-es/commands/JoinChannelCommand.js +12 -32
  54. package/dist-es/commands/LeaveChannelCommand.js +12 -32
  55. package/dist-es/commands/ListChannelMembersCommand.js +12 -32
  56. package/dist-es/commands/ListChannelsCommand.js +12 -32
  57. package/dist-es/commands/ListMessageReactionsCommand.js +12 -32
  58. package/dist-es/commands/ListMessagesCommand.js +12 -32
  59. package/dist-es/commands/MarkReadCommand.js +12 -32
  60. package/dist-es/commands/PartialUpdateChannelCommand.js +12 -32
  61. package/dist-es/commands/PartialUpdateMessageCommand.js +12 -32
  62. package/dist-es/commands/ScheduleExternalFlagAdjustmentJobCommand.js +12 -32
  63. package/dist-es/commands/SendGiphyCommand.js +12 -32
  64. package/dist-es/commands/SendMessageCommand.js +12 -32
  65. package/dist-es/commands/SendMessageReactionCommand.js +12 -32
  66. package/dist-es/commands/SendTypingStartCommand.js +12 -32
  67. package/dist-es/commands/SendTypingStopCommand.js +12 -32
  68. package/dist-es/commands/ShowChannelCommand.js +12 -32
  69. package/dist-es/commands/UpdateChannelCommand.js +12 -32
  70. package/dist-es/commands/UpdateMessageCommand.js +12 -32
  71. package/dist-es/protocols/Aws_restJson1.js +338 -1271
  72. package/dist-es/runtimeConfig.browser.js +4 -1
  73. package/dist-es/runtimeConfig.js +4 -1
  74. package/dist-es/runtimeConfig.shared.js +13 -11
  75. package/dist-types/Conversations.d.ts +4 -0
  76. package/dist-types/ConversationsClient.d.ts +13 -7
  77. package/dist-types/commands/AddChannelMemberCommand.d.ts +7 -19
  78. package/dist-types/commands/AddChannelMembersCommand.d.ts +7 -19
  79. package/dist-types/commands/CreateGroupChannelCommand.d.ts +7 -19
  80. package/dist-types/commands/DeleteChannelCommand.d.ts +7 -19
  81. package/dist-types/commands/DeleteChannelMemberCommand.d.ts +7 -19
  82. package/dist-types/commands/DeleteMessageCommand.d.ts +7 -19
  83. package/dist-types/commands/DeleteMessageReactionCommand.d.ts +7 -19
  84. package/dist-types/commands/GetChannelCommand.d.ts +7 -19
  85. package/dist-types/commands/GetChannelMemberCommand.d.ts +7 -19
  86. package/dist-types/commands/GetDirectChannelIdCommand.d.ts +9 -21
  87. package/dist-types/commands/GetMessageCommand.d.ts +7 -19
  88. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +7 -19
  89. package/dist-types/commands/HideChannelCommand.d.ts +8 -84
  90. package/dist-types/commands/InviteCommand.d.ts +7 -19
  91. package/dist-types/commands/JoinChannelCommand.d.ts +7 -19
  92. package/dist-types/commands/LeaveChannelCommand.d.ts +7 -19
  93. package/dist-types/commands/ListChannelMembersCommand.d.ts +7 -19
  94. package/dist-types/commands/ListChannelsCommand.d.ts +7 -19
  95. package/dist-types/commands/ListMessageReactionsCommand.d.ts +7 -19
  96. package/dist-types/commands/ListMessagesCommand.d.ts +7 -19
  97. package/dist-types/commands/MarkReadCommand.d.ts +7 -19
  98. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +8 -19
  99. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +7 -19
  100. package/dist-types/commands/ScheduleExternalFlagAdjustmentJobCommand.d.ts +8 -20
  101. package/dist-types/commands/SendGiphyCommand.d.ts +7 -19
  102. package/dist-types/commands/SendMessageCommand.d.ts +7 -19
  103. package/dist-types/commands/SendMessageReactionCommand.d.ts +7 -19
  104. package/dist-types/commands/SendTypingStartCommand.d.ts +7 -19
  105. package/dist-types/commands/SendTypingStopCommand.d.ts +7 -19
  106. package/dist-types/commands/ShowChannelCommand.d.ts +8 -84
  107. package/dist-types/commands/UpdateChannelCommand.d.ts +8 -19
  108. package/dist-types/commands/UpdateMessageCommand.d.ts +7 -19
  109. package/dist-types/index.d.ts +2 -0
  110. package/dist-types/models/models_0.d.ts +55 -47
  111. package/dist-types/runtimeConfig.browser.d.ts +3 -4
  112. package/dist-types/runtimeConfig.d.ts +3 -4
  113. package/dist-types/runtimeConfig.native.d.ts +3 -4
  114. package/package.json +30 -28
@@ -1,61 +1,51 @@
1
1
  import { ConversationsServiceException as __BaseException } from "../models/ConversationsServiceException";
2
2
  import { ChannelAlreadyExistException, ChannelNotFoundException, ConversationsServiceException, ForbiddenException, MemberAlreadyExistException, MemberNotFoundException, MessageNotFoundException, ValidationException, } from "../models/models_0";
3
- import { HttpRequest as __HttpRequest, } from "@smithy/protocol-http";
4
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, resolvedPath as __resolvedPath, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
3
+ import { requestBuilder as rb } from "@smithy/core";
4
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
5
  export const se_AddChannelMemberCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  'content-type': 'application/json',
9
9
  };
10
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
11
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
10
+ b.bp("/v2/conversations/channels/{channelId}/members");
11
+ b.p('channelId', () => input.channelId, '{channelId}', false);
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  'memberId': [],
15
15
  'memberToInvite': _ => _json(_),
16
16
  'silent': [],
17
17
  }));
18
- return new __HttpRequest({
19
- protocol,
20
- hostname,
21
- port,
22
- method: "POST",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
18
+ b.m("POST")
19
+ .h(headers)
20
+ .b(body);
21
+ return b.build();
27
22
  };
28
23
  export const se_AddChannelMembersCommand = async (input, context) => {
29
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = rb(input, context);
30
25
  const headers = {
31
26
  'content-type': 'application/json',
32
27
  };
33
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
34
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
28
+ b.bp("/v2/conversations/channels/{channelId}/members");
29
+ b.p('channelId', () => input.channelId, '{channelId}', false);
35
30
  let body;
36
31
  body = JSON.stringify(take(input, {
37
32
  'members': _ => _json(_),
38
33
  'membersToInvite': _ => _json(_),
39
34
  'silent': [],
40
35
  }));
41
- return new __HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "PUT",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
36
+ b.m("PUT")
37
+ .h(headers)
38
+ .b(body);
39
+ return b.build();
50
40
  };
51
41
  export const se_CreateGroupChannelCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
42
+ const b = rb(input, context);
53
43
  const headers = {
54
44
  'content-type': 'application/json',
55
45
  };
56
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/group";
46
+ b.bp("/v2/conversations/group");
57
47
  const query = map({
58
- "user": [, input.userId],
48
+ [_u]: [, input[_uI]],
59
49
  });
60
50
  let body;
61
51
  body = JSON.stringify(take(input, {
@@ -69,496 +59,382 @@ export const se_CreateGroupChannelCommand = async (input, context) => {
69
59
  'pictureColor': [],
70
60
  'subject': [],
71
61
  }));
72
- return new __HttpRequest({
73
- protocol,
74
- hostname,
75
- port,
76
- method: "POST",
77
- headers,
78
- path: resolvedPath,
79
- query,
80
- body,
81
- });
62
+ b.m("POST")
63
+ .h(headers)
64
+ .q(query)
65
+ .b(body);
66
+ return b.build();
82
67
  };
83
68
  export const se_DeleteChannelCommand = async (input, context) => {
84
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = rb(input, context);
85
70
  const headers = {};
86
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
87
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
71
+ b.bp("/v2/conversations/channels/{channelId}");
72
+ b.p('channelId', () => input.channelId, '{channelId}', false);
88
73
  let body;
89
- return new __HttpRequest({
90
- protocol,
91
- hostname,
92
- port,
93
- method: "DELETE",
94
- headers,
95
- path: resolvedPath,
96
- body,
97
- });
74
+ b.m("DELETE")
75
+ .h(headers)
76
+ .b(body);
77
+ return b.build();
98
78
  };
99
79
  export const se_DeleteChannelMemberCommand = async (input, context) => {
100
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = rb(input, context);
101
81
  const headers = {};
102
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members/{memberId}";
103
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
104
- resolvedPath = __resolvedPath(resolvedPath, input, 'memberId', () => input.memberId, '{memberId}', false);
82
+ b.bp("/v2/conversations/channels/{channelId}/members/{memberId}");
83
+ b.p('channelId', () => input.channelId, '{channelId}', false);
84
+ b.p('memberId', () => input.memberId, '{memberId}', false);
105
85
  const query = map({
106
- "silent": [() => input.silent !== void 0, () => (input.silent.toString())],
86
+ [_s]: [() => input.silent !== void 0, () => (input[_s].toString())],
107
87
  });
108
88
  let body;
109
- return new __HttpRequest({
110
- protocol,
111
- hostname,
112
- port,
113
- method: "DELETE",
114
- headers,
115
- path: resolvedPath,
116
- query,
117
- body,
118
- });
89
+ b.m("DELETE")
90
+ .h(headers)
91
+ .q(query)
92
+ .b(body);
93
+ return b.build();
119
94
  };
120
95
  export const se_DeleteMessageCommand = async (input, context) => {
121
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
96
+ const b = rb(input, context);
122
97
  const headers = {};
123
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
124
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
125
- resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
98
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
99
+ b.p('channelId', () => input.channelId, '{channelId}', false);
100
+ b.p('messageId', () => input.messageId, '{messageId}', false);
126
101
  const query = map({
127
- "user": [, input.userId],
102
+ [_u]: [, input[_uI]],
128
103
  });
129
104
  let body;
130
- return new __HttpRequest({
131
- protocol,
132
- hostname,
133
- port,
134
- method: "DELETE",
135
- headers,
136
- path: resolvedPath,
137
- query,
138
- body,
139
- });
105
+ b.m("DELETE")
106
+ .h(headers)
107
+ .q(query)
108
+ .b(body);
109
+ return b.build();
140
110
  };
141
111
  export const se_DeleteMessageReactionCommand = async (input, context) => {
142
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
112
+ const b = rb(input, context);
143
113
  const headers = {};
144
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions/{reactionType}";
145
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
146
- resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
147
- resolvedPath = __resolvedPath(resolvedPath, input, 'reactionType', () => input.reactionType, '{reactionType}', false);
114
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions/{reactionType}");
115
+ b.p('channelId', () => input.channelId, '{channelId}', false);
116
+ b.p('messageId', () => input.messageId, '{messageId}', false);
117
+ b.p('reactionType', () => input.reactionType, '{reactionType}', false);
148
118
  const query = map({
149
- "user": [, input.userId],
119
+ [_u]: [, input[_uI]],
150
120
  });
151
121
  let body;
152
- return new __HttpRequest({
153
- protocol,
154
- hostname,
155
- port,
156
- method: "DELETE",
157
- headers,
158
- path: resolvedPath,
159
- query,
160
- body,
161
- });
122
+ b.m("DELETE")
123
+ .h(headers)
124
+ .q(query)
125
+ .b(body);
126
+ return b.build();
162
127
  };
163
128
  export const se_GetChannelCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
129
+ const b = rb(input, context);
165
130
  const headers = {};
166
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
167
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
131
+ b.bp("/v2/conversations/channels/{channelId}");
132
+ b.p('channelId', () => input.channelId, '{channelId}', false);
168
133
  let body;
169
- return new __HttpRequest({
170
- protocol,
171
- hostname,
172
- port,
173
- method: "GET",
174
- headers,
175
- path: resolvedPath,
176
- body,
177
- });
134
+ b.m("GET")
135
+ .h(headers)
136
+ .b(body);
137
+ return b.build();
178
138
  };
179
139
  export const se_GetChannelMemberCommand = async (input, context) => {
180
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = rb(input, context);
181
141
  const headers = {};
182
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members/{memberId}";
183
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
184
- resolvedPath = __resolvedPath(resolvedPath, input, 'memberId', () => input.memberId, '{memberId}', false);
142
+ b.bp("/v2/conversations/channels/{channelId}/members/{memberId}");
143
+ b.p('channelId', () => input.channelId, '{channelId}', false);
144
+ b.p('memberId', () => input.memberId, '{memberId}', false);
185
145
  let body;
186
- return new __HttpRequest({
187
- protocol,
188
- hostname,
189
- port,
190
- method: "GET",
191
- headers,
192
- path: resolvedPath,
193
- body,
194
- });
146
+ b.m("GET")
147
+ .h(headers)
148
+ .b(body);
149
+ return b.build();
195
150
  };
196
151
  export const se_GetDirectChannelIdCommand = async (input, context) => {
197
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = rb(input, context);
198
153
  const headers = {
199
154
  'content-type': 'application/json',
200
155
  };
201
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_channel_id";
156
+ b.bp("/v2/conversations/direct/get_channel_id");
202
157
  const query = map({
203
- "user": [, input.userId],
158
+ [_u]: [, input[_uI]],
204
159
  });
205
160
  let body;
206
161
  body = JSON.stringify(take(input, {
207
- 'participantId': [],
208
- 'participantToInvite': _ => _json(_),
162
+ 'memberId': [],
163
+ 'memberToInvite': _ => _json(_),
209
164
  }));
210
- return new __HttpRequest({
211
- protocol,
212
- hostname,
213
- port,
214
- method: "POST",
215
- headers,
216
- path: resolvedPath,
217
- query,
218
- body,
219
- });
165
+ b.m("POST")
166
+ .h(headers)
167
+ .q(query)
168
+ .b(body);
169
+ return b.build();
220
170
  };
221
171
  export const se_GetMessageCommand = async (input, context) => {
222
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = rb(input, context);
223
173
  const headers = {};
224
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
225
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
226
- resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
174
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
175
+ b.p('channelId', () => input.channelId, '{channelId}', false);
176
+ b.p('messageId', () => input.messageId, '{messageId}', false);
227
177
  let body;
228
- return new __HttpRequest({
229
- protocol,
230
- hostname,
231
- port,
232
- method: "GET",
233
- headers,
234
- path: resolvedPath,
235
- body,
236
- });
178
+ b.m("GET")
179
+ .h(headers)
180
+ .b(body);
181
+ return b.build();
237
182
  };
238
183
  export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
239
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const b = rb(input, context);
240
185
  const headers = {
241
186
  'content-type': 'application/json',
242
187
  };
243
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_or_create_channel";
188
+ b.bp("/v2/conversations/direct/get_or_create_channel");
244
189
  const query = map({
245
- "user": [, input.userId],
190
+ [_u]: [, input[_uI]],
246
191
  });
247
192
  let body;
248
193
  body = JSON.stringify(take(input, {
249
194
  'memberId': [],
250
195
  'memberToInvite': _ => _json(_),
251
196
  }));
252
- return new __HttpRequest({
253
- protocol,
254
- hostname,
255
- port,
256
- method: "POST",
257
- headers,
258
- path: resolvedPath,
259
- query,
260
- body,
261
- });
197
+ b.m("POST")
198
+ .h(headers)
199
+ .q(query)
200
+ .b(body);
201
+ return b.build();
262
202
  };
263
203
  export const se_HideChannelCommand = async (input, context) => {
264
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
204
+ const b = rb(input, context);
265
205
  const headers = {};
266
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/hide";
267
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
206
+ b.bp("/v2/conversations/channels/{channelId}/hide");
207
+ b.p('channelId', () => input.channelId, '{channelId}', false);
268
208
  const query = map({
269
- "user": [, input.userId],
209
+ [_u]: [, input[_uI]],
270
210
  });
271
211
  let body;
272
- return new __HttpRequest({
273
- protocol,
274
- hostname,
275
- port,
276
- method: "POST",
277
- headers,
278
- path: resolvedPath,
279
- query,
280
- body,
281
- });
212
+ b.m("POST")
213
+ .h(headers)
214
+ .q(query)
215
+ .b(body);
216
+ return b.build();
282
217
  };
283
218
  export const se_InviteCommand = async (input, context) => {
284
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
219
+ const b = rb(input, context);
285
220
  const headers = {
286
221
  'content-type': 'application/json',
287
222
  };
288
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/invite";
223
+ b.bp("/v2/conversations/invite");
289
224
  let body;
290
225
  body = JSON.stringify(take(input, {
291
226
  'invitees': _ => _json(_),
292
227
  }));
293
- return new __HttpRequest({
294
- protocol,
295
- hostname,
296
- port,
297
- method: "POST",
298
- headers,
299
- path: resolvedPath,
300
- body,
301
- });
228
+ b.m("POST")
229
+ .h(headers)
230
+ .b(body);
231
+ return b.build();
302
232
  };
303
233
  export const se_JoinChannelCommand = async (input, context) => {
304
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
234
+ const b = rb(input, context);
305
235
  const headers = {
306
236
  'content-type': 'application/json',
307
237
  };
308
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/join";
309
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
238
+ b.bp("/v2/conversations/channels/{channelId}/join");
239
+ b.p('channelId', () => input.channelId, '{channelId}', false);
310
240
  const query = map({
311
- "user": [, input.userId],
241
+ [_u]: [, input[_uI]],
312
242
  });
313
243
  let body;
314
244
  body = JSON.stringify(take(input, {
315
245
  'silent': [],
316
246
  }));
317
- return new __HttpRequest({
318
- protocol,
319
- hostname,
320
- port,
321
- method: "POST",
322
- headers,
323
- path: resolvedPath,
324
- query,
325
- body,
326
- });
247
+ b.m("POST")
248
+ .h(headers)
249
+ .q(query)
250
+ .b(body);
251
+ return b.build();
327
252
  };
328
253
  export const se_LeaveChannelCommand = async (input, context) => {
329
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
254
+ const b = rb(input, context);
330
255
  const headers = {
331
256
  'content-type': 'application/json',
332
257
  };
333
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/leave";
334
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
258
+ b.bp("/v2/conversations/channels/{channelId}/leave");
259
+ b.p('channelId', () => input.channelId, '{channelId}', false);
335
260
  const query = map({
336
- "user": [, input.userId],
261
+ [_u]: [, input[_uI]],
337
262
  });
338
263
  let body;
339
264
  body = JSON.stringify(take(input, {
340
265
  'silent': [],
341
266
  }));
342
- return new __HttpRequest({
343
- protocol,
344
- hostname,
345
- port,
346
- method: "POST",
347
- headers,
348
- path: resolvedPath,
349
- query,
350
- body,
351
- });
267
+ b.m("POST")
268
+ .h(headers)
269
+ .q(query)
270
+ .b(body);
271
+ return b.build();
352
272
  };
353
273
  export const se_ListChannelMembersCommand = async (input, context) => {
354
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const b = rb(input, context);
355
275
  const headers = {};
356
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/members";
357
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
276
+ b.bp("/v2/conversations/channels/{channelId}/members");
277
+ b.p('channelId', () => input.channelId, '{channelId}', false);
358
278
  const query = map({
359
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
360
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
279
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
280
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
361
281
  });
362
282
  let body;
363
- return new __HttpRequest({
364
- protocol,
365
- hostname,
366
- port,
367
- method: "GET",
368
- headers,
369
- path: resolvedPath,
370
- query,
371
- body,
372
- });
283
+ b.m("GET")
284
+ .h(headers)
285
+ .q(query)
286
+ .b(body);
287
+ return b.build();
373
288
  };
374
289
  export const se_ListChannelsCommand = async (input, context) => {
375
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
290
+ const b = rb(input, context);
376
291
  const headers = {};
377
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels";
292
+ b.bp("/v2/conversations/channels");
378
293
  const query = map({
379
- "user": [, input.userId],
380
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
381
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
294
+ [_u]: [, input[_uI]],
295
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
296
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
382
297
  });
383
298
  let body;
384
- return new __HttpRequest({
385
- protocol,
386
- hostname,
387
- port,
388
- method: "GET",
389
- headers,
390
- path: resolvedPath,
391
- query,
392
- body,
393
- });
299
+ b.m("GET")
300
+ .h(headers)
301
+ .q(query)
302
+ .b(body);
303
+ return b.build();
394
304
  };
395
305
  export const se_ListMessageReactionsCommand = async (input, context) => {
396
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
306
+ const b = rb(input, context);
397
307
  const headers = {};
398
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
399
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
400
- resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
308
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions");
309
+ b.p('channelId', () => input.channelId, '{channelId}', false);
310
+ b.p('messageId', () => input.messageId, '{messageId}', false);
401
311
  const query = map({
402
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
403
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
312
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
313
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
404
314
  });
405
315
  let body;
406
- return new __HttpRequest({
407
- protocol,
408
- hostname,
409
- port,
410
- method: "GET",
411
- headers,
412
- path: resolvedPath,
413
- query,
414
- body,
415
- });
316
+ b.m("GET")
317
+ .h(headers)
318
+ .q(query)
319
+ .b(body);
320
+ return b.build();
416
321
  };
417
322
  export const se_ListMessagesCommand = async (input, context) => {
418
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
323
+ const b = rb(input, context);
419
324
  const headers = {};
420
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages";
421
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
325
+ b.bp("/v2/conversations/channels/{channelId}/messages");
326
+ b.p('channelId', () => input.channelId, '{channelId}', false);
422
327
  const query = map({
423
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
424
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
328
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
329
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
425
330
  });
426
331
  let body;
427
- return new __HttpRequest({
428
- protocol,
429
- hostname,
430
- port,
431
- method: "GET",
432
- headers,
433
- path: resolvedPath,
434
- query,
435
- body,
436
- });
332
+ b.m("GET")
333
+ .h(headers)
334
+ .q(query)
335
+ .b(body);
336
+ return b.build();
437
337
  };
438
338
  export const se_MarkReadCommand = async (input, context) => {
439
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
339
+ const b = rb(input, context);
440
340
  const headers = {};
441
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/read";
442
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
341
+ b.bp("/v2/conversations/channels/{channelId}/read");
342
+ b.p('channelId', () => input.channelId, '{channelId}', false);
443
343
  const query = map({
444
- "user": [, input.userId],
344
+ [_u]: [, input[_uI]],
445
345
  });
446
346
  let body;
447
- return new __HttpRequest({
448
- protocol,
449
- hostname,
450
- port,
451
- method: "POST",
452
- headers,
453
- path: resolvedPath,
454
- query,
455
- body,
456
- });
347
+ b.m("POST")
348
+ .h(headers)
349
+ .q(query)
350
+ .b(body);
351
+ return b.build();
457
352
  };
458
353
  export const se_PartialUpdateChannelCommand = async (input, context) => {
459
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
354
+ const b = rb(input, context);
460
355
  const headers = {
461
356
  'content-type': 'application/json',
462
357
  };
463
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
464
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
358
+ b.bp("/v2/conversations/channels/{channelId}");
359
+ b.p('channelId', () => input.channelId, '{channelId}', false);
465
360
  const query = map({
466
- "user": [, input.userId],
361
+ [_u]: [, input[_uI]],
467
362
  });
468
363
  let body;
469
364
  body = JSON.stringify(take(input, {
470
365
  'set': _ => _json(_),
366
+ 'silent': [],
471
367
  'unset': _ => _json(_),
472
368
  }));
473
- return new __HttpRequest({
474
- protocol,
475
- hostname,
476
- port,
477
- method: "PATCH",
478
- headers,
479
- path: resolvedPath,
480
- query,
481
- body,
482
- });
369
+ b.m("PATCH")
370
+ .h(headers)
371
+ .q(query)
372
+ .b(body);
373
+ return b.build();
483
374
  };
484
375
  export const se_PartialUpdateMessageCommand = async (input, context) => {
485
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
376
+ const b = rb(input, context);
486
377
  const headers = {
487
378
  'content-type': 'application/json',
488
379
  };
489
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
490
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
491
- resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
380
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
381
+ b.p('channelId', () => input.channelId, '{channelId}', false);
382
+ b.p('messageId', () => input.messageId, '{messageId}', false);
492
383
  let body;
493
384
  body = JSON.stringify(take(input, {
494
385
  'set': _ => _json(_),
495
386
  'unset': _ => _json(_),
496
387
  }));
497
- return new __HttpRequest({
498
- protocol,
499
- hostname,
500
- port,
501
- method: "PATCH",
502
- headers,
503
- path: resolvedPath,
504
- body,
505
- });
388
+ b.m("PATCH")
389
+ .h(headers)
390
+ .b(body);
391
+ return b.build();
506
392
  };
507
393
  export const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
508
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
394
+ const b = rb(input, context);
509
395
  const headers = {
510
396
  'content-type': 'application/json',
511
397
  };
512
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/schedule_external_flag_adjustment_job";
398
+ b.bp("/v2/conversations/schedule_external_flag_adjustment_job");
513
399
  let body;
514
400
  body = JSON.stringify(take(input, {
515
401
  'userId': [],
516
402
  }));
517
- return new __HttpRequest({
518
- protocol,
519
- hostname,
520
- port,
521
- method: "POST",
522
- headers,
523
- path: resolvedPath,
524
- body,
525
- });
403
+ b.m("POST")
404
+ .h(headers)
405
+ .b(body);
406
+ return b.build();
526
407
  };
527
408
  export const se_SendGiphyCommand = async (input, context) => {
528
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
409
+ const b = rb(input, context);
529
410
  const headers = {
530
411
  'content-type': 'application/json',
531
412
  };
532
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_giphy";
533
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
413
+ b.bp("/v2/conversations/channels/{channelId}/send_giphy");
414
+ b.p('channelId', () => input.channelId, '{channelId}', false);
534
415
  const query = map({
535
- "user": [, input.userId],
416
+ [_u]: [, input[_uI]],
536
417
  });
537
418
  let body;
538
419
  body = JSON.stringify(take(input, {
539
420
  'giphy': _ => _json(_),
540
421
  'messageId': [],
541
422
  }));
542
- return new __HttpRequest({
543
- protocol,
544
- hostname,
545
- port,
546
- method: "POST",
547
- headers,
548
- path: resolvedPath,
549
- query,
550
- body,
551
- });
423
+ b.m("POST")
424
+ .h(headers)
425
+ .q(query)
426
+ .b(body);
427
+ return b.build();
552
428
  };
553
429
  export const se_SendMessageCommand = async (input, context) => {
554
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
430
+ const b = rb(input, context);
555
431
  const headers = {
556
432
  'content-type': 'application/json',
557
433
  };
558
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages";
559
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
434
+ b.bp("/v2/conversations/channels/{channelId}/messages");
435
+ b.p('channelId', () => input.channelId, '{channelId}', false);
560
436
  const query = map({
561
- "user": [, input.userId],
437
+ [_u]: [, input[_uI]],
562
438
  });
563
439
  let body;
564
440
  body = JSON.stringify(take(input, {
@@ -569,112 +445,87 @@ export const se_SendMessageCommand = async (input, context) => {
569
445
  'quote': _ => _json(_),
570
446
  'text': [],
571
447
  }));
572
- return new __HttpRequest({
573
- protocol,
574
- hostname,
575
- port,
576
- method: "POST",
577
- headers,
578
- path: resolvedPath,
579
- query,
580
- body,
581
- });
448
+ b.m("POST")
449
+ .h(headers)
450
+ .q(query)
451
+ .b(body);
452
+ return b.build();
582
453
  };
583
454
  export const se_SendMessageReactionCommand = async (input, context) => {
584
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
455
+ const b = rb(input, context);
585
456
  const headers = {
586
457
  'content-type': 'application/json',
587
458
  };
588
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}/reactions";
589
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
590
- resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
459
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions");
460
+ b.p('channelId', () => input.channelId, '{channelId}', false);
461
+ b.p('messageId', () => input.messageId, '{messageId}', false);
591
462
  const query = map({
592
- "user": [, input.userId],
463
+ [_u]: [, input[_uI]],
593
464
  });
594
465
  let body;
595
466
  body = JSON.stringify(take(input, {
596
467
  'reactionType': [],
597
468
  }));
598
- return new __HttpRequest({
599
- protocol,
600
- hostname,
601
- port,
602
- method: "POST",
603
- headers,
604
- path: resolvedPath,
605
- query,
606
- body,
607
- });
469
+ b.m("POST")
470
+ .h(headers)
471
+ .q(query)
472
+ .b(body);
473
+ return b.build();
608
474
  };
609
475
  export const se_SendTypingStartCommand = async (input, context) => {
610
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
476
+ const b = rb(input, context);
611
477
  const headers = {};
612
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_start";
613
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
478
+ b.bp("/v2/conversations/channels/{channelId}/send_typing_start");
479
+ b.p('channelId', () => input.channelId, '{channelId}', false);
614
480
  const query = map({
615
- "user": [, input.userId],
481
+ [_u]: [, input[_uI]],
616
482
  });
617
483
  let body;
618
- return new __HttpRequest({
619
- protocol,
620
- hostname,
621
- port,
622
- method: "POST",
623
- headers,
624
- path: resolvedPath,
625
- query,
626
- body,
627
- });
484
+ b.m("POST")
485
+ .h(headers)
486
+ .q(query)
487
+ .b(body);
488
+ return b.build();
628
489
  };
629
490
  export const se_SendTypingStopCommand = async (input, context) => {
630
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
491
+ const b = rb(input, context);
631
492
  const headers = {};
632
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/send_typing_stop";
633
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
493
+ b.bp("/v2/conversations/channels/{channelId}/send_typing_stop");
494
+ b.p('channelId', () => input.channelId, '{channelId}', false);
634
495
  const query = map({
635
- "user": [, input.userId],
496
+ [_u]: [, input[_uI]],
636
497
  });
637
498
  let body;
638
- return new __HttpRequest({
639
- protocol,
640
- hostname,
641
- port,
642
- method: "POST",
643
- headers,
644
- path: resolvedPath,
645
- query,
646
- body,
647
- });
499
+ b.m("POST")
500
+ .h(headers)
501
+ .q(query)
502
+ .b(body);
503
+ return b.build();
648
504
  };
649
505
  export const se_ShowChannelCommand = async (input, context) => {
650
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
506
+ const b = rb(input, context);
651
507
  const headers = {};
652
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/show";
653
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
508
+ b.bp("/v2/conversations/channels/{channelId}/show");
509
+ b.p('channelId', () => input.channelId, '{channelId}', false);
654
510
  const query = map({
655
- "user": [, input.userId],
511
+ [_u]: [, input[_uI]],
656
512
  });
657
513
  let body;
658
- return new __HttpRequest({
659
- protocol,
660
- hostname,
661
- port,
662
- method: "POST",
663
- headers,
664
- path: resolvedPath,
665
- query,
666
- body,
667
- });
514
+ b.m("POST")
515
+ .h(headers)
516
+ .q(query)
517
+ .b(body);
518
+ return b.build();
668
519
  };
669
520
  export const se_UpdateChannelCommand = async (input, context) => {
670
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
521
+ const b = rb(input, context);
671
522
  const headers = {
672
523
  'content-type': 'application/json',
673
524
  };
674
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
675
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
525
+ b.bp("/v2/conversations/channels/{channelId}");
526
+ b.p('channelId', () => input.channelId, '{channelId}', false);
676
527
  const query = map({
677
- "user": [, input.userId],
528
+ [_u]: [, input[_uI]],
678
529
  });
679
530
  let body;
680
531
  body = JSON.stringify(take(input, {
@@ -683,27 +534,23 @@ export const se_UpdateChannelCommand = async (input, context) => {
683
534
  'description': [],
684
535
  'picture': [],
685
536
  'pictureColor': [],
537
+ 'silent': [],
686
538
  'subject': [],
687
539
  }));
688
- return new __HttpRequest({
689
- protocol,
690
- hostname,
691
- port,
692
- method: "PUT",
693
- headers,
694
- path: resolvedPath,
695
- query,
696
- body,
697
- });
540
+ b.m("PUT")
541
+ .h(headers)
542
+ .q(query)
543
+ .b(body);
544
+ return b.build();
698
545
  };
699
546
  export const se_UpdateMessageCommand = async (input, context) => {
700
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
547
+ const b = rb(input, context);
701
548
  const headers = {
702
549
  'content-type': 'application/json',
703
550
  };
704
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}/messages/{messageId}";
705
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
706
- resolvedPath = __resolvedPath(resolvedPath, input, 'messageId', () => input.messageId, '{messageId}', false);
551
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
552
+ b.p('channelId', () => input.channelId, '{channelId}', false);
553
+ b.p('messageId', () => input.messageId, '{messageId}', false);
707
554
  let body;
708
555
  body = JSON.stringify(take(input, {
709
556
  'attachments': _ => _json(_),
@@ -712,19 +559,14 @@ export const se_UpdateMessageCommand = async (input, context) => {
712
559
  'quote': _ => _json(_),
713
560
  'text': [],
714
561
  }));
715
- return new __HttpRequest({
716
- protocol,
717
- hostname,
718
- port,
719
- method: "PUT",
720
- headers,
721
- path: resolvedPath,
722
- body,
723
- });
562
+ b.m("PUT")
563
+ .h(headers)
564
+ .b(body);
565
+ return b.build();
724
566
  };
725
567
  export const de_AddChannelMemberCommand = async (output, context) => {
726
568
  if (output.statusCode !== 200 && output.statusCode >= 300) {
727
- return de_AddChannelMemberCommandError(output, context);
569
+ return de_CommandError(output, context);
728
570
  }
729
571
  const contents = map({
730
572
  $metadata: deserializeMetadata(output),
@@ -737,37 +579,9 @@ export const de_AddChannelMemberCommand = async (output, context) => {
737
579
  Object.assign(contents, doc);
738
580
  return contents;
739
581
  };
740
- const de_AddChannelMemberCommandError = async (output, context) => {
741
- const parsedOutput = {
742
- ...output,
743
- body: await parseErrorBody(output.body, context)
744
- };
745
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
746
- switch (errorCode) {
747
- case "ChannelNotFoundException":
748
- case "wildix.xbees.conversations#ChannelNotFoundException":
749
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
750
- case "ForbiddenException":
751
- case "smithy.framework#ForbiddenException":
752
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
753
- case "MemberAlreadyExistException":
754
- case "wildix.xbees.conversations#MemberAlreadyExistException":
755
- throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
756
- case "ValidationException":
757
- case "smithy.framework#ValidationException":
758
- throw await de_ValidationExceptionRes(parsedOutput, context);
759
- default:
760
- const parsedBody = parsedOutput.body;
761
- return throwDefaultError({
762
- output,
763
- parsedBody,
764
- errorCode
765
- });
766
- }
767
- };
768
582
  export const de_AddChannelMembersCommand = async (output, context) => {
769
583
  if (output.statusCode !== 200 && output.statusCode >= 300) {
770
- return de_AddChannelMembersCommandError(output, context);
584
+ return de_CommandError(output, context);
771
585
  }
772
586
  const contents = map({
773
587
  $metadata: deserializeMetadata(output),
@@ -780,37 +594,9 @@ export const de_AddChannelMembersCommand = async (output, context) => {
780
594
  Object.assign(contents, doc);
781
595
  return contents;
782
596
  };
783
- const de_AddChannelMembersCommandError = async (output, context) => {
784
- const parsedOutput = {
785
- ...output,
786
- body: await parseErrorBody(output.body, context)
787
- };
788
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
789
- switch (errorCode) {
790
- case "ChannelNotFoundException":
791
- case "wildix.xbees.conversations#ChannelNotFoundException":
792
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
793
- case "ForbiddenException":
794
- case "smithy.framework#ForbiddenException":
795
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
796
- case "MemberAlreadyExistException":
797
- case "wildix.xbees.conversations#MemberAlreadyExistException":
798
- throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
799
- case "ValidationException":
800
- case "smithy.framework#ValidationException":
801
- throw await de_ValidationExceptionRes(parsedOutput, context);
802
- default:
803
- const parsedBody = parsedOutput.body;
804
- return throwDefaultError({
805
- output,
806
- parsedBody,
807
- errorCode
808
- });
809
- }
810
- };
811
597
  export const de_CreateGroupChannelCommand = async (output, context) => {
812
598
  if (output.statusCode !== 200 && output.statusCode >= 300) {
813
- return de_CreateGroupChannelCommandError(output, context);
599
+ return de_CommandError(output, context);
814
600
  }
815
601
  const contents = map({
816
602
  $metadata: deserializeMetadata(output),
@@ -822,34 +608,9 @@ export const de_CreateGroupChannelCommand = async (output, context) => {
822
608
  Object.assign(contents, doc);
823
609
  return contents;
824
610
  };
825
- const de_CreateGroupChannelCommandError = async (output, context) => {
826
- const parsedOutput = {
827
- ...output,
828
- body: await parseErrorBody(output.body, context)
829
- };
830
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
831
- switch (errorCode) {
832
- case "ChannelAlreadyExistException":
833
- case "wildix.xbees.conversations#ChannelAlreadyExistException":
834
- throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
835
- case "ForbiddenException":
836
- case "smithy.framework#ForbiddenException":
837
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
838
- case "ValidationException":
839
- case "smithy.framework#ValidationException":
840
- throw await de_ValidationExceptionRes(parsedOutput, context);
841
- default:
842
- const parsedBody = parsedOutput.body;
843
- return throwDefaultError({
844
- output,
845
- parsedBody,
846
- errorCode
847
- });
848
- }
849
- };
850
611
  export const de_DeleteChannelCommand = async (output, context) => {
851
612
  if (output.statusCode !== 200 && output.statusCode >= 300) {
852
- return de_DeleteChannelCommandError(output, context);
613
+ return de_CommandError(output, context);
853
614
  }
854
615
  const contents = map({
855
616
  $metadata: deserializeMetadata(output),
@@ -857,34 +618,9 @@ export const de_DeleteChannelCommand = async (output, context) => {
857
618
  await collectBody(output.body, context);
858
619
  return contents;
859
620
  };
860
- const de_DeleteChannelCommandError = async (output, context) => {
861
- const parsedOutput = {
862
- ...output,
863
- body: await parseErrorBody(output.body, context)
864
- };
865
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
- switch (errorCode) {
867
- case "ChannelNotFoundException":
868
- case "wildix.xbees.conversations#ChannelNotFoundException":
869
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
870
- case "ForbiddenException":
871
- case "smithy.framework#ForbiddenException":
872
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
873
- case "ValidationException":
874
- case "smithy.framework#ValidationException":
875
- throw await de_ValidationExceptionRes(parsedOutput, context);
876
- default:
877
- const parsedBody = parsedOutput.body;
878
- return throwDefaultError({
879
- output,
880
- parsedBody,
881
- errorCode
882
- });
883
- }
884
- };
885
621
  export const de_DeleteChannelMemberCommand = async (output, context) => {
886
622
  if (output.statusCode !== 200 && output.statusCode >= 300) {
887
- return de_DeleteChannelMemberCommandError(output, context);
623
+ return de_CommandError(output, context);
888
624
  }
889
625
  const contents = map({
890
626
  $metadata: deserializeMetadata(output),
@@ -892,37 +628,9 @@ export const de_DeleteChannelMemberCommand = async (output, context) => {
892
628
  await collectBody(output.body, context);
893
629
  return contents;
894
630
  };
895
- const de_DeleteChannelMemberCommandError = async (output, context) => {
896
- const parsedOutput = {
897
- ...output,
898
- body: await parseErrorBody(output.body, context)
899
- };
900
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
901
- switch (errorCode) {
902
- case "ChannelNotFoundException":
903
- case "wildix.xbees.conversations#ChannelNotFoundException":
904
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
905
- case "ForbiddenException":
906
- case "smithy.framework#ForbiddenException":
907
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
908
- case "MemberNotFoundException":
909
- case "wildix.xbees.conversations#MemberNotFoundException":
910
- throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
911
- case "ValidationException":
912
- case "smithy.framework#ValidationException":
913
- throw await de_ValidationExceptionRes(parsedOutput, context);
914
- default:
915
- const parsedBody = parsedOutput.body;
916
- return throwDefaultError({
917
- output,
918
- parsedBody,
919
- errorCode
920
- });
921
- }
922
- };
923
631
  export const de_DeleteMessageCommand = async (output, context) => {
924
632
  if (output.statusCode !== 200 && output.statusCode >= 300) {
925
- return de_DeleteMessageCommandError(output, context);
633
+ return de_CommandError(output, context);
926
634
  }
927
635
  const contents = map({
928
636
  $metadata: deserializeMetadata(output),
@@ -930,37 +638,9 @@ export const de_DeleteMessageCommand = async (output, context) => {
930
638
  await collectBody(output.body, context);
931
639
  return contents;
932
640
  };
933
- const de_DeleteMessageCommandError = async (output, context) => {
934
- const parsedOutput = {
935
- ...output,
936
- body: await parseErrorBody(output.body, context)
937
- };
938
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
939
- switch (errorCode) {
940
- case "ChannelNotFoundException":
941
- case "wildix.xbees.conversations#ChannelNotFoundException":
942
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
943
- case "ForbiddenException":
944
- case "smithy.framework#ForbiddenException":
945
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
946
- case "MessageNotFoundException":
947
- case "wildix.xbees.conversations#MessageNotFoundException":
948
- throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
949
- case "ValidationException":
950
- case "smithy.framework#ValidationException":
951
- throw await de_ValidationExceptionRes(parsedOutput, context);
952
- default:
953
- const parsedBody = parsedOutput.body;
954
- return throwDefaultError({
955
- output,
956
- parsedBody,
957
- errorCode
958
- });
959
- }
960
- };
961
641
  export const de_DeleteMessageReactionCommand = async (output, context) => {
962
642
  if (output.statusCode !== 200 && output.statusCode >= 300) {
963
- return de_DeleteMessageReactionCommandError(output, context);
643
+ return de_CommandError(output, context);
964
644
  }
965
645
  const contents = map({
966
646
  $metadata: deserializeMetadata(output),
@@ -968,37 +648,9 @@ export const de_DeleteMessageReactionCommand = async (output, context) => {
968
648
  await collectBody(output.body, context);
969
649
  return contents;
970
650
  };
971
- const de_DeleteMessageReactionCommandError = async (output, context) => {
972
- const parsedOutput = {
973
- ...output,
974
- body: await parseErrorBody(output.body, context)
975
- };
976
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
977
- switch (errorCode) {
978
- case "ChannelNotFoundException":
979
- case "wildix.xbees.conversations#ChannelNotFoundException":
980
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
981
- case "ForbiddenException":
982
- case "smithy.framework#ForbiddenException":
983
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
984
- case "MessageNotFoundException":
985
- case "wildix.xbees.conversations#MessageNotFoundException":
986
- throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
987
- case "ValidationException":
988
- case "smithy.framework#ValidationException":
989
- throw await de_ValidationExceptionRes(parsedOutput, context);
990
- default:
991
- const parsedBody = parsedOutput.body;
992
- return throwDefaultError({
993
- output,
994
- parsedBody,
995
- errorCode
996
- });
997
- }
998
- };
999
651
  export const de_GetChannelCommand = async (output, context) => {
1000
652
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1001
- return de_GetChannelCommandError(output, context);
653
+ return de_CommandError(output, context);
1002
654
  }
1003
655
  const contents = map({
1004
656
  $metadata: deserializeMetadata(output),
@@ -1010,34 +662,9 @@ export const de_GetChannelCommand = async (output, context) => {
1010
662
  Object.assign(contents, doc);
1011
663
  return contents;
1012
664
  };
1013
- const de_GetChannelCommandError = async (output, context) => {
1014
- const parsedOutput = {
1015
- ...output,
1016
- body: await parseErrorBody(output.body, context)
1017
- };
1018
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1019
- switch (errorCode) {
1020
- case "ChannelNotFoundException":
1021
- case "wildix.xbees.conversations#ChannelNotFoundException":
1022
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1023
- case "ForbiddenException":
1024
- case "smithy.framework#ForbiddenException":
1025
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1026
- case "ValidationException":
1027
- case "smithy.framework#ValidationException":
1028
- throw await de_ValidationExceptionRes(parsedOutput, context);
1029
- default:
1030
- const parsedBody = parsedOutput.body;
1031
- return throwDefaultError({
1032
- output,
1033
- parsedBody,
1034
- errorCode
1035
- });
1036
- }
1037
- };
1038
665
  export const de_GetChannelMemberCommand = async (output, context) => {
1039
666
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1040
- return de_GetChannelMemberCommandError(output, context);
667
+ return de_CommandError(output, context);
1041
668
  }
1042
669
  const contents = map({
1043
670
  $metadata: deserializeMetadata(output),
@@ -1050,37 +677,9 @@ export const de_GetChannelMemberCommand = async (output, context) => {
1050
677
  Object.assign(contents, doc);
1051
678
  return contents;
1052
679
  };
1053
- const de_GetChannelMemberCommandError = async (output, context) => {
1054
- const parsedOutput = {
1055
- ...output,
1056
- body: await parseErrorBody(output.body, context)
1057
- };
1058
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1059
- switch (errorCode) {
1060
- case "ChannelNotFoundException":
1061
- case "wildix.xbees.conversations#ChannelNotFoundException":
1062
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1063
- case "ForbiddenException":
1064
- case "smithy.framework#ForbiddenException":
1065
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1066
- case "MemberNotFoundException":
1067
- case "wildix.xbees.conversations#MemberNotFoundException":
1068
- throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
1069
- case "ValidationException":
1070
- case "smithy.framework#ValidationException":
1071
- throw await de_ValidationExceptionRes(parsedOutput, context);
1072
- default:
1073
- const parsedBody = parsedOutput.body;
1074
- return throwDefaultError({
1075
- output,
1076
- parsedBody,
1077
- errorCode
1078
- });
1079
- }
1080
- };
1081
680
  export const de_GetDirectChannelIdCommand = async (output, context) => {
1082
681
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1083
- return de_GetDirectChannelIdCommandError(output, context);
682
+ return de_CommandError(output, context);
1084
683
  }
1085
684
  const contents = map({
1086
685
  $metadata: deserializeMetadata(output),
@@ -1092,31 +691,9 @@ export const de_GetDirectChannelIdCommand = async (output, context) => {
1092
691
  Object.assign(contents, doc);
1093
692
  return contents;
1094
693
  };
1095
- const de_GetDirectChannelIdCommandError = async (output, context) => {
1096
- const parsedOutput = {
1097
- ...output,
1098
- body: await parseErrorBody(output.body, context)
1099
- };
1100
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1101
- switch (errorCode) {
1102
- case "ForbiddenException":
1103
- case "smithy.framework#ForbiddenException":
1104
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1105
- case "ValidationException":
1106
- case "smithy.framework#ValidationException":
1107
- throw await de_ValidationExceptionRes(parsedOutput, context);
1108
- default:
1109
- const parsedBody = parsedOutput.body;
1110
- return throwDefaultError({
1111
- output,
1112
- parsedBody,
1113
- errorCode
1114
- });
1115
- }
1116
- };
1117
694
  export const de_GetMessageCommand = async (output, context) => {
1118
695
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
- return de_GetMessageCommandError(output, context);
696
+ return de_CommandError(output, context);
1120
697
  }
1121
698
  const contents = map({
1122
699
  $metadata: deserializeMetadata(output),
@@ -1128,34 +705,9 @@ export const de_GetMessageCommand = async (output, context) => {
1128
705
  Object.assign(contents, doc);
1129
706
  return contents;
1130
707
  };
1131
- const de_GetMessageCommandError = async (output, context) => {
1132
- const parsedOutput = {
1133
- ...output,
1134
- body: await parseErrorBody(output.body, context)
1135
- };
1136
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1137
- switch (errorCode) {
1138
- case "ChannelNotFoundException":
1139
- case "wildix.xbees.conversations#ChannelNotFoundException":
1140
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1141
- case "ForbiddenException":
1142
- case "smithy.framework#ForbiddenException":
1143
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1144
- case "ValidationException":
1145
- case "smithy.framework#ValidationException":
1146
- throw await de_ValidationExceptionRes(parsedOutput, context);
1147
- default:
1148
- const parsedBody = parsedOutput.body;
1149
- return throwDefaultError({
1150
- output,
1151
- parsedBody,
1152
- errorCode
1153
- });
1154
- }
1155
- };
1156
708
  export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
1157
709
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1158
- return de_GetOrCreateDirectChannelCommandError(output, context);
710
+ return de_CommandError(output, context);
1159
711
  }
1160
712
  const contents = map({
1161
713
  $metadata: deserializeMetadata(output),
@@ -1167,70 +719,19 @@ export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
1167
719
  Object.assign(contents, doc);
1168
720
  return contents;
1169
721
  };
1170
- const de_GetOrCreateDirectChannelCommandError = async (output, context) => {
1171
- const parsedOutput = {
1172
- ...output,
1173
- body: await parseErrorBody(output.body, context)
1174
- };
1175
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1176
- switch (errorCode) {
1177
- case "ForbiddenException":
1178
- case "smithy.framework#ForbiddenException":
1179
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1180
- case "ValidationException":
1181
- case "smithy.framework#ValidationException":
1182
- throw await de_ValidationExceptionRes(parsedOutput, context);
1183
- default:
1184
- const parsedBody = parsedOutput.body;
1185
- return throwDefaultError({
1186
- output,
1187
- parsedBody,
1188
- errorCode
1189
- });
1190
- }
1191
- };
1192
722
  export const de_HideChannelCommand = async (output, context) => {
1193
723
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1194
- return de_HideChannelCommandError(output, context);
724
+ return de_CommandError(output, context);
1195
725
  }
1196
726
  const contents = map({
1197
727
  $metadata: deserializeMetadata(output),
1198
728
  });
1199
- const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
1200
- const doc = take(data, {
1201
- 'channel': _json,
1202
- });
1203
- Object.assign(contents, doc);
729
+ await collectBody(output.body, context);
1204
730
  return contents;
1205
731
  };
1206
- const de_HideChannelCommandError = async (output, context) => {
1207
- const parsedOutput = {
1208
- ...output,
1209
- body: await parseErrorBody(output.body, context)
1210
- };
1211
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1212
- switch (errorCode) {
1213
- case "ChannelNotFoundException":
1214
- case "wildix.xbees.conversations#ChannelNotFoundException":
1215
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1216
- case "ForbiddenException":
1217
- case "smithy.framework#ForbiddenException":
1218
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1219
- case "ValidationException":
1220
- case "smithy.framework#ValidationException":
1221
- throw await de_ValidationExceptionRes(parsedOutput, context);
1222
- default:
1223
- const parsedBody = parsedOutput.body;
1224
- return throwDefaultError({
1225
- output,
1226
- parsedBody,
1227
- errorCode
1228
- });
1229
- }
1230
- };
1231
732
  export const de_InviteCommand = async (output, context) => {
1232
733
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1233
- return de_InviteCommandError(output, context);
734
+ return de_CommandError(output, context);
1234
735
  }
1235
736
  const contents = map({
1236
737
  $metadata: deserializeMetadata(output),
@@ -1242,31 +743,9 @@ export const de_InviteCommand = async (output, context) => {
1242
743
  Object.assign(contents, doc);
1243
744
  return contents;
1244
745
  };
1245
- const de_InviteCommandError = async (output, context) => {
1246
- const parsedOutput = {
1247
- ...output,
1248
- body: await parseErrorBody(output.body, context)
1249
- };
1250
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1251
- switch (errorCode) {
1252
- case "ForbiddenException":
1253
- case "smithy.framework#ForbiddenException":
1254
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1255
- case "ValidationException":
1256
- case "smithy.framework#ValidationException":
1257
- throw await de_ValidationExceptionRes(parsedOutput, context);
1258
- default:
1259
- const parsedBody = parsedOutput.body;
1260
- return throwDefaultError({
1261
- output,
1262
- parsedBody,
1263
- errorCode
1264
- });
1265
- }
1266
- };
1267
746
  export const de_JoinChannelCommand = async (output, context) => {
1268
747
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1269
- return de_JoinChannelCommandError(output, context);
748
+ return de_CommandError(output, context);
1270
749
  }
1271
750
  const contents = map({
1272
751
  $metadata: deserializeMetadata(output),
@@ -1278,34 +757,9 @@ export const de_JoinChannelCommand = async (output, context) => {
1278
757
  Object.assign(contents, doc);
1279
758
  return contents;
1280
759
  };
1281
- const de_JoinChannelCommandError = async (output, context) => {
1282
- const parsedOutput = {
1283
- ...output,
1284
- body: await parseErrorBody(output.body, context)
1285
- };
1286
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1287
- switch (errorCode) {
1288
- case "ChannelNotFoundException":
1289
- case "wildix.xbees.conversations#ChannelNotFoundException":
1290
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1291
- case "ForbiddenException":
1292
- case "smithy.framework#ForbiddenException":
1293
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1294
- case "ValidationException":
1295
- case "smithy.framework#ValidationException":
1296
- throw await de_ValidationExceptionRes(parsedOutput, context);
1297
- default:
1298
- const parsedBody = parsedOutput.body;
1299
- return throwDefaultError({
1300
- output,
1301
- parsedBody,
1302
- errorCode
1303
- });
1304
- }
1305
- };
1306
760
  export const de_LeaveChannelCommand = async (output, context) => {
1307
761
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1308
- return de_LeaveChannelCommandError(output, context);
762
+ return de_CommandError(output, context);
1309
763
  }
1310
764
  const contents = map({
1311
765
  $metadata: deserializeMetadata(output),
@@ -1313,34 +767,9 @@ export const de_LeaveChannelCommand = async (output, context) => {
1313
767
  await collectBody(output.body, context);
1314
768
  return contents;
1315
769
  };
1316
- const de_LeaveChannelCommandError = async (output, context) => {
1317
- const parsedOutput = {
1318
- ...output,
1319
- body: await parseErrorBody(output.body, context)
1320
- };
1321
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1322
- switch (errorCode) {
1323
- case "ChannelNotFoundException":
1324
- case "wildix.xbees.conversations#ChannelNotFoundException":
1325
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1326
- case "ForbiddenException":
1327
- case "smithy.framework#ForbiddenException":
1328
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1329
- case "ValidationException":
1330
- case "smithy.framework#ValidationException":
1331
- throw await de_ValidationExceptionRes(parsedOutput, context);
1332
- default:
1333
- const parsedBody = parsedOutput.body;
1334
- return throwDefaultError({
1335
- output,
1336
- parsedBody,
1337
- errorCode
1338
- });
1339
- }
1340
- };
1341
770
  export const de_ListChannelMembersCommand = async (output, context) => {
1342
771
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1343
- return de_ListChannelMembersCommandError(output, context);
772
+ return de_CommandError(output, context);
1344
773
  }
1345
774
  const contents = map({
1346
775
  $metadata: deserializeMetadata(output),
@@ -1353,34 +782,9 @@ export const de_ListChannelMembersCommand = async (output, context) => {
1353
782
  Object.assign(contents, doc);
1354
783
  return contents;
1355
784
  };
1356
- const de_ListChannelMembersCommandError = async (output, context) => {
1357
- const parsedOutput = {
1358
- ...output,
1359
- body: await parseErrorBody(output.body, context)
1360
- };
1361
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1362
- switch (errorCode) {
1363
- case "ChannelNotFoundException":
1364
- case "wildix.xbees.conversations#ChannelNotFoundException":
1365
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1366
- case "ForbiddenException":
1367
- case "smithy.framework#ForbiddenException":
1368
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1369
- case "ValidationException":
1370
- case "smithy.framework#ValidationException":
1371
- throw await de_ValidationExceptionRes(parsedOutput, context);
1372
- default:
1373
- const parsedBody = parsedOutput.body;
1374
- return throwDefaultError({
1375
- output,
1376
- parsedBody,
1377
- errorCode
1378
- });
1379
- }
1380
- };
1381
785
  export const de_ListChannelsCommand = async (output, context) => {
1382
786
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1383
- return de_ListChannelsCommandError(output, context);
787
+ return de_CommandError(output, context);
1384
788
  }
1385
789
  const contents = map({
1386
790
  $metadata: deserializeMetadata(output),
@@ -1392,31 +796,9 @@ export const de_ListChannelsCommand = async (output, context) => {
1392
796
  Object.assign(contents, doc);
1393
797
  return contents;
1394
798
  };
1395
- const de_ListChannelsCommandError = async (output, context) => {
1396
- const parsedOutput = {
1397
- ...output,
1398
- body: await parseErrorBody(output.body, context)
1399
- };
1400
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1401
- switch (errorCode) {
1402
- case "ForbiddenException":
1403
- case "smithy.framework#ForbiddenException":
1404
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1405
- case "ValidationException":
1406
- case "smithy.framework#ValidationException":
1407
- throw await de_ValidationExceptionRes(parsedOutput, context);
1408
- default:
1409
- const parsedBody = parsedOutput.body;
1410
- return throwDefaultError({
1411
- output,
1412
- parsedBody,
1413
- errorCode
1414
- });
1415
- }
1416
- };
1417
799
  export const de_ListMessageReactionsCommand = async (output, context) => {
1418
800
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1419
- return de_ListMessageReactionsCommandError(output, context);
801
+ return de_CommandError(output, context);
1420
802
  }
1421
803
  const contents = map({
1422
804
  $metadata: deserializeMetadata(output),
@@ -1428,34 +810,9 @@ export const de_ListMessageReactionsCommand = async (output, context) => {
1428
810
  Object.assign(contents, doc);
1429
811
  return contents;
1430
812
  };
1431
- const de_ListMessageReactionsCommandError = async (output, context) => {
1432
- const parsedOutput = {
1433
- ...output,
1434
- body: await parseErrorBody(output.body, context)
1435
- };
1436
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1437
- switch (errorCode) {
1438
- case "ChannelNotFoundException":
1439
- case "wildix.xbees.conversations#ChannelNotFoundException":
1440
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1441
- case "ForbiddenException":
1442
- case "smithy.framework#ForbiddenException":
1443
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1444
- case "ValidationException":
1445
- case "smithy.framework#ValidationException":
1446
- throw await de_ValidationExceptionRes(parsedOutput, context);
1447
- default:
1448
- const parsedBody = parsedOutput.body;
1449
- return throwDefaultError({
1450
- output,
1451
- parsedBody,
1452
- errorCode
1453
- });
1454
- }
1455
- };
1456
813
  export const de_ListMessagesCommand = async (output, context) => {
1457
814
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1458
- return de_ListMessagesCommandError(output, context);
815
+ return de_CommandError(output, context);
1459
816
  }
1460
817
  const contents = map({
1461
818
  $metadata: deserializeMetadata(output),
@@ -1467,34 +824,9 @@ export const de_ListMessagesCommand = async (output, context) => {
1467
824
  Object.assign(contents, doc);
1468
825
  return contents;
1469
826
  };
1470
- const de_ListMessagesCommandError = async (output, context) => {
1471
- const parsedOutput = {
1472
- ...output,
1473
- body: await parseErrorBody(output.body, context)
1474
- };
1475
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1476
- switch (errorCode) {
1477
- case "ChannelNotFoundException":
1478
- case "wildix.xbees.conversations#ChannelNotFoundException":
1479
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1480
- case "ForbiddenException":
1481
- case "smithy.framework#ForbiddenException":
1482
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1483
- case "ValidationException":
1484
- case "smithy.framework#ValidationException":
1485
- throw await de_ValidationExceptionRes(parsedOutput, context);
1486
- default:
1487
- const parsedBody = parsedOutput.body;
1488
- return throwDefaultError({
1489
- output,
1490
- parsedBody,
1491
- errorCode
1492
- });
1493
- }
1494
- };
1495
827
  export const de_MarkReadCommand = async (output, context) => {
1496
828
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1497
- return de_MarkReadCommandError(output, context);
829
+ return de_CommandError(output, context);
1498
830
  }
1499
831
  const contents = map({
1500
832
  $metadata: deserializeMetadata(output),
@@ -1502,34 +834,9 @@ export const de_MarkReadCommand = async (output, context) => {
1502
834
  await collectBody(output.body, context);
1503
835
  return contents;
1504
836
  };
1505
- const de_MarkReadCommandError = async (output, context) => {
1506
- const parsedOutput = {
1507
- ...output,
1508
- body: await parseErrorBody(output.body, context)
1509
- };
1510
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1511
- switch (errorCode) {
1512
- case "ChannelNotFoundException":
1513
- case "wildix.xbees.conversations#ChannelNotFoundException":
1514
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1515
- case "ForbiddenException":
1516
- case "smithy.framework#ForbiddenException":
1517
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1518
- case "ValidationException":
1519
- case "smithy.framework#ValidationException":
1520
- throw await de_ValidationExceptionRes(parsedOutput, context);
1521
- default:
1522
- const parsedBody = parsedOutput.body;
1523
- return throwDefaultError({
1524
- output,
1525
- parsedBody,
1526
- errorCode
1527
- });
1528
- }
1529
- };
1530
837
  export const de_PartialUpdateChannelCommand = async (output, context) => {
1531
838
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1532
- return de_PartialUpdateChannelCommandError(output, context);
839
+ return de_CommandError(output, context);
1533
840
  }
1534
841
  const contents = map({
1535
842
  $metadata: deserializeMetadata(output),
@@ -1541,34 +848,9 @@ export const de_PartialUpdateChannelCommand = async (output, context) => {
1541
848
  Object.assign(contents, doc);
1542
849
  return contents;
1543
850
  };
1544
- const de_PartialUpdateChannelCommandError = async (output, context) => {
1545
- const parsedOutput = {
1546
- ...output,
1547
- body: await parseErrorBody(output.body, context)
1548
- };
1549
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1550
- switch (errorCode) {
1551
- case "ChannelNotFoundException":
1552
- case "wildix.xbees.conversations#ChannelNotFoundException":
1553
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1554
- case "ForbiddenException":
1555
- case "smithy.framework#ForbiddenException":
1556
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1557
- case "ValidationException":
1558
- case "smithy.framework#ValidationException":
1559
- throw await de_ValidationExceptionRes(parsedOutput, context);
1560
- default:
1561
- const parsedBody = parsedOutput.body;
1562
- return throwDefaultError({
1563
- output,
1564
- parsedBody,
1565
- errorCode
1566
- });
1567
- }
1568
- };
1569
851
  export const de_PartialUpdateMessageCommand = async (output, context) => {
1570
852
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1571
- return de_PartialUpdateMessageCommandError(output, context);
853
+ return de_CommandError(output, context);
1572
854
  }
1573
855
  const contents = map({
1574
856
  $metadata: deserializeMetadata(output),
@@ -1580,37 +862,9 @@ export const de_PartialUpdateMessageCommand = async (output, context) => {
1580
862
  Object.assign(contents, doc);
1581
863
  return contents;
1582
864
  };
1583
- const de_PartialUpdateMessageCommandError = async (output, context) => {
1584
- const parsedOutput = {
1585
- ...output,
1586
- body: await parseErrorBody(output.body, context)
1587
- };
1588
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1589
- switch (errorCode) {
1590
- case "ChannelNotFoundException":
1591
- case "wildix.xbees.conversations#ChannelNotFoundException":
1592
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1593
- case "ForbiddenException":
1594
- case "smithy.framework#ForbiddenException":
1595
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1596
- case "MessageNotFoundException":
1597
- case "wildix.xbees.conversations#MessageNotFoundException":
1598
- throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
1599
- case "ValidationException":
1600
- case "smithy.framework#ValidationException":
1601
- throw await de_ValidationExceptionRes(parsedOutput, context);
1602
- default:
1603
- const parsedBody = parsedOutput.body;
1604
- return throwDefaultError({
1605
- output,
1606
- parsedBody,
1607
- errorCode
1608
- });
1609
- }
1610
- };
1611
865
  export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
1612
866
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1613
- return de_ScheduleExternalFlagAdjustmentJobCommandError(output, context);
867
+ return de_CommandError(output, context);
1614
868
  }
1615
869
  const contents = map({
1616
870
  $metadata: deserializeMetadata(output),
@@ -1618,34 +872,9 @@ export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, contex
1618
872
  await collectBody(output.body, context);
1619
873
  return contents;
1620
874
  };
1621
- const de_ScheduleExternalFlagAdjustmentJobCommandError = async (output, context) => {
1622
- const parsedOutput = {
1623
- ...output,
1624
- body: await parseErrorBody(output.body, context)
1625
- };
1626
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1627
- switch (errorCode) {
1628
- case "ConversationsServiceException":
1629
- case "wildix.xbees.conversations#ConversationsServiceException":
1630
- throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
1631
- case "ForbiddenException":
1632
- case "smithy.framework#ForbiddenException":
1633
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1634
- case "ValidationException":
1635
- case "smithy.framework#ValidationException":
1636
- throw await de_ValidationExceptionRes(parsedOutput, context);
1637
- default:
1638
- const parsedBody = parsedOutput.body;
1639
- return throwDefaultError({
1640
- output,
1641
- parsedBody,
1642
- errorCode
1643
- });
1644
- }
1645
- };
1646
875
  export const de_SendGiphyCommand = async (output, context) => {
1647
876
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1648
- return de_SendGiphyCommandError(output, context);
877
+ return de_CommandError(output, context);
1649
878
  }
1650
879
  const contents = map({
1651
880
  $metadata: deserializeMetadata(output),
@@ -1657,34 +886,9 @@ export const de_SendGiphyCommand = async (output, context) => {
1657
886
  Object.assign(contents, doc);
1658
887
  return contents;
1659
888
  };
1660
- const de_SendGiphyCommandError = async (output, context) => {
1661
- const parsedOutput = {
1662
- ...output,
1663
- body: await parseErrorBody(output.body, context)
1664
- };
1665
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1666
- switch (errorCode) {
1667
- case "ChannelNotFoundException":
1668
- case "wildix.xbees.conversations#ChannelNotFoundException":
1669
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1670
- case "ForbiddenException":
1671
- case "smithy.framework#ForbiddenException":
1672
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1673
- case "ValidationException":
1674
- case "smithy.framework#ValidationException":
1675
- throw await de_ValidationExceptionRes(parsedOutput, context);
1676
- default:
1677
- const parsedBody = parsedOutput.body;
1678
- return throwDefaultError({
1679
- output,
1680
- parsedBody,
1681
- errorCode
1682
- });
1683
- }
1684
- };
1685
889
  export const de_SendMessageCommand = async (output, context) => {
1686
890
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1687
- return de_SendMessageCommandError(output, context);
891
+ return de_CommandError(output, context);
1688
892
  }
1689
893
  const contents = map({
1690
894
  $metadata: deserializeMetadata(output),
@@ -1696,34 +900,9 @@ export const de_SendMessageCommand = async (output, context) => {
1696
900
  Object.assign(contents, doc);
1697
901
  return contents;
1698
902
  };
1699
- const de_SendMessageCommandError = async (output, context) => {
1700
- const parsedOutput = {
1701
- ...output,
1702
- body: await parseErrorBody(output.body, context)
1703
- };
1704
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1705
- switch (errorCode) {
1706
- case "ChannelNotFoundException":
1707
- case "wildix.xbees.conversations#ChannelNotFoundException":
1708
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1709
- case "ForbiddenException":
1710
- case "smithy.framework#ForbiddenException":
1711
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1712
- case "ValidationException":
1713
- case "smithy.framework#ValidationException":
1714
- throw await de_ValidationExceptionRes(parsedOutput, context);
1715
- default:
1716
- const parsedBody = parsedOutput.body;
1717
- return throwDefaultError({
1718
- output,
1719
- parsedBody,
1720
- errorCode
1721
- });
1722
- }
1723
- };
1724
903
  export const de_SendMessageReactionCommand = async (output, context) => {
1725
904
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1726
- return de_SendMessageReactionCommandError(output, context);
905
+ return de_CommandError(output, context);
1727
906
  }
1728
907
  const contents = map({
1729
908
  $metadata: deserializeMetadata(output),
@@ -1731,34 +910,9 @@ export const de_SendMessageReactionCommand = async (output, context) => {
1731
910
  await collectBody(output.body, context);
1732
911
  return contents;
1733
912
  };
1734
- const de_SendMessageReactionCommandError = async (output, context) => {
1735
- const parsedOutput = {
1736
- ...output,
1737
- body: await parseErrorBody(output.body, context)
1738
- };
1739
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1740
- switch (errorCode) {
1741
- case "ChannelNotFoundException":
1742
- case "wildix.xbees.conversations#ChannelNotFoundException":
1743
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1744
- case "ForbiddenException":
1745
- case "smithy.framework#ForbiddenException":
1746
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1747
- case "ValidationException":
1748
- case "smithy.framework#ValidationException":
1749
- throw await de_ValidationExceptionRes(parsedOutput, context);
1750
- default:
1751
- const parsedBody = parsedOutput.body;
1752
- return throwDefaultError({
1753
- output,
1754
- parsedBody,
1755
- errorCode
1756
- });
1757
- }
1758
- };
1759
913
  export const de_SendTypingStartCommand = async (output, context) => {
1760
914
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1761
- return de_SendTypingStartCommandError(output, context);
915
+ return de_CommandError(output, context);
1762
916
  }
1763
917
  const contents = map({
1764
918
  $metadata: deserializeMetadata(output),
@@ -1766,34 +920,9 @@ export const de_SendTypingStartCommand = async (output, context) => {
1766
920
  await collectBody(output.body, context);
1767
921
  return contents;
1768
922
  };
1769
- const de_SendTypingStartCommandError = async (output, context) => {
1770
- const parsedOutput = {
1771
- ...output,
1772
- body: await parseErrorBody(output.body, context)
1773
- };
1774
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1775
- switch (errorCode) {
1776
- case "ChannelNotFoundException":
1777
- case "wildix.xbees.conversations#ChannelNotFoundException":
1778
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1779
- case "ForbiddenException":
1780
- case "smithy.framework#ForbiddenException":
1781
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1782
- case "ValidationException":
1783
- case "smithy.framework#ValidationException":
1784
- throw await de_ValidationExceptionRes(parsedOutput, context);
1785
- default:
1786
- const parsedBody = parsedOutput.body;
1787
- return throwDefaultError({
1788
- output,
1789
- parsedBody,
1790
- errorCode
1791
- });
1792
- }
1793
- };
1794
923
  export const de_SendTypingStopCommand = async (output, context) => {
1795
924
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1796
- return de_SendTypingStopCommandError(output, context);
925
+ return de_CommandError(output, context);
1797
926
  }
1798
927
  const contents = map({
1799
928
  $metadata: deserializeMetadata(output),
@@ -1801,73 +930,19 @@ export const de_SendTypingStopCommand = async (output, context) => {
1801
930
  await collectBody(output.body, context);
1802
931
  return contents;
1803
932
  };
1804
- const de_SendTypingStopCommandError = async (output, context) => {
1805
- const parsedOutput = {
1806
- ...output,
1807
- body: await parseErrorBody(output.body, context)
1808
- };
1809
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1810
- switch (errorCode) {
1811
- case "ChannelNotFoundException":
1812
- case "wildix.xbees.conversations#ChannelNotFoundException":
1813
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1814
- case "ForbiddenException":
1815
- case "smithy.framework#ForbiddenException":
1816
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1817
- case "ValidationException":
1818
- case "smithy.framework#ValidationException":
1819
- throw await de_ValidationExceptionRes(parsedOutput, context);
1820
- default:
1821
- const parsedBody = parsedOutput.body;
1822
- return throwDefaultError({
1823
- output,
1824
- parsedBody,
1825
- errorCode
1826
- });
1827
- }
1828
- };
1829
933
  export const de_ShowChannelCommand = async (output, context) => {
1830
934
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1831
- return de_ShowChannelCommandError(output, context);
935
+ return de_CommandError(output, context);
1832
936
  }
1833
937
  const contents = map({
1834
938
  $metadata: deserializeMetadata(output),
1835
939
  });
1836
- const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
1837
- const doc = take(data, {
1838
- 'channel': _json,
1839
- });
1840
- Object.assign(contents, doc);
940
+ await collectBody(output.body, context);
1841
941
  return contents;
1842
942
  };
1843
- const de_ShowChannelCommandError = async (output, context) => {
1844
- const parsedOutput = {
1845
- ...output,
1846
- body: await parseErrorBody(output.body, context)
1847
- };
1848
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1849
- switch (errorCode) {
1850
- case "ChannelNotFoundException":
1851
- case "wildix.xbees.conversations#ChannelNotFoundException":
1852
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1853
- case "ForbiddenException":
1854
- case "smithy.framework#ForbiddenException":
1855
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1856
- case "ValidationException":
1857
- case "smithy.framework#ValidationException":
1858
- throw await de_ValidationExceptionRes(parsedOutput, context);
1859
- default:
1860
- const parsedBody = parsedOutput.body;
1861
- return throwDefaultError({
1862
- output,
1863
- parsedBody,
1864
- errorCode
1865
- });
1866
- }
1867
- };
1868
943
  export const de_UpdateChannelCommand = async (output, context) => {
1869
944
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1870
- return de_UpdateChannelCommandError(output, context);
945
+ return de_CommandError(output, context);
1871
946
  }
1872
947
  const contents = map({
1873
948
  $metadata: deserializeMetadata(output),
@@ -1879,34 +954,9 @@ export const de_UpdateChannelCommand = async (output, context) => {
1879
954
  Object.assign(contents, doc);
1880
955
  return contents;
1881
956
  };
1882
- const de_UpdateChannelCommandError = async (output, context) => {
1883
- const parsedOutput = {
1884
- ...output,
1885
- body: await parseErrorBody(output.body, context)
1886
- };
1887
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1888
- switch (errorCode) {
1889
- case "ChannelNotFoundException":
1890
- case "wildix.xbees.conversations#ChannelNotFoundException":
1891
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1892
- case "ForbiddenException":
1893
- case "smithy.framework#ForbiddenException":
1894
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1895
- case "ValidationException":
1896
- case "smithy.framework#ValidationException":
1897
- throw await de_ValidationExceptionRes(parsedOutput, context);
1898
- default:
1899
- const parsedBody = parsedOutput.body;
1900
- return throwDefaultError({
1901
- output,
1902
- parsedBody,
1903
- errorCode
1904
- });
1905
- }
1906
- };
1907
957
  export const de_UpdateMessageCommand = async (output, context) => {
1908
958
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1909
- return de_UpdateMessageCommandError(output, context);
959
+ return de_CommandError(output, context);
1910
960
  }
1911
961
  const contents = map({
1912
962
  $metadata: deserializeMetadata(output),
@@ -1918,7 +968,7 @@ export const de_UpdateMessageCommand = async (output, context) => {
1918
968
  Object.assign(contents, doc);
1919
969
  return contents;
1920
970
  };
1921
- const de_UpdateMessageCommandError = async (output, context) => {
971
+ const de_CommandError = async (output, context) => {
1922
972
  const parsedOutput = {
1923
973
  ...output,
1924
974
  body: await parseErrorBody(output.body, context)
@@ -1931,12 +981,24 @@ const de_UpdateMessageCommandError = async (output, context) => {
1931
981
  case "ForbiddenException":
1932
982
  case "smithy.framework#ForbiddenException":
1933
983
  throw await de_ForbiddenExceptionRes(parsedOutput, context);
1934
- case "MessageNotFoundException":
1935
- case "wildix.xbees.conversations#MessageNotFoundException":
1936
- throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
984
+ case "MemberAlreadyExistException":
985
+ case "wildix.xbees.conversations#MemberAlreadyExistException":
986
+ throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
1937
987
  case "ValidationException":
1938
988
  case "smithy.framework#ValidationException":
1939
989
  throw await de_ValidationExceptionRes(parsedOutput, context);
990
+ case "ChannelAlreadyExistException":
991
+ case "wildix.xbees.conversations#ChannelAlreadyExistException":
992
+ throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
993
+ case "MemberNotFoundException":
994
+ case "wildix.xbees.conversations#MemberNotFoundException":
995
+ throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
996
+ case "MessageNotFoundException":
997
+ case "wildix.xbees.conversations#MessageNotFoundException":
998
+ throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
999
+ case "ConversationsServiceException":
1000
+ case "wildix.xbees.conversations#ConversationsServiceException":
1001
+ throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
1940
1002
  default:
1941
1003
  const parsedBody = parsedOutput.body;
1942
1004
  return throwDefaultError({
@@ -2064,6 +1126,11 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2064
1126
  (!Object.getOwnPropertyNames(value).includes("length") ||
2065
1127
  value.length != 0) &&
2066
1128
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1129
+ const _l = "limit";
1130
+ const _o = "offset";
1131
+ const _s = "silent";
1132
+ const _u = "user";
1133
+ const _uI = "userId";
2067
1134
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
2068
1135
  if (encoded.length) {
2069
1136
  return JSON.parse(encoded);