@wildix/xbees-conversations-client 1.0.35 → 1.0.37

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 +346 -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 +347 -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 +8 -19
  78. package/dist-types/commands/AddChannelMembersCommand.d.ts +8 -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 +8 -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 +8 -20
  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 +69 -46
  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,59 @@
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
+ const query = map({
13
+ [_u]: [, input[_uI]],
14
+ });
12
15
  let body;
13
16
  body = JSON.stringify(take(input, {
14
17
  'memberId': [],
15
18
  'memberToInvite': _ => _json(_),
16
19
  'silent': [],
17
20
  }));
18
- return new __HttpRequest({
19
- protocol,
20
- hostname,
21
- port,
22
- method: "POST",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
21
+ b.m("POST")
22
+ .h(headers)
23
+ .q(query)
24
+ .b(body);
25
+ return b.build();
27
26
  };
28
27
  export const se_AddChannelMembersCommand = async (input, context) => {
29
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
+ const b = rb(input, context);
30
29
  const headers = {
31
30
  'content-type': 'application/json',
32
31
  };
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);
32
+ b.bp("/v2/conversations/channels/{channelId}/members");
33
+ b.p('channelId', () => input.channelId, '{channelId}', false);
34
+ const query = map({
35
+ [_u]: [, input[_uI]],
36
+ });
35
37
  let body;
36
38
  body = JSON.stringify(take(input, {
37
39
  'members': _ => _json(_),
38
40
  'membersToInvite': _ => _json(_),
39
41
  'silent': [],
40
42
  }));
41
- return new __HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "PUT",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
43
+ b.m("PUT")
44
+ .h(headers)
45
+ .q(query)
46
+ .b(body);
47
+ return b.build();
50
48
  };
51
49
  export const se_CreateGroupChannelCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
50
+ const b = rb(input, context);
53
51
  const headers = {
54
52
  'content-type': 'application/json',
55
53
  };
56
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/group";
54
+ b.bp("/v2/conversations/group");
57
55
  const query = map({
58
- "user": [, input.userId],
56
+ [_u]: [, input[_uI]],
59
57
  });
60
58
  let body;
61
59
  body = JSON.stringify(take(input, {
@@ -69,496 +67,383 @@ export const se_CreateGroupChannelCommand = async (input, context) => {
69
67
  'pictureColor': [],
70
68
  'subject': [],
71
69
  }));
72
- return new __HttpRequest({
73
- protocol,
74
- hostname,
75
- port,
76
- method: "POST",
77
- headers,
78
- path: resolvedPath,
79
- query,
80
- body,
81
- });
70
+ b.m("POST")
71
+ .h(headers)
72
+ .q(query)
73
+ .b(body);
74
+ return b.build();
82
75
  };
83
76
  export const se_DeleteChannelCommand = async (input, context) => {
84
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = rb(input, context);
85
78
  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);
79
+ b.bp("/v2/conversations/channels/{channelId}");
80
+ b.p('channelId', () => input.channelId, '{channelId}', false);
88
81
  let body;
89
- return new __HttpRequest({
90
- protocol,
91
- hostname,
92
- port,
93
- method: "DELETE",
94
- headers,
95
- path: resolvedPath,
96
- body,
97
- });
82
+ b.m("DELETE")
83
+ .h(headers)
84
+ .b(body);
85
+ return b.build();
98
86
  };
99
87
  export const se_DeleteChannelMemberCommand = async (input, context) => {
100
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
88
+ const b = rb(input, context);
101
89
  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);
90
+ b.bp("/v2/conversations/channels/{channelId}/members/{memberId}");
91
+ b.p('channelId', () => input.channelId, '{channelId}', false);
92
+ b.p('memberId', () => input.memberId, '{memberId}', false);
105
93
  const query = map({
106
- "silent": [() => input.silent !== void 0, () => (input.silent.toString())],
94
+ [_u]: [, input[_uI]],
95
+ [_s]: [() => input.silent !== void 0, () => (input[_s].toString())],
107
96
  });
108
97
  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
- });
98
+ b.m("DELETE")
99
+ .h(headers)
100
+ .q(query)
101
+ .b(body);
102
+ return b.build();
119
103
  };
120
104
  export const se_DeleteMessageCommand = async (input, context) => {
121
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
105
+ const b = rb(input, context);
122
106
  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);
107
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
108
+ b.p('channelId', () => input.channelId, '{channelId}', false);
109
+ b.p('messageId', () => input.messageId, '{messageId}', false);
126
110
  const query = map({
127
- "user": [, input.userId],
111
+ [_u]: [, input[_uI]],
128
112
  });
129
113
  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
- });
114
+ b.m("DELETE")
115
+ .h(headers)
116
+ .q(query)
117
+ .b(body);
118
+ return b.build();
140
119
  };
141
120
  export const se_DeleteMessageReactionCommand = async (input, context) => {
142
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
121
+ const b = rb(input, context);
143
122
  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);
123
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions/{reactionType}");
124
+ b.p('channelId', () => input.channelId, '{channelId}', false);
125
+ b.p('messageId', () => input.messageId, '{messageId}', false);
126
+ b.p('reactionType', () => input.reactionType, '{reactionType}', false);
148
127
  const query = map({
149
- "user": [, input.userId],
128
+ [_u]: [, input[_uI]],
150
129
  });
151
130
  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
- });
131
+ b.m("DELETE")
132
+ .h(headers)
133
+ .q(query)
134
+ .b(body);
135
+ return b.build();
162
136
  };
