@wildix/xbees-users-client 1.0.18 → 1.0.20

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
@@ -4,6 +4,7 @@ exports.Users = void 0;
4
4
  const UsersClient_1 = require("./UsersClient");
5
5
  const BatchGetUsersPbxLinkDataCommand_1 = require("./commands/BatchGetUsersPbxLinkDataCommand");
6
6
  const BatchGetUsersStreamLinkDataCommand_1 = require("./commands/BatchGetUsersStreamLinkDataCommand");
7
+ const ChangeUserEmailCommand_1 = require("./commands/ChangeUserEmailCommand");
7
8
  const CreateBotApiKeyCommand_1 = require("./commands/CreateBotApiKeyCommand");
8
9
  const CreateBotCommand_1 = require("./commands/CreateBotCommand");
9
10
  const DeleteBotApiKeyCommand_1 = require("./commands/DeleteBotApiKeyCommand");
@@ -21,6 +22,7 @@ const smithy_client_1 = require("@smithy/smithy-client");
21
22
  const commands = {
22
23
  BatchGetUsersPbxLinkDataCommand: BatchGetUsersPbxLinkDataCommand_1.BatchGetUsersPbxLinkDataCommand,
23
24
  BatchGetUsersStreamLinkDataCommand: BatchGetUsersStreamLinkDataCommand_1.BatchGetUsersStreamLinkDataCommand,
25
+ ChangeUserEmailCommand: ChangeUserEmailCommand_1.ChangeUserEmailCommand,
24
26
  CreateBotCommand: CreateBotCommand_1.CreateBotCommand,
25
27
  CreateBotApiKeyCommand: CreateBotApiKeyCommand_1.CreateBotApiKeyCommand,
26
28
  DeleteBotCommand: DeleteBotCommand_1.DeleteBotCommand,
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChangeUserEmailCommand = 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 ChangeUserEmailCommand 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", "ChangeUserEmail", {})
15
+ .n("UsersClient", "ChangeUserEmailCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ChangeUserEmailCommand)
18
+ .de(Aws_restJson1_1.de_ChangeUserEmailCommand)
19
+ .build() {
20
+ }
21
+ exports.ChangeUserEmailCommand = ChangeUserEmailCommand;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./BatchGetUsersPbxLinkDataCommand"), exports);
5
5
  tslib_1.__exportStar(require("./BatchGetUsersStreamLinkDataCommand"), exports);
6
+ tslib_1.__exportStar(require("./ChangeUserEmailCommand"), exports);
6
7
  tslib_1.__exportStar(require("./CreateBotCommand"), exports);
7
8
  tslib_1.__exportStar(require("./CreateBotApiKeyCommand"), exports);
8
9
  tslib_1.__exportStar(require("./DeleteBotCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotApiKeyNotFoundException = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.UserNotFoundException = exports.UserCompanyNotValidException = 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) {
@@ -81,3 +81,29 @@ class BotSecretKeyNotValidException extends UsersServiceException_1.UsersService
81
81
  }
82
82
  }
83
83
  exports.BotSecretKeyNotValidException = BotSecretKeyNotValidException;
84
+ class UserCompanyNotValidException extends UsersServiceException_1.UsersServiceException {
85
+ constructor(opts) {
86
+ super({
87
+ name: "UserCompanyNotValidException",
88
+ $fault: "client",
89
+ ...opts
90
+ });
91
+ this.name = "UserCompanyNotValidException";
92
+ this.$fault = "client";
93
+ Object.setPrototypeOf(this, UserCompanyNotValidException.prototype);
94
+ }
95
+ }
96
+ exports.UserCompanyNotValidException = UserCompanyNotValidException;
97
+ class UserNotFoundException extends UsersServiceException_1.UsersServiceException {
98
+ constructor(opts) {
99
+ super({
100
+ name: "UserNotFoundException",
101
+ $fault: "client",
102
+ ...opts
103
+ });
104
+ this.name = "UserNotFoundException";
105
+ this.$fault = "client";
106
+ Object.setPrototypeOf(this, UserNotFoundException.prototype);
107
+ }
108
+ }
109
+ exports.UserNotFoundException = UserNotFoundException;
@@ -1,6 +1,6 @@
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_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;
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;
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");
@@ -37,6 +37,23 @@ const se_BatchGetUsersStreamLinkDataCommand = async (input, context) => {
37
37
  return b.build();
38
38
  };
39
39
  exports.se_BatchGetUsersStreamLinkDataCommand = se_BatchGetUsersStreamLinkDataCommand;
40
+ const se_ChangeUserEmailCommand = async (input, context) => {
41
+ const b = (0, core_1.requestBuilder)(input, context);
42
+ const headers = {
43
+ 'content-type': 'application/json',
44
+ };
45
+ b.bp("/v2/users/change-email");
46
+ let body;
47
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
48
+ 'newData': _ => (0, smithy_client_1._json)(_),
49
+ 'oldData': _ => (0, smithy_client_1._json)(_),
50
+ }));
51
+ b.m("PUT")
52
+ .h(headers)
53
+ .b(body);
54
+ return b.build();
55
+ };
56
+ exports.se_ChangeUserEmailCommand = se_ChangeUserEmailCommand;
40
57
  const se_CreateBotCommand = async (input, context) => {
41
58
  const b = (0, core_1.requestBuilder)(input, context);
42
59
  const headers = {
@@ -298,6 +315,21 @@ const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
298
315
  return contents;
299
316
  };
300
317
  exports.de_BatchGetUsersStreamLinkDataCommand = de_BatchGetUsersStreamLinkDataCommand;
318
+ const de_ChangeUserEmailCommand = async (output, context) => {
319
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
320
+ return de_CommandError(output, context);
321
+ }
322
+ const contents = (0, smithy_client_1.map)({
323
+ $metadata: deserializeMetadata(output),
324
+ });
325
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
326
+ const doc = (0, smithy_client_1.take)(data, {
327
+ 'sfnArn': smithy_client_1.expectString,
328
+ });
329
+ Object.assign(contents, doc);
330
+ return contents;
331
+ };
332
+ exports.de_ChangeUserEmailCommand = de_ChangeUserEmailCommand;
301
333
  const de_CreateBotCommand = async (output, context) => {
302
334
  if (output.statusCode !== 200 && output.statusCode >= 300) {
303
335
  return de_CommandError(output, context);
@@ -501,6 +533,12 @@ const de_CommandError = async (output, context) => {
501
533
  case "ValidationException":
502
534
  case "smithy.framework#ValidationException":
503
535
  throw await de_ValidationExceptionRes(parsedOutput, context);
536
+ case "UserCompanyNotValidException":
537
+ case "wildix.xbees.users#UserCompanyNotValidException":
538
+ throw await de_UserCompanyNotValidExceptionRes(parsedOutput, context);
539
+ case "UserNotFoundException":
540
+ case "wildix.xbees.users#UserNotFoundException":
541
+ throw await de_UserNotFoundExceptionRes(parsedOutput, context);
504
542
  case "BotNotFoundException":
505
543
  case "wildix.xbees.users#BotNotFoundException":
506
544
  throw await de_BotNotFoundExceptionRes(parsedOutput, context);
@@ -585,6 +623,32 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
585
623
  });
586
624
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
587
625
  };
