@wildix/wms-api-client 1.0.3 → 1.0.5
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/WmsApi.js +8 -0
- package/dist-cjs/commands/CreatePbxOAuth2ClientCommand.js +41 -0
- package/dist-cjs/commands/DeletePbxOAuth2ClientCommand.js +41 -0
- package/dist-cjs/commands/GetPbxOAuth2ClientsCommand.js +41 -0
- package/dist-cjs/commands/UpdatePbxOAuth2ClientCommand.js +41 -0
- package/dist-cjs/commands/index.js +4 -0
- package/dist-cjs/models/models_0.js +48 -1
- package/dist-cjs/protocols/Aws_restJson1.js +317 -20
- package/dist-es/WmsApi.js +8 -0
- package/dist-es/commands/CreatePbxOAuth2ClientCommand.js +37 -0
- package/dist-es/commands/DeletePbxOAuth2ClientCommand.js +37 -0
- package/dist-es/commands/GetPbxOAuth2ClientsCommand.js +37 -0
- package/dist-es/commands/UpdatePbxOAuth2ClientCommand.js +37 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +44 -0
- package/dist-es/protocols/Aws_restJson1.js +309 -20
- package/dist-types/WmsApi.d.ts +28 -0
- package/dist-types/WmsApiClient.d.ts +6 -2
- package/dist-types/commands/CreatePbxOAuth2ClientCommand.d.ts +91 -0
- package/dist-types/commands/DeletePbxOAuth2ClientCommand.d.ts +76 -0
- package/dist-types/commands/GetPbxAclGroupsPermissionsCommand.d.ts +8 -3
- package/dist-types/commands/GetPbxCallGroupsCommand.d.ts +2 -0
- package/dist-types/commands/GetPbxColleaguesCommand.d.ts +2 -0
- package/dist-types/commands/GetPbxOAuth2ClientsCommand.d.ts +84 -0
- package/dist-types/commands/UpdatePbxOAuth2ClientCommand.d.ts +94 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +165 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -3
- package/dist-types/runtimeConfig.d.ts +3 -3
- package/dist-types/runtimeConfig.native.d.ts +3 -3
- package/dist-types/runtimeConfig.shared.d.ts +2 -2
- package/package.json +1 -1
package/dist-cjs/WmsApi.js
CHANGED
|
@@ -2,14 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WmsApi = void 0;
|
|
4
4
|
const WmsApiClient_1 = require("./WmsApiClient");
|
|
5
|
+
const CreatePbxOAuth2ClientCommand_1 = require("./commands/CreatePbxOAuth2ClientCommand");
|
|
6
|
+
const DeletePbxOAuth2ClientCommand_1 = require("./commands/DeletePbxOAuth2ClientCommand");
|
|
5
7
|
const GetPbxAclGroupsPermissionsCommand_1 = require("./commands/GetPbxAclGroupsPermissionsCommand");
|
|
6
8
|
const GetPbxCallGroupsCommand_1 = require("./commands/GetPbxCallGroupsCommand");
|
|
7
9
|
const GetPbxColleaguesCommand_1 = require("./commands/GetPbxColleaguesCommand");
|
|
10
|
+
const GetPbxOAuth2ClientsCommand_1 = require("./commands/GetPbxOAuth2ClientsCommand");
|
|
11
|
+
const UpdatePbxOAuth2ClientCommand_1 = require("./commands/UpdatePbxOAuth2ClientCommand");
|
|
8
12
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
9
13
|
const commands = {
|
|
14
|
+
CreatePbxOAuth2ClientCommand: CreatePbxOAuth2ClientCommand_1.CreatePbxOAuth2ClientCommand,
|
|
15
|
+
DeletePbxOAuth2ClientCommand: DeletePbxOAuth2ClientCommand_1.DeletePbxOAuth2ClientCommand,
|
|
10
16
|
GetPbxAclGroupsPermissionsCommand: GetPbxAclGroupsPermissionsCommand_1.GetPbxAclGroupsPermissionsCommand,
|
|
11
17
|
GetPbxCallGroupsCommand: GetPbxCallGroupsCommand_1.GetPbxCallGroupsCommand,
|
|
12
18
|
GetPbxColleaguesCommand: GetPbxColleaguesCommand_1.GetPbxColleaguesCommand,
|
|
19
|
+
GetPbxOAuth2ClientsCommand: GetPbxOAuth2ClientsCommand_1.GetPbxOAuth2ClientsCommand,
|
|
20
|
+
UpdatePbxOAuth2ClientCommand: UpdatePbxOAuth2ClientCommand_1.UpdatePbxOAuth2ClientCommand,
|
|
13
21
|
};
|
|
14
22
|
class WmsApi extends WmsApiClient_1.WmsApiClient {
|
|
15
23
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreatePbxOAuth2ClientCommand = 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
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class CreatePbxOAuth2ClientCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "WmsApiClient";
|
|
19
|
+
const commandName = "CreatePbxOAuth2ClientCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WmsApi",
|
|
28
|
+
operation: "CreatePbxOAuth2Client",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_CreatePbxOAuth2ClientCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_CreatePbxOAuth2ClientCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.CreatePbxOAuth2ClientCommand = CreatePbxOAuth2ClientCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeletePbxOAuth2ClientCommand = 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
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class DeletePbxOAuth2ClientCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "WmsApiClient";
|
|
19
|
+
const commandName = "DeletePbxOAuth2ClientCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WmsApi",
|
|
28
|
+
operation: "DeletePbxOAuth2Client",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_DeletePbxOAuth2ClientCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_DeletePbxOAuth2ClientCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.DeletePbxOAuth2ClientCommand = DeletePbxOAuth2ClientCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPbxOAuth2ClientsCommand = 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
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class GetPbxOAuth2ClientsCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "WmsApiClient";
|
|
19
|
+
const commandName = "GetPbxOAuth2ClientsCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WmsApi",
|
|
28
|
+
operation: "GetPbxOAuth2Clients",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_GetPbxOAuth2ClientsCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_GetPbxOAuth2ClientsCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.GetPbxOAuth2ClientsCommand = GetPbxOAuth2ClientsCommand;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePbxOAuth2ClientCommand = 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
|
+
const types_1 = require("@smithy/types");
|
|
9
|
+
class UpdatePbxOAuth2ClientCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
16
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
17
|
+
const { logger } = configuration;
|
|
18
|
+
const clientName = "WmsApiClient";
|
|
19
|
+
const commandName = "UpdatePbxOAuth2ClientCommand";
|
|
20
|
+
const handlerExecutionContext = {
|
|
21
|
+
logger,
|
|
22
|
+
clientName,
|
|
23
|
+
commandName,
|
|
24
|
+
inputFilterSensitiveLog: (_) => _,
|
|
25
|
+
outputFilterSensitiveLog: (_) => _,
|
|
26
|
+
[types_1.SMITHY_CONTEXT_KEY]: {
|
|
27
|
+
service: "WmsApi",
|
|
28
|
+
operation: "UpdatePbxOAuth2Client",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const { requestHandler } = configuration;
|
|
32
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
33
|
+
}
|
|
34
|
+
serialize(input, context) {
|
|
35
|
+
return (0, Aws_restJson1_1.se_UpdatePbxOAuth2ClientCommand)(input, context);
|
|
36
|
+
}
|
|
37
|
+
deserialize(output, context) {
|
|
38
|
+
return (0, Aws_restJson1_1.de_UpdatePbxOAuth2ClientCommand)(output, context);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.UpdatePbxOAuth2ClientCommand = UpdatePbxOAuth2ClientCommand;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./CreatePbxOAuth2ClientCommand"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./DeletePbxOAuth2ClientCommand"), exports);
|
|
4
6
|
tslib_1.__exportStar(require("./GetPbxAclGroupsPermissionsCommand"), exports);
|
|
5
7
|
tslib_1.__exportStar(require("./GetPbxCallGroupsCommand"), exports);
|
|
6
8
|
tslib_1.__exportStar(require("./GetPbxColleaguesCommand"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./GetPbxOAuth2ClientsCommand"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./UpdatePbxOAuth2ClientCommand"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PbxColleagueRole = exports.PbxColleaguesSearchStrategy = exports.PbxColleaguesQueryField = exports.GetPbxColleaguesDir = exports.ResponseType = exports.PbxLicenseType = exports.AclGroupPermissionAbility = void 0;
|
|
3
|
+
exports.PbxColleagueRole = exports.PbxColleaguesSearchStrategy = exports.PbxColleaguesQueryField = exports.GetPbxColleaguesDir = exports.WmsNotFoundException = exports.WmsValidationException = exports.WmsUnauthorizedException = exports.ResponseType = exports.PbxLicenseType = exports.AclGroupPermissionAbility = void 0;
|
|
4
|
+
const WmsApiServiceException_1 = require("./WmsApiServiceException");
|
|
4
5
|
exports.AclGroupPermissionAbility = {
|
|
5
6
|
CAN: "can",
|
|
6
7
|
CANNOT: "cannot",
|
|
@@ -18,6 +19,52 @@ exports.ResponseType = {
|
|
|
18
19
|
ERROR: "error",
|
|
19
20
|
RESULT: "result",
|
|
20
21
|
};
|
|
22
|
+
class WmsUnauthorizedException extends WmsApiServiceException_1.WmsApiServiceException {
|
|
23
|
+
constructor(opts) {
|
|
24
|
+
super({
|
|
25
|
+
name: "WmsUnauthorizedException",
|
|
26
|
+
$fault: "client",
|
|
27
|
+
...opts
|
|
28
|
+
});
|
|
29
|
+
this.name = "WmsUnauthorizedException";
|
|
30
|
+
this.$fault = "client";
|
|
31
|
+
Object.setPrototypeOf(this, WmsUnauthorizedException.prototype);
|
|
32
|
+
this.type = opts.type;
|
|
33
|
+
this.reason = opts.reason;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.WmsUnauthorizedException = WmsUnauthorizedException;
|
|
37
|
+
class WmsValidationException extends WmsApiServiceException_1.WmsApiServiceException {
|
|
38
|
+
constructor(opts) {
|
|
39
|
+
super({
|
|
40
|
+
name: "WmsValidationException",
|
|
41
|
+
$fault: "client",
|
|
42
|
+
...opts
|
|
43
|
+
});
|
|
44
|
+
this.name = "WmsValidationException";
|
|
45
|
+
this.$fault = "client";
|
|
46
|
+
Object.setPrototypeOf(this, WmsValidationException.prototype);
|
|
47
|
+
this.type = opts.type;
|
|
48
|
+
this.reason = opts.reason;
|
|
49
|
+
this.errors = opts.errors;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.WmsValidationException = WmsValidationException;
|
|
53
|
+
class WmsNotFoundException extends WmsApiServiceException_1.WmsApiServiceException {
|
|
54
|
+
constructor(opts) {
|
|
55
|
+
super({
|
|
56
|
+
name: "WmsNotFoundException",
|
|
57
|
+
$fault: "client",
|
|
58
|
+
...opts
|
|
59
|
+
});
|
|
60
|
+
this.name = "WmsNotFoundException";
|
|
61
|
+
this.$fault = "client";
|
|
62
|
+
Object.setPrototypeOf(this, WmsNotFoundException.prototype);
|
|
63
|
+
this.type = opts.type;
|
|
64
|
+
this.reason = opts.reason;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.WmsNotFoundException = WmsNotFoundException;
|
|
21
68
|
exports.GetPbxColleaguesDir = {
|
|
22
69
|
ASC: "asc",
|
|
23
70
|
DESC: "desc",
|
|
@@ -1,17 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_GetPbxColleaguesCommand = exports.de_GetPbxCallGroupsCommand = exports.de_GetPbxAclGroupsPermissionsCommand = exports.se_GetPbxColleaguesCommand = exports.se_GetPbxCallGroupsCommand = exports.se_GetPbxAclGroupsPermissionsCommand = void 0;
|
|
3
|
+
exports.de_UpdatePbxOAuth2ClientCommand = exports.de_GetPbxOAuth2ClientsCommand = exports.de_GetPbxColleaguesCommand = exports.de_GetPbxCallGroupsCommand = exports.de_GetPbxAclGroupsPermissionsCommand = exports.de_DeletePbxOAuth2ClientCommand = exports.de_CreatePbxOAuth2ClientCommand = exports.se_UpdatePbxOAuth2ClientCommand = exports.se_GetPbxOAuth2ClientsCommand = exports.se_GetPbxColleaguesCommand = exports.se_GetPbxCallGroupsCommand = exports.se_GetPbxAclGroupsPermissionsCommand = exports.se_DeletePbxOAuth2ClientCommand = exports.se_CreatePbxOAuth2ClientCommand = void 0;
|
|
4
4
|
const WmsApiServiceException_1 = require("../models/WmsApiServiceException");
|
|
5
|
+
const models_0_1 = require("../models/models_0");
|
|
5
6
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
7
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const
|
|
8
|
+
const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
|
|
8
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
9
10
|
const headers = {
|
|
10
11
|
'content-type': 'application/json',
|
|
11
12
|
};
|
|
13
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2";
|
|
14
|
+
let body;
|
|
15
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
+
'name': [],
|
|
17
|
+
'redirectUri': _ => (0, smithy_client_1._json)(_),
|
|
18
|
+
}));
|
|
19
|
+
return new protocol_http_1.HttpRequest({
|
|
20
|
+
protocol,
|
|
21
|
+
hostname,
|
|
22
|
+
port,
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers,
|
|
25
|
+
path: resolvedPath,
|
|
26
|
+
body,
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
exports.se_CreatePbxOAuth2ClientCommand = se_CreatePbxOAuth2ClientCommand;
|
|
30
|
+
const se_DeletePbxOAuth2ClientCommand = async (input, context) => {
|
|
31
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
32
|
+
const headers = {};
|
|
33
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2/{id}";
|
|
34
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'id', () => input.id, '{id}', false);
|
|
35
|
+
let body;
|
|
36
|
+
return new protocol_http_1.HttpRequest({
|
|
37
|
+
protocol,
|
|
38
|
+
hostname,
|
|
39
|
+
port,
|
|
40
|
+
method: "DELETE",
|
|
41
|
+
headers,
|
|
42
|
+
path: resolvedPath,
|
|
43
|
+
body,
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
exports.se_DeletePbxOAuth2ClientCommand = se_DeletePbxOAuth2ClientCommand;
|
|
47
|
+
const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
|
|
48
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
49
|
+
const headers = {};
|
|
12
50
|
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/aclgroups/permissions";
|
|
51
|
+
const query = (0, smithy_client_1.map)({
|
|
52
|
+
"groups": [, input.groups],
|
|
53
|
+
"permissions": [, input.permissions],
|
|
54
|
+
});
|
|
13
55
|
let body;
|
|
14
|
-
body = "";
|
|
15
56
|
return new protocol_http_1.HttpRequest({
|
|
16
57
|
protocol,
|
|
17
58
|
hostname,
|
|
@@ -19,6 +60,7 @@ const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
|
|
|
19
60
|
method: "GET",
|
|
20
61
|
headers,
|
|
21
62
|
path: resolvedPath,
|
|
63
|
+
query,
|
|
22
64
|
body,
|
|
23
65
|
});
|
|
24
66
|
};
|
|
@@ -83,6 +125,124 @@ const se_GetPbxColleaguesCommand = async (input, context) => {
|
|
|
83
125
|
});
|
|
84
126
|
};
|
|
85
127
|
exports.se_GetPbxColleaguesCommand = se_GetPbxColleaguesCommand;
|
|
128
|
+
const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
|
|
129
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
130
|
+
const headers = {
|
|
131
|
+
'content-type': 'application/json',
|
|
132
|
+
};
|
|
133
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2";
|
|
134
|
+
let body;
|
|
135
|
+
body = "";
|
|
136
|
+
return new protocol_http_1.HttpRequest({
|
|
137
|
+
protocol,
|
|
138
|
+
hostname,
|
|
139
|
+
port,
|
|
140
|
+
method: "GET",
|
|
141
|
+
headers,
|
|
142
|
+
path: resolvedPath,
|
|
143
|
+
body,
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
exports.se_GetPbxOAuth2ClientsCommand = se_GetPbxOAuth2ClientsCommand;
|
|
147
|
+
const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
|
|
148
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
149
|
+
const headers = {
|
|
150
|
+
'content-type': 'application/json',
|
|
151
|
+
};
|
|
152
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2/{id}";
|
|
153
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'id', () => input.id, '{id}', false);
|
|
154
|
+
let body;
|
|
155
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
156
|
+
'name': [],
|
|
157
|
+
'redirectUri': _ => (0, smithy_client_1._json)(_),
|
|
158
|
+
}));
|
|
159
|
+
return new protocol_http_1.HttpRequest({
|
|
160
|
+
protocol,
|
|
161
|
+
hostname,
|
|
162
|
+
port,
|
|
163
|
+
method: "PUT",
|
|
164
|
+
headers,
|
|
165
|
+
path: resolvedPath,
|
|
166
|
+
body,
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
exports.se_UpdatePbxOAuth2ClientCommand = se_UpdatePbxOAuth2ClientCommand;
|
|
170
|
+
const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
|
|
171
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
172
|
+
return de_CreatePbxOAuth2ClientCommandError(output, context);
|
|
173
|
+
}
|
|
174
|
+
const contents = (0, smithy_client_1.map)({
|
|
175
|
+
$metadata: deserializeMetadata(output),
|
|
176
|
+
});
|
|
177
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
178
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
179
|
+
'result': smithy_client_1._json,
|
|
180
|
+
'type': smithy_client_1.expectString,
|
|
181
|
+
});
|
|
182
|
+
Object.assign(contents, doc);
|
|
183
|
+
return contents;
|
|
184
|
+
};
|
|
185
|
+
exports.de_CreatePbxOAuth2ClientCommand = de_CreatePbxOAuth2ClientCommand;
|
|
186
|
+
const de_CreatePbxOAuth2ClientCommandError = async (output, context) => {
|
|
187
|
+
const parsedOutput = {
|
|
188
|
+
...output,
|
|
189
|
+
body: await parseErrorBody(output.body, context)
|
|
190
|
+
};
|
|
191
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
192
|
+
switch (errorCode) {
|
|
193
|
+
case "WmsUnauthorizedException":
|
|
194
|
+
case "wildix.wms.api#WmsUnauthorizedException":
|
|
195
|
+
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
196
|
+
case "WmsValidationException":
|
|
197
|
+
case "wildix.wms.api#WmsValidationException":
|
|
198
|
+
throw await de_WmsValidationExceptionRes(parsedOutput, context);
|
|
199
|
+
default:
|
|
200
|
+
const parsedBody = parsedOutput.body;
|
|
201
|
+
return throwDefaultError({
|
|
202
|
+
output,
|
|
203
|
+
parsedBody,
|
|
204
|
+
errorCode
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
|
|
209
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
210
|
+
return de_DeletePbxOAuth2ClientCommandError(output, context);
|
|
211
|
+
}
|
|
212
|
+
const contents = (0, smithy_client_1.map)({
|
|
213
|
+
$metadata: deserializeMetadata(output),
|
|
214
|
+
});
|
|
215
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
216
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
217
|
+
'result': smithy_client_1.expectString,
|
|
218
|
+
'type': smithy_client_1.expectString,
|
|
219
|
+
});
|
|
220
|
+
Object.assign(contents, doc);
|
|
221
|
+
return contents;
|
|
222
|
+
};
|
|
223
|
+
exports.de_DeletePbxOAuth2ClientCommand = de_DeletePbxOAuth2ClientCommand;
|
|
224
|
+
const de_DeletePbxOAuth2ClientCommandError = async (output, context) => {
|
|
225
|
+
const parsedOutput = {
|
|
226
|
+
...output,
|
|
227
|
+
body: await parseErrorBody(output.body, context)
|
|
228
|
+
};
|
|
229
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
230
|
+
switch (errorCode) {
|
|
231
|
+
case "WmsNotFoundException":
|
|
232
|
+
case "wildix.wms.api#WmsNotFoundException":
|
|
233
|
+
throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
|
|
234
|
+
case "WmsUnauthorizedException":
|
|
235
|
+
case "wildix.wms.api#WmsUnauthorizedException":
|
|
236
|
+
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
237
|
+
default:
|
|
238
|
+
const parsedBody = parsedOutput.body;
|
|
239
|
+
return throwDefaultError({
|
|
240
|
+
output,
|
|
241
|
+
parsedBody,
|
|
242
|
+
errorCode
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
};
|
|
86
246
|
const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
|
|
87
247
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
88
248
|
return de_GetPbxAclGroupsPermissionsCommandError(output, context);
|
|
@@ -105,12 +265,18 @@ const de_GetPbxAclGroupsPermissionsCommandError = async (output, context) => {
|
|
|
105
265
|
body: await parseErrorBody(output.body, context)
|
|
106
266
|
};
|
|
107
267
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
268
|
+
switch (errorCode) {
|
|
269
|
+
case "WmsUnauthorizedException":
|
|
270
|
+
case "wildix.wms.api#WmsUnauthorizedException":
|
|
271
|
+
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
272
|
+
default:
|
|
273
|
+
const parsedBody = parsedOutput.body;
|
|
274
|
+
return throwDefaultError({
|
|
275
|
+
output,
|
|
276
|
+
parsedBody,
|
|
277
|
+
errorCode
|
|
278
|
+
});
|
|
279
|
+
}
|
|
114
280
|
};
|
|
115
281
|
const de_GetPbxCallGroupsCommand = async (output, context) => {
|
|
116
282
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -134,12 +300,18 @@ const de_GetPbxCallGroupsCommandError = async (output, context) => {
|
|
|
134
300
|
body: await parseErrorBody(output.body, context)
|
|
135
301
|
};
|
|
136
302
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
303
|
+
switch (errorCode) {
|
|
304
|
+
case "WmsUnauthorizedException":
|
|
305
|
+
case "wildix.wms.api#WmsUnauthorizedException":
|
|
306
|
+
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
307
|
+
default:
|
|
308
|
+
const parsedBody = parsedOutput.body;
|
|
309
|
+
return throwDefaultError({
|
|
310
|
+
output,
|
|
311
|
+
parsedBody,
|
|
312
|
+
errorCode
|
|
313
|
+
});
|
|
314
|
+
}
|
|
143
315
|
};
|
|
144
316
|
const de_GetPbxColleaguesCommand = async (output, context) => {
|
|
145
317
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -163,14 +335,139 @@ const de_GetPbxColleaguesCommandError = async (output, context) => {
|
|
|
163
335
|
body: await parseErrorBody(output.body, context)
|
|
164
336
|
};
|
|
165
337
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
338
|
+
switch (errorCode) {
|
|
339
|
+
case "WmsUnauthorizedException":
|
|
340
|
+
case "wildix.wms.api#WmsUnauthorizedException":
|
|
341
|
+
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
342
|
+
default:
|
|
343
|
+
const parsedBody = parsedOutput.body;
|
|
344
|
+
return throwDefaultError({
|
|
345
|
+
output,
|
|
346
|
+
parsedBody,
|
|
347
|
+
errorCode
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
|
|
352
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
353
|
+
return de_GetPbxOAuth2ClientsCommandError(output, context);
|
|
354
|
+
}
|
|
355
|
+
const contents = (0, smithy_client_1.map)({
|
|
356
|
+
$metadata: deserializeMetadata(output),
|
|
357
|
+
});
|
|
358
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
359
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
360
|
+
'result': smithy_client_1._json,
|
|
361
|
+
'type': smithy_client_1.expectString,
|
|
362
|
+
});
|
|
363
|
+
Object.assign(contents, doc);
|
|
364
|
+
return contents;
|
|
365
|
+
};
|
|
366
|
+
exports.de_GetPbxOAuth2ClientsCommand = de_GetPbxOAuth2ClientsCommand;
|
|
367
|
+
const de_GetPbxOAuth2ClientsCommandError = async (output, context) => {
|
|
368
|
+
const parsedOutput = {
|
|
369
|
+
...output,
|
|
370
|
+
body: await parseErrorBody(output.body, context)
|
|
371
|
+
};
|
|
372
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
373
|
+
switch (errorCode) {
|
|
374
|
+
case "WmsUnauthorizedException":
|
|
375
|
+
case "wildix.wms.api#WmsUnauthorizedException":
|
|
376
|
+
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
377
|
+
default:
|
|
378
|
+
const parsedBody = parsedOutput.body;
|
|
379
|
+
return throwDefaultError({
|
|
380
|
+
output,
|
|
381
|
+
parsedBody,
|
|
382
|
+
errorCode
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
|
|
387
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
388
|
+
return de_UpdatePbxOAuth2ClientCommandError(output, context);
|
|
389
|
+
}
|
|
390
|
+
const contents = (0, smithy_client_1.map)({
|
|
391
|
+
$metadata: deserializeMetadata(output),
|
|
392
|
+
});
|
|
393
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
394
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
395
|
+
'result': smithy_client_1._json,
|
|
396
|
+
'type': smithy_client_1.expectString,
|
|
171
397
|
});
|
|
398
|
+
Object.assign(contents, doc);
|
|
399
|
+
return contents;
|
|
400
|
+
};
|
|
401
|
+
exports.de_UpdatePbxOAuth2ClientCommand = de_UpdatePbxOAuth2ClientCommand;
|
|
402
|
+
const de_UpdatePbxOAuth2ClientCommandError = async (output, context) => {
|
|
403
|
+
const parsedOutput = {
|
|
404
|
+
...output,
|
|
405
|
+
body: await parseErrorBody(output.body, context)
|
|
406
|
+
};
|
|
407
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
408
|
+
switch (errorCode) {
|
|
409
|
+
case "WmsNotFoundException":
|
|
410
|
+
case "wildix.wms.api#WmsNotFoundException":
|
|
411
|
+
throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
|
|
412
|
+
case "WmsUnauthorizedException":
|
|
413
|
+
case "wildix.wms.api#WmsUnauthorizedException":
|
|
414
|
+
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
415
|
+
case "WmsValidationException":
|
|
416
|
+
case "wildix.wms.api#WmsValidationException":
|
|
417
|
+
throw await de_WmsValidationExceptionRes(parsedOutput, context);
|
|
418
|
+
default:
|
|
419
|
+
const parsedBody = parsedOutput.body;
|
|
420
|
+
return throwDefaultError({
|
|
421
|
+
output,
|
|
422
|
+
parsedBody,
|
|
423
|
+
errorCode
|
|
424
|
+
});
|
|
425
|
+
}
|
|
172
426
|
};
|
|
173
427
|
const throwDefaultError = (0, smithy_client_1.withBaseException)(WmsApiServiceException_1.WmsApiServiceException);
|
|
428
|
+
const de_WmsNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
429
|
+
const contents = (0, smithy_client_1.map)({});
|
|
430
|
+
const data = parsedOutput.body;
|
|
431
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
432
|
+
'reason': smithy_client_1.expectString,
|
|
433
|
+
'type': smithy_client_1.expectString,
|
|
434
|
+
});
|
|
435
|
+
Object.assign(contents, doc);
|
|
436
|
+
const exception = new models_0_1.WmsNotFoundException({
|
|
437
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
438
|
+
...contents
|
|
439
|
+
});
|
|
440
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
441
|
+
};
|
|
442
|
+
const de_WmsUnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
443
|
+
const contents = (0, smithy_client_1.map)({});
|
|
444
|
+
const data = parsedOutput.body;
|
|
445
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
446
|
+
'reason': smithy_client_1.expectString,
|
|
447
|
+
'type': smithy_client_1.expectString,
|
|
448
|
+
});
|
|
449
|
+
Object.assign(contents, doc);
|
|
450
|
+
const exception = new models_0_1.WmsUnauthorizedException({
|
|
451
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
452
|
+
...contents
|
|
453
|
+
});
|
|
454
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
455
|
+
};
|
|
456
|
+
const de_WmsValidationExceptionRes = async (parsedOutput, context) => {
|
|
457
|
+
const contents = (0, smithy_client_1.map)({});
|
|
458
|
+
const data = parsedOutput.body;
|
|
459
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
460
|
+
'errors': smithy_client_1._json,
|
|
461
|
+
'reason': smithy_client_1.expectString,
|
|
462
|
+
'type': smithy_client_1.expectString,
|
|
463
|
+
});
|
|
464
|
+
Object.assign(contents, doc);
|
|
465
|
+
const exception = new models_0_1.WmsValidationException({
|
|
466
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
467
|
+
...contents
|
|
468
|
+
});
|
|
469
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
470
|
+
};
|
|
174
471
|
const deserializeMetadata = (output) => ({
|
|
175
472
|
httpStatusCode: output.statusCode,
|
|
176
473
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/WmsApi.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { WmsApiClient, } from "./WmsApiClient";
|
|
2
|
+
import { CreatePbxOAuth2ClientCommand, } from "./commands/CreatePbxOAuth2ClientCommand";
|
|
3
|
+
import { DeletePbxOAuth2ClientCommand, } from "./commands/DeletePbxOAuth2ClientCommand";
|
|
2
4
|
import { GetPbxAclGroupsPermissionsCommand, } from "./commands/GetPbxAclGroupsPermissionsCommand";
|
|
3
5
|
import { GetPbxCallGroupsCommand, } from "./commands/GetPbxCallGroupsCommand";
|
|
4
6
|
import { GetPbxColleaguesCommand, } from "./commands/GetPbxColleaguesCommand";
|
|
7
|
+
import { GetPbxOAuth2ClientsCommand, } from "./commands/GetPbxOAuth2ClientsCommand";
|
|
8
|
+
import { UpdatePbxOAuth2ClientCommand, } from "./commands/UpdatePbxOAuth2ClientCommand";
|
|
5
9
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
6
10
|
const commands = {
|
|
11
|
+
CreatePbxOAuth2ClientCommand,
|
|
12
|
+
DeletePbxOAuth2ClientCommand,
|
|
7
13
|
GetPbxAclGroupsPermissionsCommand,
|
|
8
14
|
GetPbxCallGroupsCommand,
|
|
9
15
|
GetPbxColleaguesCommand,
|
|
16
|
+
GetPbxOAuth2ClientsCommand,
|
|
17
|
+
UpdatePbxOAuth2ClientCommand,
|
|
10
18
|
};
|
|
11
19
|
export class WmsApi extends WmsApiClient {
|
|
12
20
|
}
|