@wildix/xbees-kite-client 1.0.15 → 1.0.18
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 +347 -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 +301 -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 +120 -0
- package/dist-types/commands/CreateWidgetCommand.d.ts +120 -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 +179 -0
- package/dist-types/commands/GetWhatsAppNumberConfigurationCommand.d.ts +179 -0
- package/dist-types/commands/GetWidgetCommand.d.ts +67 -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 +180 -0
- package/dist-types/commands/ListSmsNumbersCommand.d.ts +82 -0
- package/dist-types/commands/ListWhatsAppConfigurationsCommand.d.ts +180 -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 +67 -0
- package/dist-types/commands/PutSmsNumberConfigurationCommand.d.ts +272 -0
- package/dist-types/commands/PutWhatsAppNumberConfigurationCommand.d.ts +272 -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 +120 -0
- package/dist-types/commands/index.d.ts +9 -0
- package/dist-types/models/models_0.d.ts +908 -165
- 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,8 +35,10 @@ 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': [],
|
|
41
|
+
'reassign': [],
|
|
39
42
|
'routes': _ => se_WidgetRoutesList(_, context),
|
|
40
43
|
'target': _ => (0, smithy_client_1._json)(_),
|
|
41
44
|
'temporaryWidgetId': [],
|
|
@@ -49,7 +52,7 @@ const se_CreateOrUpdateWidgetPreviewCommand = async (input, context) => {
|
|
|
49
52
|
};
|
|
50
53
|
exports.se_CreateOrUpdateWidgetPreviewCommand = se_CreateOrUpdateWidgetPreviewCommand;
|
|
51
54
|
const se_CreateWidgetCommand = async (input, context) => {
|
|
52
|
-
const b = (0,
|
|
55
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
53
56
|
const headers = {
|
|
54
57
|
'content-type': 'application/json',
|
|
55
58
|
};
|
|
@@ -59,8 +62,10 @@ const se_CreateWidgetCommand = async (input, context) => {
|
|
|
59
62
|
});
|
|
60
63
|
let body;
|
|
61
64
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
65
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
62
66
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
63
67
|
'name': [],
|
|
68
|
+
'reassign': [],
|
|
64
69
|
'routes': _ => se_WidgetRoutesList(_, context),
|
|
65
70
|
'target': _ => (0, smithy_client_1._json)(_),
|
|
66
71
|
'welcomeMessages': _ => (0, smithy_client_1._json)(_),
|
|
@@ -73,7 +78,7 @@ const se_CreateWidgetCommand = async (input, context) => {
|
|
|
73
78
|
};
|
|
74
79
|
exports.se_CreateWidgetCommand = se_CreateWidgetCommand;
|
|
75
80
|
const se_DeleteWidgetCommand = async (input, context) => {
|
|
76
|
-
const b = (0,
|
|
81
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
77
82
|
const headers = {};
|
|
78
83
|
b.bp("/v2/kite/widgets/{widgetId}");
|
|
79
84
|
b.p('widgetId', () => input.widgetId, '{widgetId}', false);
|
|
@@ -85,7 +90,7 @@ const se_DeleteWidgetCommand = async (input, context) => {
|
|
|
85
90
|
};
|
|
86
91
|
exports.se_DeleteWidgetCommand = se_DeleteWidgetCommand;
|
|
87
92
|
const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
88
|
-
const b = (0,
|
|
93
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
89
94
|
const headers = {};
|
|
90
95
|
b.bp("/v2/kite/calendar/widgets/{targetId}/slots");
|
|
91
96
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
@@ -105,7 +110,7 @@ const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
|
105
110
|
};
|
|
106
111
|
exports.se_GetCalendarSlotsCommand = se_GetCalendarSlotsCommand;
|
|
107
112
|
const se_GetConfigCommand = async (input, context) => {
|
|
108
|
-
const b = (0,
|
|
113
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
109
114
|
const headers = {};
|
|
110
115
|
b.bp("/v2/kite/config/{targetId}");
|
|
111
116
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
@@ -120,8 +125,40 @@ const se_GetConfigCommand = async (input, context) => {
|
|
|
120
125
|
return b.build();
|
|
121
126
|
};
|
|
122
127
|
exports.se_GetConfigCommand = se_GetConfigCommand;
|
|
128
|
+
const se_GetSmsNumberConfigurationCommand = async (input, context) => {
|
|
129
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
130
|
+
const headers = {};
|
|
131
|
+
b.bp("/v2/kite/sms/configurations/{serviceNumber}");
|
|
132
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
133
|
+
const query = (0, smithy_client_1.map)({
|
|
134
|
+
[_c]: [, input[_cI]],
|
|
135
|
+
});
|
|
136
|
+
let body;
|
|
137
|
+
b.m("GET")
|
|
138
|
+
.h(headers)
|
|
139
|
+
.q(query)
|
|
140
|
+
.b(body);
|
|
141
|
+
return b.build();
|
|
142
|
+
};
|
|
143
|
+
exports.se_GetSmsNumberConfigurationCommand = se_GetSmsNumberConfigurationCommand;
|
|
144
|
+
const se_GetWhatsAppNumberConfigurationCommand = async (input, context) => {
|
|
145
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
146
|
+
const headers = {};
|
|
147
|
+
b.bp("/v2/kite/whatsapp/configurations/{serviceNumber}");
|
|
148
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
149
|
+
const query = (0, smithy_client_1.map)({
|
|
150
|
+
[_c]: [, input[_cI]],
|
|
151
|
+
});
|
|
152
|
+
let body;
|
|
153
|
+
b.m("GET")
|
|
154
|
+
.h(headers)
|
|
155
|
+
.q(query)
|
|
156
|
+
.b(body);
|
|
157
|
+
return b.build();
|
|
158
|
+
};
|
|
159
|
+
exports.se_GetWhatsAppNumberConfigurationCommand = se_GetWhatsAppNumberConfigurationCommand;
|
|
123
160
|
const se_GetWidgetCommand = async (input, context) => {
|
|
124
|
-
const b = (0,
|
|
161
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
125
162
|
const headers = {};
|
|
126
163
|
b.bp("/v2/kite/widgets/{widgetId}");
|
|
127
164
|
b.p('widgetId', () => input.widgetId, '{widgetId}', false);
|
|
@@ -133,7 +170,7 @@ const se_GetWidgetCommand = async (input, context) => {
|
|
|
133
170
|
};
|
|
134
171
|
exports.se_GetWidgetCommand = se_GetWidgetCommand;
|
|
135
172
|
const se_ListAgentsCommand = async (input, context) => {
|
|
136
|
-
const b = (0,
|
|
173
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
137
174
|
const headers = {
|
|
138
175
|
'content-type': 'application/json',
|
|
139
176
|
};
|
|
@@ -153,7 +190,7 @@ const se_ListAgentsCommand = async (input, context) => {
|
|
|
153
190
|
};
|
|
154
191
|
exports.se_ListAgentsCommand = se_ListAgentsCommand;
|
|
155
192
|
const se_ListServicesCommand = async (input, context) => {
|
|
156
|
-
const b = (0,
|
|
193
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
157
194
|
const headers = {};
|
|
158
195
|
b.bp("/v2/kite/services");
|
|
159
196
|
const query = (0, smithy_client_1.map)({
|
|
@@ -167,8 +204,84 @@ const se_ListServicesCommand = async (input, context) => {
|
|
|
167
204
|
return b.build();
|
|
168
205
|
};
|
|
169
206
|
exports.se_ListServicesCommand = se_ListServicesCommand;
|
|
207
|
+
const se_ListSmsConfigurationsCommand = async (input, context) => {
|
|
208
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
209
|
+
const headers = {};
|
|
210
|
+
b.bp("/v2/kite/sms/configurations");
|
|
211
|
+
const query = (0, smithy_client_1.map)({
|
|
212
|
+
[_c]: [, input[_cI]],
|
|
213
|
+
});
|
|
214
|
+
let body;
|
|
215
|
+
b.m("GET")
|
|
216
|
+
.h(headers)
|
|
217
|
+
.q(query)
|
|
218
|
+
.b(body);
|
|
219
|
+
return b.build();
|
|
220
|
+
};
|
|
221
|
+
exports.se_ListSmsConfigurationsCommand = se_ListSmsConfigurationsCommand;
|
|
222
|
+
const se_ListSmsNumbersCommand = async (input, context) => {
|
|
223
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
224
|
+
const headers = {};
|
|
225
|
+
b.bp("/v2/kite/sms/numbers");
|
|
226
|
+
const query = (0, smithy_client_1.map)({
|
|
227
|
+
[_c]: [, input[_cI]],
|
|
228
|
+
});
|
|
229
|
+
let body;
|
|
230
|
+
b.m("GET")
|
|
231
|
+
.h(headers)
|
|
232
|
+
.q(query)
|
|
233
|
+
.b(body);
|
|
234
|
+
return b.build();
|
|
235
|
+
};
|
|
236
|
+
exports.se_ListSmsNumbersCommand = se_ListSmsNumbersCommand;
|
|
237
|
+
const se_ListWhatsAppConfigurationsCommand = async (input, context) => {
|
|
238
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
239
|
+
const headers = {};
|
|
240
|
+
b.bp("/v2/kite/whatsapp/configurations");
|
|
241
|
+
const query = (0, smithy_client_1.map)({
|
|
242
|
+
[_c]: [, input[_cI]],
|
|
243
|
+
});
|
|
244
|
+
let body;
|
|
245
|
+
b.m("GET")
|
|
246
|
+
.h(headers)
|
|
247
|
+
.q(query)
|
|
248
|
+
.b(body);
|
|
249
|
+
return b.build();
|
|
250
|
+
};
|
|
251
|
+
exports.se_ListWhatsAppConfigurationsCommand = se_ListWhatsAppConfigurationsCommand;
|
|
252
|
+
const se_ListWhatsAppNumbersCommand = async (input, context) => {
|
|
253
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
254
|
+
const headers = {};
|
|
255
|
+
b.bp("/v2/kite/whatsapp/numbers");
|
|
256
|
+
const query = (0, smithy_client_1.map)({
|
|
257
|
+
[_c]: [, input[_cI]],
|
|
258
|
+
});
|
|
259
|
+
let body;
|
|
260
|
+
b.m("GET")
|
|
261
|
+
.h(headers)
|
|
262
|
+
.q(query)
|
|
263
|
+
.b(body);
|
|
264
|
+
return b.build();
|
|
265
|
+
};
|
|
266
|
+
exports.se_ListWhatsAppNumbersCommand = se_ListWhatsAppNumbersCommand;
|
|
267
|
+
const se_ListWhatsAppTemplatesCommand = async (input, context) => {
|
|
268
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
269
|
+
const headers = {};
|
|
270
|
+
b.bp("/v2/kite/whatsapp/templates/{serviceNumber}");
|
|
271
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
272
|
+
const query = (0, smithy_client_1.map)({
|
|
273
|
+
[_c]: [, input[_cI]],
|
|
274
|
+
});
|
|
275
|
+
let body;
|
|
276
|
+
b.m("GET")
|
|
277
|
+
.h(headers)
|
|
278
|
+
.q(query)
|
|
279
|
+
.b(body);
|
|
280
|
+
return b.build();
|
|
281
|
+
};
|
|
282
|
+
exports.se_ListWhatsAppTemplatesCommand = se_ListWhatsAppTemplatesCommand;
|
|
170
283
|
const se_ListWidgetsCommand = async (input, context) => {
|
|
171
|
-
const b = (0,
|
|
284
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
172
285
|
const headers = {};
|
|
173
286
|
b.bp("/v2/kite/widgets");
|
|
174
287
|
const query = (0, smithy_client_1.map)({
|
|
@@ -182,8 +295,57 @@ const se_ListWidgetsCommand = async (input, context) => {
|
|
|
182
295
|
return b.build();
|
|
183
296
|
};
|
|
184
297
|
exports.se_ListWidgetsCommand = se_ListWidgetsCommand;
|
|
298
|
+
const se_PutSmsNumberConfigurationCommand = async (input, context) => {
|
|
299
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
300
|
+
const headers = {
|
|
301
|
+
'content-type': 'application/json',
|
|
302
|
+
};
|
|
303
|
+
b.bp("/v2/kite/sms/configurations/{serviceNumber}");
|
|
304
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
305
|
+
const query = (0, smithy_client_1.map)({
|
|
306
|
+
[_c]: [, input[_cI]],
|
|
307
|
+
});
|
|
308
|
+
let body;
|
|
309
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
310
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
311
|
+
'reassign': [],
|
|
312
|
+
'routes': _ => (0, smithy_client_1._json)(_),
|
|
313
|
+
'serviceUri': [],
|
|
314
|
+
'target': _ => (0, smithy_client_1._json)(_),
|
|
315
|
+
}));
|
|
316
|
+
b.m("PUT")
|
|
317
|
+
.h(headers)
|
|
318
|
+
.q(query)
|
|
319
|
+
.b(body);
|
|
320
|
+
return b.build();
|
|
321
|
+
};
|
|
322
|
+
exports.se_PutSmsNumberConfigurationCommand = se_PutSmsNumberConfigurationCommand;
|
|
323
|
+
const se_PutWhatsAppNumberConfigurationCommand = async (input, context) => {
|
|
324
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
325
|
+
const headers = {
|
|
326
|
+
'content-type': 'application/json',
|
|
327
|
+
};
|
|
328
|
+
b.bp("/v2/kite/whatsapp/configurations/{serviceNumber}");
|
|
329
|
+
b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
|
|
330
|
+
const query = (0, smithy_client_1.map)({
|
|
331
|
+
[_c]: [, input[_cI]],
|
|
332
|
+
});
|
|
333
|
+
let body;
|
|
334
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
335
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
336
|
+
'routes': _ => (0, smithy_client_1._json)(_),
|
|
337
|
+
'serviceUri': [],
|
|
338
|
+
'target': _ => (0, smithy_client_1._json)(_),
|
|
339
|
+
}));
|
|
340
|
+
b.m("PUT")
|
|
341
|
+
.h(headers)
|
|
342
|
+
.q(query)
|
|
343
|
+
.b(body);
|
|
344
|
+
return b.build();
|
|
345
|
+
};
|
|
346
|
+
exports.se_PutWhatsAppNumberConfigurationCommand = se_PutWhatsAppNumberConfigurationCommand;
|
|
185
347
|
const se_RescheduleCalendarEventCommand = async (input, context) => {
|
|
186
|
-
const b = (0,
|
|
348
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
187
349
|
const headers = {
|
|
188
350
|
'content-type': 'application/json',
|
|
189
351
|
};
|
|
@@ -207,7 +369,7 @@ const se_RescheduleCalendarEventCommand = async (input, context) => {
|
|
|
207
369
|
};
|
|
208
370
|
exports.se_RescheduleCalendarEventCommand = se_RescheduleCalendarEventCommand;
|
|
209
371
|
const se_ScheduleCalendarEventCommand = async (input, context) => {
|
|
210
|
-
const b = (0,
|
|
372
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
211
373
|
const headers = {
|
|
212
374
|
'content-type': 'application/json',
|
|
213
375
|
};
|
|
@@ -230,7 +392,7 @@ const se_ScheduleCalendarEventCommand = async (input, context) => {
|
|
|
230
392
|
};
|
|
231
393
|
exports.se_ScheduleCalendarEventCommand = se_ScheduleCalendarEventCommand;
|
|
232
394
|
const se_UpdateWidgetCommand = async (input, context) => {
|
|
233
|
-
const b = (0,
|
|
395
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
234
396
|
const headers = {
|
|
235
397
|
'content-type': 'application/json',
|
|
236
398
|
};
|
|
@@ -241,8 +403,10 @@ const se_UpdateWidgetCommand = async (input, context) => {
|
|
|
241
403
|
});
|
|
242
404
|
let body;
|
|
243
405
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
406
|
+
'actions': _ => (0, smithy_client_1._json)(_),
|
|
244
407
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
245
408
|
'name': [],
|
|
409
|
+
'reassign': [],
|
|
246
410
|
'routes': _ => se_WidgetRoutesList(_, context),
|
|
247
411
|
'target': _ => (0, smithy_client_1._json)(_),
|
|
248
412
|
'welcomeMessages': _ => (0, smithy_client_1._json)(_),
|
|
@@ -261,7 +425,7 @@ const de_CancelCalendarEventCommand = async (output, context) => {
|
|
|
261
425
|
const contents = (0, smithy_client_1.map)({
|
|
262
426
|
$metadata: deserializeMetadata(output),
|
|
263
427
|
});
|
|
264
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
428
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
265
429
|
const doc = (0, smithy_client_1.take)(data, {
|
|
266
430
|
'channel': smithy_client_1._json,
|
|
267
431
|
'event': smithy_client_1._json,
|
|
@@ -277,7 +441,7 @@ const de_CreateOrUpdateWidgetPreviewCommand = async (output, context) => {
|
|
|
277
441
|
const contents = (0, smithy_client_1.map)({
|
|
278
442
|
$metadata: deserializeMetadata(output),
|
|
279
443
|
});
|
|
280
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
444
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
281
445
|
const doc = (0, smithy_client_1.take)(data, {
|
|
282
446
|
'widget': _ => de_Widget(_, context),
|
|
283
447
|
});
|
|
@@ -292,7 +456,7 @@ const de_CreateWidgetCommand = async (output, context) => {
|
|
|
292
456
|
const contents = (0, smithy_client_1.map)({
|
|
293
457
|
$metadata: deserializeMetadata(output),
|
|
294
458
|
});
|
|
295
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
459
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
296
460
|
const doc = (0, smithy_client_1.take)(data, {
|
|
297
461
|
'widget': _ => de_Widget(_, context),
|
|
298
462
|
});
|
|
@@ -318,7 +482,7 @@ const de_GetCalendarSlotsCommand = async (output, context) => {
|
|
|
318
482
|
const contents = (0, smithy_client_1.map)({
|
|
319
483
|
$metadata: deserializeMetadata(output),
|
|
320
484
|
});
|
|
321
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
485
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
322
486
|
const doc = (0, smithy_client_1.take)(data, {
|
|
323
487
|
'calendar': smithy_client_1._json,
|
|
324
488
|
});
|
|
@@ -333,7 +497,7 @@ const de_GetConfigCommand = async (output, context) => {
|
|
|
333
497
|
const contents = (0, smithy_client_1.map)({
|
|
334
498
|
$metadata: deserializeMetadata(output),
|
|
335
499
|
});
|
|
336
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
500
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
337
501
|
const doc = (0, smithy_client_1.take)(data, {
|
|
338
502
|
'config': smithy_client_1._json,
|
|
339
503
|
});
|
|
@@ -341,6 +505,36 @@ const de_GetConfigCommand = async (output, context) => {
|
|
|
341
505
|
return contents;
|
|
342
506
|
};
|
|
343
507
|
exports.de_GetConfigCommand = de_GetConfigCommand;
|
|
508
|
+
const de_GetSmsNumberConfigurationCommand = async (output, context) => {
|
|
509
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
510
|
+
return de_CommandError(output, context);
|
|
511
|
+
}
|
|
512
|
+
const contents = (0, smithy_client_1.map)({
|
|
513
|
+
$metadata: deserializeMetadata(output),
|
|
514
|
+
});
|
|
515
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
516
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
517
|
+
'configuration': smithy_client_1._json,
|
|
518
|
+
});
|
|
519
|
+
Object.assign(contents, doc);
|
|
520
|
+
return contents;
|
|
521
|
+
};
|
|
522
|
+
exports.de_GetSmsNumberConfigurationCommand = de_GetSmsNumberConfigurationCommand;
|
|
523
|
+
const de_GetWhatsAppNumberConfigurationCommand = async (output, context) => {
|
|
524
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
525
|
+
return de_CommandError(output, context);
|
|
526
|
+
}
|
|
527
|
+
const contents = (0, smithy_client_1.map)({
|
|
528
|
+
$metadata: deserializeMetadata(output),
|
|
529
|
+
});
|
|
530
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
531
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
532
|
+
'configuration': smithy_client_1._json,
|
|
533
|
+
});
|
|
534
|
+
Object.assign(contents, doc);
|
|
535
|
+
return contents;
|
|
536
|
+
};
|
|
537
|
+
exports.de_GetWhatsAppNumberConfigurationCommand = de_GetWhatsAppNumberConfigurationCommand;
|
|
344
538
|
const de_GetWidgetCommand = async (output, context) => {
|
|
345
539
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
346
540
|
return de_CommandError(output, context);
|
|
@@ -348,7 +542,7 @@ const de_GetWidgetCommand = async (output, context) => {
|
|
|
348
542
|
const contents = (0, smithy_client_1.map)({
|
|
349
543
|
$metadata: deserializeMetadata(output),
|
|
350
544
|
});
|
|
351
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
545
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
352
546
|
const doc = (0, smithy_client_1.take)(data, {
|
|
353
547
|
'widget': _ => de_Widget(_, context),
|
|
354
548
|
});
|
|
@@ -363,7 +557,7 @@ const de_ListAgentsCommand = async (output, context) => {
|
|
|
363
557
|
const contents = (0, smithy_client_1.map)({
|
|
364
558
|
$metadata: deserializeMetadata(output),
|
|
365
559
|
});
|
|
366
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
560
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
367
561
|
const doc = (0, smithy_client_1.take)(data, {
|
|
368
562
|
'users': smithy_client_1._json,
|
|
369
563
|
});
|
|
@@ -378,7 +572,7 @@ const de_ListServicesCommand = async (output, context) => {
|
|
|
378
572
|
const contents = (0, smithy_client_1.map)({
|
|
379
573
|
$metadata: deserializeMetadata(output),
|
|
380
574
|
});
|
|
381
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
575
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
382
576
|
const doc = (0, smithy_client_1.take)(data, {
|
|
383
577
|
'services': smithy_client_1._json,
|
|
384
578
|
});
|
|
@@ -386,6 +580,81 @@ const de_ListServicesCommand = async (output, context) => {
|
|
|
386
580
|
return contents;
|
|
387
581
|
};
|
|
388
582
|
exports.de_ListServicesCommand = de_ListServicesCommand;
|
|
583
|
+
const de_ListSmsConfigurationsCommand = async (output, context) => {
|
|
584
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
585
|
+
return de_CommandError(output, context);
|
|
586
|
+
}
|
|
587
|
+
const contents = (0, smithy_client_1.map)({
|
|
588
|
+
$metadata: deserializeMetadata(output),
|
|
589
|
+
});
|
|
590
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
591
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
592
|
+
'configurations': smithy_client_1._json,
|
|
593
|
+
});
|
|
594
|
+
Object.assign(contents, doc);
|
|
595
|
+
return contents;
|
|
596
|
+
};
|
|
597
|
+
exports.de_ListSmsConfigurationsCommand = de_ListSmsConfigurationsCommand;
|
|
598
|
+
const de_ListSmsNumbersCommand = async (output, context) => {
|
|
599
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
600
|
+
return de_CommandError(output, context);
|
|
601
|
+
}
|
|
602
|
+
const contents = (0, smithy_client_1.map)({
|
|
603
|
+
$metadata: deserializeMetadata(output),
|
|
604
|
+
});
|
|
605
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
606
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
607
|
+
'numbers': smithy_client_1._json,
|
|
608
|
+
});
|
|
609
|
+
Object.assign(contents, doc);
|
|
610
|
+
return contents;
|
|
611
|
+
};
|
|
612
|
+
exports.de_ListSmsNumbersCommand = de_ListSmsNumbersCommand;
|
|
613
|
+
const de_ListWhatsAppConfigurationsCommand = async (output, context) => {
|
|
614
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
615
|
+
return de_CommandError(output, context);
|
|
616
|
+
}
|
|
617
|
+
const contents = (0, smithy_client_1.map)({
|
|
618
|
+
$metadata: deserializeMetadata(output),
|
|
619
|
+
});
|
|
620
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
621
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
622
|
+
'configurations': smithy_client_1._json,
|
|
623
|
+
});
|
|
624
|
+
Object.assign(contents, doc);
|
|
625
|
+
return contents;
|
|
626
|
+
};
|
|
627
|
+
exports.de_ListWhatsAppConfigurationsCommand = de_ListWhatsAppConfigurationsCommand;
|
|
628
|
+
const de_ListWhatsAppNumbersCommand = async (output, context) => {
|
|
629
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
630
|
+
return de_CommandError(output, context);
|
|
631
|
+
}
|
|
632
|
+
const contents = (0, smithy_client_1.map)({
|
|
633
|
+
$metadata: deserializeMetadata(output),
|
|
634
|
+
});
|
|
635
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
636
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
637
|
+
'numbers': smithy_client_1._json,
|
|
638
|
+
});
|
|
639
|
+
Object.assign(contents, doc);
|
|
640
|
+
return contents;
|
|
641
|
+
};
|
|
642
|
+
exports.de_ListWhatsAppNumbersCommand = de_ListWhatsAppNumbersCommand;
|
|
643
|
+
const de_ListWhatsAppTemplatesCommand = async (output, context) => {
|
|
644
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
645
|
+
return de_CommandError(output, context);
|
|
646
|
+
}
|
|
647
|
+
const contents = (0, smithy_client_1.map)({
|
|
648
|
+
$metadata: deserializeMetadata(output),
|
|
649
|
+
});
|
|
650
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
651
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
652
|
+
'templates': smithy_client_1._json,
|
|
653
|
+
});
|
|
654
|
+
Object.assign(contents, doc);
|
|
655
|
+
return contents;
|
|
656
|
+
};
|
|
657
|
+
exports.de_ListWhatsAppTemplatesCommand = de_ListWhatsAppTemplatesCommand;
|
|
389
658
|
const de_ListWidgetsCommand = async (output, context) => {
|
|
390
659
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
391
660
|
return de_CommandError(output, context);
|
|
@@ -393,7 +662,7 @@ const de_ListWidgetsCommand = async (output, context) => {
|
|
|
393
662
|
const contents = (0, smithy_client_1.map)({
|
|
394
663
|
$metadata: deserializeMetadata(output),
|
|
395
664
|
});
|
|
396
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
665
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
397
666
|
const doc = (0, smithy_client_1.take)(data, {
|
|
398
667
|
'widgets': _ => de_WidgetsList(_, context),
|
|
399
668
|
});
|
|
@@ -401,6 +670,36 @@ const de_ListWidgetsCommand = async (output, context) => {
|
|
|
401
670
|
return contents;
|
|
402
671
|
};
|
|
403
672
|
exports.de_ListWidgetsCommand = de_ListWidgetsCommand;
|
|
673
|
+
const de_PutSmsNumberConfigurationCommand = async (output, context) => {
|
|
674
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
675
|
+
return de_CommandError(output, context);
|
|
676
|
+
}
|
|
677
|
+
const contents = (0, smithy_client_1.map)({
|
|
678
|
+
$metadata: deserializeMetadata(output),
|
|
679
|
+
});
|
|
680
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
681
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
682
|
+
'configuration': smithy_client_1._json,
|
|
683
|
+
});
|
|
684
|
+
Object.assign(contents, doc);
|
|
685
|
+
return contents;
|
|
686
|
+
};
|
|
687
|
+
exports.de_PutSmsNumberConfigurationCommand = de_PutSmsNumberConfigurationCommand;
|
|
688
|
+
const de_PutWhatsAppNumberConfigurationCommand = async (output, context) => {
|
|
689
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
690
|
+
return de_CommandError(output, context);
|
|
691
|
+
}
|
|
692
|
+
const contents = (0, smithy_client_1.map)({
|
|
693
|
+
$metadata: deserializeMetadata(output),
|
|
694
|
+
});
|
|
695
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
696
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
697
|
+
'configuration': smithy_client_1._json,
|
|
698
|
+
});
|
|
699
|
+
Object.assign(contents, doc);
|
|
700
|
+
return contents;
|
|
701
|
+
};
|
|
702
|
+
exports.de_PutWhatsAppNumberConfigurationCommand = de_PutWhatsAppNumberConfigurationCommand;
|
|
404
703
|
const de_RescheduleCalendarEventCommand = async (output, context) => {
|
|
405
704
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
406
705
|
return de_CommandError(output, context);
|
|
@@ -408,7 +707,7 @@ const de_RescheduleCalendarEventCommand = async (output, context) => {
|
|
|
408
707
|
const contents = (0, smithy_client_1.map)({
|
|
409
708
|
$metadata: deserializeMetadata(output),
|
|
410
709
|
});
|
|
411
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
710
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
412
711
|
const doc = (0, smithy_client_1.take)(data, {
|
|
413
712
|
'channel': smithy_client_1._json,
|
|
414
713
|
'event': smithy_client_1._json,
|
|
@@ -424,7 +723,7 @@ const de_ScheduleCalendarEventCommand = async (output, context) => {
|
|
|
424
723
|
const contents = (0, smithy_client_1.map)({
|
|
425
724
|
$metadata: deserializeMetadata(output),
|
|
426
725
|
});
|
|
427
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
726
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
428
727
|
const doc = (0, smithy_client_1.take)(data, {
|
|
429
728
|
'channel': smithy_client_1._json,
|
|
430
729
|
'event': smithy_client_1._json,
|
|
@@ -440,7 +739,7 @@ const de_UpdateWidgetCommand = async (output, context) => {
|
|
|
440
739
|
const contents = (0, smithy_client_1.map)({
|
|
441
740
|
$metadata: deserializeMetadata(output),
|
|
442
741
|
});
|
|
443
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
742
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
444
743
|
const doc = (0, smithy_client_1.take)(data, {
|
|
445
744
|
'widget': _ => de_Widget(_, context),
|
|
446
745
|
});
|
|
@@ -451,9 +750,9 @@ exports.de_UpdateWidgetCommand = de_UpdateWidgetCommand;
|
|
|
451
750
|
const de_CommandError = async (output, context) => {
|
|
452
751
|
const parsedOutput = {
|
|
453
752
|
...output,
|
|
454
|
-
body: await
|
|
753
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context)
|
|
455
754
|
};
|
|
456
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
755
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
457
756
|
switch (errorCode) {
|
|
458
757
|
case "ChannelNotFoundException":
|
|
459
758
|
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
@@ -461,6 +760,9 @@ const de_CommandError = async (output, context) => {
|
|
|
461
760
|
case "ForbiddenException":
|
|
462
761
|
case "smithy.framework#ForbiddenException":
|
|
463
762
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
763
|
+
case "NotFoundException":
|
|
764
|
+
case "smithy.framework#NotFoundException":
|
|
765
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
464
766
|
case "RateLimitExceededException":
|
|
465
767
|
case "smithy.framework#RateLimitExceededException":
|
|
466
768
|
throw await de_RateLimitExceededExceptionRes(parsedOutput, context);
|
|
@@ -499,6 +801,19 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
|
499
801
|
});
|
|
500
802
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
501
803
|
};
|
|
804
|
+
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
805
|
+
const contents = (0, smithy_client_1.map)({});
|
|
806
|
+
const data = parsedOutput.body;
|
|
807
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
808
|
+
'message': smithy_client_1.expectString,
|
|
809
|
+
});
|
|
810
|
+
Object.assign(contents, doc);
|
|
811
|
+
const exception = new models_0_1.NotFoundException({
|
|
812
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
813
|
+
...contents
|
|
814
|
+
});
|
|
815
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
816
|
+
};
|
|
502
817
|
const de_RateLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
503
818
|
const contents = (0, smithy_client_1.map)({
|
|
504
819
|
[_rL]: [, parsedOutput.headers[_xrl]],
|
|
@@ -589,13 +904,15 @@ const se_WidgetRoutesList = (input, context) => {
|
|
|
589
904
|
};
|
|
590
905
|
const de_Widget = (output, context) => {
|
|
591
906
|
return (0, smithy_client_1.take)(output, {
|
|
907
|
+
'actions': smithy_client_1._json,
|
|
592
908
|
'appearance': smithy_client_1._json,
|
|
593
909
|
'company': smithy_client_1.expectString,
|
|
594
910
|
'createdAt': smithy_client_1.expectString,
|
|
595
911
|
'id': smithy_client_1.expectString,
|
|
596
912
|
'name': smithy_client_1.expectString,
|
|
913
|
+
'reassign': smithy_client_1.expectBoolean,
|
|
597
914
|
'routes': (_) => de_WidgetRoutesList(_, context),
|
|
598
|
-
'target': (_) => (0, smithy_client_1._json)((0,
|
|
915
|
+
'target': (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
599
916
|
'updatedAt': smithy_client_1.expectString,
|
|
600
917
|
'welcomeMessages': smithy_client_1._json,
|
|
601
918
|
});
|
|
@@ -619,12 +936,6 @@ const deserializeMetadata = (output) => ({
|
|
|
619
936
|
cfId: output.headers["x-amz-cf-id"],
|
|
620
937
|
});
|
|
621
938
|
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
939
|
const _c = "company";
|
|
629
940
|
const _cI = "companyId";
|
|
630
941
|
const _d = "duration";
|
|
@@ -643,43 +954,3 @@ const _tZ = "timeZone";
|
|
|
643
954
|
const _xrl = "x-ratelimit-limit";
|
|
644
955
|
const _xrr = "x-ratelimit-remaining";
|
|
645
956
|
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
|
-
};
|