@wildix/xbees-users-client 1.0.15 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist-cjs/Users.js +4 -10
  2. package/dist-cjs/UsersClient.js +7 -2
  3. package/dist-cjs/commands/{GetUserCommand.js → BatchGetUsersStreamLinkDataCommand.js} +7 -7
  4. package/dist-cjs/commands/{BatchGetUsersCommand.js → GetUserPbxLinkSuggestionCommand.js} +7 -7
  5. package/dist-cjs/commands/index.js +2 -5
  6. package/dist-cjs/models/models_0.js +1 -46
  7. package/dist-cjs/protocols/Aws_restJson1.js +18 -141
  8. package/dist-es/Users.js +4 -10
  9. package/dist-es/UsersClient.js +7 -2
  10. package/dist-es/commands/BatchGetUsersStreamLinkDataCommand.js +17 -0
  11. package/dist-es/commands/GetUserPbxLinkSuggestionCommand.js +17 -0
  12. package/dist-es/commands/index.js +2 -5
  13. package/dist-es/models/models_0.js +0 -43
  14. package/dist-es/protocols/Aws_restJson1.js +12 -129
  15. package/dist-types/Users.d.ts +13 -33
  16. package/dist-types/UsersClient.d.ts +7 -9
  17. package/dist-types/commands/BatchGetUsersPbxLinkDataCommand.d.ts +4 -53
  18. package/dist-types/commands/BatchGetUsersStreamLinkDataCommand.d.ts +83 -0
  19. package/dist-types/commands/GetUserPbxLinkSuggestionCommand.d.ts +67 -0
  20. package/dist-types/commands/index.d.ts +2 -5
  21. package/dist-types/models/models_0.d.ts +40 -418
  22. package/dist-types/protocols/Aws_restJson1.d.ts +14 -41
  23. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  24. package/dist-types/runtimeConfig.d.ts +1 -0
  25. package/dist-types/runtimeConfig.native.d.ts +1 -0
  26. package/package.json +1 -1
  27. package/dist-cjs/commands/GetUserPbxLinkDataCommand.js +0 -21
  28. package/dist-cjs/commands/QueryUserCommand.js +0 -21
  29. package/dist-cjs/commands/QueryUsersCommand.js +0 -21
  30. package/dist-es/commands/BatchGetUsersCommand.js +0 -17
  31. package/dist-es/commands/GetUserCommand.js +0 -17
  32. package/dist-es/commands/GetUserPbxLinkDataCommand.js +0 -17
  33. package/dist-es/commands/QueryUserCommand.js +0 -17
  34. package/dist-es/commands/QueryUsersCommand.js +0 -17
  35. package/dist-types/commands/BatchGetUsersCommand.d.ts +0 -85
  36. package/dist-types/commands/GetUserCommand.d.ts +0 -83
  37. package/dist-types/commands/GetUserPbxLinkDataCommand.d.ts +0 -120
  38. package/dist-types/commands/QueryUserCommand.d.ts +0 -92
  39. package/dist-types/commands/QueryUsersCommand.d.ts +0 -92
package/dist-cjs/Users.js CHANGED
@@ -2,40 +2,34 @@
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");
6
5
  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
+ const GetUserPbxLinkSuggestionCommand_1 = require("./commands/GetUserPbxLinkSuggestionCommand");
15
14
  const ListBotApiKeysCommand_1 = require("./commands/ListBotApiKeysCommand");
16
15
  const ListBotsCommand_1 = require("./commands/ListBotsCommand");
17
- const QueryUserCommand_1 = require("./commands/QueryUserCommand");
18
- const QueryUsersCommand_1 = require("./commands/QueryUsersCommand");
19
16
  const UpdateBotCallbackCommand_1 = require("./commands/UpdateBotCallbackCommand");
20
17
  const UpdateBotCommand_1 = require("./commands/UpdateBotCommand");
