@wildix/wms-api-client 1.1.5 → 1.1.7
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 +2 -4
- package/dist-cjs/WmsApiClient.js +7 -2
- package/dist-cjs/commands/{CreatePbxColleagueCommand.js → GetPbxesCommand.js} +7 -7
- package/dist-cjs/commands/index.js +1 -2
- package/dist-cjs/models/models_0.js +8 -23
- package/dist-cjs/protocols/Aws_restJson1.js +30 -80
- package/dist-es/WmsApi.js +2 -4
- package/dist-es/WmsApiClient.js +7 -2
- package/dist-es/commands/GetPbxesCommand.js +17 -0
- package/dist-es/commands/index.js +1 -2
- package/dist-es/models/models_0.js +7 -22
- package/dist-es/protocols/Aws_restJson1.js +23 -71
- package/dist-types/WmsApi.d.ts +8 -14
- package/dist-types/WmsApiClient.d.ts +6 -6
- package/dist-types/commands/CreatePbxOAuth2ClientCommand.d.ts +2 -1
- package/dist-types/commands/DeletePbxOAuth2ClientCommand.d.ts +2 -1
- package/dist-types/commands/GetPbxAclGroupsPermissionsCommand.d.ts +2 -1
- package/dist-types/commands/GetPbxCallGroupsCommand.d.ts +2 -1
- package/dist-types/commands/GetPbxColleaguesCommand.d.ts +2 -1
- package/dist-types/commands/GetPbxOAuth2ClientsCommand.d.ts +2 -1
- package/dist-types/commands/GetPbxesCommand.d.ts +75 -0
- package/dist-types/commands/UpdatePbxOAuth2ClientCommand.d.ts +2 -1
- package/dist-types/commands/index.d.ts +1 -2
- package/dist-types/index.d.ts +2 -2
- package/dist-types/models/WmsApiServiceException.d.ts +2 -1
- package/dist-types/models/models_0.d.ts +92 -130
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -18
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/package.json +11 -10
- package/dist-cjs/commands/DeletePbxColleagueCommand.js +0 -21
- package/dist-es/commands/CreatePbxColleagueCommand.js +0 -17
- package/dist-es/commands/DeletePbxColleagueCommand.js +0 -17
- package/dist-types/commands/CreatePbxColleagueCommand.d.ts +0 -99
- package/dist-types/commands/DeletePbxColleagueCommand.d.ts +0 -65
package/dist-cjs/WmsApi.js
CHANGED
|
@@ -2,24 +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 CreatePbxColleagueCommand_1 = require("./commands/CreatePbxColleagueCommand");
|
|
6
5
|
const CreatePbxOAuth2ClientCommand_1 = require("./commands/CreatePbxOAuth2ClientCommand");
|
|
7
|
-
const DeletePbxColleagueCommand_1 = require("./commands/DeletePbxColleagueCommand");
|
|
8
6
|
const DeletePbxOAuth2ClientCommand_1 = require("./commands/DeletePbxOAuth2ClientCommand");
|
|
9
7
|
const GetPbxAclGroupsPermissionsCommand_1 = require("./commands/GetPbxAclGroupsPermissionsCommand");
|
|
10
8
|
const GetPbxCallGroupsCommand_1 = require("./commands/GetPbxCallGroupsCommand");
|
|
11
9
|
const GetPbxColleaguesCommand_1 = require("./commands/GetPbxColleaguesCommand");
|
|
12
10
|
const GetPbxOAuth2ClientsCommand_1 = require("./commands/GetPbxOAuth2ClientsCommand");
|
|
11
|
+
const GetPbxesCommand_1 = require("./commands/GetPbxesCommand");
|
|
13
12
|
const UpdatePbxOAuth2ClientCommand_1 = require("./commands/UpdatePbxOAuth2ClientCommand");
|
|
14
13
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
15
14
|
const commands = {
|
|
16
|
-
CreatePbxColleagueCommand: CreatePbxColleagueCommand_1.CreatePbxColleagueCommand,
|
|
17
15
|
CreatePbxOAuth2ClientCommand: CreatePbxOAuth2ClientCommand_1.CreatePbxOAuth2ClientCommand,
|
|
18
|
-
DeletePbxColleagueCommand: DeletePbxColleagueCommand_1.DeletePbxColleagueCommand,
|
|
19
16
|
DeletePbxOAuth2ClientCommand: DeletePbxOAuth2ClientCommand_1.DeletePbxOAuth2ClientCommand,
|
|
20
17
|
GetPbxAclGroupsPermissionsCommand: GetPbxAclGroupsPermissionsCommand_1.GetPbxAclGroupsPermissionsCommand,
|
|
21
18
|
GetPbxCallGroupsCommand: GetPbxCallGroupsCommand_1.GetPbxCallGroupsCommand,
|
|
22
19
|
GetPbxColleaguesCommand: GetPbxColleaguesCommand_1.GetPbxColleaguesCommand,
|
|
20
|
+
GetPbxesCommand: GetPbxesCommand_1.GetPbxesCommand,
|
|
23
21
|
GetPbxOAuth2ClientsCommand: GetPbxOAuth2ClientsCommand_1.GetPbxOAuth2ClientsCommand,
|
|
24
22
|
UpdatePbxOAuth2ClientCommand: UpdatePbxOAuth2ClientCommand_1.UpdatePbxOAuth2ClientCommand,
|
|
25
23
|
};
|
package/dist-cjs/WmsApiClient.js
CHANGED
|
@@ -4,6 +4,8 @@ exports.WmsApiClient = exports.__Client = void 0;
|
|
|
4
4
|
const runtimeConfig_1 = require("./runtimeConfig");
|
|
5
5
|
const runtimeExtensions_1 = require("./runtimeExtensions");
|
|
6
6
|
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
|
7
|
+
const middleware_content_length_1 = require("@smithy/middleware-content-length");
|
|
8
|
+
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
7
9
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
10
|
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
|
9
11
|
const smithy_utils_1 = require("@wildix/smithy-utils");
|
|
@@ -11,7 +13,8 @@ class WmsApiClient extends smithy_client_1.Client {
|
|
|
11
13
|
constructor(...[configuration]) {
|
|
12
14
|
let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
|
13
15
|
let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
|
|
14
|
-
let _config_2 = (0,
|
|
16
|
+
let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
|
|
17
|
+
let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
|
|
15
18
|
const hostname = configuration.domain.endsWith("wildixin.com") ? configuration.domain : `${configuration.domain}.wildixin.com`;
|
|
16
19
|
const endpoint = () => {
|
|
17
20
|
return {
|
|
@@ -22,13 +25,15 @@ class WmsApiClient extends smithy_client_1.Client {
|
|
|
22
25
|
};
|
|
23
26
|
};
|
|
24
27
|
const config = {
|
|
25
|
-
...
|
|
28
|
+
..._config_3,
|
|
26
29
|
endpoint,
|
|
27
30
|
};
|
|
28
31
|
super(config);
|
|
29
32
|
this.config = config;
|
|
30
33
|
this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
31
34
|
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
|
35
|
+
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
|
36
|
+
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
|
32
37
|
}
|
|
33
38
|
destroy() {
|
|
34
39
|
super.destroy();
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.GetPbxesCommand = exports.$Command = void 0;
|
|
4
4
|
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
5
|
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
7
|
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
-
class
|
|
8
|
+
class GetPbxesCommand extends smithy_client_1.Command.classBuilder()
|
|
9
9
|
.m(function (Command, cs, config, o) {
|
|
10
10
|
return [
|
|
11
11
|
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
12
|
];
|
|
13
13
|
})
|
|
14
|
-
.s("WmsApi", "
|
|
15
|
-
.n("WmsApiClient", "
|
|
14
|
+
.s("WmsApi", "GetPbxes", {})
|
|
15
|
+
.n("WmsApiClient", "GetPbxesCommand")
|
|
16
16
|
.f(void 0, void 0)
|
|
17
|
-
.ser(Aws_restJson1_1.
|
|
18
|
-
.de(Aws_restJson1_1.
|
|
17
|
+
.ser(Aws_restJson1_1.se_GetPbxesCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_GetPbxesCommand)
|
|
19
19
|
.build() {
|
|
20
20
|
}
|
|
21
|
-
exports.
|
|
21
|
+
exports.GetPbxesCommand = GetPbxesCommand;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./CreatePbxColleagueCommand"), exports);
|
|
5
4
|
tslib_1.__exportStar(require("./CreatePbxOAuth2ClientCommand"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./DeletePbxColleagueCommand"), exports);
|
|
7
5
|
tslib_1.__exportStar(require("./DeletePbxOAuth2ClientCommand"), exports);
|
|
8
6
|
tslib_1.__exportStar(require("./GetPbxAclGroupsPermissionsCommand"), exports);
|
|
9
7
|
tslib_1.__exportStar(require("./GetPbxCallGroupsCommand"), exports);
|
|
10
8
|
tslib_1.__exportStar(require("./GetPbxColleaguesCommand"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./GetPbxesCommand"), exports);
|
|
11
10
|
tslib_1.__exportStar(require("./GetPbxOAuth2ClientsCommand"), exports);
|
|
12
11
|
tslib_1.__exportStar(require("./UpdatePbxOAuth2ClientCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PbxColleagueRole = exports.PbxColleaguesSearchStrategy = exports.PbxColleaguesQueryField = exports.GetPbxColleaguesDir = exports.WmsNotFoundException = exports.WmsValidationException = exports.WmsUnauthorizedException = exports.ResponseType = exports.AclGroupPermissionAbility = exports.PbxLicenseType = void 0;
|
|
4
4
|
const WmsApiServiceException_1 = require("./WmsApiServiceException");
|
|
5
5
|
exports.PbxLicenseType = {
|
|
6
6
|
BASIC: "basic",
|
|
@@ -15,13 +15,6 @@ exports.AclGroupPermissionAbility = {
|
|
|
15
15
|
NO: "no",
|
|
16
16
|
YES: "yes",
|
|
17
17
|
};
|
|
18
|
-
exports.PbxColleagueRole = {
|
|
19
|
-
ADMIN: "admin",
|
|
20
|
-
FAX: "fax",
|
|
21
|
-
PARK_ORBIT: "park_orbit",
|
|
22
|
-
ROOM: "room",
|
|
23
|
-
USER: "user",
|
|
24
|
-
};
|
|
25
18
|
exports.ResponseType = {
|
|
26
19
|
ERROR: "error",
|
|
27
20
|
RESULT: "result",
|
|
@@ -57,21 +50,6 @@ class WmsValidationException extends WmsApiServiceException_1.WmsApiServiceExcep
|
|
|
57
50
|
}
|
|
58
51
|
}
|
|
59
52
|
exports.WmsValidationException = WmsValidationException;
|
|
60
|
-
exports.PbxColleaguesDeleteField = {
|
|
61
|
-
APPLICATIONS: "applications",
|
|
62
|
-
CALLS: "calls",
|
|
63
|
-
CALL_GROUP_MEMBER: "callGroupMember",
|
|
64
|
-
CHAT_HISTORY: "chatHistory",
|
|
65
|
-
DEVICES: "devices",
|
|
66
|
-
MISSED_CALL_MANAGER: "missedCallManager",
|
|
67
|
-
PAGING_GROUP_MEMBER: "pagingGroupMember",
|
|
68
|
-
PERSONAL_DATA: "personalData",
|
|
69
|
-
PHONEBOOKS: "phonebooks",
|
|
70
|
-
USER: "user",
|
|
71
|
-
USER_AVATAR: "userAvatar",
|
|
72
|
-
VOICEMAILS: "voicemails",
|
|
73
|
-
VOICEMAIL_GREETINGS: "voicemailGreetings",
|
|
74
|
-
};
|
|
75
53
|
class WmsNotFoundException extends WmsApiServiceException_1.WmsApiServiceException {
|
|
76
54
|
constructor(opts) {
|
|
77
55
|
super({
|
|
@@ -114,3 +92,10 @@ exports.PbxColleaguesSearchStrategy = {
|
|
|
114
92
|
CONTAIN: "contain",
|
|
115
93
|
STARTS_WITH: "startsWith",
|
|
116
94
|
};
|
|
95
|
+
exports.PbxColleagueRole = {
|
|
96
|
+
ADMIN: "admin",
|
|
97
|
+
FAX: "fax",
|
|
98
|
+
PARK_ORBIT: "park_orbit",
|
|
99
|
+
ROOM: "room",
|
|
100
|
+
USER: "user",
|
|
101
|
+
};
|
|
@@ -1,41 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdatePbxOAuth2ClientCommand = exports.de_GetPbxOAuth2ClientsCommand = exports.
|
|
3
|
+
exports.de_UpdatePbxOAuth2ClientCommand = exports.de_GetPbxOAuth2ClientsCommand = exports.de_GetPbxesCommand = exports.de_GetPbxColleaguesCommand = exports.de_GetPbxCallGroupsCommand = exports.de_GetPbxAclGroupsPermissionsCommand = exports.de_DeletePbxOAuth2ClientCommand = exports.de_CreatePbxOAuth2ClientCommand = exports.se_UpdatePbxOAuth2ClientCommand = exports.se_GetPbxOAuth2ClientsCommand = exports.se_GetPbxesCommand = 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
5
|
const models_0_1 = require("../models/models_0");
|
|
6
6
|
const core_1 = require("@smithy/core");
|
|
7
7
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
|
-
const se_CreatePbxColleagueCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
'content-type': 'application/json',
|
|
12
|
-
};
|
|
13
|
-
b.bp("/api/v1/PBX/Colleagues");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
'department': [],
|
|
17
|
-
'dialplan': [],
|
|
18
|
-
'email': [],
|
|
19
|
-
'extension': [],
|
|
20
|
-
'faxDialplan': [],
|
|
21
|
-
'faxNumber': [],
|
|
22
|
-
'groupDn': [],
|
|
23
|
-
'language': [],
|
|
24
|
-
'licenseType': [],
|
|
25
|
-
'login': [],
|
|
26
|
-
'mobilePhone': [],
|
|
27
|
-
'name': [],
|
|
28
|
-
'officePhone': [],
|
|
29
|
-
'password': [],
|
|
30
|
-
'role': [],
|
|
31
|
-
'sipPassword': [],
|
|
32
|
-
}));
|
|
33
|
-
b.m("POST")
|
|
34
|
-
.h(headers)
|
|
35
|
-
.b(body);
|
|
36
|
-
return b.build();
|
|
37
|
-
};
|
|
38
|
-
exports.se_CreatePbxColleagueCommand = se_CreatePbxColleagueCommand;
|
|
39
8
|
const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
|
|
40
9
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
41
10
|
const headers = {
|
|
@@ -53,22 +22,6 @@ const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
|
|
|
53
22
|
return b.build();
|
|
54
23
|
};
|
|
55
24
|
exports.se_CreatePbxOAuth2ClientCommand = se_CreatePbxOAuth2ClientCommand;
|
|
56
|
-
const se_DeletePbxColleagueCommand = async (input, context) => {
|
|
57
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
58
|
-
const headers = {};
|
|
59
|
-
b.bp("/api/v1/PBX/Colleagues/{colleagueId}");
|
|
60
|
-
b.p('colleagueId', () => input.colleagueId.toString(), '{colleagueId}', false);
|
|
61
|
-
const query = (0, smithy_client_1.map)({
|
|
62
|
-
[_d]: [() => input.data !== void 0, () => ((input[_d] || []).map(_entry => _entry))],
|
|
63
|
-
});
|
|
64
|
-
let body;
|
|
65
|
-
b.m("DELETE")
|
|
66
|
-
.h(headers)
|
|
67
|
-
.q(query)
|
|
68
|
-
.b(body);
|
|
69
|
-
return b.build();
|
|
70
|
-
};
|
|
71
|
-
exports.se_DeletePbxColleagueCommand = se_DeletePbxColleagueCommand;
|
|
72
25
|
const se_DeletePbxOAuth2ClientCommand = async (input, context) => {
|
|
73
26
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
74
27
|
const headers = {};
|
|
@@ -123,7 +76,7 @@ const se_GetPbxColleaguesCommand = async (input, context) => {
|
|
|
123
76
|
[_fil]: [() => input.name !== void 0, () => ((input[_n] || []).map(_entry => _entry))],
|
|
124
77
|
[_filt]: [() => input.email !== void 0, () => ((input[_em] || []).map(_entry => _entry))],
|
|
125
78
|
[_filte]: [() => input.role !== void 0, () => ((input[_r] || []).map(_entry => _entry))],
|
|
126
|
-
[_filter]: [() => input.dialplan !== void 0, () => ((input[
|
|
79
|
+
[_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []).map(_entry => _entry))],
|
|
127
80
|
[_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []).map(_entry => _entry))],
|
|
128
81
|
[_filterd]: [() => input.department !== void 0, () => ((input[_de] || []).map(_entry => _entry))],
|
|
129
82
|
[_filterl]: [() => input.login !== void 0, () => ((input[_l] || []).map(_entry => _entry))],
|
|
@@ -136,7 +89,7 @@ const se_GetPbxColleaguesCommand = async (input, context) => {
|
|
|
136
89
|
[_so]: [() => input.sort !== void 0, () => ((input[_so] || []).map(_entry => _entry))],
|
|
137
90
|
[_st]: [() => input.start !== void 0, () => (input[_st].toString())],
|
|
138
91
|
[_c]: [() => input.count !== void 0, () => (input[_c].toString())],
|
|
139
|
-
[
|
|
92
|
+
[_di]: [, input[_di]],
|
|
140
93
|
[_sS]: [, input[_sS]],
|
|
141
94
|
});
|
|
142
95
|
let body;
|
|
@@ -147,6 +100,20 @@ const se_GetPbxColleaguesCommand = async (input, context) => {
|
|
|
147
100
|
return b.build();
|
|
148
101
|
};
|
|
149
102
|
exports.se_GetPbxColleaguesCommand = se_GetPbxColleaguesCommand;
|
|
103
|
+
const se_GetPbxesCommand = async (input, context) => {
|
|
104
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
105
|
+
const headers = {
|
|
106
|
+
'content-type': 'application/json',
|
|
107
|
+
};
|
|
108
|
+
b.bp("/api/v1/network/pbxes");
|
|
109
|
+
let body;
|
|
110
|
+
body = "";
|
|
111
|
+
b.m("GET")
|
|
112
|
+
.h(headers)
|
|
113
|
+
.b(body);
|
|
114
|
+
return b.build();
|
|
115
|
+
};
|
|
116
|
+
exports.se_GetPbxesCommand = se_GetPbxesCommand;
|
|
150
117
|
const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
|
|
151
118
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
152
119
|
const headers = {
|
|
@@ -179,22 +146,6 @@ const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
|
|
|
179
146
|
return b.build();
|
|
180
147
|
};
|
|
181
148
|
exports.se_UpdatePbxOAuth2ClientCommand = se_UpdatePbxOAuth2ClientCommand;
|
|
182
|
-
const de_CreatePbxColleagueCommand = async (output, context) => {
|
|
183
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
184
|
-
return de_CommandError(output, context);
|
|
185
|
-
}
|
|
186
|
-
const contents = (0, smithy_client_1.map)({
|
|
187
|
-
$metadata: deserializeMetadata(output),
|
|
188
|
-
});
|
|
189
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
190
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
191
|
-
'result': smithy_client_1._json,
|
|
192
|
-
'type': smithy_client_1.expectString,
|
|
193
|
-
});
|
|
194
|
-
Object.assign(contents, doc);
|
|
195
|
-
return contents;
|
|
196
|
-
};
|
|
197
|
-
exports.de_CreatePbxColleagueCommand = de_CreatePbxColleagueCommand;
|
|
198
149
|
const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
|
|
199
150
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
200
151
|
return de_CommandError(output, context);
|
|
@@ -211,7 +162,7 @@ const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
211
162
|
return contents;
|
|
212
163
|
};
|
|
213
164
|
exports.de_CreatePbxOAuth2ClientCommand = de_CreatePbxOAuth2ClientCommand;
|
|
214
|
-
const
|
|
165
|
+
const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
|
|
215
166
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
216
167
|
return de_CommandError(output, context);
|
|
217
168
|
}
|
|
@@ -226,8 +177,8 @@ const de_DeletePbxColleagueCommand = async (output, context) => {
|
|
|
226
177
|
Object.assign(contents, doc);
|
|
227
178
|
return contents;
|
|
228
179
|
};
|
|
229
|
-
exports.
|
|
230
|
-
const
|
|
180
|
+
exports.de_DeletePbxOAuth2ClientCommand = de_DeletePbxOAuth2ClientCommand;
|
|
181
|
+
const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
|
|
231
182
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
232
183
|
return de_CommandError(output, context);
|
|
233
184
|
}
|
|
@@ -236,14 +187,14 @@ const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
236
187
|
});
|
|
237
188
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
238
189
|
const doc = (0, smithy_client_1.take)(data, {
|
|
239
|
-
'result': smithy_client_1.
|
|
190
|
+
'result': smithy_client_1._json,
|
|
240
191
|
'type': smithy_client_1.expectString,
|
|
241
192
|
});
|
|
242
193
|
Object.assign(contents, doc);
|
|
243
194
|
return contents;
|
|
244
195
|
};
|
|
245
|
-
exports.
|
|
246
|
-
const
|
|
196
|
+
exports.de_GetPbxAclGroupsPermissionsCommand = de_GetPbxAclGroupsPermissionsCommand;
|
|
197
|
+
const de_GetPbxCallGroupsCommand = async (output, context) => {
|
|
247
198
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
248
199
|
return de_CommandError(output, context);
|
|
249
200
|
}
|
|
@@ -258,8 +209,8 @@ const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
|
|
|
258
209
|
Object.assign(contents, doc);
|
|
259
210
|
return contents;
|
|
260
211
|
};
|
|
261
|
-
exports.
|
|
262
|
-
const
|
|
212
|
+
exports.de_GetPbxCallGroupsCommand = de_GetPbxCallGroupsCommand;
|
|
213
|
+
const de_GetPbxColleaguesCommand = async (output, context) => {
|
|
263
214
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
264
215
|
return de_CommandError(output, context);
|
|
265
216
|
}
|
|
@@ -274,8 +225,8 @@ const de_GetPbxCallGroupsCommand = async (output, context) => {
|
|
|
274
225
|
Object.assign(contents, doc);
|
|
275
226
|
return contents;
|
|
276
227
|
};
|
|
277
|
-
exports.
|
|
278
|
-
const
|
|
228
|
+
exports.de_GetPbxColleaguesCommand = de_GetPbxColleaguesCommand;
|
|
229
|
+
const de_GetPbxesCommand = async (output, context) => {
|
|
279
230
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
280
231
|
return de_CommandError(output, context);
|
|
281
232
|
}
|
|
@@ -290,7 +241,7 @@ const de_GetPbxColleaguesCommand = async (output, context) => {
|
|
|
290
241
|
Object.assign(contents, doc);
|
|
291
242
|
return contents;
|
|
292
243
|
};
|
|
293
|
-
exports.
|
|
244
|
+
exports.de_GetPbxesCommand = de_GetPbxesCommand;
|
|
294
245
|
const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
|
|
295
246
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
296
247
|
return de_CommandError(output, context);
|
|
@@ -406,10 +357,9 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
406
357
|
value.length != 0) &&
|
|
407
358
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
408
359
|
const _c = "count";
|
|
409
|
-
const _d = "
|
|
360
|
+
const _d = "dialplan";
|
|
410
361
|
const _de = "department";
|
|
411
|
-
const _di = "
|
|
412
|
-
const _dir = "dir";
|
|
362
|
+
const _di = "dir";
|
|
413
363
|
const _e = "extension";
|
|
414
364
|
const _em = "email";
|
|
415
365
|
const _f = "filter[extension][]";
|
package/dist-es/WmsApi.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { WmsApiClient, } from "./WmsApiClient";
|
|
2
|
-
import { CreatePbxColleagueCommand, } from "./commands/CreatePbxColleagueCommand";
|
|
3
2
|
import { CreatePbxOAuth2ClientCommand, } from "./commands/CreatePbxOAuth2ClientCommand";
|
|
4
|
-
import { DeletePbxColleagueCommand, } from "./commands/DeletePbxColleagueCommand";
|
|
5
3
|
import { DeletePbxOAuth2ClientCommand, } from "./commands/DeletePbxOAuth2ClientCommand";
|
|
6
4
|
import { GetPbxAclGroupsPermissionsCommand, } from "./commands/GetPbxAclGroupsPermissionsCommand";
|
|
7
5
|
import { GetPbxCallGroupsCommand, } from "./commands/GetPbxCallGroupsCommand";
|
|
8
6
|
import { GetPbxColleaguesCommand, } from "./commands/GetPbxColleaguesCommand";
|
|
9
7
|
import { GetPbxOAuth2ClientsCommand, } from "./commands/GetPbxOAuth2ClientsCommand";
|
|
8
|
+
import { GetPbxesCommand, } from "./commands/GetPbxesCommand";
|
|
10
9
|
import { UpdatePbxOAuth2ClientCommand, } from "./commands/UpdatePbxOAuth2ClientCommand";
|
|
11
10
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
12
11
|
const commands = {
|
|
13
|
-
CreatePbxColleagueCommand,
|
|
14
12
|
CreatePbxOAuth2ClientCommand,
|
|
15
|
-
DeletePbxColleagueCommand,
|
|
16
13
|
DeletePbxOAuth2ClientCommand,
|
|
17
14
|
GetPbxAclGroupsPermissionsCommand,
|
|
18
15
|
GetPbxCallGroupsCommand,
|
|
19
16
|
GetPbxColleaguesCommand,
|
|
17
|
+
GetPbxesCommand,
|
|
20
18
|
GetPbxOAuth2ClientsCommand,
|
|
21
19
|
UpdatePbxOAuth2ClientCommand,
|
|
22
20
|
};
|
package/dist-es/WmsApiClient.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
2
2
|
import { resolveRuntimeExtensions, } from "./runtimeExtensions";
|
|
3
3
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
4
|
+
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
5
|
+
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
|
|
4
6
|
import { Client as __Client, } from "@smithy/smithy-client";
|
|
5
7
|
import { authorizationMiddleware } from '@wildix/smithy-utils';
|
|
6
8
|
export { __Client };
|
|
@@ -8,7 +10,8 @@ export class WmsApiClient extends __Client {
|
|
|
8
10
|
constructor(...[configuration]) {
|
|
9
11
|
let _config_0 = __getRuntimeConfig(configuration || {});
|
|
10
12
|
let _config_1 = resolveUserAgentConfig(_config_0);
|
|
11
|
-
let _config_2 =
|
|
13
|
+
let _config_2 = resolveRetryConfig(_config_1);
|
|
14
|
+
let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
|
|
12
15
|
const hostname = configuration.domain.endsWith("wildixin.com") ? configuration.domain : `${configuration.domain}.wildixin.com`;
|
|
13
16
|
const endpoint = () => {
|
|
14
17
|
return {
|
|
@@ -19,13 +22,15 @@ export class WmsApiClient extends __Client {
|
|
|
19
22
|
};
|
|
20
23
|
};
|
|
21
24
|
const config = {
|
|
22
|
-
...
|
|
25
|
+
..._config_3,
|
|
23
26
|
endpoint,
|
|
24
27
|
};
|
|
25
28
|
super(config);
|
|
26
29
|
this.config = config;
|
|
27
30
|
this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
28
31
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
29
34
|
}
|
|
30
35
|
destroy() {
|
|
31
36
|
super.destroy();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetPbxesCommand, se_GetPbxesCommand, } 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 GetPbxesCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("WmsApi", "GetPbxes", {})
|
|
12
|
+
.n("WmsApiClient", "GetPbxesCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetPbxesCommand)
|
|
15
|
+
.de(de_GetPbxesCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export * from "./CreatePbxColleagueCommand";
|
|
2
1
|
export * from "./CreatePbxOAuth2ClientCommand";
|
|
3
|
-
export * from "./DeletePbxColleagueCommand";
|
|
4
2
|
export * from "./DeletePbxOAuth2ClientCommand";
|
|
5
3
|
export * from "./GetPbxAclGroupsPermissionsCommand";
|
|
6
4
|
export * from "./GetPbxCallGroupsCommand";
|
|
7
5
|
export * from "./GetPbxColleaguesCommand";
|
|
6
|
+
export * from "./GetPbxesCommand";
|
|
8
7
|
export * from "./GetPbxOAuth2ClientsCommand";
|
|
9
8
|
export * from "./UpdatePbxOAuth2ClientCommand";
|
|
@@ -12,13 +12,6 @@ export const AclGroupPermissionAbility = {
|
|
|
12
12
|
NO: "no",
|
|
13
13
|
YES: "yes",
|
|
14
14
|
};
|
|
15
|
-
export const PbxColleagueRole = {
|
|
16
|
-
ADMIN: "admin",
|
|
17
|
-
FAX: "fax",
|
|
18
|
-
PARK_ORBIT: "park_orbit",
|
|
19
|
-
ROOM: "room",
|
|
20
|
-
USER: "user",
|
|
21
|
-
};
|
|
22
15
|
export const ResponseType = {
|
|
23
16
|
ERROR: "error",
|
|
24
17
|
RESULT: "result",
|
|
@@ -52,21 +45,6 @@ export class WmsValidationException extends __BaseException {
|
|
|
52
45
|
this.errors = opts.errors;
|
|
53
46
|
}
|
|
54
47
|
}
|
|
55
|
-
export const PbxColleaguesDeleteField = {
|
|
56
|
-
APPLICATIONS: "applications",
|
|
57
|
-
CALLS: "calls",
|
|
58
|
-
CALL_GROUP_MEMBER: "callGroupMember",
|
|
59
|
-
CHAT_HISTORY: "chatHistory",
|
|
60
|
-
DEVICES: "devices",
|
|
61
|
-
MISSED_CALL_MANAGER: "missedCallManager",
|
|
62
|
-
PAGING_GROUP_MEMBER: "pagingGroupMember",
|
|
63
|
-
PERSONAL_DATA: "personalData",
|
|
64
|
-
PHONEBOOKS: "phonebooks",
|
|
65
|
-
USER: "user",
|
|
66
|
-
USER_AVATAR: "userAvatar",
|
|
67
|
-
VOICEMAILS: "voicemails",
|
|
68
|
-
VOICEMAIL_GREETINGS: "voicemailGreetings",
|
|
69
|
-
};
|
|
70
48
|
export class WmsNotFoundException extends __BaseException {
|
|
71
49
|
constructor(opts) {
|
|
72
50
|
super({
|
|
@@ -108,3 +86,10 @@ export const PbxColleaguesSearchStrategy = {
|
|
|
108
86
|
CONTAIN: "contain",
|
|
109
87
|
STARTS_WITH: "startsWith",
|
|
110
88
|
};
|
|
89
|
+
export const PbxColleagueRole = {
|
|
90
|
+
ADMIN: "admin",
|
|
91
|
+
FAX: "fax",
|
|
92
|
+
PARK_ORBIT: "park_orbit",
|
|
93
|
+
ROOM: "room",
|
|
94
|
+
USER: "user",
|
|
95
|
+
};
|