163
137
  export const se_GetChannelCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = rb(input, context);
165
139
  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);
140
+ b.bp("/v2/conversations/channels/{channelId}");
141
+ b.p('channelId', () => input.channelId, '{channelId}', false);
168
142
  let body;
169
- return new __HttpRequest({
170
- protocol,
171
- hostname,
172
- port,
173
- method: "GET",
174
- headers,
175
- path: resolvedPath,
176
- body,
177
- });
143
+ b.m("GET")
144
+ .h(headers)
145
+ .b(body);
146
+ return b.build();
178
147
  };
179
148
  export const se_GetChannelMemberCommand = async (input, context) => {
180
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = rb(input, context);
181
150
  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);
151
+ b.bp("/v2/conversations/channels/{channelId}/members/{memberId}");
152
+ b.p('channelId', () => input.channelId, '{channelId}', false);
153
+ b.p('memberId', () => input.memberId, '{memberId}', false);
185
154
  let body;
186
- return new __HttpRequest({
187
- protocol,
188
- hostname,
189
- port,
190
- method: "GET",
191
- headers,
192
- path: resolvedPath,
193
- body,
194
- });
155
+ b.m("GET")
156
+ .h(headers)
157
+ .b(body);
158
+ return b.build();
195
159
  };
196
160
  export const se_GetDirectChannelIdCommand = async (input, context) => {
197
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
161
+ const b = rb(input, context);
198
162
  const headers = {
199
163
  'content-type': 'application/json',
200
164
  };
201
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_channel_id";
165
+ b.bp("/v2/conversations/direct/get_channel_id");
202
166
  const query = map({
203
- "user": [, input.userId],
167
+ [_u]: [, input[_uI]],
204
168
  });
205
169
  let body;
206
170
  body = JSON.stringify(take(input, {
207
- 'participantId': [],
208
- 'participantToInvite': _ => _json(_),
171
+ 'memberId': [],
172
+ 'memberToInvite': _ => _json(_),
209
173
  }));
210
- return new __HttpRequest({
211
- protocol,
212
- hostname,
213
- port,
214
- method: "POST",
215
- headers,
216
- path: resolvedPath,
217
- query,
218
- body,
219
- });
174
+ b.m("POST")
175
+ .h(headers)
176
+ .q(query)
177
+ .b(body);
178
+ return b.build();
220
179
  };
221
180
  export const se_GetMessageCommand = async (input, context) => {
222
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
+ const b = rb(input, context);
223
182
  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);
183
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
184
+ b.p('channelId', () => input.channelId, '{channelId}', false);
185
+ b.p('messageId', () => input.messageId, '{messageId}', false);
227
186
  let body;
228
- return new __HttpRequest({
229
- protocol,
230
- hostname,
231
- port,
232
- method: "GET",
233
- headers,
234
- path: resolvedPath,
235
- body,
236
- });
187
+ b.m("GET")
188
+ .h(headers)
189
+ .b(body);
190
+ return b.build();
237
191
  };
238
192
  export const se_GetOrCreateDirectChannelCommand = async (input, context) => {
239
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
193
+ const b = rb(input, context);
240
194
  const headers = {
241
195
  'content-type': 'application/json',
242
196
  };
243
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/direct/get_or_create_channel";
197
+ b.bp("/v2/conversations/direct/get_or_create_channel");
244
198
  const query = map({
245
- "user": [, input.userId],
199
+ [_u]: [, input[_uI]],
246
200
  });
247
201
  let body;
248
202
  body = JSON.stringify(take(input, {
249
203
  'memberId': [],
250
204
  'memberToInvite': _ => _json(_),
251
205
  }));
252
- return new __HttpRequest({
253
- protocol,
254
- hostname,
255
- port,
256
- method: "POST",
257
- headers,
258
- path: resolvedPath,
259
- query,
260
- body,
261
- });
206
+ b.m("POST")
207
+ .h(headers)
208
+ .q(query)
209
+ .b(body);
210
+ return b.build();
262
211
  };
263
212
  export const se_HideChannelCommand = async (input, context) => {
264
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = rb(input, context);
265
214
  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);
215
+ b.bp("/v2/conversations/channels/{channelId}/hide");
216
+ b.p('channelId', () => input.channelId, '{channelId}', false);
268
217
  const query = map({
269
- "user": [, input.userId],
218
+ [_u]: [, input[_uI]],
270
219
  });
271
220
  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
- });
221
+ b.m("POST")
222
+ .h(headers)
223
+ .q(query)
224
+ .b(body);
225
+ return b.build();
282
226
  };
283
227
  export const se_InviteCommand = async (input, context) => {
284
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
228
+ const b = rb(input, context);
285
229
  const headers = {
286
230
  'content-type': 'application/json',
287
231
  };
288
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/invite";
232
+ b.bp("/v2/conversations/invite");
289
233
  let body;
290
234
  body = JSON.stringify(take(input, {
291
235
  'invitees': _ => _json(_),
292
236
  }));
293
- return new __HttpRequest({
294
- protocol,
295
- hostname,
296
- port,
297
- method: "POST",
298
- headers,
299
- path: resolvedPath,
300
- body,
301
- });
237
+ b.m("POST")
238
+ .h(headers)
239
+ .b(body);
240
+ return b.build();
302
241
  };
