@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.
Files changed (65) hide show
  1. package/dist-cjs/Kite.js +18 -0
  2. package/dist-cjs/KiteClient.js +4 -5
  3. package/dist-cjs/commands/GetSmsNumberConfigurationCommand.js +21 -0
  4. package/dist-cjs/commands/GetWhatsAppNumberConfigurationCommand.js +21 -0
  5. package/dist-cjs/commands/ListSmsConfigurationsCommand.js +21 -0
  6. package/dist-cjs/commands/ListSmsNumbersCommand.js +21 -0
  7. package/dist-cjs/commands/ListWhatsAppConfigurationsCommand.js +21 -0
  8. package/dist-cjs/commands/ListWhatsAppNumbersCommand.js +21 -0
  9. package/dist-cjs/commands/ListWhatsAppTemplatesCommand.js +21 -0
  10. package/dist-cjs/commands/PutSmsNumberConfigurationCommand.js +21 -0
  11. package/dist-cjs/commands/PutWhatsAppNumberConfigurationCommand.js +21 -0
  12. package/dist-cjs/commands/index.js +9 -0
  13. package/dist-cjs/models/models_0.js +113 -22
  14. package/dist-cjs/protocols/Aws_restJson1.js +342 -76
  15. package/dist-cjs/runtimeConfig.browser.js +1 -1
  16. package/dist-cjs/runtimeConfig.js +4 -3
  17. package/dist-cjs/runtimeExtensions.js +2 -10
  18. package/dist-es/Kite.js +18 -0
  19. package/dist-es/KiteClient.js +4 -5
  20. package/dist-es/commands/GetSmsNumberConfigurationCommand.js +17 -0
  21. package/dist-es/commands/GetWhatsAppNumberConfigurationCommand.js +17 -0
  22. package/dist-es/commands/ListSmsConfigurationsCommand.js +17 -0
  23. package/dist-es/commands/ListSmsNumbersCommand.js +17 -0
  24. package/dist-es/commands/ListWhatsAppConfigurationsCommand.js +17 -0
  25. package/dist-es/commands/ListWhatsAppNumbersCommand.js +17 -0
  26. package/dist-es/commands/ListWhatsAppTemplatesCommand.js +17 -0
  27. package/dist-es/commands/PutSmsNumberConfigurationCommand.js +17 -0
  28. package/dist-es/commands/PutWhatsAppNumberConfigurationCommand.js +17 -0
  29. package/dist-es/commands/index.js +9 -0
  30. package/dist-es/models/models_0.js +105 -15
  31. package/dist-es/protocols/Aws_restJson1.js +296 -48
  32. package/dist-es/runtimeConfig.browser.js +2 -2
  33. package/dist-es/runtimeConfig.js +5 -4
  34. package/dist-es/runtimeExtensions.js +2 -10
  35. package/dist-types/Kite.d.ts +67 -0
  36. package/dist-types/KiteClient.d.ts +11 -2
  37. package/dist-types/commands/CancelCalendarEventCommand.d.ts +17 -0
  38. package/dist-types/commands/CreateOrUpdateWidgetPreviewCommand.d.ts +118 -0
  39. package/dist-types/commands/CreateWidgetCommand.d.ts +118 -0
  40. package/dist-types/commands/DeleteWidgetCommand.d.ts +14 -0
  41. package/dist-types/commands/GetCalendarSlotsCommand.d.ts +14 -0
  42. package/dist-types/commands/GetConfigCommand.d.ts +14 -0
  43. package/dist-types/commands/GetSmsNumberConfigurationCommand.d.ts +178 -0
  44. package/dist-types/commands/GetWhatsAppNumberConfigurationCommand.d.ts +178 -0
  45. package/dist-types/commands/GetWidgetCommand.d.ts +66 -0
  46. package/dist-types/commands/ListAgentsCommand.d.ts +14 -0
  47. package/dist-types/commands/ListServicesCommand.d.ts +14 -0
  48. package/dist-types/commands/ListSmsConfigurationsCommand.d.ts +179 -0
  49. package/dist-types/commands/ListSmsNumbersCommand.d.ts +82 -0
  50. package/dist-types/commands/ListWhatsAppConfigurationsCommand.d.ts +179 -0
  51. package/dist-types/commands/ListWhatsAppNumbersCommand.d.ts +82 -0
  52. package/dist-types/commands/ListWhatsAppTemplatesCommand.d.ts +118 -0
  53. package/dist-types/commands/ListWidgetsCommand.d.ts +66 -0
  54. package/dist-types/commands/PutSmsNumberConfigurationCommand.d.ts +270 -0
  55. package/dist-types/commands/PutWhatsAppNumberConfigurationCommand.d.ts +270 -0
  56. package/dist-types/commands/RescheduleCalendarEventCommand.d.ts +17 -0
  57. package/dist-types/commands/ScheduleCalendarEventCommand.d.ts +17 -0
  58. package/dist-types/commands/UpdateWidgetCommand.d.ts +118 -0
  59. package/dist-types/commands/index.d.ts +9 -0
  60. package/dist-types/models/models_0.d.ts +869 -161
  61. package/dist-types/protocols/Aws_restJson1.d.ts +81 -0
  62. package/dist-types/runtimeConfig.browser.d.ts +2 -1
  63. package/dist-types/runtimeConfig.d.ts +2 -1
  64. package/dist-types/runtimeConfig.native.d.ts +2 -1
  65. package/package.json +37 -33
