@wildix/xbees-kite-client 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/Kite.js +18 -0
- package/dist-cjs/KiteClient.js +4 -5
- package/dist-cjs/commands/GetSmsNumberConfigurationCommand.js +21 -0
- package/dist-cjs/commands/GetWhatsAppNumberConfigurationCommand.js +21 -0
- package/dist-cjs/commands/ListSmsConfigurationsCommand.js +21 -0
- package/dist-cjs/commands/ListSmsNumbersCommand.js +21 -0
- package/dist-cjs/commands/ListWhatsAppConfigurationsCommand.js +21 -0
- package/dist-cjs/commands/ListWhatsAppNumbersCommand.js +21 -0
- package/dist-cjs/commands/ListWhatsAppTemplatesCommand.js +21 -0
- package/dist-cjs/commands/PutSmsNumberConfigurationCommand.js +21 -0
- package/dist-cjs/commands/PutWhatsAppNumberConfigurationCommand.js +21 -0
- package/dist-cjs/commands/index.js +9 -0
- package/dist-cjs/models/models_0.js +113 -22
- package/dist-cjs/protocols/Aws_restJson1.js +342 -76
- package/dist-cjs/runtimeConfig.browser.js +1 -1
- package/dist-cjs/runtimeConfig.js +4 -3
- package/dist-cjs/runtimeExtensions.js +2 -10
- package/dist-es/Kite.js +18 -0
- package/dist-es/KiteClient.js +4 -5
- package/dist-es/commands/GetSmsNumberConfigurationCommand.js +17 -0
- package/dist-es/commands/GetWhatsAppNumberConfigurationCommand.js +17 -0
- package/dist-es/commands/ListSmsConfigurationsCommand.js +17 -0
- package/dist-es/commands/ListSmsNumbersCommand.js +17 -0
- package/dist-es/commands/ListWhatsAppConfigurationsCommand.js +17 -0
- package/dist-es/commands/ListWhatsAppNumbersCommand.js +17 -0
- package/dist-es/commands/ListWhatsAppTemplatesCommand.js +17 -0
- package/dist-es/commands/PutSmsNumberConfigurationCommand.js +17 -0
- package/dist-es/commands/PutWhatsAppNumberConfigurationCommand.js +17 -0
- package/dist-es/commands/index.js +9 -0
- package/dist-es/models/models_0.js +105 -15
- package/dist-es/protocols/Aws_restJson1.js +296 -48
- package/dist-es/runtimeConfig.browser.js +2 -2
- package/dist-es/runtimeConfig.js +5 -4
- package/dist-es/runtimeExtensions.js +2 -10
- package/dist-types/Kite.d.ts +67 -0
- package/dist-types/KiteClient.d.ts +11 -2
- package/dist-types/commands/CancelCalendarEventCommand.d.ts +17 -0
- package/dist-types/commands/CreateOrUpdateWidgetPreviewCommand.d.ts +118 -0
- package/dist-types/commands/CreateWidgetCommand.d.ts +118 -0
- package/dist-types/commands/DeleteWidgetCommand.d.ts +14 -0
- package/dist-types/commands/GetCalendarSlotsCommand.d.ts +14 -0
- package/dist-types/commands/GetConfigCommand.d.ts +14 -0
- package/dist-types/commands/GetSmsNumberConfigurationCommand.d.ts +178 -0
- package/dist-types/commands/GetWhatsAppNumberConfigurationCommand.d.ts +178 -0
- package/dist-types/commands/GetWidgetCommand.d.ts +66 -0
- package/dist-types/commands/ListAgentsCommand.d.ts +14 -0
- package/dist-types/commands/ListServicesCommand.d.ts +14 -0
- package/dist-types/commands/ListSmsConfigurationsCommand.d.ts +179 -0
- package/dist-types/commands/ListSmsNumbersCommand.d.ts +82 -0
- package/dist-types/commands/ListWhatsAppConfigurationsCommand.d.ts +179 -0
- package/dist-types/commands/ListWhatsAppNumbersCommand.d.ts +82 -0
- package/dist-types/commands/ListWhatsAppTemplatesCommand.d.ts +118 -0
- package/dist-types/commands/ListWidgetsCommand.d.ts +66 -0
- package/dist-types/commands/PutSmsNumberConfigurationCommand.d.ts +270 -0
- package/dist-types/commands/PutWhatsAppNumberConfigurationCommand.d.ts +270 -0
- package/dist-types/commands/RescheduleCalendarEventCommand.d.ts +17 -0
- package/dist-types/commands/ScheduleCalendarEventCommand.d.ts +17 -0
- package/dist-types/commands/UpdateWidgetCommand.d.ts +118 -0
- package/dist-types/commands/index.d.ts +9 -0
- package/dist-types/models/models_0.d.ts +869 -161
- package/dist-types/protocols/Aws_restJson1.d.ts +81 -0
- package/dist-types/runtimeConfig.browser.d.ts +2 -1
- package/dist-types/runtimeConfig.d.ts +2 -1
- package/dist-types/runtimeConfig.native.d.ts +2 -1
- package/package.json +37 -33
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateWidgetCommand = exports.de_ScheduleCalendarEventCommand = exports.de_RescheduleCalendarEventCommand = exports.de_ListWidgetsCommand = exports.de_ListServicesCommand = exports.de_ListAgentsCommand = exports.de_GetWidgetCommand = exports.de_GetConfigCommand = exports.de_GetCalendarSlotsCommand = exports.de_DeleteWidgetCommand = exports.de_CreateWidgetCommand = exports.de_CreateOrUpdateWidgetPreviewCommand = exports.de_CancelCalendarEventCommand = exports.se_UpdateWidgetCommand = exports.se_ScheduleCalendarEventCommand = exports.se_RescheduleCalendarEventCommand = exports.se_ListWidgetsCommand = exports.se_ListServicesCommand = exports.se_ListAgentsCommand = exports.se_GetWidgetCommand = exports.se_GetConfigCommand = exports.se_GetCalendarSlotsCommand = exports.se_DeleteWidgetCommand = exports.se_CreateWidgetCommand = exports.se_CreateOrUpdateWidgetPreviewCommand = exports.se_CancelCalendarEventCommand = void 0;
|
|
3
|
+
exports.de_UpdateWidgetCommand = exports.de_ScheduleCalendarEventCommand = exports.de_RescheduleCalendarEventCommand = exports.de_PutWhatsAppNumberConfigurationCommand = exports.de_PutSmsNumberConfigurationCommand = exports.de_ListWidgetsCommand = exports.de_ListWhatsAppTemplatesCommand = exports.de_ListWhatsAppNumbersCommand = exports.de_ListWhatsAppConfigurationsCommand = exports.de_ListSmsNumbersCommand = exports.de_ListSmsConfigurationsCommand = exports.de_ListServicesCommand = exports.de_ListAgentsCommand = exports.de_GetWidgetCommand = exports.de_GetWhatsAppNumberConfigurationCommand = exports.de_GetSmsNumberConfigurationCommand = exports.de_GetConfigCommand = exports.de_GetCalendarSlotsCommand = exports.de_DeleteWidgetCommand = exports.de_CreateWidgetCommand = exports.de_CreateOrUpdateWidgetPreviewCommand = exports.de_CancelCalendarEventCommand = exports.se_UpdateWidgetCommand = exports.se_ScheduleCalendarEventCommand = exports.se_RescheduleCalendarEventCommand = exports.se_PutWhatsAppNumberConfigurationCommand = exports.se_PutSmsNumberConfigurationCommand = exports.se_ListWidgetsCommand = exports.se_ListWhatsAppTemplatesCommand = exports.se_ListWhatsAppNumbersCommand = exports.se_ListWhatsAppConfigurationsCommand = exports.se_ListSmsNumbersCommand = exports.se_ListSmsConfigurationsCommand = exports.se_ListServicesCommand = exports.se_ListAgentsCommand = exports.se_GetWidgetCommand = exports.se_GetWhatsAppNumberConfigurationCommand = exports.se_GetSmsNumberConfigurationCommand = exports.se_GetConfigCommand = exports.se_GetCalendarSlotsCommand = exports.se_DeleteWidgetCommand = exports.se_CreateWidgetCommand = exports.se_CreateOrUpdateWidgetPreviewCommand = exports.se_CancelCalendarEventCommand = void 0;
|
|
4
4
|
const KiteServiceException_1 = require("../models/KiteServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
|
-
const core_1 = require("@
|
|
6
|
+
const core_1 = require("@aws-sdk/core");
|
|
7
|
+
const core_2 = require("@smithy/core");
|
|
7
8
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
9
|
const se_CancelCalendarEventCommand = async (input, context) => {
|
|
9
|
-
const b = (0,
|
|
10
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
10
11
|
const headers = {};
|
|
11
12
|
b.bp("/v2/kite/calendar/channels/{channelId}/events/{eventOwner}/{eventId}");
|
|
12
13
|
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
@@ -24,7 +25,7 @@ const se_CancelCalendarEventCommand = async (input, context) => {
|
|
|
24
25
|
};
|
|
25
26
|
exports.se_CancelCalendarEventCommand = se_CancelCalendarEventCommand;
|
|
26
27
|
const se_CreateOrUpdateWidgetPreviewCommand = async (input, context) => {
|
|
27
|
-
const b = (0,
|
|
28
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
29
|
const headers = {
|
|
29
30
|
'content-type': 'application/json',
|
|
30
31
|
};
|
|
@@ -34,6 +35,7 @@ const se_CreateOrUpdateWidgetPreviewCommand = async (input, context) => {
|
|
|
34
35
|
});
|
|
35
36
|
let body;
|
|
36
37
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
38
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
37
39
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
38
40
|
'name': [],
|
|
39
41
|
'routes': _ => se_WidgetRoutesList(_, context),
|
|
@@ -49,7 +51,7 @@ const se_CreateOrUpdateWidgetPreviewCommand = async (input, context) => {
|
|
|
49
51
|
};
|
|
50
52
|
exports.se_CreateOrUpdateWidgetPreviewCommand = se_CreateOrUpdateWidgetPreviewCommand;
|
|
51
53
|
const se_CreateWidgetCommand = async (input, context) => {
|
|
52
|
-
const b = (0,
|
|
54
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
53
55
|
const headers = {
|
|
54
56
|
'content-type': 'application/json',
|
|
55
57
|
};
|
|
@@ -59,6 +61,7 @@ const se_CreateWidgetCommand = async (input, context) => {
|
|
|
59
61
|
});
|
|
60
62
|
let body;
|
|
61
63
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
64
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
62
65
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
63
66
|
'name': [],
|
|
64
67
|
'routes': _ => se_WidgetRoutesList(_, context),
|
|
@@ -73,7 +76,7 @@ const se_CreateWidgetCommand = async (input, context) => {
|
|
|
73
76
|
};
|
|
74
77
|
exports.se_CreateWidgetCommand = se_CreateWidgetCommand;
|
|
75
78
|
const se_DeleteWidgetCommand = async (input, context) => {
|
|
76
|
-
const b = (0,
|
|
79
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
77
80
|
const headers = {};
|
|
78
81
|
b.bp("/v2/kite/widgets/{widgetId}");
|
|
79
82
|
b.p('widgetId', () => input.widgetId, '{widgetId}', false);
|
|
@@ -85,7 +88,7 @@ const se_DeleteWidgetCommand = async (input, context) => {
|
|
|
85
88
|
};
|
|
86
89
|
exports.se_DeleteWidgetCommand = se_DeleteWidgetCommand;
|
|
87
90
|
const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
88
|
-
const b = (0,
|
|
91
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
89
92
|
const headers = {};
|
|
90
93
|
b.bp("/v2/kite/calendar/widgets/{targetId}/slots");
|
|
91
94
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
@@ -105,7 +108,7 @@ const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
|
105
108
|
};
|
|
106
109
|
exports.se_GetCalendarSlotsCommand = se_GetCalendarSlotsCommand;
|
|
107
110
|
const se_GetConfigCommand = async (input, context) => {
|
|
108
|
-
const b = (0,
|
|
111
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
109
112
|
const headers = {};
|
|
110
113
|
b.bp("/v2/kite/config/{targetId}");
|
|
111
114
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
@@ -120,8 +123,40 @@ const se_GetConfigCommand = async (input, context) => {
|
|
|
120
123
|
return b.build();
|
|
121
124
|
};
|
|
122
125
|
exports.se_GetConfigCommand = se_GetConfigCommand;
|
|
126
|
+
const se_GetSmsNumberConfigurationCommand = async (input, context) => {
|
|
127
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
128
|
+
const headers = {};
|
|
129
|
+
b.bp("/v2/kite/sms/configurations/{serviceNumber}");
|
|
130
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
131
|
+
const query = (0, smithy_client_1.map)({
|
|
132
|
+
[_c]: [, input[_cI]],
|
|
133
|
+
});
|
|
134
|
+
let body;
|
|
135
|
+
b.m("GET")
|
|
136
|
+
.h(headers)
|
|
137
|
+
.q(query)
|
|
138
|
+
.b(body);
|
|
139
|
+
return b.build();
|
|
140
|
+
};
|
|
141
|
+
exports.se_GetSmsNumberConfigurationCommand = se_GetSmsNumberConfigurationCommand;
|
|
142
|
+
const se_GetWhatsAppNumberConfigurationCommand = async (input, context) => {
|
|
143
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
144
|
+
const headers = {};
|
|
145
|
+
b.bp("/v2/kite/whatsapp/configurations/{serviceNumber}");
|
|
146
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
147
|
+
const query = (0, smithy_client_1.map)({
|
|
148
|
+
[_c]: [, input[_cI]],
|
|
149
|
+
});
|
|
150
|
+
let body;
|
|
151
|
+
b.m("GET")
|
|
152
|
+
.h(headers)
|
|
153
|
+
.q(query)
|
|
154
|
+
.b(body);
|
|
155
|
+
return b.build();
|
|
156
|
+
};
|
|
157
|
+
exports.se_GetWhatsAppNumberConfigurationCommand = se_GetWhatsAppNumberConfigurationCommand;
|
|
123
158
|
const se_GetWidgetCommand = async (input, context) => {
|
|
124
|
-
const b = (0,
|
|
159
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
125
160
|
const headers = {};
|
|
126
161
|
b.bp("/v2/kite/widgets/{widgetId}");
|
|
127
162
|
b.p('widgetId', () => input.widgetId, '{widgetId}', false);
|
|
@@ -133,7 +168,7 @@ const se_GetWidgetCommand = async (input, context) => {
|
|
|
133
168
|
};
|
|
134
169
|
exports.se_GetWidgetCommand = se_GetWidgetCommand;
|
|
135
170
|
const se_ListAgentsCommand = async (input, context) => {
|
|
136
|
-
const b = (0,
|
|
171
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
137
172
|
const headers = {
|
|
138
173
|
'content-type': 'application/json',
|
|
139
174
|
};
|
|
@@ -153,7 +188,7 @@ const se_ListAgentsCommand = async (input, context) => {
|
|
|
153
188
|
};
|
|
154
189
|
exports.se_ListAgentsCommand = se_ListAgentsCommand;
|
|
155
190
|
const se_ListServicesCommand = async (input, context) => {
|
|
156
|
-
const b = (0,
|
|
191
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
157
192
|
const headers = {};
|
|
158
193
|
b.bp("/v2/kite/services");
|
|
159
194
|
const query = (0, smithy_client_1.map)({
|
|
@@ -167,8 +202,84 @@ const se_ListServicesCommand = async (input, context) => {
|
|
|
167
202
|
return b.build();
|
|
168
203
|
};
|
|
169
204
|
exports.se_ListServicesCommand = se_ListServicesCommand;
|
|
205
|
+
const se_ListSmsConfigurationsCommand = async (input, context) => {
|
|
206
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
207
|
+
const headers = {};
|
|
208
|
+
b.bp("/v2/kite/sms/configurations");
|
|
209
|
+
const query = (0, smithy_client_1.map)({
|
|
210
|
+
[_c]: [, input[_cI]],
|
|
211
|
+
});
|
|
212
|
+
let body;
|
|
213
|
+
b.m("GET")
|
|
214
|
+
.h(headers)
|
|
215
|
+
.q(query)
|
|
216
|
+
.b(body);
|
|
217
|
+
return b.build();
|
|
218
|
+
};
|
|
219
|
+
exports.se_ListSmsConfigurationsCommand = se_ListSmsConfigurationsCommand;
|
|
220
|
+
const se_ListSmsNumbersCommand = async (input, context) => {
|
|
221
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
222
|
+
const headers = {};
|
|
223
|
+
b.bp("/v2/kite/sms/numbers");
|
|
224
|
+
const query = (0, smithy_client_1.map)({
|
|
225
|
+
[_c]: [, input[_cI]],
|
|
226
|
+
});
|
|
227
|
+
let body;
|
|
228
|
+
b.m("GET")
|
|
229
|
+
.h(headers)
|
|
230
|
+
.q(query)
|
|
231
|
+
.b(body);
|
|
232
|
+
return b.build();
|
|
233
|
+
};
|
|
234
|
+
exports.se_ListSmsNumbersCommand = se_ListSmsNumbersCommand;
|
|
235
|
+
const se_ListWhatsAppConfigurationsCommand = async (input, context) => {
|
|
236
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
237
|
+
const headers = {};
|
|
238
|
+
b.bp("/v2/kite/whatsapp/configurations");
|
|
239
|
+
const query = (0, smithy_client_1.map)({
|
|
240
|
+
[_c]: [, input[_cI]],
|
|
241
|
+
});
|
|
242
|
+
let body;
|
|
243
|
+
b.m("GET")
|
|
244
|
+
.h(headers)
|
|
245
|
+
.q(query)
|
|
246
|
+
.b(body);
|
|
247
|
+
return b.build();
|
|
248
|
+
};
|
|
249
|
+
exports.se_ListWhatsAppConfigurationsCommand = se_ListWhatsAppConfigurationsCommand;
|
|
250
|
+
const se_ListWhatsAppNumbersCommand = async (input, context) => {
|
|
251
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
252
|
+
const headers = {};
|
|
253
|
+
b.bp("/v2/kite/whatsapp/numbers");
|
|
254
|
+
const query = (0, smithy_client_1.map)({
|
|
255
|
+
[_c]: [, input[_cI]],
|
|
256
|
+
});
|
|
257
|
+
let body;
|
|
258
|
+
b.m("GET")
|
|
259
|
+
.h(headers)
|
|
260
|
+
.q(query)
|
|
261
|
+
.b(body);
|
|
262
|
+
return b.build();
|
|
263
|
+
};
|
|
264
|
+
exports.se_ListWhatsAppNumbersCommand = se_ListWhatsAppNumbersCommand;
|
|
265
|
+
const se_ListWhatsAppTemplatesCommand = async (input, context) => {
|
|
266
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
267
|
+
const headers = {};
|
|
268
|
+
b.bp("/v2/kite/whatsapp/templates/{serviceNumber}");
|
|
269
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
270
|
+
const query = (0, smithy_client_1.map)({
|
|
271
|
+
[_c]: [, input[_cI]],
|
|
272
|
+
});
|
|
273
|
+
let body;
|
|
274
|
+
b.m("GET")
|
|
275
|
+
.h(headers)
|
|
276
|
+
.q(query)
|
|
277
|
+
.b(body);
|
|
278
|
+
return b.build();
|
|
279
|
+
};
|
|
280
|
+
exports.se_ListWhatsAppTemplatesCommand = se_ListWhatsAppTemplatesCommand;
|
|
170
281
|
const se_ListWidgetsCommand = async (input, context) => {
|
|
171
|
-
const b = (0,
|
|
282
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
172
283
|
const headers = {};
|
|
173
284
|
b.bp("/v2/kite/widgets");
|
|
174
285
|
const query = (0, smithy_client_1.map)({
|
|
@@ -182,8 +293,56 @@ const se_ListWidgetsCommand = async (input, context) => {
|
|
|
182
293
|
return b.build();
|
|
183
294
|
};
|
|
184
295
|
exports.se_ListWidgetsCommand = se_ListWidgetsCommand;
|
|
296
|
+
const se_PutSmsNumberConfigurationCommand = async (input, context) => {
|
|
297
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
298
|
+
const headers = {
|
|
299
|
+
'content-type': 'application/json',
|
|
300
|
+
};
|
|
301
|
+
b.bp("/v2/kite/sms/configurations/{serviceNumber}");
|
|
302
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
303
|
+
const query = (0, smithy_client_1.map)({
|
|
304
|
+
[_c]: [, input[_cI]],
|
|
305
|
+
});
|
|
306
|
+
let body;
|
|
307
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
308
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
309
|
+
'routes': _ => (0, smithy_client_1._json)(_),
|
|
310
|
+
'serviceUri': [],
|
|
311
|
+
'target': _ => (0, smithy_client_1._json)(_),
|
|
312
|
+
}));
|
|
313
|
+
b.m("PUT")
|
|
314
|
+
.h(headers)
|
|
315
|
+
.q(query)
|
|
316
|
+
.b(body);
|
|
317
|
+
return b.build();
|
|
318
|
+
};
|
|
319
|
+
exports.se_PutSmsNumberConfigurationCommand = se_PutSmsNumberConfigurationCommand;
|
|
320
|
+
const se_PutWhatsAppNumberConfigurationCommand = async (input, context) => {
|
|
321
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
322
|
+
const headers = {
|
|
323
|
+
'content-type': 'application/json',
|
|
324
|
+
};
|
|
325
|
+
b.bp("/v2/kite/whatsapp/configurations/{serviceNumber}");
|
|
326
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
327
|
+
const query = (0, smithy_client_1.map)({
|
|
328
|
+
[_c]: [, input[_cI]],
|
|
329
|
+
});
|
|
330
|
+
let body;
|
|
331
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
332
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
333
|
+
'routes': _ => (0, smithy_client_1._json)(_),
|
|
334
|
+
'serviceUri': [],
|
|
335
|
+
'target': _ => (0, smithy_client_1._json)(_),
|
|
336
|
+
}));
|
|
337
|
+
b.m("PUT")
|
|
338
|
+
.h(headers)
|
|
339
|
+
.q(query)
|
|
340
|
+
.b(body);
|
|
341
|
+
return b.build();
|
|
342
|
+
};
|
|
343
|
+
exports.se_PutWhatsAppNumberConfigurationCommand = se_PutWhatsAppNumberConfigurationCommand;
|
|
185
344
|
const se_RescheduleCalendarEventCommand = async (input, context) => {
|
|
186
|
-
const b = (0,
|
|
345
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
187
346
|
const headers = {
|
|
188
347
|
'content-type': 'application/json',
|
|
189
348
|
};
|
|
@@ -207,7 +366,7 @@ const se_RescheduleCalendarEventCommand = async (input, context) => {
|
|
|
207
366
|
};
|
|
208
367
|
exports.se_RescheduleCalendarEventCommand = se_RescheduleCalendarEventCommand;
|
|
209
368
|
const se_ScheduleCalendarEventCommand = async (input, context) => {
|
|
210
|
-
const b = (0,
|
|
369
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
211
370
|
const headers = {
|
|
212
371
|
'content-type': 'application/json',
|
|
213
372
|
};
|
|
@@ -230,7 +389,7 @@ const se_ScheduleCalendarEventCommand = async (input, context) => {
|
|
|
230
389
|
};
|
|
231
390
|
exports.se_ScheduleCalendarEventCommand = se_ScheduleCalendarEventCommand;
|
|
232
391
|
const se_UpdateWidgetCommand = async (input, context) => {
|
|
233
|
-
const b = (0,
|
|
392
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
234
393
|
const headers = {
|
|
235
394
|
'content-type': 'application/json',
|
|
236
395
|
};
|
|
@@ -241,6 +400,7 @@ const se_UpdateWidgetCommand = async (input, context) => {
|
|
|
241
400
|
});
|
|
242
401
|
let body;
|
|
243
402
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
403
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
244
404
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
245
405
|
'name': [],
|
|
246
406
|
'routes': _ => se_WidgetRoutesList(_, context),
|
|
@@ -261,7 +421,7 @@ const de_CancelCalendarEventCommand = async (output, context) => {
|
|
|
261
421
|
const contents = (0, smithy_client_1.map)({
|
|
262
422
|
$metadata: deserializeMetadata(output),
|
|
263
423
|
});
|
|
264
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
424
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
265
425
|
const doc = (0, smithy_client_1.take)(data, {
|
|
266
426
|
'channel': smithy_client_1._json,
|
|
267
427
|
'event': smithy_client_1._json,
|
|
@@ -277,7 +437,7 @@ const de_CreateOrUpdateWidgetPreviewCommand = async (output, context) => {
|
|
|
277
437
|
const contents = (0, smithy_client_1.map)({
|
|
278
438
|
$metadata: deserializeMetadata(output),
|
|
279
439
|
});
|
|
280
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
440
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
281
441
|
const doc = (0, smithy_client_1.take)(data, {
|
|
282
442
|
'widget': _ => de_Widget(_, context),
|
|
283
443
|
});
|
|
@@ -292,7 +452,7 @@ const de_CreateWidgetCommand = async (output, context) => {
|
|
|
292
452
|
const contents = (0, smithy_client_1.map)({
|
|
293
453
|
$metadata: deserializeMetadata(output),
|
|
294
454
|
});
|
|
295
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
455
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
296
456
|
const doc = (0, smithy_client_1.take)(data, {
|
|
297
457
|
'widget': _ => de_Widget(_, context),
|
|
298
458
|
});
|
|
@@ -318,7 +478,7 @@ const de_GetCalendarSlotsCommand = async (output, context) => {
|
|
|
318
478
|
const contents = (0, smithy_client_1.map)({
|
|
319
479
|
$metadata: deserializeMetadata(output),
|
|
320
480
|
});
|
|
321
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
481
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
322
482
|
const doc = (0, smithy_client_1.take)(data, {
|
|
323
483
|
'calendar': smithy_client_1._json,
|
|
324
484
|
});
|
|
@@ -333,7 +493,7 @@ const de_GetConfigCommand = async (output, context) => {
|
|
|
333
493
|
const contents = (0, smithy_client_1.map)({
|
|
334
494
|
$metadata: deserializeMetadata(output),
|
|
335
495
|
});
|
|
336
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
496
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
337
497
|
const doc = (0, smithy_client_1.take)(data, {
|
|
338
498
|
'config': smithy_client_1._json,
|
|
339
499
|
});
|
|
@@ -341,6 +501,36 @@ const de_GetConfigCommand = async (output, context) => {
|
|
|
341
501
|
return contents;
|
|
342
502
|
};
|
|
343
503
|
exports.de_GetConfigCommand = de_GetConfigCommand;
|
|
504
|
+
const de_GetSmsNumberConfigurationCommand = async (output, context) => {
|
|
505
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
506
|
+
return de_CommandError(output, context);
|
|
507
|
+
}
|
|
508
|
+
const contents = (0, smithy_client_1.map)({
|
|
509
|
+
$metadata: deserializeMetadata(output),
|
|
510
|
+
});
|
|
511
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
512
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
513
|
+
'configuration': smithy_client_1._json,
|
|
514
|
+
});
|
|
515
|
+
Object.assign(contents, doc);
|
|
516
|
+
return contents;
|
|
517
|
+
};
|
|
518
|
+
exports.de_GetSmsNumberConfigurationCommand = de_GetSmsNumberConfigurationCommand;
|
|
519
|
+
const de_GetWhatsAppNumberConfigurationCommand = async (output, context) => {
|
|
520
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
521
|
+
return de_CommandError(output, context);
|
|
522
|
+
}
|
|
523
|
+
const contents = (0, smithy_client_1.map)({
|
|
524
|
+
$metadata: deserializeMetadata(output),
|
|
525
|
+
});
|
|
526
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
527
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
528
|
+
'configuration': smithy_client_1._json,
|
|
529
|
+
});
|
|
530
|
+
Object.assign(contents, doc);
|
|
531
|
+
return contents;
|
|
532
|
+
};
|
|
533
|
+
exports.de_GetWhatsAppNumberConfigurationCommand = de_GetWhatsAppNumberConfigurationCommand;
|
|
344
534
|
const de_GetWidgetCommand = async (output, context) => {
|
|
345
535
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
346
536
|
return de_CommandError(output, context);
|
|
@@ -348,7 +538,7 @@ const de_GetWidgetCommand = async (output, context) => {
|
|
|
348
538
|
const contents = (0, smithy_client_1.map)({
|
|
349
539
|
$metadata: deserializeMetadata(output),
|
|
350
540
|
});
|
|
351
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
541
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
352
542
|
const doc = (0, smithy_client_1.take)(data, {
|
|
353
543
|
'widget': _ => de_Widget(_, context),
|
|
354
544
|
});
|
|
@@ -363,7 +553,7 @@ const de_ListAgentsCommand = async (output, context) => {
|
|
|
363
553
|
const contents = (0, smithy_client_1.map)({
|
|
364
554
|
$metadata: deserializeMetadata(output),
|
|
365
555
|
});
|
|
366
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
556
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
367
557
|
const doc = (0, smithy_client_1.take)(data, {
|
|
368
558
|
'users': smithy_client_1._json,
|
|
369
559
|
});
|
|
@@ -378,7 +568,7 @@ const de_ListServicesCommand = async (output, context) => {
|
|
|
378
568
|
const contents = (0, smithy_client_1.map)({
|
|
379
569
|
$metadata: deserializeMetadata(output),
|
|
380
570
|
});
|
|
381
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
571
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
382
572
|
const doc = (0, smithy_client_1.take)(data, {
|
|
383
573
|
'services': smithy_client_1._json,
|
|
384
574
|
});
|
|
@@ -386,6 +576,81 @@ const de_ListServicesCommand = async (output, context) => {
|
|
|
386
576
|
return contents;
|
|
387
577
|
};
|
|
388
578
|
exports.de_ListServicesCommand = de_ListServicesCommand;
|
|
579
|
+
const de_ListSmsConfigurationsCommand = async (output, context) => {
|
|
580
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
581
|
+
return de_CommandError(output, context);
|
|
582
|
+
}
|
|
583
|
+
const contents = (0, smithy_client_1.map)({
|
|
584
|
+
$metadata: deserializeMetadata(output),
|
|
585
|
+
});
|
|
586
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
587
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
588
|
+
'configurations': smithy_client_1._json,
|
|
589
|
+
});
|
|
590
|
+
Object.assign(contents, doc);
|
|
591
|
+
return contents;
|
|
592
|
+
};
|
|
593
|
+
exports.de_ListSmsConfigurationsCommand = de_ListSmsConfigurationsCommand;
|
|
594
|
+
const de_ListSmsNumbersCommand = async (output, context) => {
|
|
595
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
596
|
+
return de_CommandError(output, context);
|
|
597
|
+
}
|
|
598
|
+
const contents = (0, smithy_client_1.map)({
|
|
599
|
+
$metadata: deserializeMetadata(output),
|
|
600
|
+
});
|
|
601
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
602
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
603
|
+
'numbers': smithy_client_1._json,
|
|
604
|
+
});
|
|
605
|
+
Object.assign(contents, doc);
|
|
606
|
+
return contents;
|
|
607
|
+
};
|
|
608
|
+
exports.de_ListSmsNumbersCommand = de_ListSmsNumbersCommand;
|
|
609
|
+
const de_ListWhatsAppConfigurationsCommand = async (output, context) => {
|
|
610
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
611
|
+
return de_CommandError(output, context);
|
|
612
|
+
}
|
|
613
|
+
const contents = (0, smithy_client_1.map)({
|
|
614
|
+
$metadata: deserializeMetadata(output),
|
|
615
|
+
});
|
|
616
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
617
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
618
|
+
'configurations': smithy_client_1._json,
|
|
619
|
+
});
|
|
620
|
+
Object.assign(contents, doc);
|
|
621
|
+
return contents;
|
|
622
|
+
};
|
|
623
|
+
exports.de_ListWhatsAppConfigurationsCommand = de_ListWhatsAppConfigurationsCommand;
|
|
624
|
+
const de_ListWhatsAppNumbersCommand = async (output, context) => {
|
|
625
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
626
|
+
return de_CommandError(output, context);
|
|
627
|
+
}
|
|
628
|
+
const contents = (0, smithy_client_1.map)({
|
|
629
|
+
$metadata: deserializeMetadata(output),
|
|
630
|
+
});
|
|
631
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
632
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
633
|
+
'numbers': smithy_client_1._json,
|
|
634
|
+
});
|
|
635
|
+
Object.assign(contents, doc);
|
|
636
|
+
return contents;
|
|
637
|
+
};
|
|
638
|
+
exports.de_ListWhatsAppNumbersCommand = de_ListWhatsAppNumbersCommand;
|
|
639
|
+
const de_ListWhatsAppTemplatesCommand = async (output, context) => {
|
|
640
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
641
|
+
return de_CommandError(output, context);
|
|
642
|
+
}
|
|
643
|
+
const contents = (0, smithy_client_1.map)({
|
|
644
|
+
$metadata: deserializeMetadata(output),
|
|
645
|
+
});
|
|
646
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
647
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
648
|
+
'templates': smithy_client_1._json,
|
|
649
|
+
});
|
|
650
|
+
Object.assign(contents, doc);
|
|
651
|
+
return contents;
|
|
652
|
+
};
|
|
653
|
+
exports.de_ListWhatsAppTemplatesCommand = de_ListWhatsAppTemplatesCommand;
|
|
389
654
|
const de_ListWidgetsCommand = async (output, context) => {
|
|
390
655
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
391
656
|
return de_CommandError(output, context);
|
|
@@ -393,7 +658,7 @@ const de_ListWidgetsCommand = async (output, context) => {
|
|
|
393
658
|
const contents = (0, smithy_client_1.map)({
|
|
394
659
|
$metadata: deserializeMetadata(output),
|
|
395
660
|
});
|
|
396
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
661
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
397
662
|
const doc = (0, smithy_client_1.take)(data, {
|
|
398
663
|
'widgets': _ => de_WidgetsList(_, context),
|
|
399
664
|
});
|
|
@@ -401,6 +666,36 @@ const de_ListWidgetsCommand = async (output, context) => {
|
|
|
401
666
|
return contents;
|
|
402
667
|
};
|
|
403
668
|
exports.de_ListWidgetsCommand = de_ListWidgetsCommand;
|
|
669
|
+
const de_PutSmsNumberConfigurationCommand = async (output, context) => {
|
|
670
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
671
|
+
return de_CommandError(output, context);
|
|
672
|
+
}
|
|
673
|
+
const contents = (0, smithy_client_1.map)({
|
|
674
|
+
$metadata: deserializeMetadata(output),
|
|
675
|
+
});
|
|
676
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
677
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
678
|
+
'configuration': smithy_client_1._json,
|
|
679
|
+
});
|
|
680
|
+
Object.assign(contents, doc);
|
|
681
|
+
return contents;
|
|
682
|
+
};
|
|
683
|
+
exports.de_PutSmsNumberConfigurationCommand = de_PutSmsNumberConfigurationCommand;
|
|
684
|
+
const de_PutWhatsAppNumberConfigurationCommand = async (output, context) => {
|
|
685
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
686
|
+
return de_CommandError(output, context);
|
|
687
|
+
}
|
|
688
|
+
const contents = (0, smithy_client_1.map)({
|
|
689
|
+
$metadata: deserializeMetadata(output),
|
|
690
|
+
});
|
|
691
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
692
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
693
|
+
'configuration': smithy_client_1._json,
|
|
694
|
+
});
|
|
695
|
+
Object.assign(contents, doc);
|
|
696
|
+
return contents;
|
|
697
|
+
};
|
|
698
|
+
exports.de_PutWhatsAppNumberConfigurationCommand = de_PutWhatsAppNumberConfigurationCommand;
|
|
404
699
|
const de_RescheduleCalendarEventCommand = async (output, context) => {
|
|
405
700
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
406
701
|
return de_CommandError(output, context);
|
|
@@ -408,7 +703,7 @@ const de_RescheduleCalendarEventCommand = async (output, context) => {
|
|
|
408
703
|
const contents = (0, smithy_client_1.map)({
|
|
409
704
|
$metadata: deserializeMetadata(output),
|
|
410
705
|
});
|
|
411
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
706
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
412
707
|
const doc = (0, smithy_client_1.take)(data, {
|
|
413
708
|
'channel': smithy_client_1._json,
|
|
414
709
|
'event': smithy_client_1._json,
|
|
@@ -424,7 +719,7 @@ const de_ScheduleCalendarEventCommand = async (output, context) => {
|
|
|
424
719
|
const contents = (0, smithy_client_1.map)({
|
|
425
720
|
$metadata: deserializeMetadata(output),
|
|
426
721
|
});
|
|
427
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
722
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
428
723
|
const doc = (0, smithy_client_1.take)(data, {
|
|
429
724
|
'channel': smithy_client_1._json,
|
|
430
725
|
'event': smithy_client_1._json,
|
|
@@ -440,7 +735,7 @@ const de_UpdateWidgetCommand = async (output, context) => {
|
|
|
440
735
|
const contents = (0, smithy_client_1.map)({
|
|
441
736
|
$metadata: deserializeMetadata(output),
|
|
442
737
|
});
|
|
443
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
738
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
444
739
|
const doc = (0, smithy_client_1.take)(data, {
|
|
445
740
|
'widget': _ => de_Widget(_, context),
|
|
446
741
|
});
|
|
@@ -451,9 +746,9 @@ exports.de_UpdateWidgetCommand = de_UpdateWidgetCommand;
|
|
|
451
746
|
const de_CommandError = async (output, context) => {
|
|
452
747
|
const parsedOutput = {
|
|
453
748
|
...output,
|
|
454
|
-
body: await
|
|
749
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context)
|
|
455
750
|
};
|
|
456
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
751
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
457
752
|
switch (errorCode) {
|
|
458
753
|
case "ChannelNotFoundException":
|
|
459
754
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
@@ -461,6 +756,9 @@ const de_CommandError = async (output, context) => {
|
|
|
461
756
|
case "ForbiddenException":
|
|
462
757
|
case "smithy.framework#ForbiddenException":
|
|
463
758
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
759
|
+
case "NotFoundException":
|
|
760
|
+
case "smithy.framework#NotFoundException":
|
|
761
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
464
762
|
case "RateLimitExceededException":
|
|
465
763
|
case "smithy.framework#RateLimitExceededException":
|
|
466
764
|
throw await de_RateLimitExceededExceptionRes(parsedOutput, context);
|
|
@@ -499,6 +797,19 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
|
499
797
|
});
|
|
500
798
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
501
799
|
};
|
|
800
|
+
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
801
|
+
const contents = (0, smithy_client_1.map)({});
|
|
802
|
+
const data = parsedOutput.body;
|
|
803
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
804
|
+
'message': smithy_client_1.expectString,
|
|
805
|
+
});
|
|
806
|
+
Object.assign(contents, doc);
|
|
807
|
+
const exception = new models_0_1.NotFoundException({
|
|
808
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
809
|
+
...contents
|
|
810
|
+
});
|
|
811
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
812
|
+
};
|
|
502
813
|
const de_RateLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
503
814
|
const contents = (0, smithy_client_1.map)({
|
|
504
815
|
[_rL]: [, parsedOutput.headers[_xrl]],
|
|
@@ -589,13 +900,14 @@ const se_WidgetRoutesList = (input, context) => {
|
|
|
589
900
|
};
|
|
590
901
|
const de_Widget = (output, context) => {
|
|
591
902
|
return (0, smithy_client_1.take)(output, {
|
|
903
|
+
'actions': smithy_client_1._json,
|
|
592
904
|
'appearance': smithy_client_1._json,
|
|
593
905
|
'company': smithy_client_1.expectString,
|
|
594
906
|
'createdAt': smithy_client_1.expectString,
|
|
595
907
|
'id': smithy_client_1.expectString,
|
|
596
908
|
'name': smithy_client_1.expectString,
|
|
597
909
|
'routes': (_) => de_WidgetRoutesList(_, context),
|
|
598
|
-
'target': (_) => (0, smithy_client_1._json)((0,
|
|
910
|
+
'target': (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
599
911
|
'updatedAt': smithy_client_1.expectString,
|
|
600
912
|
'welcomeMessages': smithy_client_1._json,
|
|
601
913
|
});
|
|
@@ -619,12 +931,6 @@ const deserializeMetadata = (output) => ({
|
|
|
619
931
|
cfId: output.headers["x-amz-cf-id"],
|
|
620
932
|
});
|
|
621
933
|
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
622
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
623
|
-
value !== null &&
|
|
624
|
-
value !== "" &&
|
|
625
|
-
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
626
|
-
value.length != 0) &&
|
|
627
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
628
934
|
const _c = "company";
|
|
629
935
|
const _cI = "companyId";
|
|
630
936
|
const _d = "duration";
|
|
@@ -643,43 +949,3 @@ const _tZ = "timeZone";
|
|
|
643
949
|
const _xrl = "x-ratelimit-limit";
|
|
644
950
|
const _xrr = "x-ratelimit-remaining";
|
|
645
951
|
const _xrr_ = "x-ratelimit-reset";
|
|
646
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
647
|
-
if (encoded.length) {
|
|
648
|
-
return JSON.parse(encoded);
|
|
649
|
-
}
|
|
650
|
-
return {};
|
|
651
|
-
});
|
|
652
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
653
|
-
const value = await parseBody(errorBody, context);
|
|
654
|
-
value.message = value.message ?? value.Message;
|
|
655
|
-
return value;
|
|
656
|
-
};
|
|
657
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
658
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
659
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
660
|
-
let cleanValue = rawValue;
|
|
661
|
-
if (typeof cleanValue === "number") {
|
|
662
|
-
cleanValue = cleanValue.toString();
|
|
663
|
-
}
|
|
664
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
665
|
-
cleanValue = cleanValue.split(",")[0];
|
|
666
|
-
}
|
|
667
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
668
|
-
cleanValue = cleanValue.split(":")[0];
|
|
669
|
-
}
|
|
670
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
671
|
-
cleanValue = cleanValue.split("#")[1];
|
|
672
|
-
}
|
|
673
|
-
return cleanValue;
|
|
674
|
-
};
|
|
675
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
676
|
-
if (headerKey !== undefined) {
|
|
677
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
678
|
-
}
|
|
679
|
-
if (data.code !== undefined) {
|
|
680
|
-
return sanitizeErrorCode(data.code);
|
|
681
|
-
}
|
|
682
|
-
if (data["__type"] !== undefined) {
|
|
683
|
-
return sanitizeErrorCode(data["__type"]);
|
|
684
|
-
}
|
|
685
|
-
};
|