303
242
  export const se_JoinChannelCommand = async (input, context) => {
304
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
243
+ const b = rb(input, context);
305
244
  const headers = {
306
245
  'content-type': 'application/json',
307
246
  };
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);
247
+ b.bp("/v2/conversations/channels/{channelId}/join");
248
+ b.p('channelId', () => input.channelId, '{channelId}', false);
310
249
  const query = map({
311
- "user": [, input.userId],
250
+ [_u]: [, input[_uI]],
312
251
  });
313
252
  let body;
314
253
  body = JSON.stringify(take(input, {
315
254
  'silent': [],
316
255
  }));
317
- return new __HttpRequest({
318
- protocol,
319
- hostname,
320
- port,
321
- method: "POST",
322
- headers,
323
- path: resolvedPath,
324
- query,
325
- body,
326
- });
256
+ b.m("POST")
257
+ .h(headers)
258
+ .q(query)
259
+ .b(body);
260
+ return b.build();
327
261
  };
328
262
  export const se_LeaveChannelCommand = async (input, context) => {
329
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
263
+ const b = rb(input, context);
330
264
  const headers = {
331
265
  'content-type': 'application/json',
332
266
  };
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);
267
+ b.bp("/v2/conversations/channels/{channelId}/leave");
268
+ b.p('channelId', () => input.channelId, '{channelId}', false);
335
269
  const query = map({
336
- "user": [, input.userId],
270
+ [_u]: [, input[_uI]],
337
271
  });
338
272
  let body;
339
273
  body = JSON.stringify(take(input, {
340
274
  'silent': [],
341
275
  }));
342
- return new __HttpRequest({
343
- protocol,
344
- hostname,
345
- port,
346
- method: "POST",
347
- headers,
348
- path: resolvedPath,
349
- query,
350
- body,
351
- });
276
+ b.m("POST")
277
+ .h(headers)
278
+ .q(query)
279
+ .b(body);
280
+ return b.build();
352
281
  };
353
282
  export const se_ListChannelMembersCommand = async (input, context) => {
354
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
283
+ const b = rb(input, context);
355
284
  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);
285
+ b.bp("/v2/conversations/channels/{channelId}/members");
286
+ b.p('channelId', () => input.channelId, '{channelId}', false);
358
287
  const query = map({
359
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
360
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
288
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
289
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
361
290
  });
362
291
  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
- });
292
+ b.m("GET")
293
+ .h(headers)
294
+ .q(query)
295
+ .b(body);
296
+ return b.build();
373
297
  };
374
298
  export const se_ListChannelsCommand = async (input, context) => {
375
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
299
+ const b = rb(input, context);
376
300
  const headers = {};
377
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels";
301
+ b.bp("/v2/conversations/channels");
378
302
  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())],
303
+ [_u]: [, input[_uI]],
304
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
305
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
382
306
  });
383
307
  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
- });
308
+ b.m("GET")
309
+ .h(headers)
310
+ .q(query)
311
+ .b(body);
312
+ return b.build();
394
313
  };
395
314
  export const se_ListMessageReactionsCommand = async (input, context) => {
396
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
315
+ const b = rb(input, context);
397
316
  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);
317
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions");
318
+ b.p('channelId', () => input.channelId, '{channelId}', false);
319
+ b.p('messageId', () => input.messageId, '{messageId}', false);
401
320
  const query = map({
402
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
403
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
321
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
322
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
404
323
  });
405
324
  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
- });
325
+ b.m("GET")
326
+ .h(headers)
327
+ .q(query)
328
+ .b(body);
329
+ return b.build();
416
330
  };
417
331
  export const se_ListMessagesCommand = async (input, context) => {
418
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
332
+ const b = rb(input, context);
419
333
  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);
334
+ b.bp("/v2/conversations/channels/{channelId}/messages");
335
+ b.p('channelId', () => input.channelId, '{channelId}', false);
422
336
  const query = map({
423
- "limit": [() => input.limit !== void 0, () => (input.limit.toString())],
424
- "offset": [() => input.offset !== void 0, () => (input.offset.toString())],
337
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
338
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
425
339
  });
426
340
  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
- });
341
+ b.m("GET")
342
+ .h(headers)
343
+ .q(query)
344
+ .b(body);
345
+ return b.build();
437
346
  };
438
347
  export const se_MarkReadCommand = async (input, context) => {
439
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
348
+ const b = rb(input, context);
440
349
  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);
350
+ b.bp("/v2/conversations/channels/{channelId}/read");
351
+ b.p('channelId', () => input.channelId, '{channelId}', false);
443
352
  const query = map({
444
- "user": [, input.userId],
353
+ [_u]: [, input[_uI]],
445
354
  });
446
355
  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
- });
356
+ b.m("POST")
357
+ .h(headers)
358
+ .q(query)
359
+ .b(body);
360
+ return b.build();
457
361
  };
458
362
  export const se_PartialUpdateChannelCommand = async (input, context) => {
459
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
363
+ const b = rb(input, context);
460
364
  const headers = {
461
365
  'content-type': 'application/json',
462
366
  };
463
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
464
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
367
+ b.bp("/v2/conversations/channels/{channelId}");
368
+ b.p('channelId', () => input.channelId, '{channelId}', false);
465
369
  const query = map({
466
- "user": [, input.userId],
370
+ [_u]: [, input[_uI]],
467
371
  });
468
372
  let body;
469
373
  body = JSON.stringify(take(input, {
470
374
  'set': _ => _json(_),
375
+ 'silent': [],
471
376
  'unset': _ => _json(_),
472
377
  }));
473
- return new __HttpRequest({
474
- protocol,
475
- hostname,
476
- port,
477
- method: "PATCH",
478
- headers,
479
- path: resolvedPath,
480
- query,
481
- body,
482
- });
378
+ b.m("PATCH")
379
+ .h(headers)
380
+ .q(query)
381
+ .b(body);
382
+ return b.build();
483
383
  };