@@ -1,7 +1,8 @@
1
1
  import { KiteServiceException as __BaseException } from "../models/KiteServiceException";
2
- import { ChannelNotFoundException, EventNotFoundException, ForbiddenException, RateLimitExceededException, TargetNotFoundException, ValidationException, WidgetNotFoundException, } from "../models/models_0";
2
+ import { ChannelNotFoundException, EventNotFoundException, ForbiddenException, NotFoundException, RateLimitExceededException, TargetNotFoundException, ValidationException, WidgetNotFoundException, } from "../models/models_0";
3
+ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
3
4
  import { requestBuilder as rb } from "@smithy/core";
4
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
6
  export const se_CancelCalendarEventCommand = async (input, context) => {
6
7
  const b = rb(input, context);
7
8
  const headers = {};
@@ -30,6 +31,7 @@ export const se_CreateOrUpdateWidgetPreviewCommand = async (input, context) => {
30
31
  });
31
32
  let body;
32
33
  body = JSON.stringify(take(input, {
34
+ 'actions': _ => _json(_),
33
35
  'appearance': _ => _json(_),
34
36
  'name': [],
35
37
  'routes': _ => se_WidgetRoutesList(_, context),
@@ -54,6 +56,7 @@ export const se_CreateWidgetCommand = async (input, context) => {
54
56
  });
55
57
  let body;
56
58
  body = JSON.stringify(take(input, {
59
+ 'actions': _ => _json(_),
57
60
  'appearance': _ => _json(_),
58
61
  'name': [],
59
62
  'routes': _ => se_WidgetRoutesList(_, context),
@@ -111,6 +114,36 @@ export const se_GetConfigCommand = async (input, context) => {
111
114
  .b(body);
112
115
  return b.build();
113
116
  };
117
+ export const se_GetSmsNumberConfigurationCommand = async (input, context) => {
118
+ const b = rb(input, context);
119
+ const headers = {};
120
+ b.bp("/v2/kite/sms/configurations/{serviceNumber}");
121
+ b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
122
+ const query = map({
123
+ [_c]: [, input[_cI]],
124
+ });
125
+ let body;
126
+ b.m("GET")
127
+ .h(headers)
128
+ .q(query)
129
+ .b(body);
130
+ return b.build();
131
+ };
132
+ export const se_GetWhatsAppNumberConfigurationCommand = async (input, context) => {
133
+ const b = rb(input, context);
134
+ const headers = {};
135
+ b.bp("/v2/kite/whatsapp/configurations/{serviceNumber}");
136
+ b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
137
+ const query = map({
138
+ [_c]: [, input[_cI]],
139
+ });
140
+ let body;
141
+ b.m("GET")
142
+ .h(headers)
143
+ .q(query)
144
+ .b(body);
145
+ return b.build();
146
+ };
114
147
  export const se_GetWidgetCommand = async (input, context) => {
115
148
  const b = rb(input, context);
116
149
  const headers = {};
@@ -155,6 +188,77 @@ export const se_ListServicesCommand = async (input, context) => {
155
188
  .b(body);
156
189
  return b.build();
157
190
  };
191
+ export const se_ListSmsConfigurationsCommand = async (input, context) => {
192
+ const b = rb(input, context);
193
+ const headers = {};
194
+ b.bp("/v2/kite/sms/configurations");
195
+ const query = map({
196
+ [_c]: [, input[_cI]],
197
+ });
198
+ let body;
199
+ b.m("GET")
200
+ .h(headers)
201
+ .q(query)
202
+ .b(body);
203
+ return b.build();
204
+ };
205
+ export const se_ListSmsNumbersCommand = async (input, context) => {
206
+ const b = rb(input, context);
207
+ const headers = {};
208
+ b.bp("/v2/kite/sms/numbers");
209
+ const query = 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
+ export const se_ListWhatsAppConfigurationsCommand = async (input, context) => {
220
+ const b = rb(input, context);
221
+ const headers = {};
222
+ b.bp("/v2/kite/whatsapp/configurations");
223
+ const query = map({
224
+ [_c]: [, input[_cI]],
225
+ });
226
+ let body;
227
+ b.m("GET")
228
+ .h(headers)
229
+ .q(query)
230
+ .b(body);
231
+ return b.build();
232
+ };
233
+ export const se_ListWhatsAppNumbersCommand = async (input, context) => {
234
+ const b = rb(input, context);
235
+ const headers = {};
236
+ b.bp("/v2/kite/whatsapp/numbers");
237
+ const query = map({
238
+ [_c]: [, input[_cI]],
239
+ });
240
+ let body;
241
+ b.m("GET")
242
+ .h(headers)
243
+ .q(query)
244
+ .b(body);
245
+ return b.build();
246
+ };
247
+ export const se_ListWhatsAppTemplatesCommand = async (input, context) => {
248
+ const b = rb(input, context);
249
+ const headers = {};
250
+ b.bp("/v2/kite/whatsapp/templates/{serviceNumber}");
251
+ b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
252
+ const query = map({
253
+ [_c]: [, input[_cI]],
254
+ });
255
+ let body;
256
+ b.m("GET")
257
+ .h(headers)
258
+ .q(query)
259
+ .b(body);
260
+ return b.build();
261
+ };
158
262
  export const se_ListWidgetsCommand = async (input, context) => {
159
263
  const b = rb(input, context);
160
264
  const headers = {};
@@ -169,6 +273,52 @@ export const se_ListWidgetsCommand = async (input, context) => {
169
273
  .b(body);
170
274
  return b.build();
171
275
  };
276
+ export const se_PutSmsNumberConfigurationCommand = async (input, context) => {
277
+ const b = rb(input, context);
278
+ const headers = {
279
+ 'content-type': 'application/json',
280
+ };
281
+ b.bp("/v2/kite/sms/configurations/{serviceNumber}");
282
+ b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
283
+ const query = map({
284
+ [_c]: [, input[_cI]],
285
+ });
286
+ let body;
287
+ body = JSON.stringify(take(input, {
288
+ 'actions': _ => _json(_),
289
+ 'routes': _ => _json(_),
290
+ 'serviceUri': [],
291
+ 'target': _ => _json(_),
292
+ }));
293
+ b.m("PUT")
294
+ .h(headers)
295
+ .q(query)
296
+ .b(body);
297
+ return b.build();
298
+ };
299
+ export const se_PutWhatsAppNumberConfigurationCommand = async (input, context) => {
300
+ const b = rb(input, context);
301
+ const headers = {
302
+ 'content-type': 'application/json',
303
+ };
304
+ b.bp("/v2/kite/whatsapp/configurations/{serviceNumber}");
305
+ b.p('serviceNumber', () => input.serviceNumber, '{serviceNumber}', false);
306
+ const query = map({
307
+ [_c]: [, input[_cI]],
308
+ });
309
+ let body;
310
+ body = JSON.stringify(take(input, {
311
+ 'actions': _ => _json(_),
312
+ 'routes': _ => _json(_),
313
+ 'serviceUri': [],
314
+ 'target': _ => _json(_),
315
+ }));
316
+ b.m("PUT")
317
+ .h(headers)
318
+ .q(query)
319
+ .b(body);
320
+ return b.build();
321
+ };
172
322
  export const se_RescheduleCalendarEventCommand = async (input, context) => {
173
323
  const b = rb(input, context);
174
324
  const headers = {
@@ -226,6 +376,7 @@ export const se_UpdateWidgetCommand = async (input, context) => {
226
376
  });
227
377
  let body;
228
378
  body = JSON.stringify(take(input, {
379
+ 'actions': _ => _json(_),
229
380
  'appearance': _ => _json(_),
230
381
  'name': [],
231
382
  'routes': _ => se_WidgetRoutesList(_, context),
@@ -319,6 +470,34 @@ export const de_GetConfigCommand = async (output, context) => {
319
470
  Object.assign(contents, doc);
320
471
  return contents;
321
472
  };
473
+ export const de_GetSmsNumberConfigurationCommand = async (output, context) => {
474
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
475
+ return de_CommandError(output, context);
476
+ }
477
+ const contents = map({
478
+ $metadata: deserializeMetadata(output),
479
+ });
480
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
481
+ const doc = take(data, {
482
+ 'configuration': _json,
483
+ });
484
+ Object.assign(contents, doc);
485
+ return contents;
486
+ };
487
+ export const de_GetWhatsAppNumberConfigurationCommand = async (output, context) => {
488
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
489
+ return de_CommandError(output, context);
490
+ }
491
+ const contents = map({
492
+ $metadata: deserializeMetadata(output),
493
+ });
494
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
495
+ const doc = take(data, {
496
+ 'configuration': _json,
497
+ });
498
+ Object.assign(contents, doc);
499
+ return contents;
500
+ };
322
501
  export const de_GetWidgetCommand = async (output, context) => {
323
502
  if (output.statusCode !== 200 && output.statusCode >= 300) {
324
503
  return de_CommandError(output, context);
@@ -361,6 +540,76 @@ export const de_ListServicesCommand = async (output, context) => {
361
540
  Object.assign(contents, doc);
362
541
  return contents;
363
542
  };
543
+ export const de_ListSmsConfigurationsCommand = async (output, context) => {
544
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
545
+ return de_CommandError(output, context);
546
+ }
547
+ const contents = map({
548
+ $metadata: deserializeMetadata(output),
549
+ });
550
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
551
+ const doc = take(data, {
552
+ 'configurations': _json,
553
+ });
554
+ Object.assign(contents, doc);
555
+ return contents;
556
+ };
557
+ export const de_ListSmsNumbersCommand = async (output, context) => {
558
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
559
+ return de_CommandError(output, context);
560
+ }
561
+ const contents = map({
562
+ $metadata: deserializeMetadata(output),
563
+ });
564
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
565
+ const doc = take(data, {
566
+ 'numbers': _json,
567
+ });
568
+ Object.assign(contents, doc);
569
+ return contents;
570
+ };
571
+ export const de_ListWhatsAppConfigurationsCommand = async (output, context) => {
572
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
573
+ return de_CommandError(output, context);
574
+ }
575
+ const contents = map({
576
+ $metadata: deserializeMetadata(output),
577
+ });
578
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
579
+ const doc = take(data, {
580
+ 'configurations': _json,
581
+ });
582
+ Object.assign(contents, doc);
583
+ return contents;
584
+ };
585
+ export const de_ListWhatsAppNumbersCommand = async (output, context) => {
586
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
587
+ return de_CommandError(output, context);
588
+ }
589
+ const contents = map({
590
+ $metadata: deserializeMetadata(output),
591
+ });
592
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
593
+ const doc = take(data, {
594
+ 'numbers': _json,
595
+ });
596
+ Object.assign(contents, doc);
597
+ return contents;
598
+ };
599
+ export const de_ListWhatsAppTemplatesCommand = async (output, context) => {
600
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
601
+ return de_CommandError(output, context);
602
+ }
603
+ const contents = map({
604
+ $metadata: deserializeMetadata(output),
605
+ });
606
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
607
+ const doc = take(data, {
608
+ 'templates': _json,
609
+ });
610
+ Object.assign(contents, doc);
611
+ return contents;
612
+ };
364
613
  export const de_ListWidgetsCommand = async (output, context) => {
365
614
  if (output.statusCode !== 200 && output.statusCode >= 300) {
366
615
  return de_CommandError(output, context);
@@ -375,6 +624,34 @@ export const de_ListWidgetsCommand = async (output, context) => {
375
624
  Object.assign(contents, doc);
376
625
  return contents;
377
626
  };
627
+ export const de_PutSmsNumberConfigurationCommand = async (output, context) => {
628
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
629
+ return de_CommandError(output, context);
630
+ }
631
+ const contents = map({
632
+ $metadata: deserializeMetadata(output),
633
+ });
634
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
635
+ const doc = take(data, {
636
+ 'configuration': _json,
637
+ });
638
+ Object.assign(contents, doc);
639
+ return contents;
640
+ };
641
+ export const de_PutWhatsAppNumberConfigurationCommand = async (output, context) => {
642
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
643
+ return de_CommandError(output, context);
644
+ }
645
+ const contents = map({
646
+ $metadata: deserializeMetadata(output),
647
+ });
648
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
649
+ const doc = take(data, {
650
+ 'configuration': _json,
651
+ });
652
+ Object.assign(contents, doc);
653
+ return contents;
654
+ };
378
655
  export const de_RescheduleCalendarEventCommand = async (output, context) => {
379
656
  if (output.statusCode !== 200 && output.statusCode >= 300) {
380
657
  return de_CommandError(output, context);
@@ -432,6 +709,9 @@ const de_CommandError = async (output, context) => {
432
709
  case "ForbiddenException":
433
710
  case "smithy.framework#ForbiddenException":
434
711
  throw await de_ForbiddenExceptionRes(parsedOutput, context);
712
+ case "NotFoundException":
713
+ case "smithy.framework#NotFoundException":
714
+ throw await de_NotFoundExceptionRes(parsedOutput, context);
435
715
  case "RateLimitExceededException":
436
716
  case "smithy.framework#RateLimitExceededException":
437
717
  throw await de_RateLimitExceededExceptionRes(parsedOutput, context);
@@ -470,6 +750,19 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
470
750
  });
471
751
  return __decorateServiceException(exception, parsedOutput.body);
472
752
  };
753
+ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
754
+ const contents = map({});
755
+ const data = parsedOutput.body;
756
+ const doc = take(data, {
757
+ 'message': __expectString,
758
+ });
759
+ Object.assign(contents, doc);
760
+ const exception = new NotFoundException({
761
+ $metadata: deserializeMetadata(parsedOutput),
762
+ ...contents
763
+ });
764
+ return __decorateServiceException(exception, parsedOutput.body);
765
+ };
473
766
  const de_RateLimitExceededExceptionRes = async (parsedOutput, context) => {
474
767
  const contents = map({
475
768
  [_rL]: [, parsedOutput.headers[_xrl]],
@@ -560,6 +853,7 @@ const se_WidgetRoutesList = (input, context) => {
560
853
  };
561
854
  const de_Widget = (output, context) => {
562
855
  return take(output, {
856
+ 'actions': _json,
563
857
  'appearance': _json,
564
858
  'company': __expectString,
565
859
  'createdAt': __expectString,
@@ -590,12 +884,6 @@ const deserializeMetadata = (output) => ({
590
884
  cfId: output.headers["x-amz-cf-id"],
591
885
  });
592
886
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
593
- const isSerializableHeaderValue = (value) => value !== undefined &&
594
- value !== null &&
595
- value !== "" &&
596
- (!Object.getOwnPropertyNames(value).includes("length") ||
597
- value.length != 0) &&
598
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
599
887
  const _c = "company";
600
888
  const _cI = "companyId";
601
889
  const _d = "duration";
@@ -614,43 +902,3 @@ const _tZ = "timeZone";
614
902
  const _xrl = "x-ratelimit-limit";
615
903
  const _xrr = "x-ratelimit-remaining";
616
904
  const _xrr_ = "x-ratelimit-reset";
617
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
618
- if (encoded.length) {
619
- return JSON.parse(encoded);
620
- }
621
- return {};
622
- });
623
- const parseErrorBody = async (errorBody, context) => {
624
- const value = await parseBody(errorBody, context);
625
- value.message = value.message ?? value.Message;
626
- return value;
627
- };
628
- const loadRestJsonErrorCode = (output, data) => {
629
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
630
- const sanitizeErrorCode = (rawValue) => {
631
- let cleanValue = rawValue;
632
- if (typeof cleanValue === "number") {
633
- cleanValue = cleanValue.toString();
634
- }
635
- if (cleanValue.indexOf(",") >= 0) {
636
- cleanValue = cleanValue.split(",")[0];
637
- }
638
- if (cleanValue.indexOf(":") >= 0) {
639
- cleanValue = cleanValue.split(":")[0];
640
- }
641
- if (cleanValue.indexOf("#") >= 0) {
642
- cleanValue = cleanValue.split("#")[1];
643
- }
644
- return cleanValue;
645
- };
646
- const headerKey = findKey(output.headers, "x-amzn-errortype");
647
- if (headerKey !== undefined) {
648
- return sanitizeErrorCode(output.headers[headerKey]);
649
- }
650
- if (data.code !== undefined) {
651
- return sanitizeErrorCode(data.code);
652
- }
653
- if (data["__type"] !== undefined) {
654
- return sanitizeErrorCode(data["__type"]);
655
- }
656
- };
@@ -1,6 +1,6 @@
1
1
  import packageInfo from "../package.json";
2
2
  import { Sha256 } from "@aws-crypto/sha256-browser";
3
- import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
3
+ import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
4
4
  import { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
5
5
  import { calculateBodyLength } from "@smithy/util-body-length-browser";
6
6
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
@@ -17,7 +17,7 @@ export const getRuntimeConfig = (config) => {
17
17
  runtime: "browser",
18
18
  defaultsMode,
19
19
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
20
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
21
21
  maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
22
22
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
23
23
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
@@ -1,5 +1,5 @@
1
1
  import packageInfo from "../package.json";
2
- import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
2
+ import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider, } from "@aws-sdk/util-user-agent-node";
3
3
  import { Hash } from "@smithy/hash-node";
4
4
  import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
5
5
  import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
@@ -21,11 +21,12 @@ export const getRuntimeConfig = (config) => {
21
21
  runtime: "node",
22
22
  defaultsMode,
23
23
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
24
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
25
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
24
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
26
26
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
- retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }),
27
+ retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }, config),
28
28
  sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
29
29
  streamCollector: config?.streamCollector ?? streamCollector,
30
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
30
31
  };
31
32
  };
@@ -1,15 +1,7 @@
1
1
  import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, } from "@smithy/protocol-http";
2
2
  import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, } from "@smithy/smithy-client";
3
- const asPartial = (t) => t;
4
3
  export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
5
- const extensionConfiguration = {
6
- ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
7
- ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
8
- };
4
+ const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig));
9
5
  extensions.forEach(extension => extension.configure(extensionConfiguration));
10
- return {
11
- ...runtimeConfig,
12
- ...resolveDefaultRuntimeConfig(extensionConfiguration),
13
- ...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
14
- };
6
+ return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration));
15
7
  };
