@wildix/xbees-users-client 1.0.1 → 1.0.3

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 (44) hide show
  1. package/dist-cjs/Users.js +16 -0
  2. package/dist-cjs/commands/CreateBotApiKeyCommand.js +41 -0
  3. package/dist-cjs/commands/CreateBotCommand.js +41 -0
  4. package/dist-cjs/commands/DeleteBotApiKeyCommand.js +41 -0
  5. package/dist-cjs/commands/DeleteBotCommand.js +41 -0
  6. package/dist-cjs/commands/ListBotApiKeysCommand.js +41 -0
  7. package/dist-cjs/commands/ListBotsCommand.js +41 -0
  8. package/dist-cjs/commands/UpdateBotCommand.js +41 -0
  9. package/dist-cjs/commands/VerifyBotSecretKeyCommand.js +41 -0
  10. package/dist-cjs/commands/index.js +8 -0
  11. package/dist-cjs/models/models_0.js +63 -1
  12. package/dist-cjs/protocols/Aws_restJson1.js +548 -1
  13. package/dist-es/Users.js +16 -0
  14. package/dist-es/commands/CreateBotApiKeyCommand.js +37 -0
  15. package/dist-es/commands/CreateBotCommand.js +37 -0
  16. package/dist-es/commands/DeleteBotApiKeyCommand.js +37 -0
  17. package/dist-es/commands/DeleteBotCommand.js +37 -0
  18. package/dist-es/commands/ListBotApiKeysCommand.js +37 -0
  19. package/dist-es/commands/ListBotsCommand.js +37 -0
  20. package/dist-es/commands/UpdateBotCommand.js +37 -0
  21. package/dist-es/commands/VerifyBotSecretKeyCommand.js +37 -0
  22. package/dist-es/commands/index.js +8 -0
  23. package/dist-es/models/models_0.js +58 -0
  24. package/dist-es/protocols/Aws_restJson1.js +533 -2
  25. package/dist-types/Users.d.ts +56 -0
  26. package/dist-types/UsersClient.d.ts +10 -2
  27. package/dist-types/commands/BatchGetUsersPbxLinkDataCommand.d.ts +2 -0
  28. package/dist-types/commands/BatchGetUsersStreamLinkDataCommand.d.ts +2 -0
  29. package/dist-types/commands/CreateBotApiKeyCommand.d.ts +113 -0
  30. package/dist-types/commands/CreateBotCommand.d.ts +132 -0
  31. package/dist-types/commands/DeleteBotApiKeyCommand.d.ts +79 -0
  32. package/dist-types/commands/DeleteBotCommand.d.ts +76 -0
  33. package/dist-types/commands/ListBotApiKeysCommand.d.ts +82 -0
  34. package/dist-types/commands/ListBotsCommand.d.ts +108 -0
  35. package/dist-types/commands/UpdateBotCommand.d.ts +133 -0
  36. package/dist-types/commands/VerifyBotSecretKeyCommand.d.ts +79 -0
  37. package/dist-types/commands/index.d.ts +8 -0
  38. package/dist-types/models/models_0.d.ts +247 -0
  39. package/dist-types/protocols/Aws_restJson1.d.ts +72 -0
  40. package/dist-types/runtimeConfig.browser.d.ts +3 -3
  41. package/dist-types/runtimeConfig.d.ts +3 -3
  42. package/dist-types/runtimeConfig.native.d.ts +3 -3
  43. package/dist-types/runtimeConfig.shared.d.ts +2 -2
  44. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import { UsersServiceException as __BaseException } from "../models/UsersServiceException";
2
- import { ValidationException } from "../models/models_0";
2
+ import { BotApiKeyNotFoundException, BotNotFoundException, BotSecretKeyNotValidException, ForbiddenException, ValidationException, } from "../models/models_0";
3
3
  import { HttpRequest as __HttpRequest, } from "@smithy/protocol-http";