626
+ const de_UserCompanyNotValidExceptionRes = async (parsedOutput, context) => {
627
+ const contents = (0, smithy_client_1.map)({});
628
+ const data = parsedOutput.body;
629
+ const doc = (0, smithy_client_1.take)(data, {
630
+ 'message': smithy_client_1.expectString,
631
+ });
632
+ Object.assign(contents, doc);
633
+ const exception = new models_0_1.UserCompanyNotValidException({
634
+ $metadata: deserializeMetadata(parsedOutput),
635
+ ...contents
636
+ });
637
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
638
+ };
639
+ const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
640
+ const contents = (0, smithy_client_1.map)({});
641
+ const data = parsedOutput.body;
642
+ const doc = (0, smithy_client_1.take)(data, {
643
+ 'message': smithy_client_1.expectString,
644
+ });
645
+ Object.assign(contents, doc);
646
+ const exception = new models_0_1.UserNotFoundException({
647
+ $metadata: deserializeMetadata(parsedOutput),
648
+ ...contents
649
+ });
650
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
651
+ };
588
652
  const se_Document = (input, context) => {
589
653
  return input;
590
654
  };
package/dist-es/Users.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { UsersClient, } from "./UsersClient";
2
2
  import { BatchGetUsersPbxLinkDataCommand, } from "./commands/BatchGetUsersPbxLinkDataCommand";
