@wildix/xbees-kite-client 1.0.14 → 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 +20 -0
- package/dist-cjs/KiteClient.js +4 -5
- package/dist-cjs/commands/CreateOrUpdateWidgetPreviewCommand.js +21 -0
- 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 +10 -0
- package/dist-cjs/models/models_0.js +113 -22
- package/dist-cjs/protocols/Aws_restJson1.js +380 -74
- 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 +20 -0
- package/dist-es/KiteClient.js +4 -5
- package/dist-es/commands/CreateOrUpdateWidgetPreviewCommand.js +17 -0
- 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 +10 -0
- package/dist-es/models/models_0.js +105 -15
- package/dist-es/protocols/Aws_restJson1.js +334 -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 +74 -0
- package/dist-types/KiteClient.d.ts +12 -2
- package/dist-types/commands/CancelCalendarEventCommand.d.ts +17 -0
- package/dist-types/commands/CreateOrUpdateWidgetPreviewCommand.d.ts +414 -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 +10 -0
- package/dist-types/models/models_0.d.ts +900 -154
- package/dist-types/protocols/Aws_restJson1.d.ts +90 -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_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_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);
|
|
@@ -23,8 +24,34 @@ const se_CancelCalendarEventCommand = async (input, context) => {
|
|
|
23
24
|
return b.build();
|
|
24
25
|
};
|
|
25
26
|
exports.se_CancelCalendarEventCommand = se_CancelCalendarEventCommand;
|
|
27
|
+
const se_CreateOrUpdateWidgetPreviewCommand = async (input, context) => {
|
|
28
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
29
|
+
const headers = {
|
|
30
|
+
'content-type': 'application/json',
|
|
31
|
+
};
|
|
32
|
+
b.bp("/v2/kite/widgets/preview");
|
|
33
|
+
const query = (0, smithy_client_1.map)({
|
|
34
|
+
[_c]: [, input[_cI]],
|
|
35
|
+
});
|
|
36
|
+
let body;
|
|
37
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
38
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
39
|
+
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
40
|
+
'name': [],
|
|
41
|
+
'routes': _ => se_WidgetRoutesList(_, context),
|
|
42
|
+
'target': _ => (0, smithy_client_1._json)(_),
|
|
43
|
+
'temporaryWidgetId': [],
|
|
44
|
+
'welcomeMessages': _ => (0, smithy_client_1._json)(_),
|
|
45
|
+
}));
|
|
46
|
+
b.m("POST")
|
|
47
|
+
.h(headers)
|
|
48
|
+
.q(query)
|
|
49
|
+
.b(body);
|
|
50
|
+
return b.build();
|
|
51
|
+
};
|
|
52
|
+
exports.se_CreateOrUpdateWidgetPreviewCommand = se_CreateOrUpdateWidgetPreviewCommand;
|
|
26
53
|
const se_CreateWidgetCommand = async (input, context) => {
|
|
27
|
-
const b = (0,
|
|
54
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
55
|
const headers = {
|
|
29
56
|
'content-type': 'application/json',
|
|
30
57
|
};
|
|
@@ -34,6 +61,7 @@ const se_CreateWidgetCommand = async (input, context) => {
|
|
|
34
61
|
});
|
|
35
62
|
let body;
|
|
36
63
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
64
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
37
65
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
38
66
|
'name': [],
|
|
39
67
|
'routes': _ => se_WidgetRoutesList(_, context),
|
|
@@ -48,7 +76,7 @@ const se_CreateWidgetCommand = async (input, context) => {
|
|
|
48
76
|
};
|
|
49
77
|
exports.se_CreateWidgetCommand = se_CreateWidgetCommand;
|
|
50
78
|
const se_DeleteWidgetCommand = async (input, context) => {
|
|
51
|
-
const b = (0,
|
|
79
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
52
80
|
const headers = {};
|
|
53
81
|
b.bp("/v2/kite/widgets/{widgetId}");
|
|
54
82
|
b.p('widgetId', () => input.widgetId, '{widgetId}', false);
|
|
@@ -60,7 +88,7 @@ const se_DeleteWidgetCommand = async (input, context) => {
|
|
|
60
88
|
};
|
|
61
89
|
exports.se_DeleteWidgetCommand = se_DeleteWidgetCommand;
|
|
62
90
|
const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
63
|
-
const b = (0,
|
|
91
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
64
92
|
const headers = {};
|
|
65
93
|
b.bp("/v2/kite/calendar/widgets/{targetId}/slots");
|
|
66
94
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
@@ -80,7 +108,7 @@ const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
|
80
108
|
};
|
|
81
109
|
exports.se_GetCalendarSlotsCommand = se_GetCalendarSlotsCommand;
|
|
82
110
|
const se_GetConfigCommand = async (input, context) => {
|
|
83
|
-
const b = (0,
|
|
111
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
84
112
|
const headers = {};
|
|
85
113
|
b.bp("/v2/kite/config/{targetId}");
|
|
86
114
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
@@ -95,8 +123,40 @@ const se_GetConfigCommand = async (input, context) => {
|
|
|
95
123
|
return b.build();
|
|
96
124
|
};
|
|
97
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;
|
|
98
158
|
const se_GetWidgetCommand = async (input, context) => {
|
|
99
|
-
const b = (0,
|
|
159
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
100
160
|
const headers = {};
|
|
101
161
|
b.bp("/v2/kite/widgets/{widgetId}");
|
|
102
162
|
b.p('widgetId', () => input.widgetId, '{widgetId}', false);
|
|
@@ -108,7 +168,7 @@ const se_GetWidgetCommand = async (input, context) => {
|
|
|
108
168
|
};
|
|
109
169
|
exports.se_GetWidgetCommand = se_GetWidgetCommand;
|
|
110
170
|
const se_ListAgentsCommand = async (input, context) => {
|
|
111
|
-
const b = (0,
|
|
171
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
112
172
|
const headers = {
|
|
113
173
|
'content-type': 'application/json',
|
|
114
174
|
};
|
|
@@ -128,7 +188,7 @@ const se_ListAgentsCommand = async (input, context) => {
|
|
|
128
188
|
};
|
|
129
189
|
exports.se_ListAgentsCommand = se_ListAgentsCommand;
|
|
130
190
|
const se_ListServicesCommand = async (input, context) => {
|
|
131
|
-
const b = (0,
|
|
191
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
132
192
|
const headers = {};
|
|
133
193
|
b.bp("/v2/kite/services");
|
|
134
194
|
const query = (0, smithy_client_1.map)({
|
|
@@ -142,8 +202,84 @@ const se_ListServicesCommand = async (input, context) => {
|
|
|
142
202
|
return b.build();
|
|
143
203
|
};
|
|
144
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;
|
|
145
281
|
const se_ListWidgetsCommand = async (input, context) => {
|
|
146
|
-
const b = (0,
|
|
282
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
147
283
|
const headers = {};
|
|
148
284
|
b.bp("/v2/kite/widgets");
|
|
149
285
|
const query = (0, smithy_client_1.map)({
|
|
@@ -157,8 +293,56 @@ const se_ListWidgetsCommand = async (input, context) => {
|
|
|
157
293
|
return b.build();
|
|
158
294
|
};
|
|
159
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;
|
|
160
344
|
const se_RescheduleCalendarEventCommand = async (input, context) => {
|
|
161
|
-
const b = (0,
|
|
345
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
162
346
|
const headers = {
|
|
163
347
|
'content-type': 'application/json',
|
|
164
348
|
};
|
|
@@ -182,7 +366,7 @@ const se_RescheduleCalendarEventCommand = async (input, context) => {
|
|
|
182
366
|
};
|
|
183
367
|
exports.se_RescheduleCalendarEventCommand = se_RescheduleCalendarEventCommand;
|
|
184
368
|
const se_ScheduleCalendarEventCommand = async (input, context) => {
|
|
185
|
-
const b = (0,
|
|
369
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
186
370
|
const headers = {
|
|
187
371
|
'content-type': 'application/json',
|
|
188
372
|
};
|
|
@@ -205,7 +389,7 @@ const se_ScheduleCalendarEventCommand = async (input, context) => {
|
|
|
205
389
|
};
|
|
206
390
|
exports.se_ScheduleCalendarEventCommand = se_ScheduleCalendarEventCommand;
|
|
207
391
|
const se_UpdateWidgetCommand = async (input, context) => {
|
|
208
|
-
const b = (0,
|
|
392
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
209
393
|
const headers = {
|
|
210
394
|
'content-type': 'application/json',
|
|
211
395
|
};
|
|
@@ -216,6 +400,7 @@ const se_UpdateWidgetCommand = async (input, context) => {
|
|
|
216
400
|
});
|
|
217
401
|
let body;
|
|
218
402
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
403
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
219
404
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
220
405
|
'name': [],
|
|
221
406
|
'routes': _ => se_WidgetRoutesList(_, context),
|
|
@@ -236,7 +421,7 @@ const de_CancelCalendarEventCommand = async (output, context) => {
|
|
|
236
421
|
const contents = (0, smithy_client_1.map)({
|
|
237
422
|
$metadata: deserializeMetadata(output),
|
|
238
423
|
});
|
|
239
|
-
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");
|
|
240
425
|
const doc = (0, smithy_client_1.take)(data, {
|
|
241
426
|
'channel': smithy_client_1._json,
|
|
242
427
|
'event': smithy_client_1._json,
|
|
@@ -245,6 +430,21 @@ const de_CancelCalendarEventCommand = async (output, context) => {
|
|
|
245
430
|
return contents;
|
|
246
431
|
};
|
|
247
432
|
exports.de_CancelCalendarEventCommand = de_CancelCalendarEventCommand;
|
|
433
|
+
const de_CreateOrUpdateWidgetPreviewCommand = async (output, context) => {
|
|
434
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
435
|
+
return de_CommandError(output, context);
|
|
436
|
+
}
|
|
437
|
+
const contents = (0, smithy_client_1.map)({
|
|
438
|
+
$metadata: deserializeMetadata(output),
|
|
439
|
+
});
|
|
440
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
441
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
442
|
+
'widget': _ => de_Widget(_, context),
|
|
443
|
+
});
|
|
444
|
+
Object.assign(contents, doc);
|
|
445
|
+
return contents;
|
|
446
|
+
};
|
|
447
|
+
exports.de_CreateOrUpdateWidgetPreviewCommand = de_CreateOrUpdateWidgetPreviewCommand;
|
|
248
448
|
const de_CreateWidgetCommand = async (output, context) => {
|
|
249
449
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
250
450
|
return de_CommandError(output, context);
|
|
@@ -252,7 +452,7 @@ const de_CreateWidgetCommand = async (output, context) => {
|
|
|
252
452
|
const contents = (0, smithy_client_1.map)({
|
|
253
453
|
$metadata: deserializeMetadata(output),
|
|
254
454
|
});
|
|
255
|
-
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");
|
|
256
456
|
const doc = (0, smithy_client_1.take)(data, {
|
|
257
457
|
'widget': _ => de_Widget(_, context),
|
|
258
458
|
});
|
|
@@ -278,7 +478,7 @@ const de_GetCalendarSlotsCommand = async (output, context) => {
|
|
|
278
478
|
const contents = (0, smithy_client_1.map)({
|
|
279
479
|
$metadata: deserializeMetadata(output),
|
|
280
480
|
});
|
|
281
|
-
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");
|
|
282
482
|
const doc = (0, smithy_client_1.take)(data, {
|
|
283
483
|
'calendar': smithy_client_1._json,
|
|
284
484
|
});
|
|
@@ -293,7 +493,7 @@ const de_GetConfigCommand = async (output, context) => {
|
|
|
293
493
|
const contents = (0, smithy_client_1.map)({
|
|
294
494
|
$metadata: deserializeMetadata(output),
|
|
295
495
|
});
|
|
296
|
-
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");
|
|
297
497
|
const doc = (0, smithy_client_1.take)(data, {
|
|
298
498
|
'config': smithy_client_1._json,
|
|
299
499
|
});
|
|
@@ -301,6 +501,36 @@ const de_GetConfigCommand = async (output, context) => {
|
|
|
301
501
|
return contents;
|
|
302
502
|
};
|
|
303
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;
|
|
304
534
|
const de_GetWidgetCommand = async (output, context) => {
|
|
305
535
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
306
536
|
return de_CommandError(output, context);
|
|
@@ -308,7 +538,7 @@ const de_GetWidgetCommand = async (output, context) => {
|
|
|
308
538
|
const contents = (0, smithy_client_1.map)({
|
|
309
539
|
$metadata: deserializeMetadata(output),
|
|
310
540
|
});
|
|
311
|
-
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");
|
|
312
542
|
const doc = (0, smithy_client_1.take)(data, {
|
|
313
543
|
'widget': _ => de_Widget(_, context),
|
|
314
544
|
});
|
|
@@ -323,7 +553,7 @@ const de_ListAgentsCommand = async (output, context) => {
|
|
|
323
553
|
const contents = (0, smithy_client_1.map)({
|
|
324
554
|
$metadata: deserializeMetadata(output),
|
|
325
555
|
});
|
|
326
|
-
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");
|
|
327
557
|
const doc = (0, smithy_client_1.take)(data, {
|
|
328
558
|
'users': smithy_client_1._json,
|
|
329
559
|
});
|
|
@@ -338,7 +568,7 @@ const de_ListServicesCommand = async (output, context) => {
|
|
|
338
568
|
const contents = (0, smithy_client_1.map)({
|
|
339
569
|
$metadata: deserializeMetadata(output),
|
|
340
570
|
});
|
|
341
|
-
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");
|
|
342
572
|
const doc = (0, smithy_client_1.take)(data, {
|
|
343
573
|
'services': smithy_client_1._json,
|
|
344
574
|
});
|
|
@@ -346,6 +576,81 @@ const de_ListServicesCommand = async (output, context) => {
|
|
|
346
576
|
return contents;
|
|
347
577
|
};
|
|
348
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;
|
|
349
654
|
const de_ListWidgetsCommand = async (output, context) => {
|
|
350
655
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
351
656
|
return de_CommandError(output, context);
|
|
@@ -353,7 +658,7 @@ const de_ListWidgetsCommand = async (output, context) => {
|
|
|
353
658
|
const contents = (0, smithy_client_1.map)({
|
|
354
659
|
$metadata: deserializeMetadata(output),
|
|
355
660
|
});
|
|
356
|
-
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");
|
|
357
662
|
const doc = (0, smithy_client_1.take)(data, {
|
|
358
663
|
'widgets': _ => de_WidgetsList(_, context),
|
|
359
664
|
});
|
|
@@ -361,6 +666,36 @@ const de_ListWidgetsCommand = async (output, context) => {
|
|
|
361
666
|
return contents;
|
|
362
667
|
};
|
|
363
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;
|
|
364
699
|
const de_RescheduleCalendarEventCommand = async (output, context) => {
|
|
365
700
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
366
701
|
return de_CommandError(output, context);
|
|
@@ -368,7 +703,7 @@ const de_RescheduleCalendarEventCommand = async (output, context) => {
|
|
|
368
703
|
const contents = (0, smithy_client_1.map)({
|
|
369
704
|
$metadata: deserializeMetadata(output),
|
|
370
705
|
});
|
|
371
|
-
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");
|
|
372
707
|
const doc = (0, smithy_client_1.take)(data, {
|
|
373
708
|
'channel': smithy_client_1._json,
|
|
374
709
|
'event': smithy_client_1._json,
|
|
@@ -384,7 +719,7 @@ const de_ScheduleCalendarEventCommand = async (output, context) => {
|
|
|
384
719
|
const contents = (0, smithy_client_1.map)({
|
|
385
720
|
$metadata: deserializeMetadata(output),
|
|
386
721
|
});
|
|
387
|
-
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");
|
|
388
723
|
const doc = (0, smithy_client_1.take)(data, {
|
|
389
724
|
'channel': smithy_client_1._json,
|
|
390
725
|
'event': smithy_client_1._json,
|
|
@@ -400,7 +735,7 @@ const de_UpdateWidgetCommand = async (output, context) => {
|
|
|
400
735
|
const contents = (0, smithy_client_1.map)({
|
|
401
736
|
$metadata: deserializeMetadata(output),
|
|
402
737
|
});
|
|
403
|
-
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");
|
|
404
739
|
const doc = (0, smithy_client_1.take)(data, {
|
|
405
740
|
'widget': _ => de_Widget(_, context),
|
|
406
741
|
});
|
|
@@ -411,9 +746,9 @@ exports.de_UpdateWidgetCommand = de_UpdateWidgetCommand;
|
|
|
411
746
|
const de_CommandError = async (output, context) => {
|
|
412
747
|
const parsedOutput = {
|
|
413
748
|
...output,
|
|
414
|
-
body: await
|
|
749
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context)
|
|
415
750
|
};
|
|
416
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
751
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
417
752
|
switch (errorCode) {
|
|
418
753
|
case "ChannelNotFoundException":
|
|
419
754
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
@@ -421,6 +756,9 @@ const de_CommandError = async (output, context) => {
|
|
|
421
756
|
case "ForbiddenException":
|
|
422
757
|
case "smithy.framework#ForbiddenException":
|
|
423
758
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
759
|
+
case "NotFoundException":
|
|
760
|
+
case "smithy.framework#NotFoundException":
|
|
761
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
424
762
|
case "RateLimitExceededException":
|
|
425
763
|
case "smithy.framework#RateLimitExceededException":
|
|
426
764
|
throw await de_RateLimitExceededExceptionRes(parsedOutput, context);
|
|
@@ -459,6 +797,19 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
|
459
797
|
});
|
|
460
798
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
461
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
|
+
};
|
|
462
813
|
const de_RateLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
463
814
|
const contents = (0, smithy_client_1.map)({
|
|
464
815
|
[_rL]: [, parsedOutput.headers[_xrl]],
|
|
@@ -549,13 +900,14 @@ const se_WidgetRoutesList = (input, context) => {
|
|
|
549
900
|
};
|
|
550
901
|
const de_Widget = (output, context) => {
|
|
551
902
|
return (0, smithy_client_1.take)(output, {
|
|
903
|
+
'actions': smithy_client_1._json,
|
|
552
904
|
'appearance': smithy_client_1._json,
|
|
553
905
|
'company': smithy_client_1.expectString,
|
|
554
906
|
'createdAt': smithy_client_1.expectString,
|
|
555
907
|
'id': smithy_client_1.expectString,
|
|
556
908
|
'name': smithy_client_1.expectString,
|
|
557
909
|
'routes': (_) => de_WidgetRoutesList(_, context),
|
|
558
|
-
'target': (_) => (0, smithy_client_1._json)((0,
|
|
910
|
+
'target': (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
559
911
|
'updatedAt': smithy_client_1.expectString,
|
|
560
912
|
'welcomeMessages': smithy_client_1._json,
|
|
561
913
|
});
|
|
@@ -579,12 +931,6 @@ const deserializeMetadata = (output) => ({
|
|
|
579
931
|
cfId: output.headers["x-amz-cf-id"],
|
|
580
932
|
});
|
|
581
933
|
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
582
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
583
|
-
value !== null &&
|
|
584
|
-
value !== "" &&
|
|
585
|
-
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
586
|
-
value.length != 0) &&
|
|
587
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
588
934
|
const _c = "company";
|
|
589
935
|
const _cI = "companyId";
|
|
590
936
|
const _d = "duration";
|
|
@@ -603,43 +949,3 @@ const _tZ = "timeZone";
|
|
|
603
949
|
const _xrl = "x-ratelimit-limit";
|
|
604
950
|
const _xrr = "x-ratelimit-remaining";
|
|
605
951
|
const _xrr_ = "x-ratelimit-reset";
|
|
606
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
607
|
-
if (encoded.length) {
|
|
608
|
-
return JSON.parse(encoded);
|
|
609
|
-
}
|
|
610
|
-
return {};
|
|
611
|
-
});
|
|
612
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
613
|
-
const value = await parseBody(errorBody, context);
|
|
614
|
-
value.message = value.message ?? value.Message;
|
|
615
|
-
return value;
|
|
616
|
-
};
|
|
617
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
618
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
619
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
620
|
-
let cleanValue = rawValue;
|
|
621
|
-
if (typeof cleanValue === "number") {
|
|
622
|
-
cleanValue = cleanValue.toString();
|
|
623
|
-
}
|
|
624
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
625
|
-
cleanValue = cleanValue.split(",")[0];
|
|
626
|
-
}
|
|
627
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
628
|
-
cleanValue = cleanValue.split(":")[0];
|
|
629
|
-
}
|
|
630
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
631
|
-
cleanValue = cleanValue.split("#")[1];
|
|
632
|
-
}
|
|
633
|
-
return cleanValue;
|
|
634
|
-
};
|
|
635
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
636
|
-
if (headerKey !== undefined) {
|
|
637
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
638
|
-
}
|
|
639
|
-
if (data.code !== undefined) {
|
|
640
|
-
return sanitizeErrorCode(data.code);
|
|
641
|
-
}
|
|
642
|
-
if (data["__type"] !== undefined) {
|
|
643
|
-
return sanitizeErrorCode(data["__type"]);
|
|
644
|
-
}
|
|
645
|
-
};
|