4
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
4
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, resolvedPath as __resolvedPath, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
5
  export const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = {
@@ -42,6 +42,184 @@ export const se_BatchGetUsersStreamLinkDataCommand = async (input, context) => {
42
42
  body,
43
43
  });
44
44
  };
45
+ export const se_CreateBotCommand = async (input, context) => {
46
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
+ const headers = {
48
+ 'content-type': 'application/json',
49
+ };
50
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/bots";
51
+ const query = map({
52
+ "company": [, input.company],
53
+ });
54
+ let body;
55
+ body = JSON.stringify(take(input, {
56
+ 'callback': _ => _json(_),
57
+ 'name': [],
58
+ 'visibility': _ => _json(_),
59
+ }));
60
+ return new __HttpRequest({
61
+ protocol,
62
+ hostname,
63
+ port,
64
+ method: "POST",
65
+ headers,
66
+ path: resolvedPath,
67
+ query,
68
+ body,
69
+ });
70
+ };
71
+ export const se_CreateBotApiKeyCommand = async (input, context) => {
72
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const headers = {
74
+ 'content-type': 'application/json',
75
+ };
76
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/bots/{botId}/keys";
77
+ resolvedPath = __resolvedPath(resolvedPath, input, 'botId', () => input.botId, '{botId}', false);
78
+ const query = map({
79
+ "company": [, input.company],
80
+ });
81
+ let body;
82
+ body = JSON.stringify(take(input, {
83
+ 'name': [],
84
+ }));
85
+ return new __HttpRequest({
86
+ protocol,
87
+ hostname,
88
+ port,
89
+ method: "POST",
90
+ headers,
91
+ path: resolvedPath,
92
+ query,
93
+ body,
94
+ });
95
+ };
96
+ export const se_DeleteBotCommand = async (input, context) => {
97
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const headers = {};
99
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/bots/{botId}";
100
+ resolvedPath = __resolvedPath(resolvedPath, input, 'botId', () => input.botId, '{botId}', false);
101
+ const query = map({
102
+ "company": [, input.company],
103
+ });
104
+ let body;
105
+ return new __HttpRequest({
106
+ protocol,
107
+ hostname,
108
+ port,
109
+ method: "DELETE",
110
+ headers,
111
+ path: resolvedPath,
112
+ query,
113
+ body,
114
+ });
115
+ };
116
+ export const se_DeleteBotApiKeyCommand = async (input, context) => {
117
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const headers = {};
119
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/bots/{botId}/keys/{apiKeySecret}";
120
+ resolvedPath = __resolvedPath(resolvedPath, input, 'botId', () => input.botId, '{botId}', false);
121
+ resolvedPath = __resolvedPath(resolvedPath, input, 'apiKeySecret', () => input.apiKeySecret, '{apiKeySecret}', false);
122
+ const query = map({
123
+ "company": [, input.company],
124
+ });
125
+ let body;
126
+ return new __HttpRequest({
127
+ protocol,
128
+ hostname,
129
+ port,
130
+ method: "DELETE",
131
+ headers,
132
+ path: resolvedPath,
133
+ query,
134
+ body,
135
+ });
136
+ };
137
+ export const se_ListBotApiKeysCommand = async (input, context) => {
138
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
139
+ const headers = {};
140
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/bots/{botId}";
141
+ resolvedPath = __resolvedPath(resolvedPath, input, 'botId', () => input.botId, '{botId}', false);
142
+ const query = map({
143
+ "company": [, input.company],
144
+ });
145
+ let body;
146
+ return new __HttpRequest({
147
+ protocol,
148
+ hostname,
149
+ port,
150
+ method: "GET",
151
+ headers,
152
+ path: resolvedPath,
153
+ query,
154
+ body,
155
+ });
156
+ };
157
+ export const se_ListBotsCommand = async (input, context) => {
158
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
159
+ const headers = {};
160
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/bots";
161
+ const query = map({
162
+ "company": [, input.company],
163
+ });
164
+ let body;
165
+ return new __HttpRequest({
166
+ protocol,
167
+ hostname,
168
+ port,
169
+ method: "GET",
170
+ headers,
171
+ path: resolvedPath,
172
+ query,
173
+ body,
174
+ });
175
+ };
176
+ export const se_UpdateBotCommand = async (input, context) => {
177
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
178
+ const headers = {
179
+ 'content-type': 'application/json',
180
+ };
181
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/bots/{botId}";
182
+ resolvedPath = __resolvedPath(resolvedPath, input, 'botId', () => input.botId, '{botId}', false);
183
+ const query = map({
184
+ "company": [, input.company],
185
+ });
186
+ let body;
187
+ body = JSON.stringify(take(input, {
188
+ 'callback': _ => _json(_),
189
+ 'name': [],
190
+ 'visibility': _ => _json(_),
191
+ }));
192
+ return new __HttpRequest({
193
+ protocol,
194
+ hostname,
195
+ port,
196
+ method: "POST",
197
+ headers,
198
+ path: resolvedPath,
199
+ query,
200
+ body,
201
+ });
202
+ };
203
+ export const se_VerifyBotSecretKeyCommand = async (input, context) => {
204
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
205
+ const headers = {
206
+ 'content-type': 'application/json',
207
+ };
208
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/auth/VerifyBotSecretKey";
209
+ let body;
210
+ body = JSON.stringify(take(input, {
211
+ 'secret': [],
212
+ }));
213
+ return new __HttpRequest({
214
+ protocol,
215
+ hostname,
216
+ port,
217
+ method: "POST",
218
+ headers,
219
+ path: resolvedPath,
220
+ body,
221
+ });
222
+ };
45
223
  export const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