3
3
  import { BatchGetUsersStreamLinkDataCommand, } from "./commands/BatchGetUsersStreamLinkDataCommand";
4
+ import { ChangeUserEmailCommand, } from "./commands/ChangeUserEmailCommand";
4
5
  import { CreateBotApiKeyCommand, } from "./commands/CreateBotApiKeyCommand";
5
6
  import { CreateBotCommand, } from "./commands/CreateBotCommand";
6
7
  import { DeleteBotApiKeyCommand, } from "./commands/DeleteBotApiKeyCommand";
@@ -18,6 +19,7 @@ import { createAggregatedClient } from "@smithy/smithy-client";
18
19
  const commands = {
19
20
  BatchGetUsersPbxLinkDataCommand,
20
21
  BatchGetUsersStreamLinkDataCommand,
22
+ ChangeUserEmailCommand,
21
23
  CreateBotCommand,
22
24
  CreateBotApiKeyCommand,
23
25
  DeleteBotCommand,
@@ -0,0 +1,17 @@
1
+ import { de_ChangeUserEmailCommand, se_ChangeUserEmailCommand, } 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 ChangeUserEmailCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "ChangeUserEmail", {})
12
+ .n("UsersClient", "ChangeUserEmailCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_ChangeUserEmailCommand)
15
+ .de(de_ChangeUserEmailCommand)
16
+ .build() {
17
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./BatchGetUsersPbxLinkDataCommand";
2
2
  export * from "./BatchGetUsersStreamLinkDataCommand";
3
+ export * from "./ChangeUserEmailCommand";
3
4
  export * from "./CreateBotCommand";
4
5
  export * from "./CreateBotApiKeyCommand";
5
6
  export * from "./DeleteBotCommand";
@@ -73,3 +73,27 @@ export class BotSecretKeyNotValidException extends __BaseException {
73
73
  Object.setPrototypeOf(this, BotSecretKeyNotValidException.prototype);
74
74
  }
75
75
  }
76
+ export class UserCompanyNotValidException extends __BaseException {
77
+ constructor(opts) {
78
+ super({
79
+ name: "UserCompanyNotValidException",
80
+ $fault: "client",
81
+ ...opts
82
+ });
83
+ this.name = "UserCompanyNotValidException";
84
+ this.$fault = "client";
85
+ Object.setPrototypeOf(this, UserCompanyNotValidException.prototype);
86
+ }
87
+ }
88
+ export class UserNotFoundException extends __BaseException {
89
+ constructor(opts) {
90
+ super({
91
+ name: "UserNotFoundException",
92
+ $fault: "client",
93
+ ...opts
94
+ });
95
+ this.name = "UserNotFoundException";
96
+ this.$fault = "client";
97
+ Object.setPrototypeOf(this, UserNotFoundException.prototype);
98
+ }
99
+ }
@@ -1,5 +1,5 @@
1
1
  import { UsersServiceException as __BaseException } from "../models/UsersServiceException";
2
- import { BotApiKeyNotFoundException, BotEndpoint, BotNotFoundException, BotSecretKeyNotValidException, ForbiddenException, ValidationException, } from "../models/models_0";
2
+ import { BotApiKeyNotFoundException, BotEndpoint, BotNotFoundException, BotSecretKeyNotValidException, ForbiddenException, UserCompanyNotValidException, UserNotFoundException, ValidationException, } from "../models/models_0";
3
3
  import { requestBuilder as rb } from "@smithy/core";
4
4
  import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
5
  export const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
@@ -32,6 +32,22 @@ export const se_BatchGetUsersStreamLinkDataCommand = async (input, context) => {
32
32
  .b(body);
33
33
  return b.build();
34
34
  };
35
+ export const se_ChangeUserEmailCommand = async (input, context) => {
36
+ const b = rb(input, context);
37
+ const headers = {
38
+ 'content-type': 'application/json',
39
+ };
40
+ b.bp("/v2/users/change-email");
41
+ let body;
42
+ body = JSON.stringify(take(input, {
43
+ 'newData': _ => _json(_),
44
+ 'oldData': _ => _json(_),
45
+ }));
46
+ b.m("PUT")
47
+ .h(headers)
48
+ .b(body);
49
+ return b.build();
50
+ };
35
51
  export const se_CreateBotCommand = async (input, context) => {
36
52
  const b = rb(input, context);
37
53
  const headers = {
@@ -278,6 +294,20 @@ export const de_BatchGetUsersStreamLinkDataCommand = async (output, context) =>
278
294
  Object.assign(contents, doc);
279
295
  return contents;
280
296
  };
297
+ export const de_ChangeUserEmailCommand = async (output, context) => {
298
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
299
+ return de_CommandError(output, context);
300
+ }
301
+ const contents = map({
302
+ $metadata: deserializeMetadata(output),
303
+ });
304
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
305
+ const doc = take(data, {
306
+ 'sfnArn': __expectString,
307
+ });
308
+ Object.assign(contents, doc);
309
+ return contents;
310
+ };
281
311
  export const de_CreateBotCommand = async (output, context) => {
282
312
  if (output.statusCode !== 200 && output.statusCode >= 300) {
283
313
  return de_CommandError(output, context);
@@ -468,6 +498,12 @@ const de_CommandError = async (output, context) => {
468
498
  case "ValidationException":
469
499
  case "smithy.framework#ValidationException":
470
500
  throw await de_ValidationExceptionRes(parsedOutput, context);
501
+ case "UserCompanyNotValidException":
502
+ case "wildix.xbees.users#UserCompanyNotValidException":
503
+ throw await de_UserCompanyNotValidExceptionRes(parsedOutput, context);
504
+ case "UserNotFoundException":
505
+ case "wildix.xbees.users#UserNotFoundException":
506
+ throw await de_UserNotFoundExceptionRes(parsedOutput, context);
471
507
  case "BotNotFoundException":
472
508
  case "wildix.xbees.users#BotNotFoundException":
473
509
  throw await de_BotNotFoundExceptionRes(parsedOutput, context);
@@ -552,6 +588,32 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
552
588
  });
553
589
  return __decorateServiceException(exception, parsedOutput.body);
554
590
  };
591
+ const de_UserCompanyNotValidExceptionRes = async (parsedOutput, context) => {
592
+ const contents = map({});
593
+ const data = parsedOutput.body;
594
+ const doc = take(data, {
595
+ 'message': __expectString,
596
+ });
597
+ Object.assign(contents, doc);
598
+ const exception = new UserCompanyNotValidException({
599
+ $metadata: deserializeMetadata(parsedOutput),
600
+ ...contents
601
+ });
602
+ return __decorateServiceException(exception, parsedOutput.body);
603
+ };
604
+ const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
605
+ const contents = map({});
606
+ const data = parsedOutput.body;
607
+ const doc = take(data, {
608
+ 'message': __expectString,
609
+ });
610
+ Object.assign(contents, doc);
611
+ const exception = new UserNotFoundException({
612
+ $metadata: deserializeMetadata(parsedOutput),
613
+ ...contents
614
+ });
615
+ return __decorateServiceException(exception, parsedOutput.body);
616
+ };
555
617
  const se_Document = (input, context) => {
556
618
  return input;
557
619
  };
