@wildix/xbees-conversations-client 1.0.34 → 1.0.36

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