@wildix/xbees-users-client 1.0.22 → 1.0.24

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 (35) 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 +33 -1
  9. package/dist-cjs/protocols/Aws_restJson1.js +149 -11
  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 +31 -0
  18. package/dist-es/protocols/Aws_restJson1.js +137 -7
  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 +53 -4
  23. package/dist-types/commands/GetUserCommand.d.ts +83 -0
  24. package/dist-types/commands/GetUserPbxLinkDataCommand.d.ts +120 -0
  25. package/dist-types/commands/QueryUserCommand.d.ts +92 -0
  26. package/dist-types/commands/QueryUsersCommand.d.ts +92 -0
  27. package/dist-types/commands/index.d.ts +5 -1
  28. package/dist-types/models/models_0.d.ts +462 -60
  29. package/dist-types/protocols/Aws_restJson1.d.ts +45 -9
  30. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  31. package/dist-types/runtimeConfig.d.ts +1 -0
  32. package/dist-types/runtimeConfig.native.d.ts +1 -0
  33. package/package.json +1 -1
  34. package/dist-es/commands/BatchGetUsersStreamLinkDataCommand.js +0 -17
  35. package/dist-types/commands/BatchGetUsersStreamLinkDataCommand.d.ts +0 -83
package/dist-cjs/Users.js CHANGED
@@ -2,8 +2,8 @@
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 ChangeUserEmailCommand_1 = require("./commands/ChangeUserEmailCommand");
8
8
  const CreateBotApiKeyCommand_1 = require("./commands/CreateBotApiKeyCommand");
9
9
  const CreateBotCommand_1 = require("./commands/CreateBotCommand");
@@ -11,17 +11,21 @@ const DeleteBotApiKeyCommand_1 = require("./commands/DeleteBotApiKeyCommand");
11
11
  const DeleteBotCommand_1 = require("./commands/DeleteBotCommand");
12
12
  const GetBotCallbackCommand_1 = require("./commands/GetBotCallbackCommand");
13
13
  const GetBotCommand_1 = require("./commands/GetBotCommand");
14
+ const GetUserCommand_1 = require("./commands/GetUserCommand");
15
+ const GetUserPbxLinkDataCommand_1 = require("./commands/GetUserPbxLinkDataCommand");
14
16
  const GetUserPbxLinkSuggestionCommand_1 = require("./commands/GetUserPbxLinkSuggestionCommand");
15
17
  const ListBotApiKeysCommand_1 = require("./commands/ListBotApiKeysCommand");
16
18
  const ListBotsCommand_1 = require("./commands/ListBotsCommand");
19
+ const QueryUserCommand_1 = require("./commands/QueryUserCommand");
20
+ const QueryUsersCommand_1 = require("./commands/QueryUsersCommand");
17
21
  const UpdateBotCallbackCommand_1 = require("./commands/UpdateBotCallbackCommand");
18
22
  const UpdateBotCommand_1 = require("./commands/UpdateBotCommand");
19
23
  const UploadPictureCommand_1 = require("./commands/UploadPictureCommand");
20
24
  const VerifyBotSecretKeyCommand_1 = require("./commands/VerifyBotSecretKeyCommand");
21
25
  const smithy_client_1 = require("@smithy/smithy-client");