@@ -1,6 +1,7 @@
1
1
  import { UsersClient } from "./UsersClient";
2
2
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
3
3
  import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "./commands/BatchGetUsersStreamLinkDataCommand";
4
+ import { ChangeUserEmailCommandInput, ChangeUserEmailCommandOutput } from "./commands/ChangeUserEmailCommand";
4
5
  import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "./commands/CreateBotApiKeyCommand";
5
6
  import { CreateBotCommandInput, CreateBotCommandOutput } from "./commands/CreateBotCommand";
6
7
  import { DeleteBotApiKeyCommandInput, DeleteBotApiKeyCommandOutput } from "./commands/DeleteBotApiKeyCommand";
@@ -28,6 +29,12 @@ export interface Users {
28
29
  batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetUsersStreamLinkDataCommandOutput>;
29
30
  batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, cb: (err: any, data?: BatchGetUsersStreamLinkDataCommandOutput) => void): void;
30
31
  batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetUsersStreamLinkDataCommandOutput) => void): void;
32
+ /**
33
+ * @see {@link ChangeUserEmailCommand}
34
+ */
35
+ changeUserEmail(args: ChangeUserEmailCommandInput, options?: __HttpHandlerOptions): Promise<ChangeUserEmailCommandOutput>;
36
+ changeUserEmail(args: ChangeUserEmailCommandInput, cb: (err: any, data?: ChangeUserEmailCommandOutput) => void): void;
37
+ changeUserEmail(args: ChangeUserEmailCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ChangeUserEmailCommandOutput) => void): void;
31
38
  /**
32
39
  * @see {@link CreateBotCommand}
33
40
  */
