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