@wildix/xbees-users-client 1.0.11 → 1.0.14

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 (46) hide show
  1. package/dist-cjs/Users.js +10 -2
  2. package/dist-cjs/commands/{BatchGetUsersStreamLinkDataCommand.js → BatchGetUsersCommand.js} +7 -7
  3. package/dist-cjs/commands/GetUserCommand.js +21 -0
  4. package/dist-cjs/commands/GetUserPbxLinkDataCommand.js +21 -0
  5. package/dist-cjs/commands/QueryUserCommand.js +21 -0
  6. package/dist-cjs/commands/QueryUsersCommand.js +21 -0
  7. package/dist-cjs/commands/index.js +5 -1
  8. package/dist-cjs/models/models_0.js +46 -1
  9. package/dist-cjs/protocols/Aws_restJson1.js +233 -15
  10. package/dist-es/Users.js +10 -2
  11. package/dist-es/commands/BatchGetUsersCommand.js +17 -0
  12. package/dist-es/commands/GetUserCommand.js +17 -0
  13. package/dist-es/commands/GetUserPbxLinkDataCommand.js +17 -0
  14. package/dist-es/commands/QueryUserCommand.js +17 -0
  15. package/dist-es/commands/QueryUsersCommand.js +17 -0
  16. package/dist-es/commands/index.js +5 -1
  17. package/dist-es/models/models_0.js +43 -0
  18. package/dist-es/protocols/Aws_restJson1.js +222 -12
  19. package/dist-types/Users.d.ts +35 -7
  20. package/dist-types/UsersClient.d.ts +7 -3
  21. package/dist-types/commands/BatchGetUsersCommand.d.ts +85 -0
  22. package/dist-types/commands/BatchGetUsersPbxLinkDataCommand.d.ts +55 -5
  23. package/dist-types/commands/CreateBotApiKeyCommand.d.ts +2 -1
  24. package/dist-types/commands/CreateBotCommand.d.ts +4 -5
  25. package/dist-types/commands/DeleteBotApiKeyCommand.d.ts +2 -1
  26. package/dist-types/commands/DeleteBotCommand.d.ts +2 -1
  27. package/dist-types/commands/GetBotCallbackCommand.d.ts +4 -5
  28. package/dist-types/commands/GetBotCommand.d.ts +2 -1
  29. package/dist-types/commands/GetUserCommand.d.ts +83 -0
  30. package/dist-types/commands/GetUserPbxLinkDataCommand.d.ts +120 -0
  31. package/dist-types/commands/ListBotApiKeysCommand.d.ts +2 -1
  32. package/dist-types/commands/ListBotsCommand.d.ts +2 -1
  33. package/dist-types/commands/QueryUserCommand.d.ts +92 -0
  34. package/dist-types/commands/QueryUsersCommand.d.ts +92 -0
  35. package/dist-types/commands/UpdateBotCallbackCommand.d.ts +6 -9
  36. package/dist-types/commands/UpdateBotCommand.d.ts +2 -1
  37. package/dist-types/commands/UploadPictureCommand.d.ts +2 -1
  38. package/dist-types/commands/VerifyBotSecretKeyCommand.d.ts +2 -1
  39. package/dist-types/commands/index.d.ts +5 -1
  40. package/dist-types/index.d.ts +2 -2
  41. package/dist-types/models/UsersServiceException.d.ts +2 -1
  42. package/dist-types/models/models_0.d.ts +439 -35
  43. package/dist-types/protocols/Aws_restJson1.d.ts +45 -9
  44. package/package.json +9 -9
  45. package/dist-es/commands/BatchGetUsersStreamLinkDataCommand.js +0 -17
  46. package/dist-types/commands/BatchGetUsersStreamLinkDataCommand.d.ts +0 -82