46
224
  if (output.statusCode !== 200 && output.statusCode >= 300) {
47
225
  return de_BatchGetUsersPbxLinkDataCommandError(output, context);
@@ -63,6 +241,9 @@ const de_BatchGetUsersPbxLinkDataCommandError = async (output, context) => {
63
241
  };
64
242
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
65
243
  switch (errorCode) {
244
+ case "ForbiddenException":
245
+ case "smithy.framework#ForbiddenException":
246
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
66
247
  case "ValidationException":
67
248
  case "smithy.framework#ValidationException":
68
249
  throw await de_ValidationExceptionRes(parsedOutput, context);
@@ -96,6 +277,304 @@ const de_BatchGetUsersStreamLinkDataCommandError = async (output, context) => {
96
277
  };
97
278
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
98
279
  switch (errorCode) {
280
+ case "ForbiddenException":
281
+ case "smithy.framework#ForbiddenException":
282
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
283
+ case "ValidationException":
284
+ case "smithy.framework#ValidationException":
285
+ throw await de_ValidationExceptionRes(parsedOutput, context);
286
+ default:
287
+ const parsedBody = parsedOutput.body;
288
+ return throwDefaultError({
289
+ output,
290
+ parsedBody,
291
+ errorCode
292
+ });
293
+ }
294
+ };
295
+ export const de_CreateBotCommand = async (output, context) => {
296
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
297
+ return de_CreateBotCommandError(output, context);
298
+ }
299
+ const contents = map({
300
+ $metadata: deserializeMetadata(output),
301
+ });
302
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
303
+ const doc = take(data, {
304
+ 'bot': _json,
305
+ });
306
+ Object.assign(contents, doc);
307
+ return contents;
308
+ };
309
+ const de_CreateBotCommandError = async (output, context) => {
310
+ const parsedOutput = {
311
+ ...output,
312
+ body: await parseErrorBody(output.body, context)
313
+ };
314
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
315
+ switch (errorCode) {
316
+ case "ForbiddenException":
317
+ case "smithy.framework#ForbiddenException":
318
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
319
+ case "ValidationException":
320
+ case "smithy.framework#ValidationException":
321
+ throw await de_ValidationExceptionRes(parsedOutput, context);
322
+ default:
323
+ const parsedBody = parsedOutput.body;
324
+ return throwDefaultError({
325
+ output,
326
+ parsedBody,
327
+ errorCode
328
+ });
329
+ }
330
+ };
331
+ export const de_CreateBotApiKeyCommand = async (output, context) => {
332
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
333
+ return de_CreateBotApiKeyCommandError(output, context);
334
+ }
335
+ const contents = map({
336
+ $metadata: deserializeMetadata(output),
337
+ });
338
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
339
+ const doc = take(data, {
340
+ 'bot': _json,
341
+ 'key': _json,
342
+ });
343
+ Object.assign(contents, doc);
344
+ return contents;
345
+ };
346
+ const de_CreateBotApiKeyCommandError = async (output, context) => {
347
+ const parsedOutput = {
348
+ ...output,
349
+ body: await parseErrorBody(output.body, context)
350
+ };
351
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
352
+ switch (errorCode) {
353
+ case "ForbiddenException":
354
+ case "smithy.framework#ForbiddenException":
355
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
356
+ case "ValidationException":
357
+ case "smithy.framework#ValidationException":
358
+ throw await de_ValidationExceptionRes(parsedOutput, context);
359
+ default:
360
+ const parsedBody = parsedOutput.body;
361
+ return throwDefaultError({
362
+ output,
363
+ parsedBody,
364
+ errorCode
365
+ });
366
+ }
367
+ };
368
+ export const de_DeleteBotCommand = async (output, context) => {
369
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
370
+ return de_DeleteBotCommandError(output, context);
371
+ }
372
+ const contents = map({
373
+ $metadata: deserializeMetadata(output),
374
+ });
375
+ await collectBody(output.body, context);
376
+ return contents;
377
+ };
378
+ const de_DeleteBotCommandError = async (output, context) => {
379
+ const parsedOutput = {
380
+ ...output,
381
+ body: await parseErrorBody(output.body, context)
382
+ };
383
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
384
+ switch (errorCode) {
385
+ case "BotNotFoundException":
386
+ case "wildix.xbees.users#BotNotFoundException":
387
+ throw await de_BotNotFoundExceptionRes(parsedOutput, context);
388
+ case "ForbiddenException":
389
+ case "smithy.framework#ForbiddenException":
390
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
391
+ case "ValidationException":
392
+ case "smithy.framework#ValidationException":
393
+ throw await de_ValidationExceptionRes(parsedOutput, context);
394
+ default:
395
+ const parsedBody = parsedOutput.body;
396
+ return throwDefaultError({
397
+ output,
398
+ parsedBody,
399
+ errorCode
400
+ });
401
+ }
402
+ };
403
+ export const de_DeleteBotApiKeyCommand = async (output, context) => {
404
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
405
+ return de_DeleteBotApiKeyCommandError(output, context);
406
+ }
407
+ const contents = map({
408
+ $metadata: deserializeMetadata(output),
409
+ });
410
+ await collectBody(output.body, context);
411
+ return contents;
412
+ };
413
+ const de_DeleteBotApiKeyCommandError = async (output, context) => {
414
+ const parsedOutput = {
415
+ ...output,
416
+ body: await parseErrorBody(output.body, context)
417
+ };
418
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
419
+ switch (errorCode) {
420
+ case "BotApiKeyNotFoundException":
421
+ case "wildix.xbees.users#BotApiKeyNotFoundException":
422
+ throw await de_BotApiKeyNotFoundExceptionRes(parsedOutput, context);
423
+ case "BotNotFoundException":
424
+ case "wildix.xbees.users#BotNotFoundException":
425
+ throw await de_BotNotFoundExceptionRes(parsedOutput, context);
426
+ case "ForbiddenException":
427
+ case "smithy.framework#ForbiddenException":
428
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
429
+ case "ValidationException":
430
+ case "smithy.framework#ValidationException":
431
+ throw await de_ValidationExceptionRes(parsedOutput, context);
432
+ default:
433
+ const parsedBody = parsedOutput.body;
434
+ return throwDefaultError({
435
+ output,
436
+ parsedBody,
437
+ errorCode
438
+ });
439
+ }
440
+ };
441
+ export const de_ListBotApiKeysCommand = async (output, context) => {
442
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
443
+ return de_ListBotApiKeysCommandError(output, context);
444
+ }
445
+ const contents = map({
446
+ $metadata: deserializeMetadata(output),
447
+ });
448
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
449
+ const doc = take(data, {
450
+ 'keys': _json,
451
+ });
452
+ Object.assign(contents, doc);
453
+ return contents;
454
+ };
455
+ const de_ListBotApiKeysCommandError = async (output, context) => {
456
+ const parsedOutput = {
457
+ ...output,
458
+ body: await parseErrorBody(output.body, context)
459
+ };
460
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
461
+ switch (errorCode) {
462
+ case "ForbiddenException":
463
+ case "smithy.framework#ForbiddenException":
464
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
465
+ case "ValidationException":
466
+ case "smithy.framework#ValidationException":
467
+ throw await de_ValidationExceptionRes(parsedOutput, context);
468
+ default:
469
+ const parsedBody = parsedOutput.body;
470
+ return throwDefaultError({
471
+ output,
472
+ parsedBody,
473
+ errorCode
474
+ });
475
+ }
476
+ };
477
+ export const de_ListBotsCommand = async (output, context) => {
478
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
479
+ return de_ListBotsCommandError(output, context);
480
+ }
481
+ const contents = map({
482
+ $metadata: deserializeMetadata(output),
483
+ });
484
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
485
+ const doc = take(data, {
486
+ 'bots': _json,
487
+ });
488
+ Object.assign(contents, doc);
489
+ return contents;
490
+ };
491
+ const de_ListBotsCommandError = async (output, context) => {
492
+ const parsedOutput = {
493
+ ...output,
494
+ body: await parseErrorBody(output.body, context)
495
+ };
496
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
497
+ switch (errorCode) {
498
+ case "ForbiddenException":
499
+ case "smithy.framework#ForbiddenException":
500
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
501
+ case "ValidationException":
502
+ case "smithy.framework#ValidationException":
503
+ throw await de_ValidationExceptionRes(parsedOutput, context);
504
+ default:
505
+ const parsedBody = parsedOutput.body;
506
+ return throwDefaultError({
507
+ output,
508
+ parsedBody,
509
+ errorCode
510
+ });
511
+ }
512
+ };
513
+ export const de_UpdateBotCommand = async (output, context) => {
514
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
515
+ return de_UpdateBotCommandError(output, context);
516
+ }
517
+ const contents = map({
518
+ $metadata: deserializeMetadata(output),
519
+ });
520
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
521
+ const doc = take(data, {
522
+ 'bot': _json,
523
+ });
524
+ Object.assign(contents, doc);
525
+ return contents;
526
+ };
527
+ const de_UpdateBotCommandError = async (output, context) => {
528
+ const parsedOutput = {
529
+ ...output,
530
+ body: await parseErrorBody(output.body, context)
531
+ };
532
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
533
+ switch (errorCode) {
534
+ case "ForbiddenException":
535
+ case "smithy.framework#ForbiddenException":
536
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
537
+ case "ValidationException":
538
+ case "smithy.framework#ValidationException":
539
+ throw await de_ValidationExceptionRes(parsedOutput, context);
540
+ default:
541
+ const parsedBody = parsedOutput.body;
542
+ return throwDefaultError({
543
+ output,
544
+ parsedBody,
545
+ errorCode
546
+ });
547
+ }
548
+ };
549
+ export const de_VerifyBotSecretKeyCommand = async (output, context) => {
550
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
551
+ return de_VerifyBotSecretKeyCommandError(output, context);
552
+ }
553
+ const contents = map({
554
+ $metadata: deserializeMetadata(output),
555
+ });
556
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
557
+ const doc = take(data, {
558
+ 'company': __expectString,
559
+ 'id': __expectString,
560
+ 'name': __expectString,
561
+ });
562
+ Object.assign(contents, doc);
563
+ return contents;
564
+ };
565
+ const de_VerifyBotSecretKeyCommandError = async (output, context) => {
566
+ const parsedOutput = {
567
+ ...output,
568
+ body: await parseErrorBody(output.body, context)
569
+ };
570
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
571
+ switch (errorCode) {
572
+ case "BotSecretKeyNotValidException":
573
+ case "wildix.xbees.users#BotSecretKeyNotValidException":
574
+ throw await de_BotSecretKeyNotValidExceptionRes(parsedOutput, context);
575
+ case "ForbiddenException":
576
+ case "smithy.framework#ForbiddenException":
577
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
99
578
  case "ValidationException":
100
579
  case "smithy.framework#ValidationException":
101
580
  throw await de_ValidationExceptionRes(parsedOutput, context);
@@ -109,6 +588,19 @@ const de_BatchGetUsersStreamLinkDataCommandError = async (output, context) => {
109
588
  }
110
589
  };
111
590
  const throwDefaultError = withBaseException(__BaseException);
591
+ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
592
+ const contents = map({});
593
+ const data = parsedOutput.body;
594
+ const doc = take(data, {
595
+ 'message': __expectString,
596
+ });
597
+ Object.assign(contents, doc);
598
+ const exception = new ForbiddenException({
599
+ $metadata: deserializeMetadata(parsedOutput),
600
+ ...contents
601
+ });
602
+ return __decorateServiceException(exception, parsedOutput.body);
603
+ };
112
604
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
113
605
  const contents = map({});