484
384
  export const se_PartialUpdateMessageCommand = async (input, context) => {
485
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
385
+ const b = rb(input, context);
486
386
  const headers = {
487
387
  'content-type': 'application/json',
488
388
  };
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);
389
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
390
+ b.p('channelId', () => input.channelId, '{channelId}', false);
391
+ b.p('messageId', () => input.messageId, '{messageId}', false);
492
392
  let body;
493
393
  body = JSON.stringify(take(input, {
494
394
  'set': _ => _json(_),
495
395
  'unset': _ => _json(_),
496
396
  }));
497
- return new __HttpRequest({
498
- protocol,
499
- hostname,
500
- port,
501
- method: "PATCH",
502
- headers,
503
- path: resolvedPath,
504
- body,
505
- });
397
+ b.m("PATCH")
398
+ .h(headers)
399
+ .b(body);
400
+ return b.build();
506
401
  };
507
402
  export const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
508
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
403
+ const b = rb(input, context);
509
404
  const headers = {
510
405
  'content-type': 'application/json',
511
406
  };
512
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/schedule_external_flag_adjustment_job";
407
+ b.bp("/v2/conversations/schedule_external_flag_adjustment_job");
513
408
  let body;
514
409
  body = JSON.stringify(take(input, {
515
410
  'userId': [],
516
411
  }));
517
- return new __HttpRequest({
518
- protocol,
519
- hostname,
520
- port,
521
- method: "POST",
522
- headers,
523
- path: resolvedPath,
524
- body,
525
- });
412
+ b.m("POST")
413
+ .h(headers)
414
+ .b(body);
415
+ return b.build();
526
416
  };
527
417
  export const se_SendGiphyCommand = async (input, context) => {
528
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
418
+ const b = rb(input, context);
529
419
  const headers = {
530
420
  'content-type': 'application/json',
531
421
  };
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);
422
+ b.bp("/v2/conversations/channels/{channelId}/send_giphy");
423
+ b.p('channelId', () => input.channelId, '{channelId}', false);
534
424
  const query = map({
535
- "user": [, input.userId],
425
+ [_u]: [, input[_uI]],
536
426
  });
537
427
  let body;
538
428
  body = JSON.stringify(take(input, {
539
429
  'giphy': _ => _json(_),
540
430
  'messageId': [],
541
431
  }));
542
- return new __HttpRequest({
543
- protocol,
544
- hostname,
545
- port,
546
- method: "POST",
547
- headers,
548
- path: resolvedPath,
549
- query,
550
- body,
551
- });
432
+ b.m("POST")
433
+ .h(headers)
434
+ .q(query)
435
+ .b(body);
436
+ return b.build();
552
437
  };
553
438
  export const se_SendMessageCommand = async (input, context) => {
554
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
439
+ const b = rb(input, context);
555
440
  const headers = {
556
441
  'content-type': 'application/json',
557
442
  };
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);
443
+ b.bp("/v2/conversations/channels/{channelId}/messages");
444
+ b.p('channelId', () => input.channelId, '{channelId}', false);
560
445
  const query = map({
561
- "user": [, input.userId],
446
+ [_u]: [, input[_uI]],
562
447
  });
563
448
  let body;
564
449
  body = JSON.stringify(take(input, {
@@ -569,112 +454,87 @@ export const se_SendMessageCommand = async (input, context) => {
569
454
  'quote': _ => _json(_),
570
455
  'text': [],
571
456
  }));
572
- return new __HttpRequest({
573
- protocol,
574
- hostname,
575
- port,
576
- method: "POST",
577
- headers,
578
- path: resolvedPath,
579
- query,
580
- body,
581
- });
457
+ b.m("POST")
458
+ .h(headers)
459
+ .q(query)
460
+ .b(body);
461
+ return b.build();
582
462
  };
583
463
  export const se_SendMessageReactionCommand = async (input, context) => {
584
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
464
+ const b = rb(input, context);
585
465
  const headers = {
586
466
  'content-type': 'application/json',
587
467
  };
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);
468
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions");
469
+ b.p('channelId', () => input.channelId, '{channelId}', false);
470
+ b.p('messageId', () => input.messageId, '{messageId}', false);
591
471
  const query = map({
592
- "user": [, input.userId],
472
+ [_u]: [, input[_uI]],
593
473
  });
594
474
  let body;
595
475
  body = JSON.stringify(take(input, {
596
476
  'reactionType': [],
597
477
  }));
598
- return new __HttpRequest({
599
- protocol,
600
- hostname,
601
- port,
602
- method: "POST",
603
- headers,
604
- path: resolvedPath,
605
- query,
606
- body,
607
- });
478
+ b.m("POST")
479
+ .h(headers)
480
+ .q(query)
481
+ .b(body);
482
+ return b.build();
608
483
  };
609
484
  export const se_SendTypingStartCommand = async (input, context) => {
610
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
485
+ const b = rb(input, context);
611
486
  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);
487
+ b.bp("/v2/conversations/channels/{channelId}/send_typing_start");
488
+ b.p('channelId', () => input.channelId, '{channelId}', false);
614
489
  const query = map({
615
- "user": [, input.userId],
490
+ [_u]: [, input[_uI]],
616
491
  });
617
492
  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
