@wildix/xbees-users-client 1.0.26 → 1.0.27

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.
package/dist-cjs/Users.js CHANGED
@@ -8,6 +8,7 @@ const BatchGetUsersPbxLinkDataV1Command_1 = require("./commands/BatchGetUsersPbx
8
8
  const ChangeUserEmailCommand_1 = require("./commands/ChangeUserEmailCommand");
9
9
  const CreateBotApiKeyCommand_1 = require("./commands/CreateBotApiKeyCommand");
10
10
  const CreateBotCommand_1 = require("./commands/CreateBotCommand");
11
+ const CreateSystemBotCommand_1 = require("./commands/CreateSystemBotCommand");
11
12
  const DeleteBotApiKeyCommand_1 = require("./commands/DeleteBotApiKeyCommand");
12
13
  const DeleteBotCommand_1 = require("./commands/DeleteBotCommand");
13
14
  const GetBotCallbackCommand_1 = require("./commands/GetBotCallbackCommand");
@@ -16,10 +17,9 @@ const GetUserCommand_1 = require("./commands/GetUserCommand");
16
17
  const GetUserPbxLinkDataCommand_1 = require("./commands/GetUserPbxLinkDataCommand");
17
18
  const GetUserPbxLinkSuggestionCommand_1 = require("./commands/GetUserPbxLinkSuggestionCommand");
18
19
  const GetUserPbxLinkSuggestionV1Command_1 = require("./commands/GetUserPbxLinkSuggestionV1Command");
19
- const GetUserSettingsCommand_1 = require("./commands/GetUserSettingsCommand");
20
20
  const ListBotApiKeysCommand_1 = require("./commands/ListBotApiKeysCommand");
21
21
  const ListBotsCommand_1 = require("./commands/ListBotsCommand");
22
- const PartialUpdateUserSettingsCommand_1 = require("./commands/PartialUpdateUserSettingsCommand");
22
+ const QueryColleaguesCommand_1 = require("./commands/QueryColleaguesCommand");
23
23
  const QueryUserCommand_1 = require("./commands/QueryUserCommand");
24
24
  const QueryUsersCommand_1 = require("./commands/QueryUsersCommand");
25
25
  const UpdateBotCallbackCommand_1 = require("./commands/UpdateBotCallbackCommand");
@@ -36,6 +36,7 @@ const commands = {
36
36
  ChangeUserEmailCommand: ChangeUserEmailCommand_1.ChangeUserEmailCommand,
37
37
  CreateBotCommand: CreateBotCommand_1.CreateBotCommand,
38
38
  CreateBotApiKeyCommand: CreateBotApiKeyCommand_1.CreateBotApiKeyCommand,
39
+ CreateSystemBotCommand: CreateSystemBotCommand_1.CreateSystemBotCommand,
39
40
  DeleteBotCommand: DeleteBotCommand_1.DeleteBotCommand,
40
41
  DeleteBotApiKeyCommand: DeleteBotApiKeyCommand_1.DeleteBotApiKeyCommand,
41
42
  GetBotCommand: GetBotCommand_1.GetBotCommand,
@@ -44,10 +45,9 @@ const commands = {
44
45
  GetUserPbxLinkDataCommand: GetUserPbxLinkDataCommand_1.GetUserPbxLinkDataCommand,
45
46
  GetUserPbxLinkSuggestionCommand: GetUserPbxLinkSuggestionCommand_1.GetUserPbxLinkSuggestionCommand,
46
47
  GetUserPbxLinkSuggestionV1Command: GetUserPbxLinkSuggestionV1Command_1.GetUserPbxLinkSuggestionV1Command,
47
- GetUserSettingsCommand: GetUserSettingsCommand_1.GetUserSettingsCommand,
48
48
  ListBotApiKeysCommand: ListBotApiKeysCommand_1.ListBotApiKeysCommand,
49
49
  ListBotsCommand: ListBotsCommand_1.ListBotsCommand,
50
- PartialUpdateUserSettingsCommand: PartialUpdateUserSettingsCommand_1.PartialUpdateUserSettingsCommand,
50
+ QueryColleaguesCommand: QueryColleaguesCommand_1.QueryColleaguesCommand,
51
51
  QueryUserCommand: QueryUserCommand_1.QueryUserCommand,
52
52
  QueryUsersCommand: QueryUsersCommand_1.QueryUsersCommand,
53
53
  UpdateBotCommand: UpdateBotCommand_1.UpdateBotCommand,
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetUserSettingsCommand = exports.$Command = void 0;
3
+ exports.CreateSystemBotCommand = 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 GetUserSettingsCommand extends smithy_client_1.Command.classBuilder()
8
+ class CreateSystemBotCommand 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", "GetUserSettings", {})
15
- .n("UsersClient", "GetUserSettingsCommand")
14
+ .s("Users", "CreateSystemBot", {})
15
+ .n("UsersClient", "CreateSystemBotCommand")
16
16
  .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_GetUserSettingsCommand)
18
- .de(Aws_restJson1_1.de_GetUserSettingsCommand)
17
+ .ser(Aws_restJson1_1.se_CreateSystemBotCommand)
18
+ .de(Aws_restJson1_1.de_CreateSystemBotCommand)
19
19
  .build() {
20
20
  }
21
- exports.GetUserSettingsCommand = GetUserSettingsCommand;
21
+ exports.CreateSystemBotCommand = CreateSystemBotCommand;
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PartialUpdateUserSettingsCommand = exports.$Command = void 0;
3
+ exports.QueryColleaguesCommand = 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 PartialUpdateUserSettingsCommand extends smithy_client_1.Command.classBuilder()
8
+ class QueryColleaguesCommand 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", "PartialUpdateUserSettings", {})
15
- .n("UsersClient", "PartialUpdateUserSettingsCommand")
14
+ .s("Users", "QueryColleagues", {})
15
+ .n("UsersClient", "QueryColleaguesCommand")
16
16
  .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_PartialUpdateUserSettingsCommand)
18
- .de(Aws_restJson1_1.de_PartialUpdateUserSettingsCommand)
17
+ .ser(Aws_restJson1_1.se_QueryColleaguesCommand)
18
+ .de(Aws_restJson1_1.de_QueryColleaguesCommand)
19
19
  .build() {
20
20
  }
21
- exports.PartialUpdateUserSettingsCommand = PartialUpdateUserSettingsCommand;
21
+ exports.QueryColleaguesCommand = QueryColleaguesCommand;
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./BatchGetUsersPbxLinkDataV1Command"), exports);
7
7
  tslib_1.__exportStar(require("./ChangeUserEmailCommand"), exports);
8
8
  tslib_1.__exportStar(require("./CreateBotCommand"), exports);
9
9
  tslib_1.__exportStar(require("./CreateBotApiKeyCommand"), exports);
10
+ tslib_1.__exportStar(require("./CreateSystemBotCommand"), exports);
10
11
  tslib_1.__exportStar(require("./DeleteBotCommand"), exports);
11
12
  tslib_1.__exportStar(require("./DeleteBotApiKeyCommand"), exports);
12
13
  tslib_1.__exportStar(require("./GetBotCommand"), exports);
@@ -15,10 +16,9 @@ tslib_1.__exportStar(require("./GetUserCommand"), exports);
15
16
  tslib_1.__exportStar(require("./GetUserPbxLinkDataCommand"), exports);
16
17
  tslib_1.__exportStar(require("./GetUserPbxLinkSuggestionCommand"), exports);
17
18
  tslib_1.__exportStar(require("./GetUserPbxLinkSuggestionV1Command"), exports);
18
- tslib_1.__exportStar(require("./GetUserSettingsCommand"), exports);
19
19
  tslib_1.__exportStar(require("./ListBotApiKeysCommand"), exports);
20
20
  tslib_1.__exportStar(require("./ListBotsCommand"), exports);
21
- tslib_1.__exportStar(require("./PartialUpdateUserSettingsCommand"), exports);
21
+ tslib_1.__exportStar(require("./QueryColleaguesCommand"), exports);
22
22
  tslib_1.__exportStar(require("./QueryUserCommand"), exports);
23
23
  tslib_1.__exportStar(require("./QueryUsersCommand"), exports);
24
24
  tslib_1.__exportStar(require("./UpdateBotCommand"), 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.UserCompanyNotValidException = exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotApiKeyNotFoundException = exports.PbxLicenseType = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.UserQueryPredicateNotMetException = exports.UserQuery = exports.UserNotFoundException = exports.UserCompanyNotValidException = exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotApiKeyNotFoundException = exports.PbxColleaguesSearchStrategy = exports.PbxColleaguesQueryField = exports.GetPbxColleaguesDir = exports.PbxColleagueRole = 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) {
@@ -35,6 +35,40 @@ exports.PbxLicenseType = {
35
35
  PREMIUM: "premium",
36
36
  WIZYCONF: "wizyconf",
37
37
  };
38
+ exports.PbxColleagueRole = {
39
+ ADMIN: "admin",
40
+ FAX: "fax",
41
+ PARK_ORBIT: "park_orbit",
42
+ ROOM: "room",
43
+ USER: "user",
44
+ };
45
+ exports.GetPbxColleaguesDir = {
46
+ ASC: "asc",
47
+ DESC: "desc",
48
+ };
49
+ exports.PbxColleaguesQueryField = {
50
+ DEPARTMENT: "department",
51
+ DIALPLAN: "dialplan",
52
+ EMAIL: "email",
53
+ EXTENSION: "extension",
54
+ FAX_DIALPLAN: "faxDialplan",
55
+ GROUP_DN: "groupDn",
56
+ ID: "id",
57
+ LANGUAGE: "language",
58
+ LICENSE_TYPE: "licenseType",
59
+ LOGIN: "login",
60
+ MOBILE_PHONE: "mobilePhone",
61
+ NAME: "name",
62
+ OFFICE_PHONE: "officePhone",
63
+ PBX_DN: "pbxDn",
64
+ PICTURE: "picture",
65
+ ROLE: "role",
66
+ SOURCE_ID: "sourceId",
67
+ };
68
+ exports.PbxColleaguesSearchStrategy = {
69
+ CONTAIN: "contain",
70
+ STARTS_WITH: "startsWith",
71
+ };
38
72
  class BotApiKeyNotFoundException extends UsersServiceException_1.UsersServiceException {
39
73
  constructor(opts) {
40
74
  super({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UploadPictureV1Command = exports.de_UploadPictureCommand = exports.de_UpdateBotCallbackCommand = exports.de_UpdateBotCommand = exports.de_QueryUsersCommand = exports.de_QueryUserCommand = exports.de_PartialUpdateUserSettingsCommand = exports.de_ListBotsCommand = exports.de_ListBotApiKeysCommand = exports.de_GetUserSettingsCommand = exports.de_GetUserPbxLinkSuggestionV1Command = 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_BatchGetUsersPbxLinkDataV1Command = exports.de_BatchGetUsersPbxLinkDataCommand = exports.de_BatchGetUsersCommand = exports.se_VerifyBotSecretKeyV1Command = exports.se_VerifyBotSecretKeyCommand = exports.se_UploadPictureV1Command = exports.se_UploadPictureCommand = exports.se_UpdateBotCallbackCommand = exports.se_UpdateBotCommand = exports.se_QueryUsersCommand = exports.se_QueryUserCommand = exports.se_PartialUpdateUserSettingsCommand = exports.se_ListBotsCommand = exports.se_ListBotApiKeysCommand = exports.se_GetUserSettingsCommand = exports.se_GetUserPbxLinkSuggestionV1Command = 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_BatchGetUsersPbxLinkDataV1Command = exports.se_BatchGetUsersPbxLinkDataCommand = exports.se_BatchGetUsersCommand = void 0;
3
+ exports.de_UploadPictureV1Command = exports.de_UploadPictureCommand = exports.de_UpdateBotCallbackCommand = exports.de_UpdateBotCommand = exports.de_QueryUsersCommand = exports.de_QueryUserCommand = exports.de_QueryColleaguesCommand = exports.de_ListBotsCommand = exports.de_ListBotApiKeysCommand = exports.de_GetUserPbxLinkSuggestionV1Command = exports.de_GetUserPbxLinkSuggestionCommand = exports.de_GetUserPbxLinkDataCommand = exports.de_GetUserCommand = exports.de_GetBotCallbackCommand = exports.de_GetBotCommand = exports.de_DeleteBotApiKeyCommand = exports.de_DeleteBotCommand = exports.de_CreateSystemBotCommand = exports.de_CreateBotApiKeyCommand = exports.de_CreateBotCommand = exports.de_ChangeUserEmailCommand = exports.de_BatchGetUsersPbxLinkDataV1Command = exports.de_BatchGetUsersPbxLinkDataCommand = exports.de_BatchGetUsersCommand = exports.se_VerifyBotSecretKeyV1Command = exports.se_VerifyBotSecretKeyCommand = exports.se_UploadPictureV1Command = exports.se_UploadPictureCommand = exports.se_UpdateBotCallbackCommand = exports.se_UpdateBotCommand = exports.se_QueryUsersCommand = exports.se_QueryUserCommand = exports.se_QueryColleaguesCommand = exports.se_ListBotsCommand = exports.se_ListBotApiKeysCommand = exports.se_GetUserPbxLinkSuggestionV1Command = exports.se_GetUserPbxLinkSuggestionCommand = exports.se_GetUserPbxLinkDataCommand = exports.se_GetUserCommand = exports.se_GetBotCallbackCommand = exports.se_GetBotCommand = exports.se_DeleteBotApiKeyCommand = exports.se_DeleteBotCommand = exports.se_CreateSystemBotCommand = exports.se_CreateBotApiKeyCommand = exports.se_CreateBotCommand = exports.se_ChangeUserEmailCommand = exports.se_BatchGetUsersPbxLinkDataV1Command = exports.se_BatchGetUsersPbxLinkDataCommand = exports.se_BatchGetUsersCommand = void 0;
4
4
  exports.de_VerifyBotSecretKeyV1Command = exports.de_VerifyBotSecretKeyCommand = void 0;
5
5
  const UsersServiceException_1 = require("../models/UsersServiceException");
6
6
  const models_0_1 = require("../models/models_0");
@@ -115,6 +115,27 @@ const se_CreateBotApiKeyCommand = async (input, context) => {
115
115
  return b.build();
116
116
  };
117
117
  exports.se_CreateBotApiKeyCommand = se_CreateBotApiKeyCommand;
118
+ const se_CreateSystemBotCommand = async (input, context) => {
119
+ const b = (0, core_1.requestBuilder)(input, context);
120
+ const headers = {
121
+ 'content-type': 'application/json',
122
+ };
123
+ b.bp("/v2/users/system-bots");
124
+ const query = (0, smithy_client_1.map)({
125
+ [_c]: [, input[_c]],
126
+ });
127
+ let body;
128
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
129
+ 'name': [],
130
+ 'picture': [],
131
+ }));
132
+ b.m("POST")
133
+ .h(headers)
134
+ .q(query)
135
+ .b(body);
136
+ return b.build();
137
+ };
138
+ exports.se_CreateSystemBotCommand = se_CreateSystemBotCommand;
118
139
  const se_DeleteBotCommand = async (input, context) => {
119
140
  const b = (0, core_1.requestBuilder)(input, context);
120
141
  const headers = {};
@@ -234,18 +255,6 @@ const se_GetUserPbxLinkSuggestionV1Command = async (input, context) => {
234
255
  return b.build();
235
256
  };
236
257
  exports.se_GetUserPbxLinkSuggestionV1Command = se_GetUserPbxLinkSuggestionV1Command;
237
- const se_GetUserSettingsCommand = async (input, context) => {
238
- const b = (0, core_1.requestBuilder)(input, context);
239
- const headers = {};
240
- b.bp("/v2/users/settings/{userId}");
241
- b.p('userId', () => input.userId, '{userId}', false);
242
- let body;
243
- b.m("GET")
244
- .h(headers)
245
- .b(body);
246
- return b.build();
247
- };
248
- exports.se_GetUserSettingsCommand = se_GetUserSettingsCommand;
249
258
  const se_ListBotApiKeysCommand = async (input, context) => {
250
259
  const b = (0, core_1.requestBuilder)(input, context);
251
260
  const headers = {};
@@ -277,27 +286,26 @@ const se_ListBotsCommand = async (input, context) => {
277
286
  return b.build();
278
287
  };
279
288
  exports.se_ListBotsCommand = se_ListBotsCommand;
280
- const se_PartialUpdateUserSettingsCommand = async (input, context) => {
289
+ const se_QueryColleaguesCommand = async (input, context) => {
281
290
  const b = (0, core_1.requestBuilder)(input, context);
282
291
  const headers = {
283
292
  'content-type': 'application/json',
284
293
  };
285
- b.bp("/v2/users/settings");
294
+ b.bp("/v2/users/query-colleagues");
286
295
  const query = (0, smithy_client_1.map)({
287
- [_t]: [, input[_t]],
296
+ [_c]: [, input[_c]],
288
297
  });
289
298
  let body;
290
299
  body = JSON.stringify((0, smithy_client_1.take)(input, {
291
- 'settings': _ => (0, smithy_client_1._json)(_),
292
- 'userId': [],
300
+ 'query': _ => (0, smithy_client_1._json)(_),
293
301
  }));
294
- b.m("PATCH")
302
+ b.m("POST")
295
303
  .h(headers)
296
304
  .q(query)
297
305
  .b(body);
298
306
  return b.build();
299
307
  };
300
- exports.se_PartialUpdateUserSettingsCommand = se_PartialUpdateUserSettingsCommand;
308
+ exports.se_QueryColleaguesCommand = se_QueryColleaguesCommand;
301
309
  const se_QueryUserCommand = async (input, context) => {
302
310
  const b = (0, core_1.requestBuilder)(input, context);
303
311
  const headers = {
@@ -531,6 +539,21 @@ const de_CreateBotApiKeyCommand = async (output, context) => {
531
539
  return contents;
532
540
  };
533
541
  exports.de_CreateBotApiKeyCommand = de_CreateBotApiKeyCommand;
542
+ const de_CreateSystemBotCommand = async (output, context) => {
543
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
544
+ return de_CommandError(output, context);
545
+ }
546
+ const contents = (0, smithy_client_1.map)({
547
+ $metadata: deserializeMetadata(output),
548
+ });
549
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
550
+ const doc = (0, smithy_client_1.take)(data, {
551
+ 'id': smithy_client_1.expectString,
552
+ });
553
+ Object.assign(contents, doc);
554
+ return contents;
555
+ };
556
+ exports.de_CreateSystemBotCommand = de_CreateSystemBotCommand;
534
557
  const de_DeleteBotCommand = async (output, context) => {
535
558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
536
559
  return de_CommandError(output, context);
@@ -643,21 +666,6 @@ const de_GetUserPbxLinkSuggestionV1Command = async (output, context) => {
643
666
  return contents;
644
667
  };
645
668
  exports.de_GetUserPbxLinkSuggestionV1Command = de_GetUserPbxLinkSuggestionV1Command;
646
- const de_GetUserSettingsCommand = async (output, context) => {
647
- if (output.statusCode !== 200 && output.statusCode >= 300) {
648
- return de_CommandError(output, context);
649
- }
650
- const contents = (0, smithy_client_1.map)({
651
- $metadata: deserializeMetadata(output),
652
- });
653
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
654
- const doc = (0, smithy_client_1.take)(data, {
655
- 'emailNotifications': smithy_client_1._json,
656
- });
657
- Object.assign(contents, doc);
658
- return contents;
659
- };
660
- exports.de_GetUserSettingsCommand = de_GetUserSettingsCommand;
661
669
  const de_ListBotApiKeysCommand = async (output, context) => {
662
670
  if (output.statusCode !== 200 && output.statusCode >= 300) {
663
671
  return de_CommandError(output, context);
@@ -688,7 +696,7 @@ const de_ListBotsCommand = async (output, context) => {
688
696
  return contents;
689
697
  };
690
698
  exports.de_ListBotsCommand = de_ListBotsCommand;
691
- const de_PartialUpdateUserSettingsCommand = async (output, context) => {
699
+ const de_QueryColleaguesCommand = async (output, context) => {
692
700
  if (output.statusCode !== 200 && output.statusCode >= 300) {
693
701
  return de_CommandError(output, context);
694
702
  }
@@ -697,12 +705,12 @@ const de_PartialUpdateUserSettingsCommand = async (output, context) => {
697
705
  });
698
706
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
699
707
  const doc = (0, smithy_client_1.take)(data, {
700
- 'emailNotifications': smithy_client_1._json,
708
+ 'colleagues': smithy_client_1._json,
701
709
  });
702
710
  Object.assign(contents, doc);
703
711
  return contents;
704
712
  };
705
- exports.de_PartialUpdateUserSettingsCommand = de_PartialUpdateUserSettingsCommand;
713
+ exports.de_QueryColleaguesCommand = de_QueryColleaguesCommand;
706
714
  const de_QueryUserCommand = async (output, context) => {
707
715
  if (output.statusCode !== 200 && output.statusCode >= 300) {
708
716
  return de_CommandError(output, context);
@@ -1051,7 +1059,6 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1051
1059
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1052
1060
  const _c = "company";
1053
1061
  const _e = "email";
1054
- const _t = "token";
1055
1062
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
1056
1063
  if (encoded.length) {
1057
1064
  return JSON.parse(encoded);
package/dist-es/Users.js CHANGED
@@ -5,6 +5,7 @@ import { BatchGetUsersPbxLinkDataV1Command, } from "./commands/BatchGetUsersPbxL
5
5
  import { ChangeUserEmailCommand, } from "./commands/ChangeUserEmailCommand";
6
6
  import { CreateBotApiKeyCommand, } from "./commands/CreateBotApiKeyCommand";
7
7
  import { CreateBotCommand, } from "./commands/CreateBotCommand";
8
+ import { CreateSystemBotCommand, } from "./commands/CreateSystemBotCommand";
8
9
  import { DeleteBotApiKeyCommand, } from "./commands/DeleteBotApiKeyCommand";
9
10
  import { DeleteBotCommand, } from "./commands/DeleteBotCommand";
10
11
  import { GetBotCallbackCommand, } from "./commands/GetBotCallbackCommand";
@@ -13,10 +14,9 @@ import { GetUserCommand, } from "./commands/GetUserCommand";
13
14
  import { GetUserPbxLinkDataCommand, } from "./commands/GetUserPbxLinkDataCommand";
14
15
  import { GetUserPbxLinkSuggestionCommand, } from "./commands/GetUserPbxLinkSuggestionCommand";
15
16
  import { GetUserPbxLinkSuggestionV1Command, } from "./commands/GetUserPbxLinkSuggestionV1Command";
16
- import { GetUserSettingsCommand, } from "./commands/GetUserSettingsCommand";
17
17
  import { ListBotApiKeysCommand, } from "./commands/ListBotApiKeysCommand";
18
18
  import { ListBotsCommand, } from "./commands/ListBotsCommand";
19
- import { PartialUpdateUserSettingsCommand, } from "./commands/PartialUpdateUserSettingsCommand";
19
+ import { QueryColleaguesCommand, } from "./commands/QueryColleaguesCommand";
20
20
  import { QueryUserCommand, } from "./commands/QueryUserCommand";
21
21
  import { QueryUsersCommand, } from "./commands/QueryUsersCommand";
22
22
  import { UpdateBotCallbackCommand, } from "./commands/UpdateBotCallbackCommand";
@@ -33,6 +33,7 @@ const commands = {
33
33
  ChangeUserEmailCommand,
34
34
  CreateBotCommand,
35
35
  CreateBotApiKeyCommand,
36
+ CreateSystemBotCommand,
36
37
  DeleteBotCommand,
37
38
  DeleteBotApiKeyCommand,
38
39
  GetBotCommand,
@@ -41,10 +42,9 @@ const commands = {
41
42
  GetUserPbxLinkDataCommand,
42
43
  GetUserPbxLinkSuggestionCommand,
43
44
  GetUserPbxLinkSuggestionV1Command,
44
- GetUserSettingsCommand,
45
45
  ListBotApiKeysCommand,
46
46
  ListBotsCommand,
47
- PartialUpdateUserSettingsCommand,
47
+ QueryColleaguesCommand,
48
48
  QueryUserCommand,
49
49
  QueryUsersCommand,
50
50
  UpdateBotCommand,
@@ -1,17 +1,17 @@
1
- import { de_GetUserSettingsCommand, se_GetUserSettingsCommand, } from "../protocols/Aws_restJson1";
1
+ import { de_CreateSystemBotCommand, se_CreateSystemBotCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
4
  export { $Command };
5
- export class GetUserSettingsCommand extends $Command.classBuilder()
5
+ export class CreateSystemBotCommand extends $Command.classBuilder()
6
6
  .m(function (Command, cs, config, o) {
7
7
  return [
8
8
  getSerdePlugin(config, this.serialize, this.deserialize),
9
9
  ];
10
10
  })
11
- .s("Users", "GetUserSettings", {})
12
- .n("UsersClient", "GetUserSettingsCommand")
11
+ .s("Users", "CreateSystemBot", {})
12
+ .n("UsersClient", "CreateSystemBotCommand")
13
13
  .f(void 0, void 0)
14
- .ser(se_GetUserSettingsCommand)
15
- .de(de_GetUserSettingsCommand)
14
+ .ser(se_CreateSystemBotCommand)
15
+ .de(de_CreateSystemBotCommand)
16
16
  .build() {
17
17
  }
@@ -0,0 +1,17 @@
1
+ import { de_QueryColleaguesCommand, se_QueryColleaguesCommand, } 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 QueryColleaguesCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "QueryColleagues", {})
12
+ .n("UsersClient", "QueryColleaguesCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_QueryColleaguesCommand)
15
+ .de(de_QueryColleaguesCommand)
16
+ .build() {
17
+ }
@@ -4,6 +4,7 @@ export * from "./BatchGetUsersPbxLinkDataV1Command";
4
4
  export * from "./ChangeUserEmailCommand";
5
5
  export * from "./CreateBotCommand";
6
6
  export * from "./CreateBotApiKeyCommand";
7
+ export * from "./CreateSystemBotCommand";
7
8
  export * from "./DeleteBotCommand";
8
9
  export * from "./DeleteBotApiKeyCommand";
9
10
  export * from "./GetBotCommand";
@@ -12,10 +13,9 @@ export * from "./GetUserCommand";
12
13
  export * from "./GetUserPbxLinkDataCommand";
13
14
  export * from "./GetUserPbxLinkSuggestionCommand";
14
15
  export * from "./GetUserPbxLinkSuggestionV1Command";
15
- export * from "./GetUserSettingsCommand";
16
16
  export * from "./ListBotApiKeysCommand";
17
17
  export * from "./ListBotsCommand";
18
- export * from "./PartialUpdateUserSettingsCommand";
18
+ export * from "./QueryColleaguesCommand";
19
19
  export * from "./QueryUserCommand";
20
20
  export * from "./QueryUsersCommand";
21
21
  export * from "./UpdateBotCommand";
@@ -30,6 +30,40 @@ export const PbxLicenseType = {
30
30
  PREMIUM: "premium",
31
31
  WIZYCONF: "wizyconf",
32
32
  };
33
+ export const PbxColleagueRole = {
34
+ ADMIN: "admin",
35
+ FAX: "fax",
36
+ PARK_ORBIT: "park_orbit",
37
+ ROOM: "room",
38
+ USER: "user",
39
+ };
40
+ export const GetPbxColleaguesDir = {
41
+ ASC: "asc",
42
+ DESC: "desc",
43
+ };
44
+ export const PbxColleaguesQueryField = {
45
+ DEPARTMENT: "department",
46
+ DIALPLAN: "dialplan",
47
+ EMAIL: "email",
48
+ EXTENSION: "extension",
49
+ FAX_DIALPLAN: "faxDialplan",
50
+ GROUP_DN: "groupDn",
51
+ ID: "id",
52
+ LANGUAGE: "language",
53
+ LICENSE_TYPE: "licenseType",
54
+ LOGIN: "login",
55
+ MOBILE_PHONE: "mobilePhone",
56
+ NAME: "name",
57
+ OFFICE_PHONE: "officePhone",
58
+ PBX_DN: "pbxDn",
59
+ PICTURE: "picture",
60
+ ROLE: "role",
61
+ SOURCE_ID: "sourceId",
62
+ };
63
+ export const PbxColleaguesSearchStrategy = {
64
+ CONTAIN: "contain",
65
+ STARTS_WITH: "startsWith",
66
+ };
33
67
  export class BotApiKeyNotFoundException extends __BaseException {
34
68
  constructor(opts) {
35
69
  super({
@@ -105,6 +105,26 @@ export const se_CreateBotApiKeyCommand = async (input, context) => {
105
105
  .b(body);
106
106
  return b.build();
107
107
  };
108
+ export const se_CreateSystemBotCommand = async (input, context) => {
109
+ const b = rb(input, context);
110
+ const headers = {
111
+ 'content-type': 'application/json',
112
+ };
113
+ b.bp("/v2/users/system-bots");
114
+ const query = map({
115
+ [_c]: [, input[_c]],
116
+ });
117
+ let body;
118
+ body = JSON.stringify(take(input, {
119
+ 'name': [],
120
+ 'picture': [],
121
+ }));
122
+ b.m("POST")
123
+ .h(headers)
124
+ .q(query)
125
+ .b(body);
126
+ return b.build();
127
+ };
108
128
  export const se_DeleteBotCommand = async (input, context) => {
109
129
  const b = rb(input, context);
110
130
  const headers = {};
@@ -216,17 +236,6 @@ export const se_GetUserPbxLinkSuggestionV1Command = async (input, context) => {
216
236
  .b(body);
217
237
  return b.build();
218
238
  };
219
- export const se_GetUserSettingsCommand = async (input, context) => {
220
- const b = rb(input, context);
221
- const headers = {};
222
- b.bp("/v2/users/settings/{userId}");
223
- b.p('userId', () => input.userId, '{userId}', false);
224
- let body;
225
- b.m("GET")
226
- .h(headers)
227
- .b(body);
228
- return b.build();
229
- };
230
239
  export const se_ListBotApiKeysCommand = async (input, context) => {
231
240
  const b = rb(input, context);
232
241
  const headers = {};
@@ -256,21 +265,20 @@ export const se_ListBotsCommand = async (input, context) => {
256
265
  .b(body);
257
266
  return b.build();
258
267
  };
259
- export const se_PartialUpdateUserSettingsCommand = async (input, context) => {
268
+ export const se_QueryColleaguesCommand = async (input, context) => {
260
269
  const b = rb(input, context);
261
270
  const headers = {
262
271
  'content-type': 'application/json',
263
272
  };
264
- b.bp("/v2/users/settings");
273
+ b.bp("/v2/users/query-colleagues");
265
274
  const query = map({
266
- [_t]: [, input[_t]],
275
+ [_c]: [, input[_c]],
267
276
  });
268
277
  let body;
269
278
  body = JSON.stringify(take(input, {
270
- 'settings': _ => _json(_),
271
- 'userId': [],
279
+ 'query': _ => _json(_),
272
280
  }));
273
- b.m("PATCH")
281
+ b.m("POST")
274
282
  .h(headers)
275
283
  .q(query)
276
284
  .b(body);
@@ -495,6 +503,20 @@ export const de_CreateBotApiKeyCommand = async (output, context) => {
495
503
  Object.assign(contents, doc);
496
504
  return contents;
497
505
  };
506
+ export const de_CreateSystemBotCommand = async (output, context) => {
507
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
508
+ return de_CommandError(output, context);
509
+ }
510
+ const contents = map({
511
+ $metadata: deserializeMetadata(output),
512
+ });
513
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
514
+ const doc = take(data, {
515
+ 'id': __expectString,
516
+ });
517
+ Object.assign(contents, doc);
518
+ return contents;
519
+ };
498
520
  export const de_DeleteBotCommand = async (output, context) => {
499
521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
500
522
  return de_CommandError(output, context);
@@ -599,20 +621,6 @@ export const de_GetUserPbxLinkSuggestionV1Command = async (output, context) => {
599
621
  Object.assign(contents, doc);
600
622
  return contents;
601
623
  };
602
- export const de_GetUserSettingsCommand = async (output, context) => {
603
- if (output.statusCode !== 200 && output.statusCode >= 300) {
604
- return de_CommandError(output, context);
605
- }
606
- const contents = map({
607
- $metadata: deserializeMetadata(output),
608
- });
609
- const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
610
- const doc = take(data, {
611
- 'emailNotifications': _json,
612
- });
613
- Object.assign(contents, doc);
614
- return contents;
615
- };
616
624
  export const de_ListBotApiKeysCommand = async (output, context) => {
617
625
  if (output.statusCode !== 200 && output.statusCode >= 300) {
618
626
  return de_CommandError(output, context);
@@ -641,7 +649,7 @@ export const de_ListBotsCommand = async (output, context) => {
641
649
  Object.assign(contents, doc);
642
650
  return contents;
643
651
  };
644
- export const de_PartialUpdateUserSettingsCommand = async (output, context) => {
652
+ export const de_QueryColleaguesCommand = async (output, context) => {
645
653
  if (output.statusCode !== 200 && output.statusCode >= 300) {
646
654
  return de_CommandError(output, context);
647
655
  }
@@ -650,7 +658,7 @@ export const de_PartialUpdateUserSettingsCommand = async (output, context) => {
650
658
  });
651
659
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
652
660
  const doc = take(data, {
653
- 'emailNotifications': _json,
661
+ 'colleagues': _json,
654
662
  });
655
663
  Object.assign(contents, doc);
656
664
  return contents;
@@ -995,7 +1003,6 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
995
1003
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
996
1004
  const _c = "company";
997
1005
  const _e = "email";
998
- const _t = "token";
999
1006
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
1000
1007
  if (encoded.length) {
1001
1008
  return JSON.parse(encoded);