@@ -1,5 +1,6 @@
1
1
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
2
2
  import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "./commands/BatchGetUsersStreamLinkDataCommand";
3
+ import { ChangeUserEmailCommandInput, ChangeUserEmailCommandOutput } from "./commands/ChangeUserEmailCommand";
3
4
  import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "./commands/CreateBotApiKeyCommand";
4
5
  import { CreateBotCommandInput, CreateBotCommandOutput } from "./commands/CreateBotCommand";
5
6
  import { DeleteBotApiKeyCommandInput, DeleteBotApiKeyCommandOutput } from "./commands/DeleteBotApiKeyCommand";
@@ -24,11 +25,11 @@ export { __Client };
24
25
  /**
25
26
  * @public
26
27
  */
27
- export type ServiceInputTypes = BatchGetUsersPbxLinkDataCommandInput | BatchGetUsersStreamLinkDataCommandInput | CreateBotApiKeyCommandInput | CreateBotCommandInput | DeleteBotApiKeyCommandInput | DeleteBotCommandInput | GetBotCallbackCommandInput | GetBotCommandInput | GetUserPbxLinkSuggestionCommandInput | ListBotApiKeysCommandInput | ListBotsCommandInput | UpdateBotCallbackCommandInput | UpdateBotCommandInput | UploadPictureCommandInput | VerifyBotSecretKeyCommandInput;
28
+ export type ServiceInputTypes = BatchGetUsersPbxLinkDataCommandInput | BatchGetUsersStreamLinkDataCommandInput | ChangeUserEmailCommandInput | CreateBotApiKeyCommandInput | CreateBotCommandInput | DeleteBotApiKeyCommandInput | DeleteBotCommandInput | GetBotCallbackCommandInput | GetBotCommandInput | GetUserPbxLinkSuggestionCommandInput | ListBotApiKeysCommandInput | ListBotsCommandInput | UpdateBotCallbackCommandInput | UpdateBotCommandInput | UploadPictureCommandInput | VerifyBotSecretKeyCommandInput;
28
29
  /**
29
30
  * @public
30
31
  */