@@ -5,10 +5,19 @@ import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "./commands/
5
5
  import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "./commands/DeleteWidgetCommand";
6
6
  import { GetCalendarSlotsCommandInput, GetCalendarSlotsCommandOutput } from "./commands/GetCalendarSlotsCommand";
7
7
  import { GetConfigCommandInput, GetConfigCommandOutput } from "./commands/GetConfigCommand";
8
+ import { GetSmsNumberConfigurationCommandInput, GetSmsNumberConfigurationCommandOutput } from "./commands/GetSmsNumberConfigurationCommand";
9
+ import { GetWhatsAppNumberConfigurationCommandInput, GetWhatsAppNumberConfigurationCommandOutput } from "./commands/GetWhatsAppNumberConfigurationCommand";
8
10
  import { GetWidgetCommandInput, GetWidgetCommandOutput } from "./commands/GetWidgetCommand";
9
11
  import { ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
10
12
  import { ListServicesCommandInput, ListServicesCommandOutput } from "./commands/ListServicesCommand";
13
+ import { ListSmsConfigurationsCommandInput, ListSmsConfigurationsCommandOutput } from "./commands/ListSmsConfigurationsCommand";
14
+ import { ListSmsNumbersCommandInput, ListSmsNumbersCommandOutput } from "./commands/ListSmsNumbersCommand";
15
+ import { ListWhatsAppConfigurationsCommandInput, ListWhatsAppConfigurationsCommandOutput } from "./commands/ListWhatsAppConfigurationsCommand";
16
+ import { ListWhatsAppNumbersCommandInput, ListWhatsAppNumbersCommandOutput } from "./commands/ListWhatsAppNumbersCommand";
17
+ import { ListWhatsAppTemplatesCommandInput, ListWhatsAppTemplatesCommandOutput } from "./commands/ListWhatsAppTemplatesCommand";
11
18
  import { ListWidgetsCommandInput, ListWidgetsCommandOutput } from "./commands/ListWidgetsCommand";
19
+ import { PutSmsNumberConfigurationCommandInput, PutSmsNumberConfigurationCommandOutput } from "./commands/PutSmsNumberConfigurationCommand";
20
+ import { PutWhatsAppNumberConfigurationCommandInput, PutWhatsAppNumberConfigurationCommandOutput } from "./commands/PutWhatsAppNumberConfigurationCommand";
12
21
  import { RescheduleCalendarEventCommandInput, RescheduleCalendarEventCommandOutput } from "./commands/RescheduleCalendarEventCommand";
13
22
  import { ScheduleCalendarEventCommandInput, ScheduleCalendarEventCommandOutput } from "./commands/ScheduleCalendarEventCommand";
14
23
  import { UpdateWidgetCommandInput, UpdateWidgetCommandOutput } from "./commands/UpdateWidgetCommand";
@@ -50,6 +59,18 @@ export interface Kite {
50
59
  getConfig(args: GetConfigCommandInput, options?: __HttpHandlerOptions): Promise<GetConfigCommandOutput>;
51
60
  getConfig(args: GetConfigCommandInput, cb: (err: any, data?: GetConfigCommandOutput) => void): void;
52
61
  getConfig(args: GetConfigCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetConfigCommandOutput) => void): void;
62
+ /**
63
+ * @see {@link GetSmsNumberConfigurationCommand}
64
+ */
65
+ getSmsNumberConfiguration(args: GetSmsNumberConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<GetSmsNumberConfigurationCommandOutput>;
66
+ getSmsNumberConfiguration(args: GetSmsNumberConfigurationCommandInput, cb: (err: any, data?: GetSmsNumberConfigurationCommandOutput) => void): void;
67
+ getSmsNumberConfiguration(args: GetSmsNumberConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSmsNumberConfigurationCommandOutput) => void): void;
68
+ /**
69
+ * @see {@link GetWhatsAppNumberConfigurationCommand}
70
+ */
71
+ getWhatsAppNumberConfiguration(args: GetWhatsAppNumberConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<GetWhatsAppNumberConfigurationCommandOutput>;
72
+ getWhatsAppNumberConfiguration(args: GetWhatsAppNumberConfigurationCommandInput, cb: (err: any, data?: GetWhatsAppNumberConfigurationCommandOutput) => void): void;
73
+ getWhatsAppNumberConfiguration(args: GetWhatsAppNumberConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetWhatsAppNumberConfigurationCommandOutput) => void): void;
53
74
  /**
54
75
  * @see {@link GetWidgetCommand}
55
76
  */
@@ -69,6 +90,40 @@ export interface Kite {
69
90
  listServices(args: ListServicesCommandInput, options?: __HttpHandlerOptions): Promise<ListServicesCommandOutput>;
70
91
  listServices(args: ListServicesCommandInput, cb: (err: any, data?: ListServicesCommandOutput) => void): void;
71
92
  listServices(args: ListServicesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListServicesCommandOutput) => void): void;
93
+ /**
94
+ * @see {@link ListSmsConfigurationsCommand}
95
+ */
96
+ listSmsConfigurations(): Promise<ListSmsConfigurationsCommandOutput>;
97
+ listSmsConfigurations(args: ListSmsConfigurationsCommandInput, options?: __HttpHandlerOptions): Promise<ListSmsConfigurationsCommandOutput>;
98
+ listSmsConfigurations(args: ListSmsConfigurationsCommandInput, cb: (err: any, data?: ListSmsConfigurationsCommandOutput) => void): void;
99
+ listSmsConfigurations(args: ListSmsConfigurationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListSmsConfigurationsCommandOutput) => void): void;
100
+ /**
101
+ * @see {@link ListSmsNumbersCommand}
102
+ */
103
+ listSmsNumbers(): Promise<ListSmsNumbersCommandOutput>;
104
+ listSmsNumbers(args: ListSmsNumbersCommandInput, options?: __HttpHandlerOptions): Promise<ListSmsNumbersCommandOutput>;
105
+ listSmsNumbers(args: ListSmsNumbersCommandInput, cb: (err: any, data?: ListSmsNumbersCommandOutput) => void): void;
106
+ listSmsNumbers(args: ListSmsNumbersCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListSmsNumbersCommandOutput) => void): void;
107
+ /**
108
+ * @see {@link ListWhatsAppConfigurationsCommand}
109
+ */
110
+ listWhatsAppConfigurations(): Promise<ListWhatsAppConfigurationsCommandOutput>;
111
+ listWhatsAppConfigurations(args: ListWhatsAppConfigurationsCommandInput, options?: __HttpHandlerOptions): Promise<ListWhatsAppConfigurationsCommandOutput>;
112
+ listWhatsAppConfigurations(args: ListWhatsAppConfigurationsCommandInput, cb: (err: any, data?: ListWhatsAppConfigurationsCommandOutput) => void): void;
113
+ listWhatsAppConfigurations(args: ListWhatsAppConfigurationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListWhatsAppConfigurationsCommandOutput) => void): void;
114
+ /**
115
+ * @see {@link ListWhatsAppNumbersCommand}
116
+ */
117
+ listWhatsAppNumbers(): Promise<ListWhatsAppNumbersCommandOutput>;
118
+ listWhatsAppNumbers(args: ListWhatsAppNumbersCommandInput, options?: __HttpHandlerOptions): Promise<ListWhatsAppNumbersCommandOutput>;
119
+ listWhatsAppNumbers(args: ListWhatsAppNumbersCommandInput, cb: (err: any, data?: ListWhatsAppNumbersCommandOutput) => void): void;
120
+ listWhatsAppNumbers(args: ListWhatsAppNumbersCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListWhatsAppNumbersCommandOutput) => void): void;
121
+ /**
122
+ * @see {@link ListWhatsAppTemplatesCommand}
123
+ */
124
+ listWhatsAppTemplates(args: ListWhatsAppTemplatesCommandInput, options?: __HttpHandlerOptions): Promise<ListWhatsAppTemplatesCommandOutput>;
125
+ listWhatsAppTemplates(args: ListWhatsAppTemplatesCommandInput, cb: (err: any, data?: ListWhatsAppTemplatesCommandOutput) => void): void;
126
+ listWhatsAppTemplates(args: ListWhatsAppTemplatesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListWhatsAppTemplatesCommandOutput) => void): void;
72
127
  /**
73
128
  * @see {@link ListWidgetsCommand}
74
129
  */
