@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
package/dist-cjs/Users.js CHANGED
@@ -2,32 +2,40 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Users = void 0;
4
4
  const UsersClient_1 = require("./UsersClient");
5
+ const BatchGetUsersCommand_1 = require("./commands/BatchGetUsersCommand");
5
6
  const BatchGetUsersPbxLinkDataCommand_1 = require("./commands/BatchGetUsersPbxLinkDataCommand");
6
- const BatchGetUsersStreamLinkDataCommand_1 = require("./commands/BatchGetUsersStreamLinkDataCommand");
7
7
  const CreateBotApiKeyCommand_1 = require("./commands/CreateBotApiKeyCommand");
8
8
  const CreateBotCommand_1 = require("./commands/CreateBotCommand");
9
9
  const DeleteBotApiKeyCommand_1 = require("./commands/DeleteBotApiKeyCommand");
10
10
  const DeleteBotCommand_1 = require("./commands/DeleteBotCommand");
11
11
  const GetBotCallbackCommand_1 = require("./commands/GetBotCallbackCommand");
12
12
  const GetBotCommand_1 = require("./commands/GetBotCommand");
13
+ const GetUserCommand_1 = require("./commands/GetUserCommand");
14
+ const GetUserPbxLinkDataCommand_1 = require("./commands/GetUserPbxLinkDataCommand");
13
15
  const ListBotApiKeysCommand_1 = require("./commands/ListBotApiKeysCommand");
14
16
  const ListBotsCommand_1 = require("./commands/ListBotsCommand");
17
+ const QueryUserCommand_1 = require("./commands/QueryUserCommand");
18
+ const QueryUsersCommand_1 = require("./commands/QueryUsersCommand");
15
19
  const UpdateBotCallbackCommand_1 = require("./commands/UpdateBotCallbackCommand");
16
20
  const UpdateBotCommand_1 = require("./commands/UpdateBotCommand");
17
21
  const UploadPictureCommand_1 = require("./commands/UploadPictureCommand");
18
22
  const VerifyBotSecretKeyCommand_1 = require("./commands/VerifyBotSecretKeyCommand");
19
23
  const smithy_client_1 = require("@smithy/smithy-client");