22
26
  const commands = {
27
+ BatchGetUsersCommand: BatchGetUsersCommand_1.BatchGetUsersCommand,
23
28
  BatchGetUsersPbxLinkDataCommand: BatchGetUsersPbxLinkDataCommand_1.BatchGetUsersPbxLinkDataCommand,
24
- BatchGetUsersStreamLinkDataCommand: BatchGetUsersStreamLinkDataCommand_1.BatchGetUsersStreamLinkDataCommand,
25
29
  ChangeUserEmailCommand: ChangeUserEmailCommand_1.ChangeUserEmailCommand,
26
30
  CreateBotCommand: CreateBotCommand_1.CreateBotCommand,
27
31
  CreateBotApiKeyCommand: CreateBotApiKeyCommand_1.CreateBotApiKeyCommand,
@@ -29,9 +33,13 @@ const commands = {
29
33
  DeleteBotApiKeyCommand: DeleteBotApiKeyCommand_1.DeleteBotApiKeyCommand,
30
34
  GetBotCommand: GetBotCommand_1.GetBotCommand,
31
35
  GetBotCallbackCommand: GetBotCallbackCommand_1.GetBotCallbackCommand,
36
+ GetUserCommand: GetUserCommand_1.GetUserCommand,
37
+ GetUserPbxLinkDataCommand: GetUserPbxLinkDataCommand_1.GetUserPbxLinkDataCommand,
32
38
  GetUserPbxLinkSuggestionCommand: GetUserPbxLinkSuggestionCommand_1.GetUserPbxLinkSuggestionCommand,
33
39
  ListBotApiKeysCommand: ListBotApiKeysCommand_1.ListBotApiKeysCommand,
34
40
  ListBotsCommand: ListBotsCommand_1.ListBotsCommand,
41
+ QueryUserCommand: QueryUserCommand_1.QueryUserCommand,
42
+ QueryUsersCommand: QueryUsersCommand_1.QueryUsersCommand,
35
43
  UpdateBotCommand: UpdateBotCommand_1.UpdateBotCommand,
36
44
  UpdateBotCallbackCommand: UpdateBotCallbackCommand_1.UpdateBotCallbackCommand,
37
45
  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,8 +1,8 @@
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("./ChangeUserEmailCommand"), exports);
7
7
  tslib_1.__exportStar(require("./CreateBotCommand"), exports);
8
8
  tslib_1.__exportStar(require("./CreateBotApiKeyCommand"), exports);
@@ -10,9 +10,13 @@ tslib_1.__exportStar(require("./DeleteBotCommand"), exports);
10
10
  tslib_1.__exportStar(require("./DeleteBotApiKeyCommand"), exports);
11
11
  tslib_1.__exportStar(require("./GetBotCommand"), exports);
12
12
  tslib_1.__exportStar(require("./GetBotCallbackCommand"), exports);
13
+ tslib_1.__exportStar(require("./GetUserCommand"), exports);
14
+ tslib_1.__exportStar(require("./GetUserPbxLinkDataCommand"), exports);
13
15
  tslib_1.__exportStar(require("./GetUserPbxLinkSuggestionCommand"), exports);
14
16
  tslib_1.__exportStar(require("./ListBotApiKeysCommand"), exports);
15
17
  tslib_1.__exportStar(require("./ListBotsCommand"), exports);
18
+ tslib_1.__exportStar(require("./QueryUserCommand"), exports);
19
+ tslib_1.__exportStar(require("./QueryUsersCommand"), exports);
16
20
  tslib_1.__exportStar(require("./UpdateBotCommand"), exports);
17
21
  tslib_1.__exportStar(require("./UpdateBotCallbackCommand"), exports);
18
22
  tslib_1.__exportStar(require("./UploadPictureCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserNotFoundException = exports.UserCompanyNotValidException = exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotApiKeyNotFoundException = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.UserQueryPredicateNotMetException = exports.UserQuery = exports.UserNotFoundException = exports.UserCompanyNotValidException = 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({
@@ -107,3 +114,28 @@ class UserNotFoundException extends UsersServiceException_1.UsersServiceExceptio
107
114
  }
108
115
  }
109
116
  exports.UserNotFoundException = UserNotFoundException;
117
+ var UserQuery;
118
+ (function (UserQuery) {
119
+ UserQuery.visit = (value, visitor) => {
120
+ if (value.id !== undefined)
121
+ return visitor.id(value.id);
122
+ if (value.email !== undefined)
123
+ return visitor.email(value.email);
124
+ if (value.phone !== undefined)
125
+ return visitor.phone(value.phone);
126
+ return visitor._(value.$unknown[0], value.$unknown[1]);
127
+ };
128
+ })(UserQuery = exports.UserQuery || (exports.UserQuery = {}));
129
+ class UserQueryPredicateNotMetException extends UsersServiceException_1.UsersServiceException {
130
+ constructor(opts) {
131
+ super({
132
+ name: "UserQueryPredicateNotMetException",
133
+ $fault: "client",
134
+ ...opts
135
+ });
136
+ this.name = "UserQueryPredicateNotMetException";
137
+ this.$fault = "client";
138
+ Object.setPrototypeOf(this, UserQueryPredicateNotMetException.prototype);
139
+ }
140
+ }
141
+ 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_GetUserPbxLinkSuggestionCommand = exports.de_GetBotCallbackCommand = exports.de_GetBotCommand = exports.de_DeleteBotApiKeyCommand = exports.de_DeleteBotCommand = exports.de_CreateBotApiKeyCommand = exports.de_CreateBotCommand = exports.de_ChangeUserEmailCommand = 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_GetUserPbxLinkSuggestionCommand = exports.se_GetBotCallbackCommand = exports.se_GetBotCommand = exports.se_DeleteBotApiKeyCommand = exports.se_DeleteBotCommand = exports.se_CreateBotApiKeyCommand = exports.se_CreateBotCommand = exports.se_ChangeUserEmailCommand = 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_GetUserPbxLinkSuggestionCommand = 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_ChangeUserEmailCommand = 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_GetUserPbxLinkSuggestionCommand = 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_ChangeUserEmailCommand = 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("/v2/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_ChangeUserEmailCommand = async (input, context) => {
41
41
  const b = (0, core_1.requestBuilder)(input, context);
42
42
  const headers = {
@@ -163,6 +163,34 @@ const se_GetBotCallbackCommand = async (input, context) => {
163
163
  return b.build();
164
164
  };
165
165
  exports.se_GetBotCallbackCommand = se_GetBotCallbackCommand;
166
+ const se_GetUserCommand = async (input, context) => {
167
+ const b = (0, core_1.requestBuilder)(input, context);
168
+ const headers = {};
169
+ b.bp("/v2/users/cloud/{userId}");
170
+ b.p('userId', () => input.userId, '{userId}', false);
171
+ let body;
172
+ b.m("GET")
173
+ .h(headers)
174
+ .b(body);
175
+ return b.build();
176
+ };
177
+ exports.se_GetUserCommand = se_GetUserCommand;
178
+ const se_GetUserPbxLinkDataCommand = async (input, context) => {
179
+ const b = (0, core_1.requestBuilder)(input, context);
180
+ const headers = {
181
+ 'content-type': 'application/json',
182
+ };
183
+ b.bp("/v2/users/GetUserPbxLinkData");
184
+ let body;
185
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
186
+ 'id': [],
187
+ }));
188
+ b.m("POST")
189
+ .h(headers)
190
+ .b(body);
191
+ return b.build();
192
+ };
193
+ exports.se_GetUserPbxLinkDataCommand = se_GetUserPbxLinkDataCommand;
166
194
  const se_GetUserPbxLinkSuggestionCommand = async (input, context) => {
167
195
  const b = (0, core_1.requestBuilder)(input, context);
168
196
  const headers = {};
@@ -209,6 +237,40 @@ const se_ListBotsCommand = async (input, context) => {
209
237
  return b.build();
210
238
  };
211
239
  exports.se_ListBotsCommand = se_ListBotsCommand;
240
+ const se_QueryUserCommand = async (input, context) => {
241
+ const b = (0, core_1.requestBuilder)(input, context);
242
+ const headers = {
243
+ 'content-type': 'application/json',
244
+ };
245
+ b.bp("/v2/users/QueryUser");
246
+ let body;
247
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
248
+ 'predicate': _ => (0, smithy_client_1._json)(_),
249
+ 'query': _ => (0, smithy_client_1._json)(_),
250
+ }));
251
+ b.m("POST")
252
+ .h(headers)
253
+ .b(body);
254
+ return b.build();
255
+ };
256
+ exports.se_QueryUserCommand = se_QueryUserCommand;
257
+ const se_QueryUsersCommand = async (input, context) => {
258
+ const b = (0, core_1.requestBuilder)(input, context);
259
+ const headers = {
260
+ 'content-type': 'application/json',
261
+ };
262
+ b.bp("/v2/users/QueryUsers");
263
+ let body;
264
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
265
+ 'predicate': _ => (0, smithy_client_1._json)(_),
266
+ 'queries': _ => (0, smithy_client_1._json)(_),
267
+ }));
268
+ b.m("POST")
269
+ .h(headers)
270
+ .b(body);
271
+ return b.build();
272
+ };
273
+ exports.se_QueryUsersCommand = se_QueryUsersCommand;
212
274
  const se_UpdateBotCommand = async (input, context) => {
213
275
  const b = (0, core_1.requestBuilder)(input, context);
214
276
  const headers = {
@@ -285,7 +347,7 @@ const se_VerifyBotSecretKeyCommand = async (input, context) => {
285
347
  return b.build();
286
348
  };
287
349
  exports.se_VerifyBotSecretKeyCommand = se_VerifyBotSecretKeyCommand;
288
- const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
350
+ const de_BatchGetUsersCommand = async (output, context) => {
289
351
  if (output.statusCode !== 200 && output.statusCode >= 300) {
290
352
  return de_CommandError(output, context);
291
353
  }
@@ -299,8 +361,8 @@ const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
299
361
  Object.assign(contents, doc);
300
362
  return contents;
301
363
  };
302
- exports.de_BatchGetUsersPbxLinkDataCommand = de_BatchGetUsersPbxLinkDataCommand;
303
- const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
364
+ exports.de_BatchGetUsersCommand = de_BatchGetUsersCommand;
365
+ const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
304
366
  if (output.statusCode !== 200 && output.statusCode >= 300) {
305
367
  return de_CommandError(output, context);
306
368
  }
@@ -314,7 +376,7 @@ const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
314
376
  Object.assign(contents, doc);
315
377
  return contents;
316
378
  };
317
- exports.de_BatchGetUsersStreamLinkDataCommand = de_BatchGetUsersStreamLinkDataCommand;
379
+ exports.de_BatchGetUsersPbxLinkDataCommand = de_BatchGetUsersPbxLinkDataCommand;
318
380
  const de_ChangeUserEmailCommand = async (output, context) => {
319
381
  if (output.statusCode !== 200 && output.statusCode >= 300) {
320
382
  return de_CommandError(output, context);
@@ -413,6 +475,36 @@ const de_GetBotCallbackCommand = async (output, context) => {
413
475
  return contents;
414
476
  };
415
477
  exports.de_GetBotCallbackCommand = de_GetBotCallbackCommand;
478
+ const de_GetUserCommand = async (output, context) => {
479
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
480
+ return de_CommandError(output, context);
481
+ }
482
+ const contents = (0, smithy_client_1.map)({
483
+ $metadata: deserializeMetadata(output),
484
+ });
485
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
486
+ const doc = (0, smithy_client_1.take)(data, {
487
+ 'user': smithy_client_1._json,
488
+ });
489
+ Object.assign(contents, doc);
490
+ return contents;
491
+ };
492
+ exports.de_GetUserCommand = de_GetUserCommand;
493
+ const de_GetUserPbxLinkDataCommand = async (output, context) => {
494
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
495
+ return de_CommandError(output, context);
496
+ }
497
+ const contents = (0, smithy_client_1.map)({
498
+ $metadata: deserializeMetadata(output),
499
+ });
500
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
501
+ const doc = (0, smithy_client_1.take)(data, {
502
+ 'user': smithy_client_1._json,
503
+ });
504
+ Object.assign(contents, doc);
505
+ return contents;
506
+ };
507
+ exports.de_GetUserPbxLinkDataCommand = de_GetUserPbxLinkDataCommand;
416
508
  const de_GetUserPbxLinkSuggestionCommand = async (output, context) => {
417
509
  if (output.statusCode !== 200 && output.statusCode >= 300) {
418
510
  return de_CommandError(output, context);
@@ -458,6 +550,36 @@ const de_ListBotsCommand = async (output, context) => {
458
550
  return contents;
459
551
  };
460
552
  exports.de_ListBotsCommand = de_ListBotsCommand;
553
+ const de_QueryUserCommand = async (output, context) => {
554
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
555
+ return de_CommandError(output, context);
556
+ }
557
+ const contents = (0, smithy_client_1.map)({
558
+ $metadata: deserializeMetadata(output),
559
+ });
560
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
561
+ const doc = (0, smithy_client_1.take)(data, {
562
+ 'user': smithy_client_1._json,
563
+ });
564
+ Object.assign(contents, doc);
565
+ return contents;
566
+ };
567
+ exports.de_QueryUserCommand = de_QueryUserCommand;
568
+ const de_QueryUsersCommand = async (output, context) => {
569
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
570
+ return de_CommandError(output, context);
571
+ }
572
+ const contents = (0, smithy_client_1.map)({
573
+ $metadata: deserializeMetadata(output),
574
+ });
575
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
576
+ const doc = (0, smithy_client_1.take)(data, {
577
+ 'users': smithy_client_1._json,
578
+ });
579
+ Object.assign(contents, doc);
580
+ return contents;
581
+ };
582
+ exports.de_QueryUsersCommand = de_QueryUsersCommand;
461
583
  const de_UpdateBotCommand = async (output, context) => {
462
584
  if (output.statusCode !== 200 && output.statusCode >= 300) {
463
585
  return de_CommandError(output, context);
@@ -545,6 +667,9 @@ const de_CommandError = async (output, context) => {
545
667
  case "BotApiKeyNotFoundException":
546
668
  case "wildix.xbees.users#BotApiKeyNotFoundException":
547
669
  throw await de_BotApiKeyNotFoundExceptionRes(parsedOutput, context);
670
+ case "UserQueryPredicateNotMetException":
671
+ case "wildix.xbees.users#UserQueryPredicateNotMetException":
672
+ throw await de_UserQueryPredicateNotMetExceptionRes(parsedOutput, context);
548
673
  case "BotSecretKeyNotValidException":
549
674
  case "wildix.xbees.users#BotSecretKeyNotValidException":
550
675
  throw await de_BotSecretKeyNotValidExceptionRes(parsedOutput, context);
@@ -649,6 +774,19 @@ const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
649
774
  });
650
775
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
651
776
  };
777
+ const de_UserQueryPredicateNotMetExceptionRes = async (parsedOutput, context) => {
778
+ const contents = (0, smithy_client_1.map)({});
779
+ const data = parsedOutput.body;
780
+ const doc = (0, smithy_client_1.take)(data, {
781
+ 'message': smithy_client_1.expectString,
782
+ });
783
+ Object.assign(contents, doc);
784
+ const exception = new models_0_1.UserQueryPredicateNotMetException({
785
+ $metadata: deserializeMetadata(parsedOutput),
786
+ ...contents
787
+ });
788
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
789
+ };
652
790
  const se_Document = (input, context) => {
653
791
  return input;
654
792
  };
package/dist-es/Users.js CHANGED
@@ -1,6 +1,6 @@
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 { ChangeUserEmailCommand, } from "./commands/ChangeUserEmailCommand";
5
5
  import { CreateBotApiKeyCommand, } from "./commands/CreateBotApiKeyCommand";
6
6
  import { CreateBotCommand, } from "./commands/CreateBotCommand";
@@ -8,17 +8,21 @@ import { DeleteBotApiKeyCommand, } from "./commands/DeleteBotApiKeyCommand";
8
8
  import { DeleteBotCommand, } from "./commands/DeleteBotCommand";
9
9
  import { GetBotCallbackCommand, } from "./commands/GetBotCallbackCommand";
10
10
  import { GetBotCommand, } from "./commands/GetBotCommand";
11
+ import { GetUserCommand, } from "./commands/GetUserCommand";
12
+ import { GetUserPbxLinkDataCommand, } from "./commands/GetUserPbxLinkDataCommand";
11
13
  import { GetUserPbxLinkSuggestionCommand, } from "./commands/GetUserPbxLinkSuggestionCommand";
12
14
  import { ListBotApiKeysCommand, } from "./commands/ListBotApiKeysCommand";
13
15
  import { ListBotsCommand, } from "./commands/ListBotsCommand";
16
+ import { QueryUserCommand, } from "./commands/QueryUserCommand";
17
+ import { QueryUsersCommand, } from "./commands/QueryUsersCommand";
14
18
  import { UpdateBotCallbackCommand, } from "./commands/UpdateBotCallbackCommand";
15
19
  import { UpdateBotCommand, } from "./commands/UpdateBotCommand";
16
20
  import { UploadPictureCommand, } from "./commands/UploadPictureCommand";
17
21
  import { VerifyBotSecretKeyCommand, } from "./commands/VerifyBotSecretKeyCommand";
18
22
  import { createAggregatedClient } from "@smithy/smithy-client";
19
23
  const commands = {
24
+ BatchGetUsersCommand,
20
25
  BatchGetUsersPbxLinkDataCommand,
21
- BatchGetUsersStreamLinkDataCommand,
22
26
  ChangeUserEmailCommand,
23
27
  CreateBotCommand,
24
28
  CreateBotApiKeyCommand,
@@ -26,9 +30,13 @@ const commands = {
26
30
  DeleteBotApiKeyCommand,
27
31
  GetBotCommand,
28
32
  GetBotCallbackCommand,
33
+ GetUserCommand,
34
+ GetUserPbxLinkDataCommand,
29
35
  GetUserPbxLinkSuggestionCommand,
30
36
  ListBotApiKeysCommand,
31
37
  ListBotsCommand,
38
+ QueryUserCommand,
39
+ QueryUsersCommand,
32
40
  UpdateBotCommand,
33
41
  UpdateBotCallbackCommand,
34
42
  UploadPictureCommand,
@@ -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,5 +1,5 @@
1
+ export * from "./BatchGetUsersCommand";
1
2
  export * from "./BatchGetUsersPbxLinkDataCommand";
2
- export * from "./BatchGetUsersStreamLinkDataCommand";
3
3
  export * from "./ChangeUserEmailCommand";
4
4
  export * from "./CreateBotCommand";
5
5
  export * from "./CreateBotApiKeyCommand";
@@ -7,9 +7,13 @@ export * from "./DeleteBotCommand";
7
7
  export * from "./DeleteBotApiKeyCommand";
8
8
  export * from "./GetBotCommand";
9
9
  export * from "./GetBotCallbackCommand";
10
+ export * from "./GetUserCommand";
11
+ export * from "./GetUserPbxLinkDataCommand";
10
12
  export * from "./GetUserPbxLinkSuggestionCommand";
11
13
  export * from "./ListBotApiKeysCommand";
12
14
  export * from "./ListBotsCommand";
15
+ export * from "./QueryUserCommand";
16
+ export * from "./QueryUsersCommand";
13
17
  export * from "./UpdateBotCommand";
14
18
  export * from "./UpdateBotCallbackCommand";
15
19
  export * from "./UploadPictureCommand";