31
- export type ServiceOutputTypes = BatchGetUsersPbxLinkDataCommandOutput | BatchGetUsersStreamLinkDataCommandOutput | CreateBotApiKeyCommandOutput | CreateBotCommandOutput | DeleteBotApiKeyCommandOutput | DeleteBotCommandOutput | GetBotCallbackCommandOutput | GetBotCommandOutput | GetUserPbxLinkSuggestionCommandOutput | ListBotApiKeysCommandOutput | ListBotsCommandOutput | UpdateBotCallbackCommandOutput | UpdateBotCommandOutput | UploadPictureCommandOutput | VerifyBotSecretKeyCommandOutput;
32
+ export type ServiceOutputTypes = BatchGetUsersPbxLinkDataCommandOutput | BatchGetUsersStreamLinkDataCommandOutput | ChangeUserEmailCommandOutput | CreateBotApiKeyCommandOutput | CreateBotCommandOutput | DeleteBotApiKeyCommandOutput | DeleteBotCommandOutput | GetBotCallbackCommandOutput | GetBotCommandOutput | GetUserPbxLinkSuggestionCommandOutput | ListBotApiKeysCommandOutput | ListBotsCommandOutput | UpdateBotCallbackCommandOutput | UpdateBotCommandOutput | UploadPictureCommandOutput | VerifyBotSecretKeyCommandOutput;
32
33
  /**
33
34
  * @public
34
35
  */
