@wildix/xbees-users-client 1.0.18 → 1.0.19
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 +2 -0
- package/dist-cjs/commands/ChangeUserEmailCommand.js +21 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +27 -1
- package/dist-cjs/protocols/Aws_restJson1.js +61 -1
- package/dist-es/Users.js +2 -0
- package/dist-es/commands/ChangeUserEmailCommand.js +17 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +24 -0
- package/dist-es/protocols/Aws_restJson1.js +59 -1
- package/dist-types/Users.d.ts +7 -0
- package/dist-types/UsersClient.d.ts +3 -2
- package/dist-types/commands/ChangeUserEmailCommand.d.ts +73 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +41 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
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,17 @@ 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
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
326
|
+
return contents;
|
|
327
|
+
};
|
|
328
|
+
exports.de_ChangeUserEmailCommand = de_ChangeUserEmailCommand;
|
|
301
329
|
const de_CreateBotCommand = async (output, context) => {
|
|
302
330
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
303
331
|
return de_CommandError(output, context);
|
|
@@ -501,6 +529,12 @@ const de_CommandError = async (output, context) => {
|
|
|
501
529
|
case "ValidationException":
|
|
502
530
|
case "smithy.framework#ValidationException":
|
|
503
531
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
532
|
+
case "UserCompanyNotValidException":
|
|
533
|
+
case "wildix.xbees.users#UserCompanyNotValidException":
|
|
534
|
+
throw await de_UserCompanyNotValidExceptionRes(parsedOutput, context);
|
|
535
|
+
case "UserNotFoundException":
|
|
536
|
+
case "wildix.xbees.users#UserNotFoundException":
|
|
537
|
+
throw await de_UserNotFoundExceptionRes(parsedOutput, context);
|
|
504
538
|
case "BotNotFoundException":
|
|
505
539
|
case "wildix.xbees.users#BotNotFoundException":
|
|
506
540
|
throw await de_BotNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -585,6 +619,32 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
|
|
|
585
619
|
});
|
|
586
620
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
587
621
|
};
|
|
622
|
+
const de_UserCompanyNotValidExceptionRes = async (parsedOutput, context) => {
|
|
623
|
+
const contents = (0, smithy_client_1.map)({});
|
|
624
|
+
const data = parsedOutput.body;
|
|
625
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
626
|
+
'message': smithy_client_1.expectString,
|
|
627
|
+
});
|
|
628
|
+
Object.assign(contents, doc);
|
|
629
|
+
const exception = new models_0_1.UserCompanyNotValidException({
|
|
630
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
631
|
+
...contents
|
|
632
|
+
});
|
|
633
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
634
|
+
};
|
|
635
|
+
const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
636
|
+
const contents = (0, smithy_client_1.map)({});
|
|
637
|
+
const data = parsedOutput.body;
|
|
638
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
639
|
+
'message': smithy_client_1.expectString,
|
|
640
|
+
});
|
|
641
|
+
Object.assign(contents, doc);
|
|
642
|
+
const exception = new models_0_1.UserNotFoundException({
|
|
643
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
644
|
+
...contents
|
|
645
|
+
});
|
|
646
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
647
|
+
};
|
|
588
648
|
const se_Document = (input, context) => {
|
|
589
649
|
return input;
|
|
590
650
|
};
|
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,16 @@ 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
|
+
await collectBody(output.body, context);
|
|
305
|
+
return contents;
|
|
306
|
+
};
|
|
281
307
|
export const de_CreateBotCommand = async (output, context) => {
|
|
282
308
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
283
309
|
return de_CommandError(output, context);
|
|
@@ -468,6 +494,12 @@ const de_CommandError = async (output, context) => {
|
|
|
468
494
|
case "ValidationException":
|
|
469
495
|
case "smithy.framework#ValidationException":
|
|
470
496
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
497
|
+
case "UserCompanyNotValidException":
|
|
498
|
+
case "wildix.xbees.users#UserCompanyNotValidException":
|
|
499
|
+
throw await de_UserCompanyNotValidExceptionRes(parsedOutput, context);
|
|
500
|
+
case "UserNotFoundException":
|
|
501
|
+
case "wildix.xbees.users#UserNotFoundException":
|
|
502
|
+
throw await de_UserNotFoundExceptionRes(parsedOutput, context);
|
|
471
503
|
case "BotNotFoundException":
|
|
472
504
|
case "wildix.xbees.users#BotNotFoundException":
|
|
473
505
|
throw await de_BotNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -552,6 +584,32 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
|
|
|
552
584
|
});
|
|
553
585
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
554
586
|
};
|
|
587
|
+
const de_UserCompanyNotValidExceptionRes = async (parsedOutput, context) => {
|
|
588
|
+
const contents = map({});
|
|
589
|
+
const data = parsedOutput.body;
|
|
590
|
+
const doc = take(data, {
|
|
591
|
+
'message': __expectString,
|
|
592
|
+
});
|
|
593
|
+
Object.assign(contents, doc);
|
|
594
|
+
const exception = new UserCompanyNotValidException({
|
|
595
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
596
|
+
...contents
|
|
597
|
+
});
|
|
598
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
599
|
+
};
|
|
600
|
+
const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
601
|
+
const contents = map({});
|
|
602
|
+
const data = parsedOutput.body;
|
|
603
|
+
const doc = take(data, {
|
|
604
|
+
'message': __expectString,
|
|
605
|
+
});
|
|
606
|
+
Object.assign(contents, doc);
|
|
607
|
+
const exception = new UserNotFoundException({
|
|
608
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
609
|
+
...contents
|
|
610
|
+
});
|
|
611
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
612
|
+
};
|
|
555
613
|
const se_Document = (input, context) => {
|
|
556
614
|
return input;
|
|
557
615
|
};
|
package/dist-types/Users.d.ts
CHANGED
|
@@ -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,73 @@
|
|
|
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
|
+
* // {};
|
|
50
|
+
*
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @param ChangeUserEmailCommandInput - {@link ChangeUserEmailCommandInput}
|
|
54
|
+
* @returns {@link ChangeUserEmailCommandOutput}
|
|
55
|
+
* @see {@link ChangeUserEmailCommandInput} for command's `input` shape.
|
|
56
|
+
* @see {@link ChangeUserEmailCommandOutput} for command's `response` shape.
|
|
57
|
+
* @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link UserNotFoundException} (client fault)
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link UserCompanyNotValidException} (client fault)
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link ValidationException} (client fault)
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link UsersServiceException}
|
|
68
|
+
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
export declare class ChangeUserEmailCommand extends ChangeUserEmailCommand_base {
|
|
73
|
+
}
|
|
@@ -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,47 @@ 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
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @public
|
|
259
|
+
*/
|
|
260
|
+
export declare class UserCompanyNotValidException extends __BaseException {
|
|
261
|
+
readonly name: "UserCompanyNotValidException";
|
|
262
|
+
readonly $fault: "client";
|
|
263
|
+
/**
|
|
264
|
+
* @internal
|
|
265
|
+
*/
|
|
266
|
+
constructor(opts: __ExceptionOptionType<UserCompanyNotValidException, __BaseException>);
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* @public
|
|
270
|
+
*/
|
|
271
|
+
export declare class UserNotFoundException extends __BaseException {
|
|
272
|
+
readonly name: "UserNotFoundException";
|
|
273
|
+
readonly $fault: "client";
|
|
274
|
+
/**
|
|
275
|
+
* @internal
|
|
276
|
+
*/
|
|
277
|
+
constructor(opts: __ExceptionOptionType<UserNotFoundException, __BaseException>);
|
|
278
|
+
}
|
|
238
279
|
/**
|
|
239
280
|
* @public
|
|
240
281
|
*/
|
|
@@ -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.
|
|
4
|
+
"version": "1.0.19",
|
|
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",
|