@@ -76,6 +131,18 @@ export interface Kite {
76
131
  listWidgets(args: ListWidgetsCommandInput, options?: __HttpHandlerOptions): Promise<ListWidgetsCommandOutput>;
77
132
  listWidgets(args: ListWidgetsCommandInput, cb: (err: any, data?: ListWidgetsCommandOutput) => void): void;
78
133
  listWidgets(args: ListWidgetsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListWidgetsCommandOutput) => void): void;
134
+ /**
135
+ * @see {@link PutSmsNumberConfigurationCommand}
136
+ */
137
+ putSmsNumberConfiguration(args: PutSmsNumberConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<PutSmsNumberConfigurationCommandOutput>;
138
+ putSmsNumberConfiguration(args: PutSmsNumberConfigurationCommandInput, cb: (err: any, data?: PutSmsNumberConfigurationCommandOutput) => void): void;
139
+ putSmsNumberConfiguration(args: PutSmsNumberConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutSmsNumberConfigurationCommandOutput) => void): void;
140
+ /**
141
+ * @see {@link PutWhatsAppNumberConfigurationCommand}
142
+ */
143
+ putWhatsAppNumberConfiguration(args: PutWhatsAppNumberConfigurationCommandInput, options?: __HttpHandlerOptions): Promise<PutWhatsAppNumberConfigurationCommandOutput>;
144
+ putWhatsAppNumberConfiguration(args: PutWhatsAppNumberConfigurationCommandInput, cb: (err: any, data?: PutWhatsAppNumberConfigurationCommandOutput) => void): void;
145
+ putWhatsAppNumberConfiguration(args: PutWhatsAppNumberConfigurationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutWhatsAppNumberConfigurationCommandOutput) => void): void;
79
146
  /**
80
147
  * @see {@link RescheduleCalendarEventCommand}
81
148
  */