@@ -0,0 +1,75 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, UsersClientResolvedConfig } from "../UsersClient";
2
+ import { ChangeUserEmailInput, ChangeUserEmailOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ChangeUserEmailCommand}.
14
+ */
15
+ export interface ChangeUserEmailCommandInput extends ChangeUserEmailInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ChangeUserEmailCommand}.
21
+ */
22
+ export interface ChangeUserEmailCommandOutput extends ChangeUserEmailOutput, __MetadataBearer {
23
+ }
24
+ declare const ChangeUserEmailCommand_base: {
25
+ new (input: ChangeUserEmailCommandInput): import("@smithy/smithy-client").CommandImpl<ChangeUserEmailCommandInput, ChangeUserEmailCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: ChangeUserEmailCommandInput): import("@smithy/smithy-client").CommandImpl<ChangeUserEmailCommandInput, ChangeUserEmailCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Schedules user's email changing.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { UsersClient, ChangeUserEmailCommand } from "@wildix/xbees-users-client"; // ES Modules import
35
+ * // const { UsersClient, ChangeUserEmailCommand } = require("@wildix/xbees-users-client"); // CommonJS import
36
+ * const client = new UsersClient(config);
37
+ * const input = { // ChangeUserEmailInput
38
+ * newData: { // ChangeEmailData
39
+ * email: "STRING_VALUE", // required
40
+ * companyId: "STRING_VALUE",
41
+ * },
42
+ * oldData: {
43
+ * email: "STRING_VALUE", // required
44
+ * companyId: "STRING_VALUE",
45
+ * },
46
+ * };
47
+ * const command = new ChangeUserEmailCommand(input);
48
+ * const response = await client.send(command);
49
+ * // { // ChangeUserEmailOutput
50
+ * // sfnArn: "STRING_VALUE", // required
51
+ * // };
52
+ *
53
+ * ```
54
+ *
55
+ * @param ChangeUserEmailCommandInput - {@link ChangeUserEmailCommandInput}
56
+ * @returns {@link ChangeUserEmailCommandOutput}
57
+ * @see {@link ChangeUserEmailCommandInput} for command's `input` shape.
58
+ * @see {@link ChangeUserEmailCommandOutput} for command's `response` shape.
59
+ * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
60
+ *
61
+ * @throws {@link UserNotFoundException} (client fault)
62
+ *
63
+ * @throws {@link UserCompanyNotValidException} (client fault)
64
+ *
65
+ * @throws {@link ForbiddenException} (client fault)
66
+ *
67
+ * @throws {@link ValidationException} (client fault)
68
+ *
69
+ * @throws {@link UsersServiceException}
70
+ * <p>Base exception class for all service exceptions from Users service.</p>
71
+ *
72
+ * @public
73
+ */
74
+ export declare class ChangeUserEmailCommand extends ChangeUserEmailCommand_base {
75
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./BatchGetUsersPbxLinkDataCommand";
2
2
  export * from "./BatchGetUsersStreamLinkDataCommand";
3
+ export * from "./ChangeUserEmailCommand";
3
4
  export * from "./CreateBotCommand";
4
5
  export * from "./CreateBotApiKeyCommand";
5
6
  export * from "./DeleteBotCommand";
@@ -235,6 +235,48 @@ export declare class BotSecretKeyNotValidException extends __BaseException {
235
235
  */
236
236
  constructor(opts: __ExceptionOptionType<BotSecretKeyNotValidException, __BaseException>);
237
237
  }
238
+ /**
239
+ * @public
240
+ */
241
+ export interface ChangeEmailData {
242
+ email: string;
243
+ companyId?: string;
244
+ }
245
+ /**
246
+ * @public
247
+ */
248
+ export interface ChangeUserEmailInput {
249
+ newData: ChangeEmailData;
250
+ oldData: ChangeEmailData;
251
+ }
252
+ /**
253
+ * @public
254
+ */
255
+ export interface ChangeUserEmailOutput {
256
+ sfnArn: string;
257
+ }
258
+ /**
259
+ * @public
260
+ */
261
+ export declare class UserCompanyNotValidException extends __BaseException {
262
+ readonly name: "UserCompanyNotValidException";
263
+ readonly $fault: "client";
264
+ /**
265
+ * @internal
266
+ */
267
+ constructor(opts: __ExceptionOptionType<UserCompanyNotValidException, __BaseException>);
268
+ }
269
+ /**
270
+ * @public
271
+ */
272
+ export declare class UserNotFoundException extends __BaseException {
273
+ readonly name: "UserNotFoundException";
274
+ readonly $fault: "client";
275
+ /**
276
+ * @internal
277
+ */
278
+ constructor(opts: __ExceptionOptionType<UserNotFoundException, __BaseException>);
279
+ }
238
280
  /**
239
281
  * @public
240
282
  */
@@ -1,5 +1,6 @@
1
1
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "../commands/BatchGetUsersPbxLinkDataCommand";
2
2
  import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "../commands/BatchGetUsersStreamLinkDataCommand";
3
+ import { ChangeUserEmailCommandInput, ChangeUserEmailCommandOutput } from "../commands/ChangeUserEmailCommand";
3
4
  import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "../commands/CreateBotApiKeyCommand";
4
5
  import { CreateBotCommandInput, CreateBotCommandOutput } from "../commands/CreateBotCommand";
5
6
  import { DeleteBotApiKeyCommandInput, DeleteBotApiKeyCommandOutput } from "../commands/DeleteBotApiKeyCommand";
@@ -23,6 +24,10 @@ export declare const se_BatchGetUsersPbxLinkDataCommand: (input: BatchGetUsersPb
23
24
  * serializeAws_restJson1BatchGetUsersStreamLinkDataCommand
24
25
  */
25
26
  export declare const se_BatchGetUsersStreamLinkDataCommand: (input: BatchGetUsersStreamLinkDataCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
27
+ /**
28
+ * serializeAws_restJson1ChangeUserEmailCommand
29
+ */
30
+ export declare const se_ChangeUserEmailCommand: (input: ChangeUserEmailCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
26
31
  /**
27
32
  * serializeAws_restJson1CreateBotCommand
28
33
  */
@@ -83,6 +88,10 @@ export declare const de_BatchGetUsersPbxLinkDataCommand: (output: __HttpResponse
83
88
  * deserializeAws_restJson1BatchGetUsersStreamLinkDataCommand
84
89
  */
85
90
  export declare const de_BatchGetUsersStreamLinkDataCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchGetUsersStreamLinkDataCommandOutput>;
91
+ /**
92
+ * deserializeAws_restJson1ChangeUserEmailCommand
93
+ */
94
+ export declare const de_ChangeUserEmailCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ChangeUserEmailCommandOutput>;
86
95
  /**
87
96
  * deserializeAws_restJson1CreateBotCommand
88
97
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/xbees-users-client",
3
3
  "description": "@wildix/xbees-users-client client",
4
- "version": "1.0.18",
4
+ "version": "1.0.20",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",