@wildix/wms-api-client 1.1.2 → 1.1.3
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/WmsApiClient.js +6 -3
- package/dist-cjs/commands/CreatePbxOAuth2ClientCommand.js +12 -32
- 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/protocols/Aws_restJson1.js +122 -237
- 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/WmsApiClient.js +6 -3
- package/dist-es/commands/CreatePbxOAuth2ClientCommand.js +12 -32
- 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/protocols/Aws_restJson1.js +123 -238
- 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 +4 -0
- package/dist-types/WmsApiClient.d.ts +13 -7
- package/dist-types/commands/CreatePbxOAuth2ClientCommand.d.ts +8 -20
- 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/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +27 -27
- 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 +29 -27
|
@@ -1,165 +1,130 @@
|
|
|
1
1
|
import { WmsApiServiceException as __BaseException } from "../models/WmsApiServiceException";
|
|
2
2
|
import { WmsNotFoundException, WmsUnauthorizedException, WmsValidationException, } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString,
|
|
3
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
|
|
6
|
-
const
|
|
6
|
+
const b = rb(input, context);
|
|
7
7
|
const headers = {
|
|
8
8
|
'content-type': 'application/json',
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
b.bp("/api/v1/pbx/applications/oauth2");
|
|
11
11
|
let body;
|
|
12
12
|
body = JSON.stringify(take(input, {
|
|
13
13
|
'name': [],
|
|
14
14
|
'redirectUri': _ => _json(_),
|
|
15
15
|
}));
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
method: "POST",
|
|
21
|
-
headers,
|
|
22
|
-
path: resolvedPath,
|
|
23
|
-
body,
|
|
24
|
-
});
|
|
16
|
+
b.m("POST")
|
|
17
|
+
.h(headers)
|
|
18
|
+
.b(body);
|
|
19
|
+
return b.build();
|
|
25
20
|
};
|
|
26
21
|
export const se_DeletePbxOAuth2ClientCommand = async (input, context) => {
|
|
27
|
-
const
|
|
22
|
+
const b = rb(input, context);
|
|
28
23
|
const headers = {};
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
b.bp("/api/v1/pbx/applications/oauth2/{id}");
|
|
25
|
+
b.p('id', () => input.id, '{id}', false);
|
|
31
26
|
let body;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
method: "DELETE",
|
|
37
|
-
headers,
|
|
38
|
-
path: resolvedPath,
|
|
39
|
-
body,
|
|
40
|
-
});
|
|
27
|
+
b.m("DELETE")
|
|
28
|
+
.h(headers)
|
|
29
|
+
.b(body);
|
|
30
|
+
return b.build();
|
|
41
31
|
};
|
|
42
32
|
export const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
|
|
43
|
-
const
|
|
33
|
+
const b = rb(input, context);
|
|
44
34
|
const headers = {};
|
|
45
|
-
|
|
35
|
+
b.bp("/api/v1/pbx/aclgroups/permissions");
|
|
46
36
|
const query = map({
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
[_gr]: [() => input.groups !== void 0, () => ((input[_g] || []).map(_entry => _entry))],
|
|
38
|
+
[_pe]: [() => input.permissions !== void 0, () => ((input[_p] || []).map(_entry => _entry))],
|
|
49
39
|
});
|
|
50
40
|
let body;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
headers,
|
|
57
|
-
path: resolvedPath,
|
|
58
|
-
query,
|
|
59
|
-
body,
|
|
60
|
-
});
|
|
41
|
+
b.m("GET")
|
|
42
|
+
.h(headers)
|
|
43
|
+
.q(query)
|
|
44
|
+
.b(body);
|
|
45
|
+
return b.build();
|
|
61
46
|
};
|
|
62
47
|
export const se_GetPbxCallGroupsCommand = async (input, context) => {
|
|
63
|
-
const
|
|
48
|
+
const b = rb(input, context);
|
|
64
49
|
const headers = {
|
|
65
50
|
'content-type': 'application/json',
|
|
66
51
|
};
|
|
67
|
-
|
|
52
|
+
b.bp("/api/v1/Dialplan/CallGroups");
|
|
68
53
|
let body;
|
|
69
54
|
body = "";
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
method: "GET",
|
|
75
|
-
headers,
|
|
76
|
-
path: resolvedPath,
|
|
77
|
-
body,
|
|
78
|
-
});
|
|
55
|
+
b.m("GET")
|
|
56
|
+
.h(headers)
|
|
57
|
+
.b(body);
|
|
58
|
+
return b.build();
|
|
79
59
|
};
|
|
80
60
|
export const se_GetPbxColleaguesCommand = async (input, context) => {
|
|
81
|
-
const
|
|
61
|
+
const b = rb(input, context);
|
|
82
62
|
const headers = {};
|
|
83
|
-
|
|
63
|
+
b.bp("/api/v1/PBX/Colleagues");
|
|
84
64
|
const query = map({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
65
|
+
[_f]: [() => input.extension !== void 0, () => ((input[_e] || []).map(_entry => _entry))],
|
|
66
|
+
[_fi]: [() => input.id !== void 0, () => ((input[_i] || []).map(_entry => _entry))],
|
|
67
|
+
[_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []).map(_entry => _entry))],
|
|
68
|
+
[_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []).map(_entry => _entry))],
|
|
69
|
+
[_fil]: [() => input.name !== void 0, () => ((input[_n] || []).map(_entry => _entry))],
|
|
70
|
+
[_filt]: [() => input.email !== void 0, () => ((input[_em] || []).map(_entry => _entry))],
|
|
71
|
+
[_filte]: [() => input.role !== void 0, () => ((input[_r] || []).map(_entry => _entry))],
|
|
72
|
+
[_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []).map(_entry => _entry))],
|
|
73
|
+
[_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []).map(_entry => _entry))],
|
|
74
|
+
[_filterd]: [() => input.department !== void 0, () => ((input[_de] || []).map(_entry => _entry))],
|
|
75
|
+
[_filterl]: [() => input.login !== void 0, () => ((input[_l] || []).map(_entry => _entry))],
|
|
76
|
+
[_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []).map(_entry => _entry))],
|
|
77
|
+
[_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []).map(_entry => _entry))],
|
|
78
|
+
[_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []).map(_entry => _entry))],
|
|
79
|
+
[_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []).join(','))],
|
|
80
|
+
[_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []).join(','))],
|
|
81
|
+
[_s]: [, input[_s]],
|
|
82
|
+
[_so]: [() => input.sort !== void 0, () => ((input[_so] || []).map(_entry => _entry))],
|
|
83
|
+
[_st]: [() => input.start !== void 0, () => (input[_st].toString())],
|
|
84
|
+
[_c]: [() => input.count !== void 0, () => (input[_c].toString())],
|
|
85
|
+
[_di]: [, input[_di]],
|
|
86
|
+
[_sS]: [, input[_sS]],
|
|
107
87
|
});
|
|
108
88
|
let body;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
headers,
|
|
115
|
-
path: resolvedPath,
|
|
116
|
-
query,
|
|
117
|
-
body,
|
|
118
|
-
});
|
|
89
|
+
b.m("GET")
|
|
90
|
+
.h(headers)
|
|
91
|
+
.q(query)
|
|
92
|
+
.b(body);
|
|
93
|
+
return b.build();
|
|
119
94
|
};
|
|
120
95
|
export const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
|
|
121
|
-
const
|
|
96
|
+
const b = rb(input, context);
|
|
122
97
|
const headers = {
|
|
123
98
|
'content-type': 'application/json',
|
|
124
99
|
};
|
|
125
|
-
|
|
100
|
+
b.bp("/api/v1/pbx/applications/oauth2");
|
|
126
101
|
let body;
|
|
127
102
|
body = "";
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
method: "GET",
|
|
133
|
-
headers,
|
|
134
|
-
path: resolvedPath,
|
|
135
|
-
body,
|
|
136
|
-
});
|
|
103
|
+
b.m("GET")
|
|
104
|
+
.h(headers)
|
|
105
|
+
.b(body);
|
|
106
|
+
return b.build();
|
|
137
107
|
};
|
|
138
108
|
export const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
|
|
139
|
-
const
|
|
109
|
+
const b = rb(input, context);
|
|
140
110
|
const headers = {
|
|
141
111
|
'content-type': 'application/json',
|
|
142
112
|
};
|
|
143
|
-
|
|
144
|
-
|
|
113
|
+
b.bp("/api/v1/pbx/applications/oauth2/{id}");
|
|
114
|
+
b.p('id', () => input.id, '{id}', false);
|
|
145
115
|
let body;
|
|
146
116
|
body = JSON.stringify(take(input, {
|
|
147
117
|
'name': [],
|
|
148
118
|
'redirectUri': _ => _json(_),
|
|
149
119
|
}));
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
method: "PUT",
|
|
155
|
-
headers,
|
|
156
|
-
path: resolvedPath,
|
|
157
|
-
body,
|
|
158
|
-
});
|
|
120
|
+
b.m("PUT")
|
|
121
|
+
.h(headers)
|
|
122
|
+
.b(body);
|
|
123
|
+
return b.build();
|
|
159
124
|
};
|
|
160
125
|
export const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
|
|
161
126
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
162
|
-
return
|
|
127
|
+
return de_CommandError(output, context);
|
|
163
128
|
}
|
|
164
129
|
const contents = map({
|
|
165
130
|
$metadata: deserializeMetadata(output),
|
|
@@ -172,31 +137,9 @@ export const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
172
137
|
Object.assign(contents, doc);
|
|
173
138
|
return contents;
|
|
174
139
|
};
|
|
175
|
-
const de_CreatePbxOAuth2ClientCommandError = async (output, context) => {
|
|
176
|
-
const parsedOutput = {
|
|
177
|
-
...output,
|
|
178
|
-
body: await parseErrorBody(output.body, context)
|
|
179
|
-
};
|
|
180
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
181
|
-
switch (errorCode) {
|
|
182
|
-
case "WmsUnauthorizedException":
|
|
183
|
-
case "wildix.wms.api#WmsUnauthorizedException":
|
|
184
|
-
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
185
|
-
case "WmsValidationException":
|
|
186
|
-
case "wildix.wms.api#WmsValidationException":
|
|
187
|
-
throw await de_WmsValidationExceptionRes(parsedOutput, context);
|
|
188
|
-
default:
|
|
189
|
-
const parsedBody = parsedOutput.body;
|
|
190
|
-
return throwDefaultError({
|
|
191
|
-
output,
|
|
192
|
-
parsedBody,
|
|
193
|
-
errorCode
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
140
|
export const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
|
|
198
141
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
199
|
-
return
|
|
142
|
+
return de_CommandError(output, context);
|
|
200
143
|
}
|
|
201
144
|
const contents = map({
|
|
202
145
|
$metadata: deserializeMetadata(output),
|
|
@@ -209,31 +152,9 @@ export const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
209
152
|
Object.assign(contents, doc);
|
|
210
153
|
return contents;
|
|
211
154
|
};
|
|
212
|
-
const de_DeletePbxOAuth2ClientCommandError = async (output, context) => {
|
|
213
|
-
const parsedOutput = {
|
|
214
|
-
...output,
|
|
215
|
-
body: await parseErrorBody(output.body, context)
|
|
216
|
-
};
|
|
217
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
218
|
-
switch (errorCode) {
|
|
219
|
-
case "WmsNotFoundException":
|
|
220
|
-
case "wildix.wms.api#WmsNotFoundException":
|
|
221
|
-
throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
|
|
222
|
-
case "WmsUnauthorizedException":
|
|
223
|
-
case "wildix.wms.api#WmsUnauthorizedException":
|
|
224
|
-
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
225
|
-
default:
|
|
226
|
-
const parsedBody = parsedOutput.body;
|
|
227
|
-
return throwDefaultError({
|
|
228
|
-
output,
|
|
229
|
-
parsedBody,
|
|
230
|
-
errorCode
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
155
|
export const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
|
|
235
156
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
236
|
-
return
|
|
157
|
+
return de_CommandError(output, context);
|
|
237
158
|
}
|
|
238
159
|
const contents = map({
|
|
239
160
|
$metadata: deserializeMetadata(output),
|
|
@@ -246,28 +167,9 @@ export const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
|
|
|
246
167
|
Object.assign(contents, doc);
|
|
247
168
|
return contents;
|
|
248
169
|
};
|
|
249
|
-
const de_GetPbxAclGroupsPermissionsCommandError = async (output, context) => {
|
|
250
|
-
const parsedOutput = {
|
|
251
|
-
...output,
|
|
252
|
-
body: await parseErrorBody(output.body, context)
|
|
253
|
-
};
|
|
254
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
255
|
-
switch (errorCode) {
|
|
256
|
-
case "WmsUnauthorizedException":
|
|
257
|
-
case "wildix.wms.api#WmsUnauthorizedException":
|
|
258
|
-
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
259
|
-
default:
|
|
260
|
-
const parsedBody = parsedOutput.body;
|
|
261
|
-
return throwDefaultError({
|
|
262
|
-
output,
|
|
263
|
-
parsedBody,
|
|
264
|
-
errorCode
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
170
|
export const de_GetPbxCallGroupsCommand = async (output, context) => {
|
|
269
171
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
270
|
-
return
|
|
172
|
+
return de_CommandError(output, context);
|
|
271
173
|
}
|
|
272
174
|
const contents = map({
|
|
273
175
|
$metadata: deserializeMetadata(output),
|
|
@@ -280,28 +182,9 @@ export const de_GetPbxCallGroupsCommand = async (output, context) => {
|
|
|
280
182
|
Object.assign(contents, doc);
|
|
281
183
|
return contents;
|
|
282
184
|
};
|
|
283
|
-
const de_GetPbxCallGroupsCommandError = async (output, context) => {
|
|
284
|
-
const parsedOutput = {
|
|
285
|
-
...output,
|
|
286
|
-
body: await parseErrorBody(output.body, context)
|
|
287
|
-
};
|
|
288
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
289
|
-
switch (errorCode) {
|
|
290
|
-
case "WmsUnauthorizedException":
|
|
291
|
-
case "wildix.wms.api#WmsUnauthorizedException":
|
|
292
|
-
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
293
|
-
default:
|
|
294
|
-
const parsedBody = parsedOutput.body;
|
|
295
|
-
return throwDefaultError({
|
|
296
|
-
output,
|
|
297
|
-
parsedBody,
|
|
298
|
-
errorCode
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
185
|
export const de_GetPbxColleaguesCommand = async (output, context) => {
|
|
303
186
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
304
|
-
return
|
|
187
|
+
return de_CommandError(output, context);
|
|
305
188
|
}
|
|
306
189
|
const contents = map({
|
|
307
190
|
$metadata: deserializeMetadata(output),
|
|
@@ -314,28 +197,9 @@ export const de_GetPbxColleaguesCommand = async (output, context) => {
|
|
|
314
197
|
Object.assign(contents, doc);
|
|
315
198
|
return contents;
|
|
316
199
|
};
|
|
317
|
-
const de_GetPbxColleaguesCommandError = async (output, context) => {
|
|
318
|
-
const parsedOutput = {
|
|
319
|
-
...output,
|
|
320
|
-
body: await parseErrorBody(output.body, context)
|
|
321
|
-
};
|
|
322
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
323
|
-
switch (errorCode) {
|
|
324
|
-
case "WmsUnauthorizedException":
|
|
325
|
-
case "wildix.wms.api#WmsUnauthorizedException":
|
|
326
|
-
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
327
|
-
default:
|
|
328
|
-
const parsedBody = parsedOutput.body;
|
|
329
|
-
return throwDefaultError({
|
|
330
|
-
output,
|
|
331
|
-
parsedBody,
|
|
332
|
-
errorCode
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
200
|
export const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
|
|
337
201
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
338
|
-
return
|
|
202
|
+
return de_CommandError(output, context);
|
|
339
203
|
}
|
|
340
204
|
const contents = map({
|
|
341
205
|
$metadata: deserializeMetadata(output),
|
|
@@ -348,28 +212,9 @@ export const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
|
|
|
348
212
|
Object.assign(contents, doc);
|
|
349
213
|
return contents;
|
|
350
214
|
};
|
|
351
|
-
const de_GetPbxOAuth2ClientsCommandError = async (output, context) => {
|
|
352
|
-
const parsedOutput = {
|
|
353
|
-
...output,
|
|
354
|
-
body: await parseErrorBody(output.body, context)
|
|
355
|
-
};
|
|
356
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
357
|
-
switch (errorCode) {
|
|
358
|
-
case "WmsUnauthorizedException":
|
|
359
|
-
case "wildix.wms.api#WmsUnauthorizedException":
|
|
360
|
-
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
361
|
-
default:
|
|
362
|
-
const parsedBody = parsedOutput.body;
|
|
363
|
-
return throwDefaultError({
|
|
364
|
-
output,
|
|
365
|
-
parsedBody,
|
|
366
|
-
errorCode
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
};
|
|
370
215
|
export const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
|
|
371
216
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
372
|
-
return
|
|
217
|
+
return de_CommandError(output, context);
|
|
373
218
|
}
|
|
374
219
|
const contents = map({
|
|
375
220
|
$metadata: deserializeMetadata(output),
|
|
@@ -382,22 +227,22 @@ export const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
382
227
|
Object.assign(contents, doc);
|
|
383
228
|
return contents;
|
|
384
229
|
};
|
|
385
|
-
const
|
|
230
|
+
const de_CommandError = async (output, context) => {
|
|
386
231
|
const parsedOutput = {
|
|
387
232
|
...output,
|
|
388
233
|
body: await parseErrorBody(output.body, context)
|
|
389
234
|
};
|
|
390
235
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
391
236
|
switch (errorCode) {
|
|
392
|
-
case "WmsNotFoundException":
|
|
393
|
-
case "wildix.wms.api#WmsNotFoundException":
|
|
394
|
-
throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
|
|
395
237
|
case "WmsUnauthorizedException":
|
|
396
238
|
case "wildix.wms.api#WmsUnauthorizedException":
|
|
397
239
|
throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
|
|
398
240
|
case "WmsValidationException":
|
|
399
241
|
case "wildix.wms.api#WmsValidationException":
|
|
400
242
|
throw await de_WmsValidationExceptionRes(parsedOutput, context);
|
|
243
|
+
case "WmsNotFoundException":
|
|
244
|
+
case "wildix.wms.api#WmsNotFoundException":
|
|
245
|
+
throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
|
|
401
246
|
default:
|
|
402
247
|
const parsedBody = parsedOutput.body;
|
|
403
248
|
return throwDefaultError({
|
|
@@ -464,6 +309,46 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
464
309
|
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
465
310
|
value.length != 0) &&
|
|
466
311
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
312
|
+
const _c = "count";
|
|
313
|
+
const _d = "dialplan";
|
|
314
|
+
const _de = "department";
|
|
315
|
+
const _di = "dir";
|
|
316
|
+
const _e = "extension";
|
|
317
|
+
const _em = "email";
|
|
318
|
+
const _f = "filter[extension][]";
|
|
319
|
+
const _fD = "faxDialplan";
|
|
320
|
+
const _fDi = "filter[faxDialplan][]";
|
|
321
|
+
const _fDil = "filter[groupDn][]";
|
|
322
|
+
const _fDilt = "filter[pbxDn][]";
|
|
323
|
+
const _fP = "filter[officePhone][]";
|
|
324
|
+
const _fPi = "filter[mobilePhone][]";
|
|
325
|
+
const _fT = "filter[licenseType][]";
|
|
326
|
+
const _fi = "filter[id][]";
|
|
327
|
+
const _fie = "fields";
|
|
328
|
+
const _fil = "filter[name][]";
|
|
329
|
+
const _filt = "filter[email][]";
|
|
330
|
+
const _filte = "filter[role][]";
|
|
331
|
+
const _filter = "filter[dialplan][]";
|
|
332
|
+
const _filterd = "filter[department][]";
|
|
333
|
+
const _filterl = "filter[login][]";
|
|
334
|
+
const _g = "groups";
|
|
335
|
+
const _gD = "groupDn";
|
|
336
|
+
const _gr = "groups[]";
|
|
337
|
+
const _i = "id";
|
|
338
|
+
const _l = "login";
|
|
339
|
+
const _lT = "licenseType";
|
|
340
|
+
const _mP = "mobilePhone";
|
|
341
|
+
const _n = "name";
|
|
342
|
+
const _oP = "officePhone";
|
|
343
|
+
const _p = "permissions";
|
|
344
|
+
const _pD = "pbxDn";
|
|
345
|
+
const _pe = "permissions[]";
|
|
346
|
+
const _r = "role";
|
|
347
|
+
const _s = "search";
|
|
348
|
+
const _sF = "searchFields";
|
|
349
|
+
const _sS = "searchStrategy";
|
|
350
|
+
const _so = "sort";
|
|
351
|
+
const _st = "start";
|
|
467
352
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
468
353
|
if (encoded.length) {
|
|
469
354
|
return JSON.parse(encoded);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
1
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
2
4
|
import { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
|
|
3
5
|
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
4
6
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
|
|
@@ -15,8 +17,9 @@ export const getRuntimeConfig = (config) => {
|
|
|
15
17
|
runtime: "browser",
|
|
16
18
|
defaultsMode,
|
|
17
19
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
|
|
18
21
|
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
19
|
-
requestHandler: config?.requestHandler ??
|
|
22
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
20
23
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
21
24
|
sha256: config?.sha256 ?? Sha256,
|
|
22
25
|
streamCollector: config?.streamCollector ?? streamCollector,
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
1
3
|
import { Hash } from "@smithy/hash-node";
|
|
2
4
|
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
|
|
3
5
|
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
@@ -19,8 +21,9 @@ export const getRuntimeConfig = (config) => {
|
|
|
19
21
|
runtime: "node",
|
|
20
22
|
defaultsMode,
|
|
21
23
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
|
|
22
25
|
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
23
|
-
requestHandler: config?.requestHandler ??
|
|
26
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
24
27
|
retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }),
|
|
25
28
|
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
26
29
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
@@ -2,14 +2,16 @@ import { NoOpLogger } from "@smithy/smithy-client";
|
|
|
2
2
|
import { parseUrl } from "@smithy/url-parser";
|
|
3
3
|
import { fromBase64, toBase64, } from "@smithy/util-base64";
|
|
4
4
|
import { fromUtf8, toUtf8, } from "@smithy/util-utf8";
|
|
5
|
-
export const getRuntimeConfig = (config) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
export const getRuntimeConfig = (config) => {
|
|
6
|
+
return {
|
|
7
|
+
apiVersion: "",
|
|
8
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
9
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
10
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
11
|
+
extensions: config?.extensions ?? [],
|
|
12
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
13
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
14
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
15
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
16
|
+
};
|
|
17
|
+
};
|
package/dist-types/WmsApi.d.ts
CHANGED
|
@@ -23,24 +23,28 @@ export interface WmsApi {
|
|
|
23
23
|
/**
|
|
24
24
|
* @see {@link GetPbxAclGroupsPermissionsCommand}
|
|
25
25
|
*/
|
|
26
|
+
getPbxAclGroupsPermissions(): Promise<GetPbxAclGroupsPermissionsCommandOutput>;
|
|
26
27
|
getPbxAclGroupsPermissions(args: GetPbxAclGroupsPermissionsCommandInput, options?: __HttpHandlerOptions): Promise<GetPbxAclGroupsPermissionsCommandOutput>;
|
|
27
28
|
getPbxAclGroupsPermissions(args: GetPbxAclGroupsPermissionsCommandInput, cb: (err: any, data?: GetPbxAclGroupsPermissionsCommandOutput) => void): void;
|
|
28
29
|
getPbxAclGroupsPermissions(args: GetPbxAclGroupsPermissionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPbxAclGroupsPermissionsCommandOutput) => void): void;
|
|
29
30
|
/**
|
|
30
31
|
* @see {@link GetPbxCallGroupsCommand}
|
|
31
32
|
*/
|
|
33
|
+
getPbxCallGroups(): Promise<GetPbxCallGroupsCommandOutput>;
|
|
32
34
|
getPbxCallGroups(args: GetPbxCallGroupsCommandInput, options?: __HttpHandlerOptions): Promise<GetPbxCallGroupsCommandOutput>;
|
|
33
35
|
getPbxCallGroups(args: GetPbxCallGroupsCommandInput, cb: (err: any, data?: GetPbxCallGroupsCommandOutput) => void): void;
|
|
34
36
|
getPbxCallGroups(args: GetPbxCallGroupsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPbxCallGroupsCommandOutput) => void): void;
|
|
35
37
|
/**
|
|
36
38
|
* @see {@link GetPbxColleaguesCommand}
|
|
37
39
|
*/
|
|
40
|
+
getPbxColleagues(): Promise<GetPbxColleaguesCommandOutput>;
|
|
38
41
|
getPbxColleagues(args: GetPbxColleaguesCommandInput, options?: __HttpHandlerOptions): Promise<GetPbxColleaguesCommandOutput>;
|
|
39
42
|
getPbxColleagues(args: GetPbxColleaguesCommandInput, cb: (err: any, data?: GetPbxColleaguesCommandOutput) => void): void;
|
|
40
43
|
getPbxColleagues(args: GetPbxColleaguesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPbxColleaguesCommandOutput) => void): void;
|
|
41
44
|
/**
|
|
42
45
|
* @see {@link GetPbxOAuth2ClientsCommand}
|
|
43
46
|
*/
|
|
47
|
+
getPbxOAuth2Clients(): Promise<GetPbxOAuth2ClientsCommandOutput>;
|
|
44
48
|
getPbxOAuth2Clients(args: GetPbxOAuth2ClientsCommandInput, options?: __HttpHandlerOptions): Promise<GetPbxOAuth2ClientsCommandOutput>;
|
|
45
49
|
getPbxOAuth2Clients(args: GetPbxOAuth2ClientsCommandInput, cb: (err: any, data?: GetPbxOAuth2ClientsCommandOutput) => void): void;
|
|
46
50
|
getPbxOAuth2Clients(args: GetPbxOAuth2ClientsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPbxOAuth2ClientsCommandOutput) => void): void;
|
|
@@ -6,9 +6,10 @@ import { GetPbxColleaguesCommandInput, GetPbxColleaguesCommandOutput } from "./c
|
|
|
6
6
|
import { GetPbxOAuth2ClientsCommandInput, GetPbxOAuth2ClientsCommandOutput } from "./commands/GetPbxOAuth2ClientsCommand";
|
|
7
7
|
import { UpdatePbxOAuth2ClientCommandInput, UpdatePbxOAuth2ClientCommandOutput } from "./commands/UpdatePbxOAuth2ClientCommand";
|
|
8
8
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
9
|
-
import {
|
|
9
|
+
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
10
|
+
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
10
11
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
11
|
-
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser } from "@smithy/types";
|
|
12
|
+
import { Provider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
12
13
|
import { TokenProvider } from '@wildix/smithy-utils';
|
|
13
14
|
export { __Client };
|
|
14
15
|
/**
|
|
@@ -22,11 +23,11 @@ export type ServiceOutputTypes = CreatePbxOAuth2ClientCommandOutput | DeletePbxO
|
|
|
22
23
|
/**
|
|
23
24
|
* @public
|
|
24
25
|
*/
|
|
25
|
-
export interface ClientDefaults extends Partial<
|
|
26
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
26
27
|
/**
|
|
27
|
-
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
28
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
28
29
|
*/
|
|
29
|
-
requestHandler?:
|
|
30
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
30
31
|
/**
|
|
31
32
|
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
32
33
|
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
@@ -78,6 +79,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
78
79
|
* trait of an operation.
|
|
79
80
|
*/
|
|
80
81
|
disableHostPrefix?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
81
87
|
/**
|
|
82
88
|
* Value for how many times a request will be made at most in case of retry.
|
|
83
89
|
*/
|
|
@@ -104,7 +110,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
104
110
|
/**
|
|
105
111
|
* @public
|
|
106
112
|
*/
|
|
107
|
-
export type WmsApiClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults;
|
|
113
|
+
export type WmsApiClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig;
|
|
108
114
|
/**
|
|
109
115
|
* @public
|
|
110
116
|
*
|
|
@@ -118,7 +124,7 @@ export interface WmsApiClientConfig extends WmsApiClientConfigType {
|
|
|
118
124
|
/**
|
|
119
125
|
* @public
|
|
120
126
|
*/
|
|
121
|
-
export type WmsApiClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig;
|
|
127
|
+
export type WmsApiClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig;
|
|
122
128
|
/**
|
|
123
129
|
* @public
|
|
124
130
|
*
|