- });
493
+ b.m("POST")
494
+ .h(headers)
495
+ .q(query)
496
+ .b(body);
497
+ return b.build();
628
498
  };
629
499
  export const se_SendTypingStopCommand = async (input, context) => {
630
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
500
+ const b = rb(input, context);
631
501
  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);
502
+ b.bp("/v2/conversations/channels/{channelId}/send_typing_stop");
503
+ b.p('channelId', () => input.channelId, '{channelId}', false);
634
504
  const query = map({
635
- "user": [, input.userId],
505
+ [_u]: [, input[_uI]],
636
506
  });
637
507
  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
- });
508
+ b.m("POST")
509
+ .h(headers)
510
+ .q(query)
511
+ .b(body);
512
+ return b.build();
648
513
  };
649
514
  export const se_ShowChannelCommand = async (input, context) => {
650
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
515
+ const b = rb(input, context);
651
516
  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);
517
+ b.bp("/v2/conversations/channels/{channelId}/show");
518
+ b.p('channelId', () => input.channelId, '{channelId}', false);
654
519
  const query = map({
655
- "user": [, input.userId],
520
+ [_u]: [, input[_uI]],
656
521
  });
657
522
  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
- });
523
+ b.m("POST")
524
+ .h(headers)
525
+ .q(query)
526
+ .b(body);
527
+ return b.build();
668
528
  };
