@wildix/wms-api-client 1.1.2 → 1.1.4
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 +4 -0
- package/dist-cjs/WmsApiClient.js +6 -3
- package/dist-cjs/commands/CreatePbxColleagueCommand.js +21 -0
- package/dist-cjs/commands/CreatePbxOAuth2ClientCommand.js +12 -32
- package/dist-cjs/commands/DeletePbxColleagueCommand.js +21 -0
- package/dist-cjs/commands/DeletePbxOAuth2ClientCommand.js +12 -32
- package/dist-cjs/commands/GetPbxAclGroupsPermissionsCommand.js +12 -32
- package/dist-cjs/commands/GetPbxCallGroupsCommand.js +12 -32
- package/dist-cjs/commands/GetPbxColleaguesCommand.js +12 -32
- package/dist-cjs/commands/GetPbxOAuth2ClientsCommand.js +12 -32
- package/dist-cjs/commands/UpdatePbxOAuth2ClientCommand.js +12 -32
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +29 -14
- package/dist-cjs/protocols/Aws_restJson1.js +220 -236
- package/dist-cjs/runtimeConfig.browser.js +5 -1
- package/dist-cjs/runtimeConfig.js +5 -1
- package/dist-cjs/runtimeConfig.shared.js +13 -11
- package/dist-es/WmsApi.js +4 -0
- package/dist-es/WmsApiClient.js +6 -3
- package/dist-es/commands/CreatePbxColleagueCommand.js +17 -0
- package/dist-es/commands/CreatePbxOAuth2ClientCommand.js +12 -32
- package/dist-es/commands/DeletePbxColleagueCommand.js +17 -0
- package/dist-es/commands/DeletePbxOAuth2ClientCommand.js +12 -32
- package/dist-es/commands/GetPbxAclGroupsPermissionsCommand.js +12 -32
- package/dist-es/commands/GetPbxCallGroupsCommand.js +12 -32
- package/dist-es/commands/GetPbxColleaguesCommand.js +12 -32
- package/dist-es/commands/GetPbxOAuth2ClientsCommand.js +12 -32
- package/dist-es/commands/UpdatePbxOAuth2ClientCommand.js +12 -32
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +28 -13
- package/dist-es/protocols/Aws_restJson1.js +214 -234
- package/dist-es/runtimeConfig.browser.js +4 -1
- package/dist-es/runtimeConfig.js +4 -1
- package/dist-es/runtimeConfig.shared.js +13 -11
- package/dist-types/WmsApi.d.ts +18 -0
- package/dist-types/WmsApiClient.d.ts +17 -9
- package/dist-types/commands/CreatePbxColleagueCommand.d.ts +96 -0
- package/dist-types/commands/CreatePbxOAuth2ClientCommand.d.ts +8 -20
- package/dist-types/commands/DeletePbxColleagueCommand.d.ts +65 -0
- package/dist-types/commands/DeletePbxOAuth2ClientCommand.d.ts +8 -20
- package/dist-types/commands/GetPbxAclGroupsPermissionsCommand.d.ts +7 -19
- package/dist-types/commands/GetPbxCallGroupsCommand.d.ts +8 -20
- package/dist-types/commands/GetPbxColleaguesCommand.d.ts +7 -19
- package/dist-types/commands/GetPbxOAuth2ClientsCommand.d.ts +8 -20
- package/dist-types/commands/UpdatePbxOAuth2ClientCommand.d.ts +8 -20
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +154 -70
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -4
- package/dist-types/runtimeConfig.d.ts +3 -4
- package/dist-types/runtimeConfig.native.d.ts +3 -4
- package/package.json +31 -30
|
@@ -1,175 +1,222 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
3
|
+
exports.de_UpdatePbxOAuth2ClientCommand = exports.de_GetPbxOAuth2ClientsCommand = exports.de_GetPbxColleaguesCommand = exports.de_GetPbxCallGroupsCommand = exports.de_GetPbxAclGroupsPermissionsCommand = exports.de_DeletePbxOAuth2ClientCommand = exports.de_DeletePbxColleagueCommand = exports.de_CreatePbxOAuth2ClientCommand = exports.de_CreatePbxColleagueCommand = exports.se_UpdatePbxOAuth2ClientCommand = exports.se_GetPbxOAuth2ClientsCommand = exports.se_GetPbxColleaguesCommand = exports.se_GetPbxCallGroupsCommand = exports.se_GetPbxAclGroupsPermissionsCommand = exports.se_DeletePbxOAuth2ClientCommand = exports.se_DeletePbxColleagueCommand = exports.se_CreatePbxOAuth2ClientCommand = exports.se_CreatePbxColleagueCommand = void 0;
|
|
4
4
|
const WmsApiServiceException_1 = require("../models/WmsApiServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
|
-
const
|
|
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;
|
|
8
39
|
const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
|
|
9
|
-
const
|
|
40
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
41
|
const headers = {
|
|
11
42
|
'content-type': 'application/json',
|
|
12
43
|
};
|
|
13
|
-
|
|
44
|
+
b.bp("/api/v1/pbx/applications/oauth2");
|
|
14
45
|
let body;
|
|
15
46
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
47
|
'name': [],
|
|
17
48
|
'redirectUri': _ => (0, smithy_client_1._json)(_),
|
|
18
49
|
}));
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
method: "POST",
|
|
24
|
-
headers,
|
|
25
|
-
path: resolvedPath,
|
|
26
|
-
body,
|
|
27
|
-
});
|
|
50
|
+
b.m("POST")
|
|
51
|
+
.h(headers)
|
|
52
|
+
.b(body);
|
|
53
|
+
return b.build();
|
|
28
54
|
};
|
|
29
55
|
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;
|
|
30
72
|
const se_DeletePbxOAuth2ClientCommand = async (input, context) => {
|
|
31
|
-
const
|
|
73
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
32
74
|
const headers = {};
|
|
33
|
-
|
|
34
|
-
|
|
75
|
+
b.bp("/api/v1/pbx/applications/oauth2/{id}");
|
|
76
|
+
b.p('id', () => input.id, '{id}', false);
|
|
35
77
|
let body;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
method: "DELETE",
|
|
41
|
-
headers,
|
|
42
|
-
path: resolvedPath,
|
|
43
|
-
body,
|
|
44
|
-
});
|
|
78
|
+
b.m("DELETE")
|
|
79
|
+
.h(headers)
|
|
80
|
+
.b(body);
|
|
81
|
+
return b.build();
|
|
45
82
|
};
|
|
46
83
|
exports.se_DeletePbxOAuth2ClientCommand = se_DeletePbxOAuth2ClientCommand;
|
|
47
84
|
const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
|
|
48
|
-
const
|
|
85
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
49
86
|
const headers = {};
|
|
50
|
-
|
|
87
|
+
b.bp("/api/v1/pbx/aclgroups/permissions");
|
|
51
88
|
const query = (0, smithy_client_1.map)({
|
|
52
|
-
|
|
53
|
-
|
|
89
|
+
[_gr]: [() => input.groups !== void 0, () => ((input[_g] || []).map(_entry => _entry))],
|
|
90
|
+
[_pe]: [() => input.permissions !== void 0, () => ((input[_p] || []).map(_entry => _entry))],
|
|
54
91
|
});
|
|
55
92
|
let body;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
headers,
|
|
62
|
-
path: resolvedPath,
|
|
63
|
-
query,
|
|
64
|
-
body,
|
|
65
|
-
});
|
|
93
|
+
b.m("GET")
|
|
94
|
+
.h(headers)
|
|
95
|
+
.q(query)
|
|
96
|
+
.b(body);
|
|
97
|
+
return b.build();
|
|
66
98
|
};
|
|
67
99
|
exports.se_GetPbxAclGroupsPermissionsCommand = se_GetPbxAclGroupsPermissionsCommand;
|
|
68
100
|
const se_GetPbxCallGroupsCommand = async (input, context) => {
|
|
69
|
-
const
|
|
101
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
70
102
|
const headers = {
|
|
71
103
|
'content-type': 'application/json',
|
|
72
104
|
};
|
|
73
|
-
|
|
105
|
+
b.bp("/api/v1/Dialplan/CallGroups");
|
|
74
106
|
let body;
|
|
75
107
|
body = "";
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
method: "GET",
|
|
81
|
-
headers,
|
|
82
|
-
path: resolvedPath,
|
|
83
|
-
body,
|
|
84
|
-
});
|
|
108
|
+
b.m("GET")
|
|
109
|
+
.h(headers)
|
|
110
|
+
.b(body);
|
|
111
|
+
return b.build();
|
|
85
112
|
};
|
|
86
113
|
exports.se_GetPbxCallGroupsCommand = se_GetPbxCallGroupsCommand;
|
|
87
114
|
const se_GetPbxColleaguesCommand = async (input, context) => {
|
|
88
|
-
const
|
|
115
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
89
116
|
const headers = {};
|
|
90
|
-
|
|
117
|
+
b.bp("/api/v1/PBX/Colleagues");
|
|
91
118
|
const query = (0, smithy_client_1.map)({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
[_f]: [() => input.extension !== void 0, () => ((input[_e] || []).map(_entry => _entry))],
|
|
120
|
+
[_fi]: [() => input.id !== void 0, () => ((input[_i] || []).map(_entry => _entry))],
|
|
121
|
+
[_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []).map(_entry => _entry))],
|
|
122
|
+
[_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []).map(_entry => _entry))],
|
|
123
|
+
[_fil]: [() => input.name !== void 0, () => ((input[_n] || []).map(_entry => _entry))],
|
|
124
|
+
[_filt]: [() => input.email !== void 0, () => ((input[_em] || []).map(_entry => _entry))],
|
|
125
|
+
[_filte]: [() => input.role !== void 0, () => ((input[_r] || []).map(_entry => _entry))],
|
|
126
|
+
[_filter]: [() => input.dialplan !== void 0, () => ((input[_di] || []).map(_entry => _entry))],
|
|
127
|
+
[_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []).map(_entry => _entry))],
|
|
128
|
+
[_filterd]: [() => input.department !== void 0, () => ((input[_de] || []).map(_entry => _entry))],
|
|
129
|
+
[_filterl]: [() => input.login !== void 0, () => ((input[_l] || []).map(_entry => _entry))],
|
|
130
|
+
[_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []).map(_entry => _entry))],
|
|
131
|
+
[_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []).map(_entry => _entry))],
|
|
132
|
+
[_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []).map(_entry => _entry))],
|
|
133
|
+
[_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []).join(','))],
|
|
134
|
+
[_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []).join(','))],
|
|
135
|
+
[_s]: [, input[_s]],
|
|
136
|
+
[_so]: [() => input.sort !== void 0, () => ((input[_so] || []).map(_entry => _entry))],
|
|
137
|
+
[_st]: [() => input.start !== void 0, () => (input[_st].toString())],
|
|
138
|
+
[_c]: [() => input.count !== void 0, () => (input[_c].toString())],
|
|
139
|
+
[_dir]: [, input[_dir]],
|
|
140
|
+
[_sS]: [, input[_sS]],
|
|
114
141
|
});
|
|
115
142
|
let body;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
headers,
|
|
122
|
-
path: resolvedPath,
|
|
123
|
-
query,
|
|
124
|
-
body,
|
|
125
|
-
});
|
|
143
|
+
b.m("GET")
|
|
144
|
+
.h(headers)
|
|
145
|
+
.q(query)
|
|
146
|
+
.b(body);
|
|
147
|
+
return b.build();
|
|
126
148
|
};
|
|
127
149
|
exports.se_GetPbxColleaguesCommand = se_GetPbxColleaguesCommand;
|
|
128
150
|
const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
|
|
129
|
-
const
|
|
151
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
130
152
|
const headers = {
|
|
131
153
|
'content-type': 'application/json',
|
|
132
154
|
};
|
|
133
|
-
|
|
155
|
+
b.bp("/api/v1/pbx/applications/oauth2");
|
|
134
156
|
let body;
|
|
135
157
|
body = "";
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
method: "GET",
|
|
141
|
-
headers,
|
|
142
|
-
path: resolvedPath,
|
|
143
|
-
body,
|
|
144
|
-
});
|
|
158
|
+
b.m("GET")
|
|
159
|
+
.h(headers)
|
|
160
|
+
.b(body);
|
|
161
|
+
return b.build();
|
|
145
162
|
};
|
|
146
163
|
exports.se_GetPbxOAuth2ClientsCommand = se_GetPbxOAuth2ClientsCommand;
|
|
147
164
|
const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
|
|
148
|
-
const
|
|
165
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
149
166
|
const headers = {
|
|
150
167
|
'content-type': 'application/json',
|
|
151
168
|
};
|
|
152
|
-
|
|
153
|
-
|
|
169
|
+
b.bp("/api/v1/pbx/applications/oauth2/{id}");
|
|
170
|
+
b.p('id', () => input.id, '{id}', false);
|
|
154
171
|
let body;
|
|
155
172
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
156
173
|
'name': [],
|
|
157
174
|
'redirectUri': _ => (0, smithy_client_1._json)(_),
|
|
158
175
|
}));
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
method: "PUT",
|
|
164
|
-
headers,
|
|
165
|
-
path: resolvedPath,
|
|
166
|
-
body,
|
|
167
|
-
});
|
|
176
|
+
b.m("PUT")
|
|
177
|
+
.h(headers)
|
|
178
|
+
.b(body);
|
|
179
|
+
return b.build();
|
|
168
180
|
};
|
|
169
181
|
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
|
+
'department': smithy_client_1.expectString,
|
|
192
|
+
'dialplan': smithy_client_1.expectString,
|
|
193
|
+
'email': smithy_client_1.expectString,
|
|
194
|
+
'extension': smithy_client_1.expectString,
|
|
195
|
+
'faxDialplan': smithy_client_1.expectString,
|
|
196
|
+
'faxNumber': smithy_client_1.expectString,
|
|
197
|
+
'groupDn': smithy_client_1.expectString,
|
|
198
|
+
'groupName': smithy_client_1.expectString,
|
|
199
|
+
'id': smithy_client_1.expectString,
|
|
200
|
+
'jid': smithy_client_1.expectString,
|
|
201
|
+
'language': smithy_client_1.expectString,
|
|
202
|
+
'licenseType': smithy_client_1.expectString,
|
|
203
|
+
'login': smithy_client_1.expectString,
|
|
204
|
+
'mobilePhone': smithy_client_1.expectString,
|
|
205
|
+
'name': smithy_client_1.expectString,
|
|
206
|
+
'officePhone': smithy_client_1.expectString,
|
|
207
|
+
'pbx': smithy_client_1.expectString,
|
|
208
|
+
'pbxDn': smithy_client_1.expectString,
|
|
209
|
+
'picture': smithy_client_1.expectString,
|
|
210
|
+
'role': smithy_client_1.expectString,
|
|
211
|
+
'sourceId': smithy_client_1.expectString,
|
|
212
|
+
});
|
|
213
|
+
Object.assign(contents, doc);
|
|
214
|
+
return contents;
|
|
215
|
+
};
|
|
216
|
+
exports.de_CreatePbxColleagueCommand = de_CreatePbxColleagueCommand;
|
|
170
217
|
const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
|
|
171
218
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
172
|
-
return
|
|
219
|
+
return de_CommandError(output, context);
|
|
173
220
|
}
|
|
174
221
|
const contents = (0, smithy_client_1.map)({
|
|
175
222
|
$metadata: deserializeMetadata(output),
|
|
@@ -183,31 +230,25 @@ const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
183
230
|
return contents;
|
|
184
231
|
};
|
|
185
232
|
exports.de_CreatePbxOAuth2ClientCommand = de_CreatePbxOAuth2ClientCommand;
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
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
|
-
});
|
|
233
|
+
const de_DeletePbxColleagueCommand = async (output, context) => {
|
|
234
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
235
|
+
return de_CommandError(output, context);
|
|
206
236
|
}
|
|
237
|
+
const contents = (0, smithy_client_1.map)({
|
|
238
|
+
$metadata: deserializeMetadata(output),
|
|
239
|
+
});
|
|
240
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
241
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
242
|
+
'result': smithy_client_1.expectString,
|
|
243
|
+
'type': smithy_client_1.expectString,
|
|
244
|
+
});
|
|
245
|
+
Object.assign(contents, doc);
|
|
246
|
+
return contents;
|
|
207
247
|
};
|
|
248
|
+
exports.de_DeletePbxColleagueCommand = de_DeletePbxColleagueCommand;
|
|
208
249
|
const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
|
|
209
250
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
210
|
-
return
|
|
251
|
+
return de_CommandError(output, context);
|
|
211
252
|
}
|
|
212
253
|
const contents = (0, smithy_client_1.map)({
|
|
213
254
|
$metadata: deserializeMetadata(output),
|
|
@@ -221,31 +262,9 @@ const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
221
262
|
return contents;
|
|
222
263
|
};
|
|
223
264
|
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
|
-
};
|
|
246
265
|
const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
|
|
247
266
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
248
|
-
return
|
|
267
|
+
return de_CommandError(output, context);
|
|
249
268
|
}
|
|
250
269
|
const contents = (0, smithy_client_1.map)({
|
|
251
270
|
$metadata: deserializeMetadata(output),
|
|
@@ -259,28 +278,9 @@ const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
|
|
|
259
278
|
return contents;
|
|
260
279
|
};
|
|
261
280
|
exports.de_GetPbxAclGroupsPermissionsCommand = de_GetPbxAclGroupsPermissionsCommand;
|
|
262
|
-
const de_GetPbxAclGroupsPermissionsCommandError = async (output, context) => {
|
|
263
|
-
const parsedOutput = {
|
|
264
|
-
...output,
|
|
265
|
-
body: await parseErrorBody(output.body, context)
|
|
266
|
-
};
|
|
267
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
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
|
-
}
|
|
280
|
-
};
|
|
281
281
|
const de_GetPbxCallGroupsCommand = async (output, context) => {
|
|
282
282
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
283
|
-
return
|
|
283
|
+
return de_CommandError(output, context);
|
|
284
284
|
}
|
|
285
285
|
const contents = (0, smithy_client_1.map)({
|
|
286
286
|
$metadata: deserializeMetadata(output),
|
|
@@ -294,28 +294,9 @@ const de_GetPbxCallGroupsCommand = async (output, context) => {
|
|
|
294
294
|
return contents;
|
|
295
295
|
};
|
|
296
296
|
exports.de_GetPbxCallGroupsCommand = de_GetPbxCallGroupsCommand;
|
|
297
|
-
const de_GetPbxCallGroupsCommandError = async (output, context) => {
|
|
298
|
-
const parsedOutput = {
|
|
299
|
-
...output,
|
|
300
|
-
body: await parseErrorBody(output.body, context)
|
|
301
|
-
};
|
|
302
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
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
|
-
}
|
|
315
|
-
};
|
|
316
297
|
const de_GetPbxColleaguesCommand = async (output, context) => {
|
|
317
298
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
318
|
-
return
|
|
299
|
+
return de_CommandError(output, context);
|
|
319
300
|
}
|
|
320
301
|
const contents = (0, smithy_client_1.map)({
|
|
321
302
|
$metadata: deserializeMetadata(output),
|
|
@@ -329,28 +310,9 @@ const de_GetPbxColleaguesCommand = async (output, context) => {
|
|
|
329
310
|
return contents;
|
|
330
311
|
};
|
|
331
312
|
exports.de_GetPbxColleaguesCommand = de_GetPbxColleaguesCommand;
|
|
332
|
-
const de_GetPbxColleaguesCommandError = async (output, context) => {
|
|
333
|
-
const parsedOutput = {
|
|
334
|
-
...output,
|
|
335
|
-
body: await parseErrorBody(output.body, context)
|
|
336
|
-
};
|
|
337
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
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
313
|
const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
|
|
352
314
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
353
|
-
return
|
|
315
|
+
return de_CommandError(output, context);
|
|
354
316
|
}
|
|
355
317
|
const contents = (0, smithy_client_1.map)({
|
|
356
318
|
$metadata: deserializeMetadata(output),
|
|
@@ -364,28 +326,9 @@ const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
|
|
|
364
326
|
return contents;
|
|
365
327
|
};
|
|
366
328
|
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
329
|
const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
|
|
387
330
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
388
|
-
return
|
|
331
|
+
return de_CommandError(output, context);
|
|
389
332
|
}
|
|
390
333
|
const contents = (0, smithy_client_1.map)({
|
|
391
334
|
$metadata: deserializeMetadata(output),
|
|
@@ -399,22 +342,22 @@ const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
399
342
|
return contents;
|
|
400
343
|
};
|
|
401
344
|
exports.de_UpdatePbxOAuth2ClientCommand = de_UpdatePbxOAuth2ClientCommand;
|
|
402
|
-
const
|
|
345
|
+
const de_CommandError = async (output, context) => {
|
|
403
346
|
const parsedOutput = {
|
|
404
347
|
...output,
|
|
405
348
|
body: await parseErrorBody(output.body, context)
|
|
406
349
|
};
|
|
407
350
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
408
351
|
switch (errorCode) {
|
|
409
|
-
case "WmsNotFoundException":
|
|
410
|
-
case "wildix.wms.api#WmsNotFoundException":
|
|
411
|
-
throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
|
|
412
352
|
case "WmsUnauthorizedException":
|
|
413
353
|
case "wildix.wms.api#WmsUnauthorizedException":
|
|
414
354
|
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
415
355
|
case "WmsValidationException":
|
|
416
356
|
case "wildix.wms.api#WmsValidationException":
|
|
417
357
|
throw await de_WmsValidationExceptionRes(parsedOutput, context);
|
|
358
|
+
case "WmsNotFoundException":
|
|
359
|
+
case "wildix.wms.api#WmsNotFoundException":
|
|
360
|
+
throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
|
|
418
361
|
default:
|
|
419
362
|
const parsedBody = parsedOutput.body;
|
|
420
363
|
return throwDefaultError({
|
|
@@ -481,6 +424,47 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
481
424
|
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
482
425
|
value.length != 0) &&
|
|
483
426
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
427
|
+
const _c = "count";
|
|
428
|
+
const _d = "data";
|
|
429
|
+
const _de = "department";
|
|
430
|
+
const _di = "dialplan";
|
|
431
|
+
const _dir = "dir";
|
|
432
|
+
const _e = "extension";
|
|
433
|
+
const _em = "email";
|
|
434
|
+
const _f = "filter[extension][]";
|
|
435
|
+
const _fD = "faxDialplan";
|
|
436
|
+
const _fDi = "filter[faxDialplan][]";
|
|
437
|
+
const _fDil = "filter[groupDn][]";
|
|
438
|
+
const _fDilt = "filter[pbxDn][]";
|
|
439
|
+
const _fP = "filter[officePhone][]";
|
|
440
|
+
const _fPi = "filter[mobilePhone][]";
|
|
441
|
+
const _fT = "filter[licenseType][]";
|
|
442
|
+
const _fi = "filter[id][]";
|
|
443
|
+
const _fie = "fields";
|
|
444
|
+
const _fil = "filter[name][]";
|
|
445
|
+
const _filt = "filter[email][]";
|
|
446
|
+
const _filte = "filter[role][]";
|
|
447
|
+
const _filter = "filter[dialplan][]";
|
|
448
|
+
const _filterd = "filter[department][]";
|
|
449
|
+
const _filterl = "filter[login][]";
|
|
450
|
+
const _g = "groups";
|
|
451
|
+
const _gD = "groupDn";
|
|
452
|
+
const _gr = "groups[]";
|
|
453
|
+
const _i = "id";
|
|
454
|
+
const _l = "login";
|
|
455
|
+
const _lT = "licenseType";
|
|
456
|
+
const _mP = "mobilePhone";
|
|
457
|
+
const _n = "name";
|
|
458
|
+
const _oP = "officePhone";
|
|
459
|
+
const _p = "permissions";
|
|
460
|
+
const _pD = "pbxDn";
|
|
461
|
+
const _pe = "permissions[]";
|
|
462
|
+
const _r = "role";
|
|
463
|
+
const _s = "search";
|
|
464
|
+
const _sF = "searchFields";
|
|
465
|
+
const _sS = "searchStrategy";
|
|
466
|
+
const _so = "sort";
|
|
467
|
+
const _st = "start";
|
|
484
468
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
485
469
|
if (encoded.length) {
|
|
486
470
|
return JSON.parse(encoded);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
4
6
|
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
+
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
5
8
|
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
6
9
|
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
7
10
|
const util_retry_1 = require("@smithy/util-retry");
|
|
@@ -18,8 +21,9 @@ const getRuntimeConfig = (config) => {
|
|
|
18
21
|
runtime: "browser",
|
|
19
22
|
defaultsMode,
|
|
20
23
|
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
|
|
21
25
|
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
22
|
-
requestHandler: config?.requestHandler ??
|
|
26
|
+
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
23
27
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
24
28
|
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
25
29
|
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
4
7
|
const hash_node_1 = require("@smithy/hash-node");
|
|
5
8
|
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
6
9
|
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
@@ -22,8 +25,9 @@ const getRuntimeConfig = (config) => {
|
|
|
22
25
|
runtime: "node",
|
|
23
26
|
defaultsMode,
|
|
24
27
|
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
28
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
|
|
25
29
|
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
26
|
-
requestHandler: config?.requestHandler ??
|
|
30
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
31
|
retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }),
|
|
28
32
|
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
29
33
|
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|