114
606
  const data = parsedOutput.body;
@@ -122,6 +614,45 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
122
614
  });
123
615
  return __decorateServiceException(exception, parsedOutput.body);
124
616
  };
617
+ const de_BotApiKeyNotFoundExceptionRes = async (parsedOutput, context) => {
618
+ const contents = map({});
619
+ const data = parsedOutput.body;
620
+ const doc = take(data, {
621
+ 'message': __expectString,
622
+ });
623
+ Object.assign(contents, doc);
624
+ const exception = new BotApiKeyNotFoundException({
625
+ $metadata: deserializeMetadata(parsedOutput),
626
+ ...contents
627
+ });
628
+ return __decorateServiceException(exception, parsedOutput.body);
629
+ };
630
+ const de_BotNotFoundExceptionRes = async (parsedOutput, context) => {
631
+ const contents = map({});
632
+ const data = parsedOutput.body;
633
+ const doc = take(data, {
634
+ 'message': __expectString,
635
+ });
636
+ Object.assign(contents, doc);
637
+ const exception = new BotNotFoundException({
638
+ $metadata: deserializeMetadata(parsedOutput),
639
+ ...contents
640
+ });
641
+ return __decorateServiceException(exception, parsedOutput.body);
642
+ };
643
+ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
644
+ const contents = map({});
645
+ const data = parsedOutput.body;
646
+ const doc = take(data, {
647
+ 'message': __expectString,
648
+ });
649
+ Object.assign(contents, doc);
650
+ const exception = new BotSecretKeyNotValidException({
651
+ $metadata: deserializeMetadata(parsedOutput),
652
+ ...contents
653
+ });
654
+ return __decorateServiceException(exception, parsedOutput.body);
655
+ };
125
656
  const deserializeMetadata = (output) => ({
126
657
  httpStatusCode: output.statusCode,
127
658
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,6 +1,14 @@
1
1
  import { UsersClient } from "./UsersClient";
2
2
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
3
3
  import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "./commands/BatchGetUsersStreamLinkDataCommand";
4
+ import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "./commands/CreateBotApiKeyCommand";
5
+ import { CreateBotCommandInput, CreateBotCommandOutput } from "./commands/CreateBotCommand";
6
+ import { DeleteBotApiKeyCommandInput, DeleteBotApiKeyCommandOutput } from "./commands/DeleteBotApiKeyCommand";
7
+ import { DeleteBotCommandInput, DeleteBotCommandOutput } from "./commands/DeleteBotCommand";
8
+ import { ListBotApiKeysCommandInput, ListBotApiKeysCommandOutput } from "./commands/ListBotApiKeysCommand";
9
+ import { ListBotsCommandInput, ListBotsCommandOutput } from "./commands/ListBotsCommand";
10
+ import { UpdateBotCommandInput, UpdateBotCommandOutput } from "./commands/UpdateBotCommand";
11
+ import { VerifyBotSecretKeyCommandInput, VerifyBotSecretKeyCommandOutput } from "./commands/VerifyBotSecretKeyCommand";
4
12
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
5
13
  export interface Users {
6
14
  /**
@@ -15,6 +23,54 @@ export interface Users {
15
23
  batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetUsersStreamLinkDataCommandOutput>;
16
24
  batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, cb: (err: any, data?: BatchGetUsersStreamLinkDataCommandOutput) => void): void;
17
25
  batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetUsersStreamLinkDataCommandOutput) => void): void;
26
+ /**
27
+ * @see {@link CreateBotCommand}
28
+ */
29
+ createBot(args: CreateBotCommandInput, options?: __HttpHandlerOptions): Promise<CreateBotCommandOutput>;
30
+ createBot(args: CreateBotCommandInput, cb: (err: any, data?: CreateBotCommandOutput) => void): void;
31
+ createBot(args: CreateBotCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateBotCommandOutput) => void): void;
32
+ /**
33
+ * @see {@link CreateBotApiKeyCommand}
34
+ */
35
+ createBotApiKey(args: CreateBotApiKeyCommandInput, options?: __HttpHandlerOptions): Promise<CreateBotApiKeyCommandOutput>;
36
+ createBotApiKey(args: CreateBotApiKeyCommandInput, cb: (err: any, data?: CreateBotApiKeyCommandOutput) => void): void;
37
+ createBotApiKey(args: CreateBotApiKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateBotApiKeyCommandOutput) => void): void;
38
+ /**
39
+ * @see {@link DeleteBotCommand}
40
+ */
41
+ deleteBot(args: DeleteBotCommandInput, options?: __HttpHandlerOptions): Promise<DeleteBotCommandOutput>;
42
+ deleteBot(args: DeleteBotCommandInput, cb: (err: any, data?: DeleteBotCommandOutput) => void): void;
43
+ deleteBot(args: DeleteBotCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteBotCommandOutput) => void): void;
44
+ /**
45
+ * @see {@link DeleteBotApiKeyCommand}
46
+ */
47
+ deleteBotApiKey(args: DeleteBotApiKeyCommandInput, options?: __HttpHandlerOptions): Promise<DeleteBotApiKeyCommandOutput>;
48
+ deleteBotApiKey(args: DeleteBotApiKeyCommandInput, cb: (err: any, data?: DeleteBotApiKeyCommandOutput) => void): void;
49
+ deleteBotApiKey(args: DeleteBotApiKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteBotApiKeyCommandOutput) => void): void;
50
+ /**
51
+ * @see {@link ListBotApiKeysCommand}
52
+ */
53
+ listBotApiKeys(args: ListBotApiKeysCommandInput, options?: __HttpHandlerOptions): Promise<ListBotApiKeysCommandOutput>;
54
+ listBotApiKeys(args: ListBotApiKeysCommandInput, cb: (err: any, data?: ListBotApiKeysCommandOutput) => void): void;
55
+ listBotApiKeys(args: ListBotApiKeysCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListBotApiKeysCommandOutput) => void): void;
56
+ /**
57
+ * @see {@link ListBotsCommand}
58
+ */
59
+ listBots(args: ListBotsCommandInput, options?: __HttpHandlerOptions): Promise<ListBotsCommandOutput>;
60
+ listBots(args: ListBotsCommandInput, cb: (err: any, data?: ListBotsCommandOutput) => void): void;
61
+ listBots(args: ListBotsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListBotsCommandOutput) => void): void;
62
+ /**
63
+ * @see {@link UpdateBotCommand}
64
+ */
65
+ updateBot(args: UpdateBotCommandInput, options?: __HttpHandlerOptions): Promise<UpdateBotCommandOutput>;
66
+ updateBot(args: UpdateBotCommandInput, cb: (err: any, data?: UpdateBotCommandOutput) => void): void;
67
+ updateBot(args: UpdateBotCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateBotCommandOutput) => void): void;
68
+ /**
69
+ * @see {@link VerifyBotSecretKeyCommand}
70
+ */
71
+ verifyBotSecretKey(args: VerifyBotSecretKeyCommandInput, options?: __HttpHandlerOptions): Promise<VerifyBotSecretKeyCommandOutput>;
72
+ verifyBotSecretKey(args: VerifyBotSecretKeyCommandInput, cb: (err: any, data?: VerifyBotSecretKeyCommandOutput) => void): void;
73
+ verifyBotSecretKey(args: VerifyBotSecretKeyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyBotSecretKeyCommandOutput) => void): void;
18
74
  }