669
529
  export const se_UpdateChannelCommand = async (input, context) => {
670
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
530
+ const b = rb(input, context);
671
531
  const headers = {
672
532
  'content-type': 'application/json',
673
533
  };
674
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/conversations/channels/{channelId}";
675
- resolvedPath = __resolvedPath(resolvedPath, input, 'channelId', () => input.channelId, '{channelId}', false);
534
+ b.bp("/v2/conversations/channels/{channelId}");
535
+ b.p('channelId', () => input.channelId, '{channelId}', false);
676
536
  const query = map({
677
- "user": [, input.userId],
537
+ [_u]: [, input[_uI]],
678
538
  });
679
539
  let body;
680
540
  body = JSON.stringify(take(input, {
@@ -683,27 +543,23 @@ export const se_UpdateChannelCommand = async (input, context) => {
683
543
  'description': [],
684
544
  'picture': [],
685
545
  'pictureColor': [],
546
+ 'silent': [],
686
547
  'subject': [],
687
548
  }));
688
- return new __HttpRequest({
689
- protocol,
690
- hostname,
691
- port,
692
- method: "PUT",
693
- headers,
694
- path: resolvedPath,
695
- query,
696
- body,
697
- });
549
+ b.m("PUT")
550
+ .h(headers)
551
+ .q(query)
552
+ .b(body);
553
+ return b.build();
698
554
  };
699
555
  export const se_UpdateMessageCommand = async (input, context) => {
700
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
556
+ const b = rb(input, context);
701
557
  const headers = {
702
558
  'content-type': 'application/json',
703
559
  };
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);
560
+ b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
561
+ b.p('channelId', () => input.channelId, '{channelId}', false);
562
+ b.p('messageId', () => input.messageId, '{messageId}', false);
707
563
  let body;
708
564
  body = JSON.stringify(take(input, {
709
565
  'attachments': _ => _json(_),
@@ -712,19 +568,14 @@ export const se_UpdateMessageCommand = async (input, context) => {
712
568
  'quote': _ => _json(_),
713
569
  'text': [],
714
570
  }));
715
- return new __HttpRequest({
716
- protocol,
717
- hostname,
718
- port,
719
- method: "PUT",
720
- headers,
721
- path: resolvedPath,
722
- body,
723
- });
571
+ b.m("PUT")
572
+ .h(headers)
573
+ .b(body);
574
+ return b.build();
724
575
  };
725
576
  export const de_AddChannelMemberCommand = async (output, context) => {
726
577
  if (output.statusCode !== 200 && output.statusCode >= 300) {
727
- return de_AddChannelMemberCommandError(output, context);
578
+ return de_CommandError(output, context);
728
579
  }
729
580
  const contents = map({
730
581
  $metadata: deserializeMetadata(output),
@@ -737,37 +588,9 @@ export const de_AddChannelMemberCommand = async (output, context) => {
737
588
  Object.assign(contents, doc);
738
589
  return contents;
739
590
  };
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
591
  export const de_AddChannelMembersCommand = async (output, context) => {
769
592
  if (output.statusCode !== 200 && output.statusCode >= 300) {
770
- return de_AddChannelMembersCommandError(output, context);
593
+ return de_CommandError(output, context);
771
594
  }
772
595
  const contents = map({
773
596
  $metadata: deserializeMetadata(output),
@@ -780,37 +603,9 @@ export const de_AddChannelMembersCommand = async (output, context) => {
780
603
  Object.assign(contents, doc);
781
604
  return contents;
782
605
  };
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
606
  export const de_CreateGroupChannelCommand = async (output, context) => {
812
607
  if (output.statusCode !== 200 && output.statusCode >= 300) {
813
- return de_CreateGroupChannelCommandError(output, context);
608
+ return de_CommandError(output, context);
814
609
  }
815
610
  const contents = map({
816
611
  $metadata: deserializeMetadata(output),
@@ -822,34 +617,9 @@ export const de_CreateGroupChannelCommand = async (output, context) => {
822
617
  Object.assign(contents, doc);
823
618
  return contents;
824
619
  };
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
620
  export const de_DeleteChannelCommand = async (output, context) => {
851
621
  if (output.statusCode !== 200 && output.statusCode >= 300) {
852
- return de_DeleteChannelCommandError(output, context);
622
+ return de_CommandError(output, context);
853
623
  }
854
624
  const contents = map({
855
625
  $metadata: deserializeMetadata(output),
@@ -857,34 +627,9 @@ export const de_DeleteChannelCommand = async (output, context) => {
857
627
  await collectBody(output.body, context);
858
628
  return contents;
859
629
  };
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
630
  export const de_DeleteChannelMemberCommand = async (output, context) => {
886
631
  if (output.statusCode !== 200 && output.statusCode >= 300) {
887
- return de_DeleteChannelMemberCommandError(output, context);
632
+ return de_CommandError(output, context);
888
633
  }
889
634
  const contents = map({
890
635
  $metadata: deserializeMetadata(output),
@@ -892,37 +637,9 @@ export const de_DeleteChannelMemberCommand = async (output, context) => {
892
637
  await collectBody(output.body, context);
893
638
  return contents;
894
639
  };
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
640
  export const de_DeleteMessageCommand = async (output, context) => {
924
641
  if (output.statusCode !== 200 && output.statusCode >= 300) {
925
- return de_DeleteMessageCommandError(output, context);
642
+ return de_CommandError(output, context);
926
643
  }
927
644
  const contents = map({
928
645
  $metadata: deserializeMetadata(output),
@@ -930,37 +647,9 @@ export const de_DeleteMessageCommand = async (output, context) => {
930
647
  await collectBody(output.body, context);
931
648
  return contents;
932
649
  };
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
650
  export const de_DeleteMessageReactionCommand = async (output, context) => {
962
651
  if (output.statusCode !== 200 && output.statusCode >= 300) {
963
- return de_DeleteMessageReactionCommandError(output, context);
652
+ return de_CommandError(output, context);
964
653
  }
965
654
  const contents = map({
966
655
  $metadata: deserializeMetadata(output),
@@ -968,37 +657,9 @@ export const de_DeleteMessageReactionCommand = async (output, context) => {
968
657
  await collectBody(output.body, context);
969
658
  return contents;
970
659
  };
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
660
  export const de_GetChannelCommand = async (output, context) => {
1000
661
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1001
- return de_GetChannelCommandError(output, context);
662
+ return de_CommandError(output, context);
1002
663
  }
1003
664
  const contents = map({
1004
665
  $metadata: deserializeMetadata(output),
@@ -1010,34 +671,9 @@ export const de_GetChannelCommand = async (output, context) => {
1010
671
  Object.assign(contents, doc);
1011
672
  return contents;
1012
673
  };
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
674
  export const de_GetChannelMemberCommand = async (output, context) => {
1039
675
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1040
- return de_GetChannelMemberCommandError(output, context);
676
+ return de_CommandError(output, context);
1041
677
  }
1042
678
  const contents = map({
1043
679
  $metadata: deserializeMetadata(output),
@@ -1050,37 +686,9 @@ export const de_GetChannelMemberCommand = async (output, context) => {
1050
686
  Object.assign(contents, doc);
1051
687
  return contents;
1052
688
  };
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
689
  export const de_GetDirectChannelIdCommand = async (output, context) => {
1082
690
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1083
- return de_GetDirectChannelIdCommandError(output, context);
691
+ return de_CommandError(output, context);
1084
692
  }
1085
693
  const contents = map({
1086
694
  $metadata: deserializeMetadata(output),
@@ -1092,31 +700,9 @@ export const de_GetDirectChannelIdCommand = async (output, context) => {
1092
700
  Object.assign(contents, doc);
1093
701
  return contents;
1094
702
  };
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
703
  export const de_GetMessageCommand = async (output, context) => {
1118
704
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
- return de_GetMessageCommandError(output, context);
705
+ return de_CommandError(output, context);
1120
706
  }
1121
707
  const contents = map({
1122
708
  $metadata: deserializeMetadata(output),
@@ -1128,34 +714,9 @@ export const de_GetMessageCommand = async (output, context) => {
1128
714
  Object.assign(contents, doc);
1129
715
  return contents;
1130
716
  };
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
717
  export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
1157
718
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1158
- return de_GetOrCreateDirectChannelCommandError(output, context);
719
+ return de_CommandError(output, context);
1159
720
  }
1160
721
  const contents = map({
1161
722
  $metadata: deserializeMetadata(output),
@@ -1167,70 +728,19 @@ export const de_GetOrCreateDirectChannelCommand = async (output, context) => {
1167
728
  Object.assign(contents, doc);
1168
729
  return contents;
1169
730
  };
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
731
  export const de_HideChannelCommand = async (output, context) => {
1193
732
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1194
- return de_HideChannelCommandError(output, context);
733
+ return de_CommandError(output, context);
1195
734
  }
1196
735
  const contents = map({
1197
736
  $metadata: deserializeMetadata(output),
1198
737
  });
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);
738
+ await collectBody(output.body, context);
1204
739
  return contents;
1205
740
  };
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
741
  export const de_InviteCommand = async (output, context) => {
1232
742
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1233
- return de_InviteCommandError(output, context);
743
+ return de_CommandError(output, context);
1234
744
  }
1235
745
  const contents = map({
1236
746
  $metadata: deserializeMetadata(output),
@@ -1242,31 +752,9 @@ export const de_InviteCommand = async (output, context) => {
1242
752
  Object.assign(contents, doc);
1243
753
  return contents;
1244
754
  };
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
755
  export const de_JoinChannelCommand = async (output, context) => {
1268
756
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1269
- return de_JoinChannelCommandError(output, context);
757
+ return de_CommandError(output, context);
1270
758
  }
1271
759
  const contents = map({
1272
760
  $metadata: deserializeMetadata(output),
@@ -1278,34 +766,9 @@ export const de_JoinChannelCommand = async (output, context) => {
1278
766
  Object.assign(contents, doc);
1279
767
  return contents;
1280
768
  };
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
769
  export const de_LeaveChannelCommand = async (output, context) => {
1307
770
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1308
- return de_LeaveChannelCommandError(output, context);
771
+ return de_CommandError(output, context);
1309
772
  }
1310
773
  const contents = map({
1311
774
  $metadata: deserializeMetadata(output),
@@ -1313,34 +776,9 @@ export const de_LeaveChannelCommand = async (output, context) => {
1313
776
  await collectBody(output.body, context);
1314
777
  return contents;
1315
778
  };
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
779
  export const de_ListChannelMembersCommand = async (output, context) => {
1342
780
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1343
- return de_ListChannelMembersCommandError(output, context);
781
+ return de_CommandError(output, context);
1344
782
  }
1345
783
  const contents = map({
1346
784
  $metadata: deserializeMetadata(output),
@@ -1353,34 +791,9 @@ export const de_ListChannelMembersCommand = async (output, context) => {
1353
791
  Object.assign(contents, doc);
1354
792
  return contents;
1355
793
  };
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
794
  export const de_ListChannelsCommand = async (output, context) => {
1382
795
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1383
- return de_ListChannelsCommandError(output, context);
796
+ return de_CommandError(output, context);
1384
797
  }
1385
798
  const contents = map({
1386
799
  $metadata: deserializeMetadata(output),
@@ -1392,31 +805,9 @@ export const de_ListChannelsCommand = async (output, context) => {
1392
805
  Object.assign(contents, doc);
1393
806
  return contents;
1394
807
  };
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
808
  export const de_ListMessageReactionsCommand = async (output, context) => {
1418
809
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1419
- return de_ListMessageReactionsCommandError(output, context);
810
+ return de_CommandError(output, context);
1420
811
  }
1421
812
  const contents = map({
1422
813
  $metadata: deserializeMetadata(output),
@@ -1428,34 +819,9 @@ export const de_ListMessageReactionsCommand = async (output, context) => {
1428
819
  Object.assign(contents, doc);
1429
820
  return contents;
1430
821
  };
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
822
  export const de_ListMessagesCommand = async (output, context) => {
1457
823
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1458
- return de_ListMessagesCommandError(output, context);
824
+ return de_CommandError(output, context);
1459
825
  }
1460
826
  const contents = map({
1461
827
  $metadata: deserializeMetadata(output),
@@ -1467,34 +833,9 @@ export const de_ListMessagesCommand = async (output, context) => {
1467
833
  Object.assign(contents, doc);
1468
834
  return contents;
1469
835
  };
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
836
  export const de_MarkReadCommand = async (output, context) => {
1496
837
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1497
- return de_MarkReadCommandError(output, context);
838
+ return de_CommandError(output, context);
1498
839
  }
1499
840
  const contents = map({
1500
841
  $metadata: deserializeMetadata(output),
@@ -1502,34 +843,9 @@ export const de_MarkReadCommand = async (output, context) => {
1502
843
  await collectBody(output.body, context);
1503
844
  return contents;
1504
845
  };
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
846
  export const de_PartialUpdateChannelCommand = async (output, context) => {
1531
847
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1532
- return de_PartialUpdateChannelCommandError(output, context);
848
+ return de_CommandError(output, context);
1533
849
  }
1534
850
  const contents = map({
1535
851
  $metadata: deserializeMetadata(output),
@@ -1541,34 +857,9 @@ export const de_PartialUpdateChannelCommand = async (output, context) => {
1541
857
  Object.assign(contents, doc);
1542
858
  return contents;
1543
859
  };
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
860
  export const de_PartialUpdateMessageCommand = async (output, context) => {
1570
861
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1571
- return de_PartialUpdateMessageCommandError(output, context);
862
+ return de_CommandError(output, context);
1572
863
  }
1573
864
  const contents = map({
1574
865
  $metadata: deserializeMetadata(output),
@@ -1580,37 +871,9 @@ export const de_PartialUpdateMessageCommand = async (output, context) => {
1580
871
  Object.assign(contents, doc);
1581
872
  return contents;
1582
873
  };
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
874
  export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
1612
875
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1613
- return de_ScheduleExternalFlagAdjustmentJobCommandError(output, context);
876
+ return de_CommandError(output, context);
1614
877
  }
1615
878
  const contents = map({
1616
879
  $metadata: deserializeMetadata(output),
@@ -1618,34 +881,9 @@ export const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, contex
1618
881
  await collectBody(output.body, context);
1619
882
  return contents;
1620
883
  };
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
884
  export const de_SendGiphyCommand = async (output, context) => {
1647
885
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1648
- return de_SendGiphyCommandError(output, context);
886
+ return de_CommandError(output, context);
1649
887
  }
1650
888
  const contents = map({
1651
889
  $metadata: deserializeMetadata(output),
@@ -1657,34 +895,9 @@ export const de_SendGiphyCommand = async (output, context) => {
1657
895
  Object.assign(contents, doc);
1658
896
  return contents;
1659
897
  };
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
898
  export const de_SendMessageCommand = async (output, context) => {
1686
899
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1687
- return de_SendMessageCommandError(output, context);
900
+ return de_CommandError(output, context);
1688
901
  }
1689
902
  const contents = map({
1690
903
  $metadata: deserializeMetadata(output),
@@ -1696,34 +909,9 @@ export const de_SendMessageCommand = async (output, context) => {
1696
909
  Object.assign(contents, doc);
1697
910
  return contents;
1698
911
  };
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
912
  export const de_SendMessageReactionCommand = async (output, context) => {
1725
913
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1726
- return de_SendMessageReactionCommandError(output, context);
914
+ return de_CommandError(output, context);
1727
915
  }
1728
916
  const contents = map({
1729
917
  $metadata: deserializeMetadata(output),
@@ -1731,34 +919,9 @@ export const de_SendMessageReactionCommand = async (output, context) => {
1731
919
  await collectBody(output.body, context);
1732
920
  return contents;
1733
921
  };
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
922
  export const de_SendTypingStartCommand = async (output, context) => {
1760
923
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1761
- return de_SendTypingStartCommandError(output, context);
924
+ return de_CommandError(output, context);
1762
925
  }
1763
926
  const contents = map({
1764
927
  $metadata: deserializeMetadata(output),
@@ -1766,34 +929,9 @@ export const de_SendTypingStartCommand = async (output, context) => {
1766
929
  await collectBody(output.body, context);
1767
930
  return contents;
1768
931
  };
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
932
  export const de_SendTypingStopCommand = async (output, context) => {
1795
933
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1796
- return de_SendTypingStopCommandError(output, context);
934
+ return de_CommandError(output, context);
1797
935
  }
1798
936
  const contents = map({
1799
937
  $metadata: deserializeMetadata(output),
@@ -1801,73 +939,19 @@ export const de_SendTypingStopCommand = async (output, context) => {
1801
939
  await collectBody(output.body, context);
1802
940
  return contents;
1803
941
  };
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
942
  export const de_ShowChannelCommand = async (output, context) => {
1830
943
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1831
- return de_ShowChannelCommandError(output, context);
944
+ return de_CommandError(output, context);
1832
945
  }
1833
946
  const contents = map({
1834
947
  $metadata: deserializeMetadata(output),
1835
948
  });
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);
949
+ await collectBody(output.body, context);
1841
950
  return contents;
1842
951
  };
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
952
  export const de_UpdateChannelCommand = async (output, context) => {
1869
953
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1870
- return de_UpdateChannelCommandError(output, context);
954
+ return de_CommandError(output, context);
1871
955
  }
1872
956
  const contents = map({
1873
957
  $metadata: deserializeMetadata(output),
@@ -1879,34 +963,9 @@ export const de_UpdateChannelCommand = async (output, context) => {
1879
963
  Object.assign(contents, doc);
1880
964
  return contents;
1881
965
  };
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
966
  export const de_UpdateMessageCommand = async (output, context) => {
1908
967
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1909
- return de_UpdateMessageCommandError(output, context);
968
+ return de_CommandError(output, context);
1910
969
  }
1911
970
  const contents = map({
1912
971
  $metadata: deserializeMetadata(output),
@@ -1918,7 +977,7 @@ export const de_UpdateMessageCommand = async (output, context) => {
1918
977
  Object.assign(contents, doc);
1919
978
  return contents;
1920
979
  };
1921
- const de_UpdateMessageCommandError = async (output, context) => {
980
+ const de_CommandError = async (output, context) => {
1922
981
  const parsedOutput = {
1923
982
  ...output,
1924
983
  body: await parseErrorBody(output.body, context)
@@ -1931,12 +990,24 @@ const de_UpdateMessageCommandError = async (output, context) => {
1931
990
  case "ForbiddenException":
1932
991
  case "smithy.framework#ForbiddenException":
1933
992
  throw await de_ForbiddenExceptionRes(parsedOutput, context);
1934
- case "MessageNotFoundException":
1935
- case "wildix.xbees.conversations#MessageNotFoundException":
1936
- throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
993
+ case "MemberAlreadyExistException":
994
+ case "wildix.xbees.conversations#MemberAlreadyExistException":
995
+ throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
1937
996
  case "ValidationException":
1938
997
  case "smithy.framework#ValidationException":
1939
998
  throw await de_ValidationExceptionRes(parsedOutput, context);
999
+ case "ChannelAlreadyExistException":
1000
+ case "wildix.xbees.conversations#ChannelAlreadyExistException":
1001
+ throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
1002
+ case "MemberNotFoundException":
1003
+ case "wildix.xbees.conversations#MemberNotFoundException":
1004
+ throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
1005
+ case "MessageNotFoundException":
1006
+ case "wildix.xbees.conversations#MessageNotFoundException":
1007
+ throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
1008
+ case "ConversationsServiceException":
1009
+ case "wildix.xbees.conversations#ConversationsServiceException":
1010
+ throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
1940
1011
  default:
1941
1012
  const parsedBody = parsedOutput.body;
1942
1013
  return throwDefaultError({
@@ -2064,6 +1135,11 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2064
1135
  (!Object.getOwnPropertyNames(value).includes("length") ||
2065
1136
  value.length != 0) &&
2066
1137
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1138
+ const _l = "limit";
1139
+ const _o = "offset";
1140
+ const _s = "silent";
1141
+ const _u = "user";
1142
+ const _uI = "userId";
2067
1143
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
2068
1144
  if (encoded.length) {
2069
1145
  return JSON.parse(encoded);