20
24
  const commands = {
25
+ BatchGetUsersCommand: BatchGetUsersCommand_1.BatchGetUsersCommand,
21
26
  BatchGetUsersPbxLinkDataCommand: BatchGetUsersPbxLinkDataCommand_1.BatchGetUsersPbxLinkDataCommand,
22
- BatchGetUsersStreamLinkDataCommand: BatchGetUsersStreamLinkDataCommand_1.BatchGetUsersStreamLinkDataCommand,
23
27
  CreateBotCommand: CreateBotCommand_1.CreateBotCommand,
24
28
  CreateBotApiKeyCommand: CreateBotApiKeyCommand_1.CreateBotApiKeyCommand,
25
29
  DeleteBotCommand: DeleteBotCommand_1.DeleteBotCommand,
26
30
  DeleteBotApiKeyCommand: DeleteBotApiKeyCommand_1.DeleteBotApiKeyCommand,
27
31
  GetBotCommand: GetBotCommand_1.GetBotCommand,
28
32
  GetBotCallbackCommand: GetBotCallbackCommand_1.GetBotCallbackCommand,
33
+ GetUserCommand: GetUserCommand_1.GetUserCommand,
34
+ GetUserPbxLinkDataCommand: GetUserPbxLinkDataCommand_1.GetUserPbxLinkDataCommand,
29
35
  ListBotApiKeysCommand: ListBotApiKeysCommand_1.ListBotApiKeysCommand,
30
36
  ListBotsCommand: ListBotsCommand_1.ListBotsCommand,
37
+ QueryUserCommand: QueryUserCommand_1.QueryUserCommand,
38
+ QueryUsersCommand: QueryUsersCommand_1.QueryUsersCommand,
31
39
  UpdateBotCommand: UpdateBotCommand_1.UpdateBotCommand,
32
40
  UpdateBotCallbackCommand: UpdateBotCallbackCommand_1.UpdateBotCallbackCommand,
33
41
  UploadPictureCommand: UploadPictureCommand_1.UploadPictureCommand,
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BatchGetUsersStreamLinkDataCommand = exports.$Command = void 0;
3
+ exports.BatchGetUsersCommand = exports.$Command = void 0;
4
4
  const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- class BatchGetUsersStreamLinkDataCommand extends smithy_client_1.Command.classBuilder()
8
+ class BatchGetUsersCommand extends smithy_client_1.Command.classBuilder()
9
9
  .m(function (Command, cs, config, o) {
10
10
  return [
11
11
  (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
12
  ];
13
13
  })
14
- .s("Users", "BatchGetUsersStreamLinkData", {})
15
- .n("UsersClient", "BatchGetUsersStreamLinkDataCommand")
14
+ .s("Users", "BatchGetUsers", {})
15
+ .n("UsersClient", "BatchGetUsersCommand")
16
16
  .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_BatchGetUsersStreamLinkDataCommand)
18
- .de(Aws_restJson1_1.de_BatchGetUsersStreamLinkDataCommand)
17
+ .ser(Aws_restJson1_1.se_BatchGetUsersCommand)
18
+ .de(Aws_restJson1_1.de_BatchGetUsersCommand)
19
19
  .build() {
20
20
  }
21
- exports.BatchGetUsersStreamLinkDataCommand = BatchGetUsersStreamLinkDataCommand;
21
+ exports.BatchGetUsersCommand = BatchGetUsersCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetUserCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class GetUserCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("Users", "GetUser", {})
15
+ .n("UsersClient", "GetUserCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetUserCommand)
18
+ .de(Aws_restJson1_1.de_GetUserCommand)
19
+ .build() {
20
+ }
21
+ exports.GetUserCommand = GetUserCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetUserPbxLinkDataCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class GetUserPbxLinkDataCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("Users", "GetUserPbxLinkData", {})
15
+ .n("UsersClient", "GetUserPbxLinkDataCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetUserPbxLinkDataCommand)
18
+ .de(Aws_restJson1_1.de_GetUserPbxLinkDataCommand)
19
+ .build() {
20
+ }
21
+ exports.GetUserPbxLinkDataCommand = GetUserPbxLinkDataCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueryUserCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class QueryUserCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("Users", "QueryUser", {})
15
+ .n("UsersClient", "QueryUserCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_QueryUserCommand)
18
+ .de(Aws_restJson1_1.de_QueryUserCommand)
19
+ .build() {
20
+ }
21
+ exports.QueryUserCommand = QueryUserCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueryUsersCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class QueryUsersCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("Users", "QueryUsers", {})
15
+ .n("UsersClient", "QueryUsersCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_QueryUsersCommand)
18
+ .de(Aws_restJson1_1.de_QueryUsersCommand)
19
+ .build() {
20
+ }
21
+ exports.QueryUsersCommand = QueryUsersCommand;
@@ -1,16 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./BatchGetUsersCommand"), exports);
4
5
  tslib_1.__exportStar(require("./BatchGetUsersPbxLinkDataCommand"), exports);
5
- tslib_1.__exportStar(require("./BatchGetUsersStreamLinkDataCommand"), exports);
6
6
  tslib_1.__exportStar(require("./CreateBotCommand"), exports);
7
7
  tslib_1.__exportStar(require("./CreateBotApiKeyCommand"), exports);
8
8
  tslib_1.__exportStar(require("./DeleteBotCommand"), exports);
9
9
  tslib_1.__exportStar(require("./DeleteBotApiKeyCommand"), exports);
10
10
  tslib_1.__exportStar(require("./GetBotCommand"), exports);
11
11
  tslib_1.__exportStar(require("./GetBotCallbackCommand"), exports);
12
+ tslib_1.__exportStar(require("./GetUserCommand"), exports);
13
+ tslib_1.__exportStar(require("./GetUserPbxLinkDataCommand"), exports);
12
14
  tslib_1.__exportStar(require("./ListBotApiKeysCommand"), exports);
13
15
  tslib_1.__exportStar(require("./ListBotsCommand"), exports);
16
+ tslib_1.__exportStar(require("./QueryUserCommand"), exports);
17
+ tslib_1.__exportStar(require("./QueryUsersCommand"), exports);
14
18
  tslib_1.__exportStar(require("./UpdateBotCommand"), exports);
15
19
  tslib_1.__exportStar(require("./UpdateBotCallbackCommand"), exports);
16
20
  tslib_1.__exportStar(require("./UploadPictureCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotApiKeyNotFoundException = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.UserQueryPredicateNotMetException = exports.UserQuery = exports.UserNotFoundException = exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotApiKeyNotFoundException = exports.PbxLicenseType = exports.ForbiddenException = exports.ValidationException = void 0;
4
4
  const UsersServiceException_1 = require("./UsersServiceException");
5
5
  class ValidationException extends UsersServiceException_1.UsersServiceException {
6
6
  constructor(opts) {
@@ -28,6 +28,13 @@ class ForbiddenException extends UsersServiceException_1.UsersServiceException {
28
28
  }
29
29
  }
30
30
  exports.ForbiddenException = ForbiddenException;
31
+ exports.PbxLicenseType = {
32
+ BASIC: "basic",
33
+ BUSINESS: "business",
34
+ ESSENTIAL: "essential",
35
+ PREMIUM: "premium",
36
+ WIZYCONF: "wizyconf",
37
+ };
31
38
  class BotApiKeyNotFoundException extends UsersServiceException_1.UsersServiceException {
32
39
  constructor(opts) {
33
40
  super({
@@ -81,3 +88,41 @@ class BotSecretKeyNotValidException extends UsersServiceException_1.UsersService
81
88
  }
82
89
  }
83
90
  exports.BotSecretKeyNotValidException = BotSecretKeyNotValidException;
91
+ class UserNotFoundException extends UsersServiceException_1.UsersServiceException {
92
+ constructor(opts) {
93
+ super({
94
+ name: "UserNotFoundException",
95
+ $fault: "client",
96
+ ...opts
97
+ });
98
+ this.name = "UserNotFoundException";
99
+ this.$fault = "client";
100
+ Object.setPrototypeOf(this, UserNotFoundException.prototype);
101
+ }
102
+ }
103
+ exports.UserNotFoundException = UserNotFoundException;
104
+ var UserQuery;
105
+ (function (UserQuery) {
106
+ UserQuery.visit = (value, visitor) => {
107
+ if (value.id !== undefined)
108
+ return visitor.id(value.id);
109
+ if (value.email !== undefined)
110
+ return visitor.email(value.email);
111
+ if (value.phone !== undefined)
112
+ return visitor.phone(value.phone);
113
+ return visitor._(value.$unknown[0], value.$unknown[1]);
114
+ };
115
+ })(UserQuery = exports.UserQuery || (exports.UserQuery = {}));
116
+ class UserQueryPredicateNotMetException extends UsersServiceException_1.UsersServiceException {
117
+ constructor(opts) {
118
+ super({
119
+ name: "UserQueryPredicateNotMetException",
120
+ $fault: "client",
121
+ ...opts
122
+ });
123
+ this.name = "UserQueryPredicateNotMetException";
124
+ this.$fault = "client";
125
+ Object.setPrototypeOf(this, UserQueryPredicateNotMetException.prototype);
126
+ }
127
+ }
128
+ exports.UserQueryPredicateNotMetException = UserQueryPredicateNotMetException;
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_VerifyBotSecretKeyCommand = exports.de_UploadPictureCommand = exports.de_UpdateBotCallbackCommand = exports.de_UpdateBotCommand = exports.de_ListBotsCommand = exports.de_ListBotApiKeysCommand = exports.de_GetBotCallbackCommand = exports.de_GetBotCommand = exports.de_DeleteBotApiKeyCommand = exports.de_DeleteBotCommand = exports.de_CreateBotApiKeyCommand = exports.de_CreateBotCommand = exports.de_BatchGetUsersStreamLinkDataCommand = exports.de_BatchGetUsersPbxLinkDataCommand = exports.se_VerifyBotSecretKeyCommand = exports.se_UploadPictureCommand = exports.se_UpdateBotCallbackCommand = exports.se_UpdateBotCommand = exports.se_ListBotsCommand = exports.se_ListBotApiKeysCommand = exports.se_GetBotCallbackCommand = exports.se_GetBotCommand = exports.se_DeleteBotApiKeyCommand = exports.se_DeleteBotCommand = exports.se_CreateBotApiKeyCommand = exports.se_CreateBotCommand = exports.se_BatchGetUsersStreamLinkDataCommand = exports.se_BatchGetUsersPbxLinkDataCommand = void 0;
3
+ exports.de_VerifyBotSecretKeyCommand = exports.de_UploadPictureCommand = exports.de_UpdateBotCallbackCommand = exports.de_UpdateBotCommand = exports.de_QueryUsersCommand = exports.de_QueryUserCommand = exports.de_ListBotsCommand = exports.de_ListBotApiKeysCommand = exports.de_GetUserPbxLinkDataCommand = exports.de_GetUserCommand = exports.de_GetBotCallbackCommand = exports.de_GetBotCommand = exports.de_DeleteBotApiKeyCommand = exports.de_DeleteBotCommand = exports.de_CreateBotApiKeyCommand = exports.de_CreateBotCommand = exports.de_BatchGetUsersPbxLinkDataCommand = exports.de_BatchGetUsersCommand = exports.se_VerifyBotSecretKeyCommand = exports.se_UploadPictureCommand = exports.se_UpdateBotCallbackCommand = exports.se_UpdateBotCommand = exports.se_QueryUsersCommand = exports.se_QueryUserCommand = exports.se_ListBotsCommand = exports.se_ListBotApiKeysCommand = exports.se_GetUserPbxLinkDataCommand = exports.se_GetUserCommand = exports.se_GetBotCallbackCommand = exports.se_GetBotCommand = exports.se_DeleteBotApiKeyCommand = exports.se_DeleteBotCommand = exports.se_CreateBotApiKeyCommand = exports.se_CreateBotCommand = exports.se_BatchGetUsersPbxLinkDataCommand = exports.se_BatchGetUsersCommand = void 0;
4
4
  const UsersServiceException_1 = require("../models/UsersServiceException");
5
5
  const models_0_1 = require("../models/models_0");
6
6
  const core_1 = require("@smithy/core");
7
7
  const smithy_client_1 = require("@smithy/smithy-client");
8
- const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
8
+ const se_BatchGetUsersCommand = async (input, context) => {
9
9
  const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  'content-type': 'application/json',
12
12
  };
13
- b.bp("/v2/users/BatchGetUsersPbxLinkData");
13
+ b.bp("/v1/users/BatchGetUsers");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  'id': _ => (0, smithy_client_1._json)(_),
@@ -20,13 +20,13 @@ const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
20
20
  .b(body);
21
21
  return b.build();
22
22
  };
23
- exports.se_BatchGetUsersPbxLinkDataCommand = se_BatchGetUsersPbxLinkDataCommand;
24
- const se_BatchGetUsersStreamLinkDataCommand = async (input, context) => {
23
+ exports.se_BatchGetUsersCommand = se_BatchGetUsersCommand;
24
+ const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
25
25
  const b = (0, core_1.requestBuilder)(input, context);
26
26
  const headers = {
27
27
  'content-type': 'application/json',
28
28
  };
29
- b.bp("/v1/users/BatchGetUsersStreamLinkData");
29
+ b.bp("/v2/users/BatchGetUsersPbxLinkData");
30
30
  let body;
31
31
  body = JSON.stringify((0, smithy_client_1.take)(input, {
32
32
  'id': _ => (0, smithy_client_1._json)(_),
@@ -36,7 +36,7 @@ const se_BatchGetUsersStreamLinkDataCommand = async (input, context) => {
36
36
  .b(body);
37
37
  return b.build();
38
38
  };
39
- exports.se_BatchGetUsersStreamLinkDataCommand = se_BatchGetUsersStreamLinkDataCommand;
39
+ exports.se_BatchGetUsersPbxLinkDataCommand = se_BatchGetUsersPbxLinkDataCommand;
40
40
  const se_CreateBotCommand = async (input, context) => {
41
41
  const b = (0, core_1.requestBuilder)(input, context);
42
42
  const headers = {
@@ -48,7 +48,7 @@ const se_CreateBotCommand = async (input, context) => {
48
48
  });
49
49
  let body;
50
50
  body = JSON.stringify((0, smithy_client_1.take)(input, {
51
- 'callback': _ => (0, smithy_client_1._json)(_),
51
+ 'callback': _ => se_BotCallback(_, context),
52
52
  'name': [],
53
53
  'picture': [],
54
54
  'searchable': [],
@@ -146,6 +146,34 @@ const se_GetBotCallbackCommand = async (input, context) => {
146
146
  return b.build();
147
147
  };
148
148
  exports.se_GetBotCallbackCommand = se_GetBotCallbackCommand;
149
+ const se_GetUserCommand = async (input, context) => {
150
+ const b = (0, core_1.requestBuilder)(input, context);
151
+ const headers = {};
152
+ b.bp("/v1/users/cloud/{userId}");
153
+ b.p('userId', () => input.userId, '{userId}', false);
154
+ let body;
155
+ b.m("POST")
156
+ .h(headers)
157
+ .b(body);
158
+ return b.build();
159
+ };
160
+ exports.se_GetUserCommand = se_GetUserCommand;
161
+ const se_GetUserPbxLinkDataCommand = async (input, context) => {
162
+ const b = (0, core_1.requestBuilder)(input, context);
163
+ const headers = {
164
+ 'content-type': 'application/json',
165
+ };
166
+ b.bp("/v2/users/GetUserPbxLinkData");
167
+ let body;
168
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
169
+ 'id': [],
170
+ }));
171
+ b.m("POST")
172
+ .h(headers)
173
+ .b(body);
174
+ return b.build();
175
+ };
176
+ exports.se_GetUserPbxLinkDataCommand = se_GetUserPbxLinkDataCommand;
149
177
  const se_ListBotApiKeysCommand = async (input, context) => {
150
178
  const b = (0, core_1.requestBuilder)(input, context);
151
179
  const headers = {};
@@ -177,6 +205,40 @@ const se_ListBotsCommand = async (input, context) => {
177
205
  return b.build();
178
206
  };
179
207
  exports.se_ListBotsCommand = se_ListBotsCommand;
208
+ const se_QueryUserCommand = async (input, context) => {
209
+ const b = (0, core_1.requestBuilder)(input, context);
210
+ const headers = {
211
+ 'content-type': 'application/json',
212
+ };
213
+ b.bp("/v1/users/QueryUser");
214
+ let body;
215
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
216
+ 'predicate': _ => (0, smithy_client_1._json)(_),
217
+ 'query': _ => (0, smithy_client_1._json)(_),
218
+ }));
219
+ b.m("POST")
220
+ .h(headers)
221
+ .b(body);
222
+ return b.build();
223
+ };
224
+ exports.se_QueryUserCommand = se_QueryUserCommand;
225
+ const se_QueryUsersCommand = async (input, context) => {
226
+ const b = (0, core_1.requestBuilder)(input, context);
227
+ const headers = {
228
+ 'content-type': 'application/json',
229
+ };
230
+ b.bp("/v1/users/QueryUsers");
231
+ let body;
232
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
233
+ 'predicate': _ => (0, smithy_client_1._json)(_),
234
+ 'queries': _ => (0, smithy_client_1._json)(_),
235
+ }));
236
+ b.m("POST")
237
+ .h(headers)
238
+ .b(body);
239
+ return b.build();
240
+ };
241
+ exports.se_QueryUsersCommand = se_QueryUsersCommand;
180
242
  const se_UpdateBotCommand = async (input, context) => {
181
243
  const b = (0, core_1.requestBuilder)(input, context);
182
244
  const headers = {
@@ -212,7 +274,7 @@ const se_UpdateBotCallbackCommand = async (input, context) => {
212
274
  });
213
275
  let body;
214
276
  body = JSON.stringify((0, smithy_client_1.take)(input, {
215
- 'callback': _ => (0, smithy_client_1._json)(_),
277
+ 'callback': _ => se_BotCallback(_, context),
216
278
  }));
217
279
  b.m("PUT")
218
280
  .h(headers)
@@ -253,7 +315,7 @@ const se_VerifyBotSecretKeyCommand = async (input, context) => {
253
315
  return b.build();
254
316
  };
255
317
  exports.se_VerifyBotSecretKeyCommand = se_VerifyBotSecretKeyCommand;
256
- const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
318
+ const de_BatchGetUsersCommand = async (output, context) => {
257
319
  if (output.statusCode !== 200 && output.statusCode >= 300) {
258
320
  return de_CommandError(output, context);
259
321
  }
@@ -267,8 +329,8 @@ const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
267
329
  Object.assign(contents, doc);
268
330
  return contents;
269
331
  };
270
- exports.de_BatchGetUsersPbxLinkDataCommand = de_BatchGetUsersPbxLinkDataCommand;
271
- const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
332
+ exports.de_BatchGetUsersCommand = de_BatchGetUsersCommand;
333
+ const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
272
334
  if (output.statusCode !== 200 && output.statusCode >= 300) {
273
335
  return de_CommandError(output, context);
274
336
  }
@@ -282,7 +344,7 @@ const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
282
344
  Object.assign(contents, doc);
283
345
  return contents;
284
346
  };
285
- exports.de_BatchGetUsersStreamLinkDataCommand = de_BatchGetUsersStreamLinkDataCommand;
347
+ exports.de_BatchGetUsersPbxLinkDataCommand = de_BatchGetUsersPbxLinkDataCommand;
286
348
  const de_CreateBotCommand = async (output, context) => {
287
349
  if (output.statusCode !== 200 && output.statusCode >= 300) {
288
350
  return de_CommandError(output, context);
@@ -360,12 +422,42 @@ const de_GetBotCallbackCommand = async (output, context) => {
360
422
  });
361
423
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
362
424
  const doc = (0, smithy_client_1.take)(data, {
363
- 'callback': smithy_client_1._json,
425
+ 'callback': _ => de_BotCallback(_, context),
364
426
  });
365
427
  Object.assign(contents, doc);
366
428
  return contents;
367
429
  };
368
430
  exports.de_GetBotCallbackCommand = de_GetBotCallbackCommand;
431
+ const de_GetUserCommand = async (output, context) => {
432
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
433
+ return de_CommandError(output, context);
434
+ }
435
+ const contents = (0, smithy_client_1.map)({
436
+ $metadata: deserializeMetadata(output),
437
+ });
438
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
439
+ const doc = (0, smithy_client_1.take)(data, {
440
+ 'user': smithy_client_1._json,
441
+ });
442
+ Object.assign(contents, doc);
443
+ return contents;
444
+ };
445
+ exports.de_GetUserCommand = de_GetUserCommand;
446
+ const de_GetUserPbxLinkDataCommand = async (output, context) => {
447
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
448
+ return de_CommandError(output, context);
449
+ }
450
+ const contents = (0, smithy_client_1.map)({
451
+ $metadata: deserializeMetadata(output),
452
+ });
453
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
454
+ const doc = (0, smithy_client_1.take)(data, {
455
+ 'user': smithy_client_1._json,
456
+ });
457
+ Object.assign(contents, doc);
458
+ return contents;
459
+ };
460
+ exports.de_GetUserPbxLinkDataCommand = de_GetUserPbxLinkDataCommand;
369
461
  const de_ListBotApiKeysCommand = async (output, context) => {
370
462
  if (output.statusCode !== 200 && output.statusCode >= 300) {
371
463
  return de_CommandError(output, context);
@@ -396,6 +488,36 @@ const de_ListBotsCommand = async (output, context) => {
396
488
  return contents;
397
489
  };
398
490
  exports.de_ListBotsCommand = de_ListBotsCommand;
491
+ const de_QueryUserCommand = async (output, context) => {
492
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
493
+ return de_CommandError(output, context);
494
+ }
495
+ const contents = (0, smithy_client_1.map)({
496
+ $metadata: deserializeMetadata(output),
497
+ });
498
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
499
+ const doc = (0, smithy_client_1.take)(data, {
500
+ 'user': smithy_client_1._json,
501
+ });
502
+ Object.assign(contents, doc);
503
+ return contents;
504
+ };
505
+ exports.de_QueryUserCommand = de_QueryUserCommand;
506
+ const de_QueryUsersCommand = async (output, context) => {
507
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
508
+ return de_CommandError(output, context);
509
+ }
510
+ const contents = (0, smithy_client_1.map)({
511
+ $metadata: deserializeMetadata(output),
512
+ });
513
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
514
+ const doc = (0, smithy_client_1.take)(data, {
515
+ 'users': smithy_client_1._json,
516
+ });
517
+ Object.assign(contents, doc);
518
+ return contents;
519
+ };
520
+ exports.de_QueryUsersCommand = de_QueryUsersCommand;
399
521
  const de_UpdateBotCommand = async (output, context) => {
400
522
  if (output.statusCode !== 200 && output.statusCode >= 300) {
401
523
  return de_CommandError(output, context);
@@ -420,7 +542,7 @@ const de_UpdateBotCallbackCommand = async (output, context) => {
420
542
  });
421
543
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
422
544
  const doc = (0, smithy_client_1.take)(data, {
423
- 'callback': smithy_client_1._json,
545
+ 'callback': _ => de_BotCallback(_, context),
424
546
  });
425
547
  Object.assign(contents, doc);
426
548
  return contents;
@@ -477,6 +599,12 @@ const de_CommandError = async (output, context) => {
477
599
  case "BotApiKeyNotFoundException":
478
600
  case "wildix.xbees.users#BotApiKeyNotFoundException":
479
601
  throw await de_BotApiKeyNotFoundExceptionRes(parsedOutput, context);
602
+ case "UserNotFoundException":
603
+ case "wildix.xbees.users#UserNotFoundException":
604
+ throw await de_UserNotFoundExceptionRes(parsedOutput, context);
605
+ case "UserQueryPredicateNotMetException":
606
+ case "wildix.xbees.users#UserQueryPredicateNotMetException":
607
+ throw await de_UserQueryPredicateNotMetExceptionRes(parsedOutput, context);
480
608
  case "BotSecretKeyNotValidException":
481
609
  case "wildix.xbees.users#BotSecretKeyNotValidException":
482
610
  throw await de_BotSecretKeyNotValidExceptionRes(parsedOutput, context);
@@ -555,6 +683,96 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
555
683
  });
556
684
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
557
685
  };
686
+ const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
687
+ const contents = (0, smithy_client_1.map)({});
688
+ const data = parsedOutput.body;
689
+ const doc = (0, smithy_client_1.take)(data, {
690
+ 'message': smithy_client_1.expectString,
691
+ });
692
+ Object.assign(contents, doc);
693
+ const exception = new models_0_1.UserNotFoundException({
694
+ $metadata: deserializeMetadata(parsedOutput),
695
+ ...contents
696
+ });
697
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
698
+ };
699
+ const de_UserQueryPredicateNotMetExceptionRes = async (parsedOutput, context) => {
700
+ const contents = (0, smithy_client_1.map)({});
701
+ const data = parsedOutput.body;
702
+ const doc = (0, smithy_client_1.take)(data, {
703
+ 'message': smithy_client_1.expectString,
704
+ });
705
+ Object.assign(contents, doc);
706
+ const exception = new models_0_1.UserQueryPredicateNotMetException({
707
+ $metadata: deserializeMetadata(parsedOutput),
708
+ ...contents
709
+ });
710
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
711
+ };
712
+ const se_Document = (input, context) => {
713
+ return input;
714
+ };
715
+ const se_BotCallback = (input, context) => {
716
+ return (0, smithy_client_1.take)(input, {
717
+ 'endpoint': _ => se_BotEndpoint(_, context),
718
+ });
719
+ };
720
+ const se_BotDialogflowCxEndpoint = (input, context) => {
721
+ return (0, smithy_client_1.take)(input, {
722
+ 'agent': [],
723
+ 'credentials': _ => se_Document(_, context),
724
+ 'language': [],
725
+ 'location': [],
726
+ });
727
+ };
728
+ const se_BotEndpoint = (input, context) => {
729
+ return models_0_1.BotEndpoint.visit(input, {
730
+ dialogflowCx: value => ({ "dialogflowCx": se_BotDialogflowCxEndpoint(value, context) }),
731
+ openAiAssistant: value => ({ "openAiAssistant": (0, smithy_client_1._json)(value) }),
732
+ sqs: value => ({ "sqs": (0, smithy_client_1._json)(value) }),
733
+ webhook: value => ({ "webhook": (0, smithy_client_1._json)(value) }),
734
+ _: (name, value) => ({ name: value })
735
+ });
736
+ };
737
+ const de_Document = (output, context) => {
738
+ return output;
739
+ };
740
+ const de_BotCallback = (output, context) => {
741
+ return (0, smithy_client_1.take)(output, {
742
+ 'endpoint': (_) => de_BotEndpoint((0, smithy_client_1.expectUnion)(_), context),
743
+ });
744
+ };
745
+ const de_BotDialogflowCxEndpoint = (output, context) => {
746
+ return (0, smithy_client_1.take)(output, {
747
+ 'agent': smithy_client_1.expectString,
748
+ 'credentials': (_) => de_Document(_, context),
749
+ 'language': smithy_client_1.expectString,
750
+ 'location': smithy_client_1.expectString,
751
+ });
752
+ };
753
+ const de_BotEndpoint = (output, context) => {
754
+ if (output.dialogflowCx != null) {
755
+ return {
756
+ dialogflowCx: de_BotDialogflowCxEndpoint(output.dialogflowCx, context)
757
+ };
758
+ }
759
+ if (output.openAiAssistant != null) {
760
+ return {
761
+ openAiAssistant: (0, smithy_client_1._json)(output.openAiAssistant)
762
+ };
763
+ }
764
+ if (output.sqs != null) {
765
+ return {
766
+ sqs: (0, smithy_client_1._json)(output.sqs)
767
+ };
768
+ }
769
+ if (output.webhook != null) {
770
+ return {
771
+ webhook: (0, smithy_client_1._json)(output.webhook)
772
+ };
773
+ }
774
+ return { $unknown: Object.entries(output)[0] };
775
+ };
558
776
  const deserializeMetadata = (output) => ({
559
777
  httpStatusCode: output.statusCode,
560
778
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
package/dist-es/Users.js CHANGED
@@ -1,30 +1,38 @@
1
1
  import { UsersClient, } from "./UsersClient";
2
+ import { BatchGetUsersCommand, } from "./commands/BatchGetUsersCommand";
2
3
  import { BatchGetUsersPbxLinkDataCommand, } from "./commands/BatchGetUsersPbxLinkDataCommand";
3
- import { BatchGetUsersStreamLinkDataCommand, } from "./commands/BatchGetUsersStreamLinkDataCommand";
4
4
  import { CreateBotApiKeyCommand, } from "./commands/CreateBotApiKeyCommand";
5
5
  import { CreateBotCommand, } from "./commands/CreateBotCommand";
6
6
  import { DeleteBotApiKeyCommand, } from "./commands/DeleteBotApiKeyCommand";
7
7
  import { DeleteBotCommand, } from "./commands/DeleteBotCommand";
8
8
  import { GetBotCallbackCommand, } from "./commands/GetBotCallbackCommand";
9
9
  import { GetBotCommand, } from "./commands/GetBotCommand";
10
+ import { GetUserCommand, } from "./commands/GetUserCommand";
11
+ import { GetUserPbxLinkDataCommand, } from "./commands/GetUserPbxLinkDataCommand";
10
12
  import { ListBotApiKeysCommand, } from "./commands/ListBotApiKeysCommand";
11
13
  import { ListBotsCommand, } from "./commands/ListBotsCommand";
14
+ import { QueryUserCommand, } from "./commands/QueryUserCommand";
15
+ import { QueryUsersCommand, } from "./commands/QueryUsersCommand";
12
16
  import { UpdateBotCallbackCommand, } from "./commands/UpdateBotCallbackCommand";
13
17
  import { UpdateBotCommand, } from "./commands/UpdateBotCommand";
14
18
  import { UploadPictureCommand, } from "./commands/UploadPictureCommand";
15
19
  import { VerifyBotSecretKeyCommand, } from "./commands/VerifyBotSecretKeyCommand";
16
20
  import { createAggregatedClient } from "@smithy/smithy-client";
17
21
  const commands = {
22
+ BatchGetUsersCommand,
18
23
  BatchGetUsersPbxLinkDataCommand,
19
- BatchGetUsersStreamLinkDataCommand,
20
24
  CreateBotCommand,
21
25
  CreateBotApiKeyCommand,
22
26
  DeleteBotCommand,
23
27
  DeleteBotApiKeyCommand,
24
28
  GetBotCommand,
25
29
  GetBotCallbackCommand,
30
+ GetUserCommand,
31
+ GetUserPbxLinkDataCommand,
26
32
  ListBotApiKeysCommand,
27
33
  ListBotsCommand,
34
+ QueryUserCommand,
35
+ QueryUsersCommand,
28
36
  UpdateBotCommand,
29
37
  UpdateBotCallbackCommand,
30
38
  UploadPictureCommand,