19
75
  /**
20
76
  * @public
@@ -1,5 +1,13 @@
1
1
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
2
2
  import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "./commands/BatchGetUsersStreamLinkDataCommand";
3
+ import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "./commands/CreateBotApiKeyCommand";
4
+ import { CreateBotCommandInput, CreateBotCommandOutput } from "./commands/CreateBotCommand";
5
+ import { DeleteBotApiKeyCommandInput, DeleteBotApiKeyCommandOutput } from "./commands/DeleteBotApiKeyCommand";
6
+ import { DeleteBotCommandInput, DeleteBotCommandOutput } from "./commands/DeleteBotCommand";
7
+ import { ListBotApiKeysCommandInput, ListBotApiKeysCommandOutput } from "./commands/ListBotApiKeysCommand";
8
+ import { ListBotsCommandInput, ListBotsCommandOutput } from "./commands/ListBotsCommand";
9
+ import { UpdateBotCommandInput, UpdateBotCommandOutput } from "./commands/UpdateBotCommand";
10
+ import { VerifyBotSecretKeyCommandInput, VerifyBotSecretKeyCommandOutput } from "./commands/VerifyBotSecretKeyCommand";
3
11
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
4
12
  import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
5
13
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
@@ -8,11 +16,11 @@ export { __Client };
8
16
  /**
9
17
  * @public
10
18
  */