@@ -0,0 +1,17 @@
1
+ import { de_BatchGetUsersCommand, se_BatchGetUsersCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class BatchGetUsersCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "BatchGetUsers", {})
12
+ .n("UsersClient", "BatchGetUsersCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_BatchGetUsersCommand)
15
+ .de(de_BatchGetUsersCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_GetUserCommand, se_GetUserCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class GetUserCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "GetUser", {})
12
+ .n("UsersClient", "GetUserCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_GetUserCommand)
15
+ .de(de_GetUserCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_GetUserPbxLinkDataCommand, se_GetUserPbxLinkDataCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class GetUserPbxLinkDataCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "GetUserPbxLinkData", {})
12
+ .n("UsersClient", "GetUserPbxLinkDataCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_GetUserPbxLinkDataCommand)
15
+ .de(de_GetUserPbxLinkDataCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_QueryUserCommand, se_QueryUserCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class QueryUserCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "QueryUser", {})
12
+ .n("UsersClient", "QueryUserCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_QueryUserCommand)
15
+ .de(de_QueryUserCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_QueryUsersCommand, se_QueryUsersCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class QueryUsersCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "QueryUsers", {})
12
+ .n("UsersClient", "QueryUsersCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_QueryUsersCommand)
15
+ .de(de_QueryUsersCommand)
16
+ .build() {
17
+ }
@@ -1,13 +1,17 @@
1
+ export * from "./BatchGetUsersCommand";
1
2
  export * from "./BatchGetUsersPbxLinkDataCommand";
2
- export * from "./BatchGetUsersStreamLinkDataCommand";
3
3
  export * from "./CreateBotCommand";
4
4
  export * from "./CreateBotApiKeyCommand";
5
5
  export * from "./DeleteBotCommand";
6
6
  export * from "./DeleteBotApiKeyCommand";
7
7
  export * from "./GetBotCommand";
8
8
  export * from "./GetBotCallbackCommand";
9
+ export * from "./GetUserCommand";
10
+ export * from "./GetUserPbxLinkDataCommand";
9
11
  export * from "./ListBotApiKeysCommand";
10
12
  export * from "./ListBotsCommand";
13
+ export * from "./QueryUserCommand";
14
+ export * from "./QueryUsersCommand";
11
15
  export * from "./UpdateBotCommand";
12
16
  export * from "./UpdateBotCallbackCommand";
13
17
  export * from "./UploadPictureCommand";
@@ -23,6 +23,13 @@ export class ForbiddenException extends __BaseException {
23
23
  Object.setPrototypeOf(this, ForbiddenException.prototype);
24
24
  }
25
25
  }
26
+ export const PbxLicenseType = {
27
+ BASIC: "basic",
28
+ BUSINESS: "business",
29
+ ESSENTIAL: "essential",
30
+ PREMIUM: "premium",
31
+ WIZYCONF: "wizyconf",
32
+ };
26
33
  export class BotApiKeyNotFoundException extends __BaseException {
27
34
  constructor(opts) {
28
35
  super({
@@ -73,3 +80,39 @@ export class BotSecretKeyNotValidException extends __BaseException {
73
80
  Object.setPrototypeOf(this, BotSecretKeyNotValidException.prototype);
74
81
  }
75
82
  }
83
+ export class UserNotFoundException extends __BaseException {
84
+ constructor(opts) {
85
+ super({
86
+ name: "UserNotFoundException",
87
+ $fault: "client",
88
+ ...opts
89
+ });
90
+ this.name = "UserNotFoundException";
91
+ this.$fault = "client";
92
+ Object.setPrototypeOf(this, UserNotFoundException.prototype);
93
+ }
94
+ }
95
+ export var UserQuery;
96
+ (function (UserQuery) {
97
+ UserQuery.visit = (value, visitor) => {
98
+ if (value.id !== undefined)
99
+ return visitor.id(value.id);
100
+ if (value.email !== undefined)
101
+ return visitor.email(value.email);
102
+ if (value.phone !== undefined)
103
+ return visitor.phone(value.phone);
104
+ return visitor._(value.$unknown[0], value.$unknown[1]);
105
+ };
106
+ })(UserQuery || (UserQuery = {}));
107
+ export class UserQueryPredicateNotMetException extends __BaseException {
108
+ constructor(opts) {
109
+ super({
110
+ name: "UserQueryPredicateNotMetException",
111
+ $fault: "client",
112
+ ...opts
113
+ });
114
+ this.name = "UserQueryPredicateNotMetException";
115
+ this.$fault = "client";
116
+ Object.setPrototypeOf(this, UserQueryPredicateNotMetException.prototype);
117
+ }
118
+ }
@@ -1,13 +1,13 @@
1
1
  import { UsersServiceException as __BaseException } from "../models/UsersServiceException";
2
- import { BotApiKeyNotFoundException, BotNotFoundException, BotSecretKeyNotValidException, ForbiddenException, ValidationException, } from "../models/models_0";
2
+ import { BotApiKeyNotFoundException, BotEndpoint, BotNotFoundException, BotSecretKeyNotValidException, ForbiddenException, UserNotFoundException, UserQueryPredicateNotMetException, ValidationException, } from "../models/models_0";
3
3
  import { requestBuilder as rb } from "@smithy/core";
4
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
- export const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
4
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
+ export const se_BatchGetUsersCommand = async (input, context) => {
6
6
  const b = rb(input, context);
7
7
  const headers = {
8
8
  'content-type': 'application/json',
9
9
  };
10
- b.bp("/v2/users/BatchGetUsersPbxLinkData");
10
+ b.bp("/v1/users/BatchGetUsers");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  'id': _ => _json(_),
@@ -17,12 +17,12 @@ export const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
17
17
  .b(body);
18
18
  return b.build();
19
19
  };
20
- export const se_BatchGetUsersStreamLinkDataCommand = async (input, context) => {
20
+ export const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
21
21
  const b = rb(input, context);
22
22
  const headers = {
23
23
  'content-type': 'application/json',
24
24
  };
25
- b.bp("/v1/users/BatchGetUsersStreamLinkData");
25
+ b.bp("/v2/users/BatchGetUsersPbxLinkData");
26
26
  let body;
27
27
  body = JSON.stringify(take(input, {
28
28
  'id': _ => _json(_),
@@ -43,7 +43,7 @@ export const se_CreateBotCommand = async (input, context) => {
43
43
  });
44
44
  let body;
45
45
  body = JSON.stringify(take(input, {
46
- 'callback': _ => _json(_),
46
+ 'callback': _ => se_BotCallback(_, context),
47
47
  'name': [],
48
48
  'picture': [],
49
49
  'searchable': [],
@@ -135,6 +135,32 @@ export const se_GetBotCallbackCommand = async (input, context) => {
135
135
  .b(body);
136
136
  return b.build();
137
137
  };
138
+ export const se_GetUserCommand = async (input, context) => {
139
+ const b = rb(input, context);
140
+ const headers = {};
141
+ b.bp("/v1/users/cloud/{userId}");
142
+ b.p('userId', () => input.userId, '{userId}', false);
143
+ let body;
144
+ b.m("POST")
145
+ .h(headers)
146
+ .b(body);
147
+ return b.build();
148
+ };
149
+ export const se_GetUserPbxLinkDataCommand = async (input, context) => {
150
+ const b = rb(input, context);
151
+ const headers = {
152
+ 'content-type': 'application/json',
153
+ };
154
+ b.bp("/v2/users/GetUserPbxLinkData");
155
+ let body;
156
+ body = JSON.stringify(take(input, {
157
+ 'id': [],
158
+ }));
159
+ b.m("POST")
160
+ .h(headers)
161
+ .b(body);
162
+ return b.build();
163
+ };
138
164
  export const se_ListBotApiKeysCommand = async (input, context) => {
139
165
  const b = rb(input, context);
140
166
  const headers = {};
@@ -164,6 +190,38 @@ export const se_ListBotsCommand = async (input, context) => {
164
190
  .b(body);
165
191
  return b.build();
166
192
  };
193
+ export const se_QueryUserCommand = async (input, context) => {
194
+ const b = rb(input, context);
195
+ const headers = {
196
+ 'content-type': 'application/json',
197
+ };
198
+ b.bp("/v1/users/QueryUser");
199
+ let body;
200
+ body = JSON.stringify(take(input, {
201
+ 'predicate': _ => _json(_),
202
+ 'query': _ => _json(_),
203
+ }));
204
+ b.m("POST")
205
+ .h(headers)
206
+ .b(body);
207
+ return b.build();
208
+ };
209
+ export const se_QueryUsersCommand = async (input, context) => {
210
+ const b = rb(input, context);
211
+ const headers = {
212
+ 'content-type': 'application/json',
213
+ };
214
+ b.bp("/v1/users/QueryUsers");
215
+ let body;
216
+ body = JSON.stringify(take(input, {
217
+ 'predicate': _ => _json(_),
218
+ 'queries': _ => _json(_),
219
+ }));
220
+ b.m("POST")
221
+ .h(headers)
222
+ .b(body);
223
+ return b.build();
224
+ };
167
225
  export const se_UpdateBotCommand = async (input, context) => {
168
226
  const b = rb(input, context);
169
227
  const headers = {
@@ -198,7 +256,7 @@ export const se_UpdateBotCallbackCommand = async (input, context) => {
198
256
  });
199
257
  let body;
200
258
  body = JSON.stringify(take(input, {
201
- 'callback': _ => _json(_),
259
+ 'callback': _ => se_BotCallback(_, context),
202
260
  }));
203
261
  b.m("PUT")
204
262
  .h(headers)
@@ -236,7 +294,7 @@ export const se_VerifyBotSecretKeyCommand = async (input, context) => {
236
294
  .b(body);
237
295
  return b.build();
238
296
  };
239
- export const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
297
+ export const de_BatchGetUsersCommand = async (output, context) => {
240
298
  if (output.statusCode !== 200 && output.statusCode >= 300) {
241
299
  return de_CommandError(output, context);
242
300
  }
@@ -250,7 +308,7 @@ export const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
250
308
  Object.assign(contents, doc);
251
309
  return contents;
252
310
  };
253
- export const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
311
+ export const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
254
312
  if (output.statusCode !== 200 && output.statusCode >= 300) {
255
313
  return de_CommandError(output, context);
256
314
  }
@@ -336,7 +394,35 @@ export const de_GetBotCallbackCommand = async (output, context) => {
336
394
  });
337
395
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
338
396
  const doc = take(data, {
339
- 'callback': _json,
397
+ 'callback': _ => de_BotCallback(_, context),
398
+ });
399
+ Object.assign(contents, doc);
400
+ return contents;
401
+ };
402
+ export const de_GetUserCommand = async (output, context) => {
403
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
404
+ return de_CommandError(output, context);
405
+ }
406
+ const contents = map({
407
+ $metadata: deserializeMetadata(output),
408
+ });
409
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
410
+ const doc = take(data, {
411
+ 'user': _json,
412
+ });
413
+ Object.assign(contents, doc);
414
+ return contents;
415
+ };
416
+ export const de_GetUserPbxLinkDataCommand = async (output, context) => {
417
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
418
+ return de_CommandError(output, context);
419
+ }
420
+ const contents = map({
421
+ $metadata: deserializeMetadata(output),
422
+ });
423
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
424
+ const doc = take(data, {
425
+ 'user': _json,
340
426
  });
341
427
  Object.assign(contents, doc);
342
428
  return contents;
@@ -369,6 +455,34 @@ export const de_ListBotsCommand = async (output, context) => {
369
455
  Object.assign(contents, doc);
370
456
  return contents;
371
457
  };
458
+ export const de_QueryUserCommand = async (output, context) => {
459
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
460
+ return de_CommandError(output, context);
461
+ }
462
+ const contents = map({
463
+ $metadata: deserializeMetadata(output),
464
+ });
465
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
466
+ const doc = take(data, {
467
+ 'user': _json,
468
+ });
469
+ Object.assign(contents, doc);
470
+ return contents;
471
+ };
472
+ export const de_QueryUsersCommand = async (output, context) => {
473
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
474
+ return de_CommandError(output, context);
475
+ }
476
+ const contents = map({
477
+ $metadata: deserializeMetadata(output),
478
+ });
479
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
480
+ const doc = take(data, {
481
+ 'users': _json,
482
+ });
483
+ Object.assign(contents, doc);
484
+ return contents;
485
+ };
372
486
  export const de_UpdateBotCommand = async (output, context) => {
373
487
  if (output.statusCode !== 200 && output.statusCode >= 300) {
374
488
  return de_CommandError(output, context);
@@ -392,7 +506,7 @@ export const de_UpdateBotCallbackCommand = async (output, context) => {
392
506
  });
393
507
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
394
508
  const doc = take(data, {
395
- 'callback': _json,
509
+ 'callback': _ => de_BotCallback(_, context),
396
510
  });
397
511
  Object.assign(contents, doc);
398
512
  return contents;
@@ -446,6 +560,12 @@ const de_CommandError = async (output, context) => {
446
560
  case "BotApiKeyNotFoundException":
447
561
  case "wildix.xbees.users#BotApiKeyNotFoundException":
448
562
  throw await de_BotApiKeyNotFoundExceptionRes(parsedOutput, context);
563
+ case "UserNotFoundException":
564
+ case "wildix.xbees.users#UserNotFoundException":
565
+ throw await de_UserNotFoundExceptionRes(parsedOutput, context);
566
+ case "UserQueryPredicateNotMetException":
567
+ case "wildix.xbees.users#UserQueryPredicateNotMetException":
568
+ throw await de_UserQueryPredicateNotMetExceptionRes(parsedOutput, context);
449
569
  case "BotSecretKeyNotValidException":
450
570
  case "wildix.xbees.users#BotSecretKeyNotValidException":
451
571
  throw await de_BotSecretKeyNotValidExceptionRes(parsedOutput, context);
@@ -524,6 +644,96 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
524
644
  });
525
645
  return __decorateServiceException(exception, parsedOutput.body);
526
646
  };
647
+ const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
648
+ const contents = map({});
649
+ const data = parsedOutput.body;
650
+ const doc = take(data, {
651
+ 'message': __expectString,
652
+ });
653
+ Object.assign(contents, doc);
654
+ const exception = new UserNotFoundException({
655
+ $metadata: deserializeMetadata(parsedOutput),
656
+ ...contents
657
+ });
658
+ return __decorateServiceException(exception, parsedOutput.body);
659
+ };
660
+ const de_UserQueryPredicateNotMetExceptionRes = async (parsedOutput, context) => {
661
+ const contents = map({});
662
+ const data = parsedOutput.body;
663
+ const doc = take(data, {
664
+ 'message': __expectString,
665
+ });
666
+ Object.assign(contents, doc);
667
+ const exception = new UserQueryPredicateNotMetException({
668
+ $metadata: deserializeMetadata(parsedOutput),
669
+ ...contents
670
+ });
671
+ return __decorateServiceException(exception, parsedOutput.body);
672
+ };
673
+ const se_Document = (input, context) => {
674
+ return input;
675
+ };
676
+ const se_BotCallback = (input, context) => {
677
+ return take(input, {
678
+ 'endpoint': _ => se_BotEndpoint(_, context),
679
+ });
680
+ };
681
+ const se_BotDialogflowCxEndpoint = (input, context) => {
682
+ return take(input, {
683
+ 'agent': [],
684
+ 'credentials': _ => se_Document(_, context),
685
+ 'language': [],
686
+ 'location': [],
687
+ });
688
+ };
689
+ const se_BotEndpoint = (input, context) => {
690
+ return BotEndpoint.visit(input, {
691
+ dialogflowCx: value => ({ "dialogflowCx": se_BotDialogflowCxEndpoint(value, context) }),
692
+ openAiAssistant: value => ({ "openAiAssistant": _json(value) }),
693
+ sqs: value => ({ "sqs": _json(value) }),
694
+ webhook: value => ({ "webhook": _json(value) }),
695
+ _: (name, value) => ({ name: value })
696
+ });
697
+ };
698
+ const de_Document = (output, context) => {
699
+ return output;
700
+ };
701
+ const de_BotCallback = (output, context) => {
702
+ return take(output, {
703
+ 'endpoint': (_) => de_BotEndpoint(__expectUnion(_), context),
704
+ });
705
+ };
706
+ const de_BotDialogflowCxEndpoint = (output, context) => {
707
+ return take(output, {
708
+ 'agent': __expectString,
709
+ 'credentials': (_) => de_Document(_, context),
710
+ 'language': __expectString,
711
+ 'location': __expectString,
712
+ });
713
+ };
714
+ const de_BotEndpoint = (output, context) => {
715
+ if (output.dialogflowCx != null) {
716
+ return {
717
+ dialogflowCx: de_BotDialogflowCxEndpoint(output.dialogflowCx, context)
718
+ };
719
+ }
720
+ if (output.openAiAssistant != null) {
721
+ return {
722
+ openAiAssistant: _json(output.openAiAssistant)
723
+ };
724
+ }
725
+ if (output.sqs != null) {
726
+ return {
727
+ sqs: _json(output.sqs)
728
+ };
729
+ }
730
+ if (output.webhook != null) {
731
+ return {
732
+ webhook: _json(output.webhook)
733
+ };
734
+ }
735
+ return { $unknown: Object.entries(output)[0] };
736
+ };
527
737
  const deserializeMetadata = (output) => ({
528
738
  httpStatusCode: output.statusCode,
529
739
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,32 +1,36 @@
1
1
  import { UsersClient } from "./UsersClient";
2
+ import { BatchGetUsersCommandInput, BatchGetUsersCommandOutput } from "./commands/BatchGetUsersCommand";
2
3
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
3
- import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "./commands/BatchGetUsersStreamLinkDataCommand";
4
4
  import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "./commands/CreateBotApiKeyCommand";
5
5
  import { CreateBotCommandInput, CreateBotCommandOutput } from "./commands/CreateBotCommand";
6
6
  import { DeleteBotApiKeyCommandInput, DeleteBotApiKeyCommandOutput } from "./commands/DeleteBotApiKeyCommand";
7
7
  import { DeleteBotCommandInput, DeleteBotCommandOutput } from "./commands/DeleteBotCommand";
8
8
  import { GetBotCallbackCommandInput, GetBotCallbackCommandOutput } from "./commands/GetBotCallbackCommand";
9
9
  import { GetBotCommandInput, GetBotCommandOutput } from "./commands/GetBotCommand";
10
+ import { GetUserCommandInput, GetUserCommandOutput } from "./commands/GetUserCommand";
11
+ import { GetUserPbxLinkDataCommandInput, GetUserPbxLinkDataCommandOutput } from "./commands/GetUserPbxLinkDataCommand";
10
12
  import { ListBotApiKeysCommandInput, ListBotApiKeysCommandOutput } from "./commands/ListBotApiKeysCommand";
11
13
  import { ListBotsCommandInput, ListBotsCommandOutput } from "./commands/ListBotsCommand";
14
+ import { QueryUserCommandInput, QueryUserCommandOutput } from "./commands/QueryUserCommand";
15
+ import { QueryUsersCommandInput, QueryUsersCommandOutput } from "./commands/QueryUsersCommand";
12
16
  import { UpdateBotCallbackCommandInput, UpdateBotCallbackCommandOutput } from "./commands/UpdateBotCallbackCommand";
13
17
  import { UpdateBotCommandInput, UpdateBotCommandOutput } from "./commands/UpdateBotCommand";
14
18
  import { UploadPictureCommandInput, UploadPictureCommandOutput } from "./commands/UploadPictureCommand";
15
19
  import { VerifyBotSecretKeyCommandInput, VerifyBotSecretKeyCommandOutput } from "./commands/VerifyBotSecretKeyCommand";
16
20
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
17
21
  export interface Users {
22
+ /**
23
+ * @see {@link BatchGetUsersCommand}
24
+ */
25
+ batchGetUsers(args: BatchGetUsersCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetUsersCommandOutput>;
26
+ batchGetUsers(args: BatchGetUsersCommandInput, cb: (err: any, data?: BatchGetUsersCommandOutput) => void): void;
27
+ batchGetUsers(args: BatchGetUsersCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetUsersCommandOutput) => void): void;
18
28
  /**
19
29
  * @see {@link BatchGetUsersPbxLinkDataCommand}
20
30
  */
21
31
  batchGetUsersPbxLinkData(args: BatchGetUsersPbxLinkDataCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetUsersPbxLinkDataCommandOutput>;
22
32
  batchGetUsersPbxLinkData(args: BatchGetUsersPbxLinkDataCommandInput, cb: (err: any, data?: BatchGetUsersPbxLinkDataCommandOutput) => void): void;
23
33
  batchGetUsersPbxLinkData(args: BatchGetUsersPbxLinkDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetUsersPbxLinkDataCommandOutput) => void): void;
24
- /**
25
- * @see {@link BatchGetUsersStreamLinkDataCommand}
26
- */
27
- batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetUsersStreamLinkDataCommandOutput>;
28
- batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, cb: (err: any, data?: BatchGetUsersStreamLinkDataCommandOutput) => void): void;
29
- batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetUsersStreamLinkDataCommandOutput) => void): void;
30
34
  /**
31
35
  * @see {@link CreateBotCommand}
32
36
  */
@@ -63,6 +67,18 @@ export interface Users {
63
67
  getBotCallback(args: GetBotCallbackCommandInput, options?: __HttpHandlerOptions): Promise<GetBotCallbackCommandOutput>;
64
68
  getBotCallback(args: GetBotCallbackCommandInput, cb: (err: any, data?: GetBotCallbackCommandOutput) => void): void;
65
69
  getBotCallback(args: GetBotCallbackCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetBotCallbackCommandOutput) => void): void;
70
+ /**
71
+ * @see {@link GetUserCommand}
72
+ */
73
+ getUser(args: GetUserCommandInput, options?: __HttpHandlerOptions): Promise<GetUserCommandOutput>;
74
+ getUser(args: GetUserCommandInput, cb: (err: any, data?: GetUserCommandOutput) => void): void;
75
+ getUser(args: GetUserCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetUserCommandOutput) => void): void;
76
+ /**
77
+ * @see {@link GetUserPbxLinkDataCommand}
78
+ */
79
+ getUserPbxLinkData(args: GetUserPbxLinkDataCommandInput, options?: __HttpHandlerOptions): Promise<GetUserPbxLinkDataCommandOutput>;
80
+ getUserPbxLinkData(args: GetUserPbxLinkDataCommandInput, cb: (err: any, data?: GetUserPbxLinkDataCommandOutput) => void): void;
81
+ getUserPbxLinkData(args: GetUserPbxLinkDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetUserPbxLinkDataCommandOutput) => void): void;
66
82
  /**
67
83
  * @see {@link ListBotApiKeysCommand}
68
84
  */
@@ -76,6 +92,18 @@ export interface Users {
76
92
  listBots(args: ListBotsCommandInput, options?: __HttpHandlerOptions): Promise<ListBotsCommandOutput>;
77
93
  listBots(args: ListBotsCommandInput, cb: (err: any, data?: ListBotsCommandOutput) => void): void;
78
94
  listBots(args: ListBotsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListBotsCommandOutput) => void): void;
95
+ /**
96
+ * @see {@link QueryUserCommand}
97
+ */
98
+ queryUser(args: QueryUserCommandInput, options?: __HttpHandlerOptions): Promise<QueryUserCommandOutput>;
99
+ queryUser(args: QueryUserCommandInput, cb: (err: any, data?: QueryUserCommandOutput) => void): void;
100
+ queryUser(args: QueryUserCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryUserCommandOutput) => void): void;
101
+ /**
102
+ * @see {@link QueryUsersCommand}
103
+ */
104
+ queryUsers(args: QueryUsersCommandInput, options?: __HttpHandlerOptions): Promise<QueryUsersCommandOutput>;
105
+ queryUsers(args: QueryUsersCommandInput, cb: (err: any, data?: QueryUsersCommandOutput) => void): void;
106
+ queryUsers(args: QueryUsersCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryUsersCommandOutput) => void): void;
79
107
  /**
80
108
  * @see {@link UpdateBotCommand}
81
109
  */
@@ -1,13 +1,17 @@
1
+ import { BatchGetUsersCommandInput, BatchGetUsersCommandOutput } from "./commands/BatchGetUsersCommand";
1
2
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
2
- import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "./commands/BatchGetUsersStreamLinkDataCommand";
3
3
  import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "./commands/CreateBotApiKeyCommand";
4
4
  import { CreateBotCommandInput, CreateBotCommandOutput } from "./commands/CreateBotCommand";
5
5
  import { DeleteBotApiKeyCommandInput, DeleteBotApiKeyCommandOutput } from "./commands/DeleteBotApiKeyCommand";
6
6
  import { DeleteBotCommandInput, DeleteBotCommandOutput } from "./commands/DeleteBotCommand";
7
7
  import { GetBotCallbackCommandInput, GetBotCallbackCommandOutput } from "./commands/GetBotCallbackCommand";
8
8
  import { GetBotCommandInput, GetBotCommandOutput } from "./commands/GetBotCommand";
9
+ import { GetUserCommandInput, GetUserCommandOutput } from "./commands/GetUserCommand";
10
+ import { GetUserPbxLinkDataCommandInput, GetUserPbxLinkDataCommandOutput } from "./commands/GetUserPbxLinkDataCommand";
9
11
  import { ListBotApiKeysCommandInput, ListBotApiKeysCommandOutput } from "./commands/ListBotApiKeysCommand";
10
12
  import { ListBotsCommandInput, ListBotsCommandOutput } from "./commands/ListBotsCommand";
13
+ import { QueryUserCommandInput, QueryUserCommandOutput } from "./commands/QueryUserCommand";
14
+ import { QueryUsersCommandInput, QueryUsersCommandOutput } from "./commands/QueryUsersCommand";
11
15
  import { UpdateBotCallbackCommandInput, UpdateBotCallbackCommandOutput } from "./commands/UpdateBotCallbackCommand";
12
16
  import { UpdateBotCommandInput, UpdateBotCommandOutput } from "./commands/UpdateBotCommand";
13
17
  import { UploadPictureCommandInput, UploadPictureCommandOutput } from "./commands/UploadPictureCommand";
@@ -22,11 +26,11 @@ export { __Client };
22
26
  /**
23
27
  * @public
24
28
  */
25
- export type ServiceInputTypes = BatchGetUsersPbxLinkDataCommandInput | BatchGetUsersStreamLinkDataCommandInput | CreateBotApiKeyCommandInput | CreateBotCommandInput | DeleteBotApiKeyCommandInput | DeleteBotCommandInput | GetBotCallbackCommandInput | GetBotCommandInput | ListBotApiKeysCommandInput | ListBotsCommandInput | UpdateBotCallbackCommandInput | UpdateBotCommandInput | UploadPictureCommandInput | VerifyBotSecretKeyCommandInput;
29
+ export type ServiceInputTypes = BatchGetUsersCommandInput | BatchGetUsersPbxLinkDataCommandInput | CreateBotApiKeyCommandInput | CreateBotCommandInput | DeleteBotApiKeyCommandInput | DeleteBotCommandInput | GetBotCallbackCommandInput | GetBotCommandInput | GetUserCommandInput | GetUserPbxLinkDataCommandInput | ListBotApiKeysCommandInput | ListBotsCommandInput | QueryUserCommandInput | QueryUsersCommandInput | UpdateBotCallbackCommandInput | UpdateBotCommandInput | UploadPictureCommandInput | VerifyBotSecretKeyCommandInput;
26
30
  /**
27
31
  * @public
28
32
  */
29
- export type ServiceOutputTypes = BatchGetUsersPbxLinkDataCommandOutput | BatchGetUsersStreamLinkDataCommandOutput | CreateBotApiKeyCommandOutput | CreateBotCommandOutput | DeleteBotApiKeyCommandOutput | DeleteBotCommandOutput | GetBotCallbackCommandOutput | GetBotCommandOutput | ListBotApiKeysCommandOutput | ListBotsCommandOutput | UpdateBotCallbackCommandOutput | UpdateBotCommandOutput | UploadPictureCommandOutput | VerifyBotSecretKeyCommandOutput;
33
+ export type ServiceOutputTypes = BatchGetUsersCommandOutput | BatchGetUsersPbxLinkDataCommandOutput | CreateBotApiKeyCommandOutput | CreateBotCommandOutput | DeleteBotApiKeyCommandOutput | DeleteBotCommandOutput | GetBotCallbackCommandOutput | GetBotCommandOutput | GetUserCommandOutput | GetUserPbxLinkDataCommandOutput | ListBotApiKeysCommandOutput | ListBotsCommandOutput | QueryUserCommandOutput | QueryUsersCommandOutput | UpdateBotCallbackCommandOutput | UpdateBotCommandOutput | UploadPictureCommandOutput | VerifyBotSecretKeyCommandOutput;
30
34
  /**
31
35
  * @public
32
36
  */