21
18
  const UploadPictureCommand_1 = require("./commands/UploadPictureCommand");
22
19
  const VerifyBotSecretKeyCommand_1 = require("./commands/VerifyBotSecretKeyCommand");
23
20
  const smithy_client_1 = require("@smithy/smithy-client");
24
21
  const commands = {
25
- BatchGetUsersCommand: BatchGetUsersCommand_1.BatchGetUsersCommand,
26
22
  BatchGetUsersPbxLinkDataCommand: BatchGetUsersPbxLinkDataCommand_1.BatchGetUsersPbxLinkDataCommand,
23
+ BatchGetUsersStreamLinkDataCommand: BatchGetUsersStreamLinkDataCommand_1.BatchGetUsersStreamLinkDataCommand,
27
24
  CreateBotCommand: CreateBotCommand_1.CreateBotCommand,
28
25
  CreateBotApiKeyCommand: CreateBotApiKeyCommand_1.CreateBotApiKeyCommand,
29
26
  DeleteBotCommand: DeleteBotCommand_1.DeleteBotCommand,
30
27
  DeleteBotApiKeyCommand: DeleteBotApiKeyCommand_1.DeleteBotApiKeyCommand,
31
28
  GetBotCommand: GetBotCommand_1.GetBotCommand,
32
29
  GetBotCallbackCommand: GetBotCallbackCommand_1.GetBotCallbackCommand,
33
- GetUserCommand: GetUserCommand_1.GetUserCommand,
34
- GetUserPbxLinkDataCommand: GetUserPbxLinkDataCommand_1.GetUserPbxLinkDataCommand,
30
+ GetUserPbxLinkSuggestionCommand: GetUserPbxLinkSuggestionCommand_1.GetUserPbxLinkSuggestionCommand,
35
31
  ListBotApiKeysCommand: ListBotApiKeysCommand_1.ListBotApiKeysCommand,
36
32
  ListBotsCommand: ListBotsCommand_1.ListBotsCommand,
37
- QueryUserCommand: QueryUserCommand_1.QueryUserCommand,
38
- QueryUsersCommand: QueryUsersCommand_1.QueryUsersCommand,
39
33
  UpdateBotCommand: UpdateBotCommand_1.UpdateBotCommand,
40
34
  UpdateBotCallbackCommand: UpdateBotCallbackCommand_1.UpdateBotCallbackCommand,
41
35
  UploadPictureCommand: UploadPictureCommand_1.UploadPictureCommand,
@@ -4,6 +4,8 @@ exports.UsersClient = exports.__Client = void 0;
4
4
  const runtimeConfig_1 = require("./runtimeConfig");
5
5
  const runtimeExtensions_1 = require("./runtimeExtensions");
6
6
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
7
+ const middleware_content_length_1 = require("@smithy/middleware-content-length");
8
+ const middleware_retry_1 = require("@smithy/middleware-retry");
7
9
  const smithy_client_1 = require("@smithy/smithy-client");
8
10
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
9
11
  const smithy_utils_1 = require("@wildix/smithy-utils");
@@ -11,7 +13,8 @@ class UsersClient extends smithy_client_1.Client {
11
13
  constructor(...[configuration]) {
12
14
  let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
13
15
  let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
14
- let _config_2 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_1, configuration?.extensions || []);
16
+ let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
17
+ let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
15
18
  const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `api-${configuration.env}.x-bees.com` : 'api.x-bees.com';
16
19
  const endpoint = () => {
17
20
  return {
@@ -22,13 +25,15 @@ class UsersClient extends smithy_client_1.Client {
22
25
  };
23
26
  };
24
27
  const config = {
25
- ..._config_2,
28
+ ..._config_3,
26
29
  endpoint,
27
30
  };
28
31
  super(config);
29
32
  this.config = config;
30
33
  this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
31
34
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
35
+ this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
36
+ this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
32
37
  }
33
38
  destroy() {
34
39
  super.destroy();
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetUserCommand = exports.$Command = void 0;
3
+ exports.BatchGetUsersStreamLinkDataCommand = 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 GetUserCommand extends smithy_client_1.Command.classBuilder()
8
+ class BatchGetUsersStreamLinkDataCommand 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", "GetUser", {})
15
- .n("UsersClient", "GetUserCommand")
14
+ .s("Users", "BatchGetUsersStreamLinkData", {})
15
+ .n("UsersClient", "BatchGetUsersStreamLinkDataCommand")
16
16
  .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_GetUserCommand)
18
- .de(Aws_restJson1_1.de_GetUserCommand)
17
+ .ser(Aws_restJson1_1.se_BatchGetUsersStreamLinkDataCommand)
18
+ .de(Aws_restJson1_1.de_BatchGetUsersStreamLinkDataCommand)
19
19
  .build() {
20
20
  }
21
- exports.GetUserCommand = GetUserCommand;
21
+ exports.BatchGetUsersStreamLinkDataCommand = BatchGetUsersStreamLinkDataCommand;
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BatchGetUsersCommand = exports.$Command = void 0;
3
+ exports.GetUserPbxLinkSuggestionCommand = 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 BatchGetUsersCommand extends smithy_client_1.Command.classBuilder()
8
+ class GetUserPbxLinkSuggestionCommand 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", "BatchGetUsers", {})
15
- .n("UsersClient", "BatchGetUsersCommand")
14
+ .s("Users", "GetUserPbxLinkSuggestion", {})
15
+ .n("UsersClient", "GetUserPbxLinkSuggestionCommand")
16
16
  .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_BatchGetUsersCommand)
18
- .de(Aws_restJson1_1.de_BatchGetUsersCommand)
17
+ .ser(Aws_restJson1_1.se_GetUserPbxLinkSuggestionCommand)
18
+ .de(Aws_restJson1_1.de_GetUserPbxLinkSuggestionCommand)
19
19
  .build() {
20
20
  }
21
- exports.BatchGetUsersCommand = BatchGetUsersCommand;
21
+ exports.GetUserPbxLinkSuggestionCommand = GetUserPbxLinkSuggestionCommand;
@@ -1,20 +1,17 @@
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);
5
4
  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