11
- export type ServiceInputTypes = BatchGetUsersPbxLinkDataCommandInput | BatchGetUsersStreamLinkDataCommandInput;
19
+ export type ServiceInputTypes = BatchGetUsersPbxLinkDataCommandInput | BatchGetUsersStreamLinkDataCommandInput | CreateBotApiKeyCommandInput | CreateBotCommandInput | DeleteBotApiKeyCommandInput | DeleteBotCommandInput | ListBotApiKeysCommandInput | ListBotsCommandInput | UpdateBotCommandInput | VerifyBotSecretKeyCommandInput;
12
20
  /**
13
21
  * @public
14
22
  */
15
- export type ServiceOutputTypes = BatchGetUsersPbxLinkDataCommandOutput | BatchGetUsersStreamLinkDataCommandOutput;
23
+ export type ServiceOutputTypes = BatchGetUsersPbxLinkDataCommandOutput | BatchGetUsersStreamLinkDataCommandOutput | CreateBotApiKeyCommandOutput | CreateBotCommandOutput | DeleteBotApiKeyCommandOutput | DeleteBotCommandOutput | ListBotApiKeysCommandOutput | ListBotsCommandOutput | UpdateBotCommandOutput | VerifyBotSecretKeyCommandOutput;
16
24
  /**
17
25
  * @public
18
26
  */
@@ -55,6 +55,8 @@ export interface BatchGetUsersPbxLinkDataCommandOutput extends BatchGetUsersPbxL
55
55
  * @see {@link BatchGetUsersPbxLinkDataCommandOutput} for command's `response` shape.
56
56
  * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
57
57
  *
58
+ * @throws {@link ForbiddenException} (client fault)
59
+ *
58
60
  * @throws {@link ValidationException} (client fault)
59
61
  *
60
62
  * @throws {@link UsersServiceException}