@@ -4,10 +4,19 @@ import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "./commands/
4
4
  import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "./commands/DeleteWidgetCommand";
5
5
  import { GetCalendarSlotsCommandInput, GetCalendarSlotsCommandOutput } from "./commands/GetCalendarSlotsCommand";
6
6
  import { GetConfigCommandInput, GetConfigCommandOutput } from "./commands/GetConfigCommand";
7
+ import { GetSmsNumberConfigurationCommandInput, GetSmsNumberConfigurationCommandOutput } from "./commands/GetSmsNumberConfigurationCommand";
8
+ import { GetWhatsAppNumberConfigurationCommandInput, GetWhatsAppNumberConfigurationCommandOutput } from "./commands/GetWhatsAppNumberConfigurationCommand";
7
9
  import { GetWidgetCommandInput, GetWidgetCommandOutput } from "./commands/GetWidgetCommand";
8
10
  import { ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
9
11
  import { ListServicesCommandInput, ListServicesCommandOutput } from "./commands/ListServicesCommand";
12
+ import { ListSmsConfigurationsCommandInput, ListSmsConfigurationsCommandOutput } from "./commands/ListSmsConfigurationsCommand";
13
+ import { ListSmsNumbersCommandInput, ListSmsNumbersCommandOutput } from "./commands/ListSmsNumbersCommand";
14
+ import { ListWhatsAppConfigurationsCommandInput, ListWhatsAppConfigurationsCommandOutput } from "./commands/ListWhatsAppConfigurationsCommand";
15
+ import { ListWhatsAppNumbersCommandInput, ListWhatsAppNumbersCommandOutput } from "./commands/ListWhatsAppNumbersCommand";
16
+ import { ListWhatsAppTemplatesCommandInput, ListWhatsAppTemplatesCommandOutput } from "./commands/ListWhatsAppTemplatesCommand";
10
17
  import { ListWidgetsCommandInput, ListWidgetsCommandOutput } from "./commands/ListWidgetsCommand";
18
+ import { PutSmsNumberConfigurationCommandInput, PutSmsNumberConfigurationCommandOutput } from "./commands/PutSmsNumberConfigurationCommand";
19
+ import { PutWhatsAppNumberConfigurationCommandInput, PutWhatsAppNumberConfigurationCommandOutput } from "./commands/PutWhatsAppNumberConfigurationCommand";
11
20
  import { RescheduleCalendarEventCommandInput, RescheduleCalendarEventCommandOutput } from "./commands/RescheduleCalendarEventCommand";
12
21
  import { ScheduleCalendarEventCommandInput, ScheduleCalendarEventCommandOutput } from "./commands/ScheduleCalendarEventCommand";
13
22
  import { UpdateWidgetCommandInput, UpdateWidgetCommandOutput } from "./commands/UpdateWidgetCommand";
@@ -22,11 +31,11 @@ export { __Client };
22
31
  /**
23
32
  * @public
24
33
  */
25
- export type ServiceInputTypes = CancelCalendarEventCommandInput | CreateOrUpdateWidgetPreviewCommandInput | CreateWidgetCommandInput | DeleteWidgetCommandInput | GetCalendarSlotsCommandInput | GetConfigCommandInput | GetWidgetCommandInput | ListAgentsCommandInput | ListServicesCommandInput | ListWidgetsCommandInput | RescheduleCalendarEventCommandInput | ScheduleCalendarEventCommandInput | UpdateWidgetCommandInput;
34
+ export type ServiceInputTypes = CancelCalendarEventCommandInput | CreateOrUpdateWidgetPreviewCommandInput | CreateWidgetCommandInput | DeleteWidgetCommandInput | GetCalendarSlotsCommandInput | GetConfigCommandInput | GetSmsNumberConfigurationCommandInput | GetWhatsAppNumberConfigurationCommandInput | GetWidgetCommandInput | ListAgentsCommandInput | ListServicesCommandInput | ListSmsConfigurationsCommandInput | ListSmsNumbersCommandInput | ListWhatsAppConfigurationsCommandInput | ListWhatsAppNumbersCommandInput | ListWhatsAppTemplatesCommandInput | ListWidgetsCommandInput | PutSmsNumberConfigurationCommandInput | PutWhatsAppNumberConfigurationCommandInput | RescheduleCalendarEventCommandInput | ScheduleCalendarEventCommandInput | UpdateWidgetCommandInput;
26
35
  /**
27
36
  * @public
28
37
  */
29
- export type ServiceOutputTypes = CancelCalendarEventCommandOutput | CreateOrUpdateWidgetPreviewCommandOutput | CreateWidgetCommandOutput | DeleteWidgetCommandOutput | GetCalendarSlotsCommandOutput | GetConfigCommandOutput | GetWidgetCommandOutput | ListAgentsCommandOutput | ListServicesCommandOutput | ListWidgetsCommandOutput | RescheduleCalendarEventCommandOutput | ScheduleCalendarEventCommandOutput | UpdateWidgetCommandOutput;
38
+ export type ServiceOutputTypes = CancelCalendarEventCommandOutput | CreateOrUpdateWidgetPreviewCommandOutput | CreateWidgetCommandOutput | DeleteWidgetCommandOutput | GetCalendarSlotsCommandOutput | GetConfigCommandOutput | GetSmsNumberConfigurationCommandOutput | GetWhatsAppNumberConfigurationCommandOutput | GetWidgetCommandOutput | ListAgentsCommandOutput | ListServicesCommandOutput | ListSmsConfigurationsCommandOutput | ListSmsNumbersCommandOutput | ListWhatsAppConfigurationsCommandOutput | ListWhatsAppNumbersCommandOutput | ListWhatsAppTemplatesCommandOutput | ListWidgetsCommandOutput | PutSmsNumberConfigurationCommandOutput | PutWhatsAppNumberConfigurationCommandOutput | RescheduleCalendarEventCommandOutput | ScheduleCalendarEventCommandOutput | UpdateWidgetCommandOutput;
30
39
  /**
31
40
  * @public
32
41
  */