+ tslib_1.__exportStar(require("./GetUserPbxLinkSuggestionCommand"), exports);
14
13
  tslib_1.__exportStar(require("./ListBotApiKeysCommand"), exports);
15
14
  tslib_1.__exportStar(require("./ListBotsCommand"), exports);
16
- tslib_1.__exportStar(require("./QueryUserCommand"), exports);
17
- tslib_1.__exportStar(require("./QueryUsersCommand"), exports);
18
15
  tslib_1.__exportStar(require("./UpdateBotCommand"), exports);
19
16
  tslib_1.__exportStar(require("./UpdateBotCallbackCommand"), exports);
20
17
  tslib_1.__exportStar(require("./UploadPictureCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserQueryPredicateNotMetException = exports.UserQuery = exports.UserNotFoundException = exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotApiKeyNotFoundException = exports.PbxLicenseType = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotApiKeyNotFoundException = 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,13 +28,6 @@ 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
- };
38
31
  class BotApiKeyNotFoundException extends UsersServiceException_1.UsersServiceException {
39
32
  constructor(opts) {
40
33
  super({
@@ -88,41 +81,3 @@ class BotSecretKeyNotValidException extends UsersServiceException_1.UsersService
88
81
  }
89
82
  }
90
83
  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_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;
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_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_BatchGetUsersStreamLinkDataCommand = exports.se_BatchGetUsersPbxLinkDataCommand = 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_BatchGetUsersCommand = async (input, context) => {
8
+ const se_BatchGetUsersPbxLinkDataCommand = 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/BatchGetUsers");
13
+ b.bp("/v2/users/BatchGetUsersPbxLinkData");
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_BatchGetUsersCommand = async (input, context) => {
20
20
  .b(body);
21
21
  return b.build();
22
22
  };
23
- exports.se_BatchGetUsersCommand = se_BatchGetUsersCommand;
24
- const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
23
+ exports.se_BatchGetUsersPbxLinkDataCommand = se_BatchGetUsersPbxLinkDataCommand;
24
+ const se_BatchGetUsersStreamLinkDataCommand = 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("/v2/users/BatchGetUsersPbxLinkData");
29
+ b.bp("/v1/users/BatchGetUsersStreamLinkData");
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_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
36
36
  .b(body);
37
37
  return b.build();
38
38
  };
39
- exports.se_BatchGetUsersPbxLinkDataCommand = se_BatchGetUsersPbxLinkDataCommand;
39
+ exports.se_BatchGetUsersStreamLinkDataCommand = se_BatchGetUsersStreamLinkDataCommand;
40
40
  const se_CreateBotCommand = async (input, context) => {
41
41
  const b = (0, core_1.requestBuilder)(input, context);
42
42
  const headers = {
@@ -146,34 +146,22 @@ 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("/v2/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) => {
149
+ const se_GetUserPbxLinkSuggestionCommand = async (input, context) => {
162
150
  const b = (0, core_1.requestBuilder)(input, context);
163
151
  const headers = {
164
152
  'content-type': 'application/json',
165
153
  };
166
- b.bp("/v2/users/GetUserPbxLinkData");
154
+ b.bp("/v2/users/GetUserPbxLinkSuggestion");
167
155
  let body;
168
156
  body = JSON.stringify((0, smithy_client_1.take)(input, {
169
- 'id': [],
157
+ 'email': [],
170
158
  }));
171
159
  b.m("POST")
172
160
  .h(headers)
173
161
  .b(body);
174
162
  return b.build();
175
163
  };
176
- exports.se_GetUserPbxLinkDataCommand = se_GetUserPbxLinkDataCommand;
164
+ exports.se_GetUserPbxLinkSuggestionCommand = se_GetUserPbxLinkSuggestionCommand;
177
165
  const se_ListBotApiKeysCommand = async (input, context) => {
178
166
  const b = (0, core_1.requestBuilder)(input, context);
179
167
  const headers = {};
@@ -205,40 +193,6 @@ const se_ListBotsCommand = async (input, context) => {
205
193
  return b.build();
206
194
  };
207
195
  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("/v2/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("/v2/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;
242
196
  const se_UpdateBotCommand = async (input, context) => {
243
197
  const b = (0, core_1.requestBuilder)(input, context);
244
198
  const headers = {
@@ -315,7 +269,7 @@ const se_VerifyBotSecretKeyCommand = async (input, context) => {
315
269
  return b.build();
316
270
  };
317
271
  exports.se_VerifyBotSecretKeyCommand = se_VerifyBotSecretKeyCommand;
318
- const de_BatchGetUsersCommand = async (output, context) => {
272
+ const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
319
273
  if (output.statusCode !== 200 && output.statusCode >= 300) {
320
274
  return de_CommandError(output, context);
321
275
  }
@@ -329,8 +283,8 @@ const de_BatchGetUsersCommand = async (output, context) => {
329
283
  Object.assign(contents, doc);
330
284
  return contents;
331
285
  };
332
- exports.de_BatchGetUsersCommand = de_BatchGetUsersCommand;
333
- const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
286
+ exports.de_BatchGetUsersPbxLinkDataCommand = de_BatchGetUsersPbxLinkDataCommand;
287
+ const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
334
288
  if (output.statusCode !== 200 && output.statusCode >= 300) {
335
289
  return de_CommandError(output, context);
336
290
  }
@@ -344,7 +298,7 @@ const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
344
298
  Object.assign(contents, doc);
345
299
  return contents;
346
300
  };
347
- exports.de_BatchGetUsersPbxLinkDataCommand = de_BatchGetUsersPbxLinkDataCommand;
301
+ exports.de_BatchGetUsersStreamLinkDataCommand = de_BatchGetUsersStreamLinkDataCommand;
348
302
  const de_CreateBotCommand = async (output, context) => {
349
303
  if (output.statusCode !== 200 && output.statusCode >= 300) {
350
304
  return de_CommandError(output, context);
@@ -428,7 +382,7 @@ const de_GetBotCallbackCommand = async (output, context) => {
428
382
  return contents;
429
383
  };
430
384
  exports.de_GetBotCallbackCommand = de_GetBotCallbackCommand;
431
- const de_GetUserCommand = async (output, context) => {
385
+ const de_GetUserPbxLinkSuggestionCommand = async (output, context) => {
432
386
  if (output.statusCode !== 200 && output.statusCode >= 300) {
433
387
  return de_CommandError(output, context);
434
388
  }
@@ -437,27 +391,12 @@ const de_GetUserCommand = async (output, context) => {
437
391
  });
438
392
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
439
393
  const doc = (0, smithy_client_1.take)(data, {
440
- 'user': smithy_client_1._json,
394
+ 'suggestion': smithy_client_1._json,
441
395
  });
442
396
  Object.assign(contents, doc);
443
397
  return contents;
444
398
  };
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;
399
+ exports.de_GetUserPbxLinkSuggestionCommand = de_GetUserPbxLinkSuggestionCommand;
461
400
  const de_ListBotApiKeysCommand = async (output, context) => {
462
401
  if (output.statusCode !== 200 && output.statusCode >= 300) {
463
402
  return de_CommandError(output, context);
@@ -488,36 +427,6 @@ const de_ListBotsCommand = async (output, context) => {
488
427
  return contents;
489
428
  };
490
429
  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;
521
430
  const de_UpdateBotCommand = async (output, context) => {
522
431
  if (output.statusCode !== 200 && output.statusCode >= 300) {
523
432
  return de_CommandError(output, context);
@@ -599,12 +508,6 @@ const de_CommandError = async (output, context) => {
599
508
  case "BotApiKeyNotFoundException":
600
509
  case "wildix.xbees.users#BotApiKeyNotFoundException":
601
510
  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);
608
511
  case "BotSecretKeyNotValidException":
609
512
  case "wildix.xbees.users#BotSecretKeyNotValidException":
610
513
  throw await de_BotSecretKeyNotValidExceptionRes(parsedOutput, context);
@@ -683,32 +586,6 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
683
586
  });
684
587
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
685
588
  };
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
589
  const se_Document = (input, context) => {
713
590
  return input;
714
591
  };
package/dist-es/Users.js CHANGED
@@ -1,38 +1,32 @@
1
1
  import { UsersClient, } from "./UsersClient";
2
- import { BatchGetUsersCommand, } from "./commands/BatchGetUsersCommand";
3
2
  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
+ import { GetUserPbxLinkSuggestionCommand, } from "./commands/GetUserPbxLinkSuggestionCommand";
12
11
  import { ListBotApiKeysCommand, } from "./commands/ListBotApiKeysCommand";
13
12
  import { ListBotsCommand, } from "./commands/ListBotsCommand";
14
- import { QueryUserCommand, } from "./commands/QueryUserCommand";
15
- import { QueryUsersCommand, } from "./commands/QueryUsersCommand";
16
13
  import { UpdateBotCallbackCommand, } from "./commands/UpdateBotCallbackCommand";
17
14
  import { UpdateBotCommand, } from "./commands/UpdateBotCommand";
18
15
  import { UploadPictureCommand, } from "./commands/UploadPictureCommand";
19
16
  import { VerifyBotSecretKeyCommand, } from "./commands/VerifyBotSecretKeyCommand";
20
17
  import { createAggregatedClient } from "@smithy/smithy-client";
21
18
  const commands = {
22
- BatchGetUsersCommand,
23
19
  BatchGetUsersPbxLinkDataCommand,
20
+ BatchGetUsersStreamLinkDataCommand,
24
21
  CreateBotCommand,
25
22
  CreateBotApiKeyCommand,
26
23
  DeleteBotCommand,
27
24
  DeleteBotApiKeyCommand,
28
25
  GetBotCommand,
29
26
  GetBotCallbackCommand,
30
- GetUserCommand,
31
- GetUserPbxLinkDataCommand,
27
+ GetUserPbxLinkSuggestionCommand,
32
28
  ListBotApiKeysCommand,
33
29
  ListBotsCommand,
34
- QueryUserCommand,
35
- QueryUsersCommand,
36
30
  UpdateBotCommand,
37
31
  UpdateBotCallbackCommand,
38
32
  UploadPictureCommand,
@@ -1,6 +1,8 @@
1
1
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
2
2
  import { resolveRuntimeExtensions, } from "./runtimeExtensions";
3
3
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
4
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
5
+ import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
4
6
  import { Client as __Client, } from "@smithy/smithy-client";
5
7
  import { authorizationMiddleware } from '@wildix/smithy-utils';
6
8
  export { __Client };
@@ -8,7 +10,8 @@ export class UsersClient extends __Client {
8
10
  constructor(...[configuration]) {
9
11
  let _config_0 = __getRuntimeConfig(configuration || {});
10
12
  let _config_1 = resolveUserAgentConfig(_config_0);
11
- let _config_2 = resolveRuntimeExtensions(_config_1, configuration?.extensions || []);
13
+ let _config_2 = resolveRetryConfig(_config_1);
14
+ let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
12
15
  const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `api-${configuration.env}.x-bees.com` : 'api.x-bees.com';
13
16
  const endpoint = () => {
14
17
  return {
@@ -19,13 +22,15 @@ export class UsersClient extends __Client {
19
22
  };
20
23
  };
21
24
  const config = {
22
- ..._config_2,
25
+ ..._config_3,
23
26
  endpoint,
24
27
  };
25
28
  super(config);
26
29
  this.config = config;
27
30
  this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
28
31
  this.middlewareStack.use(getUserAgentPlugin(this.config));
32
+ this.middlewareStack.use(getRetryPlugin(this.config));
33
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
29
34
  }
30
35
  destroy() {
31
36
  super.destroy();
@@ -0,0 +1,17 @@
1
+ import { de_BatchGetUsersStreamLinkDataCommand, se_BatchGetUsersStreamLinkDataCommand, } 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 BatchGetUsersStreamLinkDataCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "BatchGetUsersStreamLinkData", {})
12
+ .n("UsersClient", "BatchGetUsersStreamLinkDataCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_BatchGetUsersStreamLinkDataCommand)
15
+ .de(de_BatchGetUsersStreamLinkDataCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_GetUserPbxLinkSuggestionCommand, se_GetUserPbxLinkSuggestionCommand, } 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 GetUserPbxLinkSuggestionCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "GetUserPbxLinkSuggestion", {})
12
+ .n("UsersClient", "GetUserPbxLinkSuggestionCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_GetUserPbxLinkSuggestionCommand)
15
+ .de(de_GetUserPbxLinkSuggestionCommand)
16
+ .build() {
17
+ }
@@ -1,17 +1,14 @@
1
- export * from "./BatchGetUsersCommand";
2
1
  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
+ export * from "./GetUserPbxLinkSuggestionCommand";
11
10
  export * from "./ListBotApiKeysCommand";
12
11
  export * from "./ListBotsCommand";
13
- export * from "./QueryUserCommand";
14
- export * from "./QueryUsersCommand";
15
12
  export * from "./UpdateBotCommand";
16
13
  export * from "./UpdateBotCallbackCommand";
17
14
  export * from "./UploadPictureCommand";