@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,6 +1,44 @@
1
1
  import { WmsApiServiceException as __BaseException } from "../models/WmsApiServiceException";
2
+ import { WmsNotFoundException, WmsUnauthorizedException, WmsValidationException, } from "../models/models_0";
2
3
  import { HttpRequest as __HttpRequest, } from "@smithy/protocol-http";
3
- import { expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
4
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, resolvedPath as __resolvedPath, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
+ export const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
6
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const headers = {
8
+ 'content-type': 'application/json',
9
+ };
10
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2";
11
+ let body;
12
+ body = JSON.stringify(take(input, {
13
+ 'name': [],
14
+ 'redirectUri': _ => _json(_),
15
+ }));
16
+ return new __HttpRequest({
17
+ protocol,
18
+ hostname,
19
+ port,
20
+ method: "POST",
21
+ headers,
22
+ path: resolvedPath,
23
+ body,
24
+ });
25
+ };
26
+ export const se_DeletePbxOAuth2ClientCommand = async (input, context) => {
27
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
+ const headers = {};
29
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2/{id}";
30
+ resolvedPath = __resolvedPath(resolvedPath, input, 'id', () => input.id, '{id}', false);
31
+ let body;
32
+ return new __HttpRequest({
33
+ protocol,
34
+ hostname,
35
+ port,
36
+ method: "DELETE",
37
+ headers,
38
+ path: resolvedPath,
39
+ body,
40
+ });
41
+ };
4
42
  export const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
5
43
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
44
  const headers = {
@@ -19,6 +57,24 @@ export const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
19
57
  body,
20
58
  });
21
59
  };
60
+ export const se_GetPbxCallGroupsCommand = async (input, context) => {
61
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const headers = {
63
+ 'content-type': 'application/json',
64
+ };
65
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/Dialplan/CallGroups";
66
+ let body;
67
+ body = "";
68
+ return new __HttpRequest({
69
+ protocol,
70
+ hostname,
71
+ port,
72
+ method: "GET",
73
+ headers,
74
+ path: resolvedPath,
75
+ body,
76
+ });
77
+ };
22
78
  export const se_GetPbxColleaguesCommand = async (input, context) => {
23
79
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
80
  const headers = {};
@@ -59,6 +115,120 @@ export const se_GetPbxColleaguesCommand = async (input, context) => {
59
115
  body,
60
116
  });
61
117
  };
118
+ export const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
119
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
+ const headers = {
121
+ 'content-type': 'application/json',
122
+ };
123
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2";
124
+ let body;
125
+ body = "";
126
+ return new __HttpRequest({
127
+ protocol,
128
+ hostname,
129
+ port,
130
+ method: "GET",
131
+ headers,
132
+ path: resolvedPath,
133
+ body,
134
+ });
135
+ };
136
+ export const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
137
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const headers = {
139
+ 'content-type': 'application/json',
140
+ };
141
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2/{id}";
142
+ resolvedPath = __resolvedPath(resolvedPath, input, 'id', () => input.id, '{id}', false);
143
+ let body;
144
+ body = JSON.stringify(take(input, {
145
+ 'name': [],
146
+ 'redirectUri': _ => _json(_),
147
+ }));
148
+ return new __HttpRequest({
149
+ protocol,
150
+ hostname,
151
+ port,
152
+ method: "PUT",
153
+ headers,
154
+ path: resolvedPath,
155
+ body,
156
+ });
157
+ };
158
+ export const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
159
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
160
+ return de_CreatePbxOAuth2ClientCommandError(output, context);
161
+ }
162
+ const contents = map({
163
+ $metadata: deserializeMetadata(output),
164
+ });
165
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
166
+ const doc = take(data, {
167
+ 'result': _json,
168
+ 'type': __expectString,
169
+ });
170
+ Object.assign(contents, doc);
171
+ return contents;
172
+ };
173
+ const de_CreatePbxOAuth2ClientCommandError = async (output, context) => {
174
+ const parsedOutput = {
175
+ ...output,
176
+ body: await parseErrorBody(output.body, context)
177
+ };
178
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
179
+ switch (errorCode) {
180
+ case "WmsUnauthorizedException":
181
+ case "wildix.wms.api#WmsUnauthorizedException":
182
+ throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
183
+ case "WmsValidationException":
184
+ case "wildix.wms.api#WmsValidationException":
185
+ throw await de_WmsValidationExceptionRes(parsedOutput, context);
186
+ default:
187
+ const parsedBody = parsedOutput.body;
188
+ return throwDefaultError({
189
+ output,
190
+ parsedBody,
191
+ errorCode
192
+ });
193
+ }
194
+ };
195
+ export const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
196
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
197
+ return de_DeletePbxOAuth2ClientCommandError(output, context);
198
+ }
199
+ const contents = map({
200
+ $metadata: deserializeMetadata(output),
201
+ });
202
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
203
+ const doc = take(data, {
204
+ 'result': __expectString,
205
+ 'type': __expectString,
206
+ });
207
+ Object.assign(contents, doc);
208
+ return contents;
209
+ };
210
+ const de_DeletePbxOAuth2ClientCommandError = async (output, context) => {
211
+ const parsedOutput = {
212
+ ...output,
213
+ body: await parseErrorBody(output.body, context)
214
+ };
215
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
216
+ switch (errorCode) {
217
+ case "WmsNotFoundException":
218
+ case "wildix.wms.api#WmsNotFoundException":
219
+ throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
220
+ case "WmsUnauthorizedException":
221
+ case "wildix.wms.api#WmsUnauthorizedException":
222
+ throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
223
+ default:
224
+ const parsedBody = parsedOutput.body;
225
+ return throwDefaultError({
226
+ output,
227
+ parsedBody,
228
+ errorCode
229
+ });
230
+ }
231
+ };
62
232
  export const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
63
233
  if (output.statusCode !== 200 && output.statusCode >= 300) {
64
234
  return de_GetPbxAclGroupsPermissionsCommandError(output, context);
@@ -80,12 +250,52 @@ const de_GetPbxAclGroupsPermissionsCommandError = async (output, context) => {
80
250
  body: await parseErrorBody(output.body, context)
81
251
  };
82
252
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
83
- const parsedBody = parsedOutput.body;
84
- return throwDefaultError({
85
- output,
86
- parsedBody,
87
- errorCode
253
+ switch (errorCode) {
254
+ case "WmsUnauthorizedException":
255
+ case "wildix.wms.api#WmsUnauthorizedException":
256
+ throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
257
+ default:
258
+ const parsedBody = parsedOutput.body;
259
+ return throwDefaultError({
260
+ output,
261
+ parsedBody,
262
+ errorCode
263
+ });
264
+ }
265
+ };
266
+ export const de_GetPbxCallGroupsCommand = async (output, context) => {
267
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
268
+ return de_GetPbxCallGroupsCommandError(output, context);
269
+ }
270
+ const contents = map({
271
+ $metadata: deserializeMetadata(output),
88
272
  });
273
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
274
+ const doc = take(data, {
275
+ 'result': _json,
276
+ 'type': __expectString,
277
+ });
278
+ Object.assign(contents, doc);
279
+ return contents;
280
+ };
281
+ const de_GetPbxCallGroupsCommandError = async (output, context) => {
282
+ const parsedOutput = {
283
+ ...output,
284
+ body: await parseErrorBody(output.body, context)
285
+ };
286
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
287
+ switch (errorCode) {
288
+ case "WmsUnauthorizedException":
289
+ case "wildix.wms.api#WmsUnauthorizedException":
290
+ throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
291
+ default:
292
+ const parsedBody = parsedOutput.body;
293
+ return throwDefaultError({
294
+ output,
295
+ parsedBody,
296
+ errorCode
297
+ });
298
+ }
89
299
  };
90
300
  export const de_GetPbxColleaguesCommand = async (output, context) => {
91
301
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -108,14 +318,137 @@ const de_GetPbxColleaguesCommandError = async (output, context) => {
108
318
  body: await parseErrorBody(output.body, context)
109
319
  };
110
320
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
111
- const parsedBody = parsedOutput.body;
112
- return throwDefaultError({
113
- output,
114
- parsedBody,
115
- errorCode
321
+ switch (errorCode) {
322
+ case "WmsUnauthorizedException":
323
+ case "wildix.wms.api#WmsUnauthorizedException":
324
+ throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
325
+ default:
326
+ const parsedBody = parsedOutput.body;
327
+ return throwDefaultError({
328
+ output,
329
+ parsedBody,
330
+ errorCode
331
+ });
332
+ }
333
+ };
334
+ export const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
335
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
336
+ return de_GetPbxOAuth2ClientsCommandError(output, context);
337
+ }
338
+ const contents = map({
339
+ $metadata: deserializeMetadata(output),
340
+ });
341
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
342
+ const doc = take(data, {
343
+ 'result': _json,
344
+ 'type': __expectString,
345
+ });
346
+ Object.assign(contents, doc);
347
+ return contents;
348
+ };
349
+ const de_GetPbxOAuth2ClientsCommandError = async (output, context) => {
350
+ const parsedOutput = {
351
+ ...output,
352
+ body: await parseErrorBody(output.body, context)
353
+ };
354
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
355
+ switch (errorCode) {
356
+ case "WmsUnauthorizedException":
357
+ case "wildix.wms.api#WmsUnauthorizedException":
358
+ throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
359
+ default:
360
+ const parsedBody = parsedOutput.body;
361
+ return throwDefaultError({
362
+ output,
363
+ parsedBody,
364
+ errorCode
365
+ });
366
+ }
367
+ };
368
+ export const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
369
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
370
+ return de_UpdatePbxOAuth2ClientCommandError(output, context);
371
+ }
372
+ const contents = map({
373
+ $metadata: deserializeMetadata(output),
374
+ });
375
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
376
+ const doc = take(data, {
377
+ 'result': _json,
378
+ 'type': __expectString,
116
379
  });
380
+ Object.assign(contents, doc);
381
+ return contents;
382
+ };
383
+ const de_UpdatePbxOAuth2ClientCommandError = async (output, context) => {
384
+ const parsedOutput = {
385
+ ...output,
386
+ body: await parseErrorBody(output.body, context)
387
+ };
388
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
389
+ switch (errorCode) {
390
+ case "WmsNotFoundException":
391
+ case "wildix.wms.api#WmsNotFoundException":
392
+ throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
393
+ case "WmsUnauthorizedException":
394
+ case "wildix.wms.api#WmsUnauthorizedException":
395
+ throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
396
+ case "WmsValidationException":
397
+ case "wildix.wms.api#WmsValidationException":
398
+ throw await de_WmsValidationExceptionRes(parsedOutput, context);
399
+ default:
400
+ const parsedBody = parsedOutput.body;
401
+ return throwDefaultError({
402
+ output,
403
+ parsedBody,
404
+ errorCode
405
+ });
406
+ }
117
407
  };
118
408
  const throwDefaultError = withBaseException(__BaseException);
409
+ const de_WmsNotFoundExceptionRes = async (parsedOutput, context) => {
410
+ const contents = map({});
411
+ const data = parsedOutput.body;
412
+ const doc = take(data, {
413
+ 'reason': __expectString,
414
+ 'type': __expectString,
415
+ });
416
+ Object.assign(contents, doc);
417
+ const exception = new WmsNotFoundException({
418
+ $metadata: deserializeMetadata(parsedOutput),
419
+ ...contents
420
+ });
421
+ return __decorateServiceException(exception, parsedOutput.body);
422
+ };
423
+ const de_WmsUnauthorizedExceptionRes = async (parsedOutput, context) => {
424
+ const contents = map({});
425
+ const data = parsedOutput.body;
426
+ const doc = take(data, {
427
+ 'reason': __expectString,
428
+ 'type': __expectString,
429
+ });
430
+ Object.assign(contents, doc);
431
+ const exception = new WmsUnauthorizedException({
432
+ $metadata: deserializeMetadata(parsedOutput),
433
+ ...contents
434
+ });
435
+ return __decorateServiceException(exception, parsedOutput.body);
436
+ };
437
+ const de_WmsValidationExceptionRes = async (parsedOutput, context) => {
438
+ const contents = map({});
439
+ const data = parsedOutput.body;
440
+ const doc = take(data, {
441
+ 'errors': _json,
442
+ 'reason': __expectString,
443
+ 'type': __expectString,
444
+ });
445
+ Object.assign(contents, doc);
446
+ const exception = new WmsValidationException({
447
+ $metadata: deserializeMetadata(parsedOutput),
448
+ ...contents
449
+ });
450
+ return __decorateServiceException(exception, parsedOutput.body);
451
+ };
119
452
  const deserializeMetadata = (output) => ({
120
453
  httpStatusCode: output.statusCode,
121
454
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,20 +1,55 @@
1
1
  import { WmsApiClient } from "./WmsApiClient";
2
+ import { CreatePbxOAuth2ClientCommandInput, CreatePbxOAuth2ClientCommandOutput } from "./commands/CreatePbxOAuth2ClientCommand";
3
+ import { DeletePbxOAuth2ClientCommandInput, DeletePbxOAuth2ClientCommandOutput } from "./commands/DeletePbxOAuth2ClientCommand";
2
4
  import { GetPbxAclGroupsPermissionsCommandInput, GetPbxAclGroupsPermissionsCommandOutput } from "./commands/GetPbxAclGroupsPermissionsCommand";
5
+ import { GetPbxCallGroupsCommandInput, GetPbxCallGroupsCommandOutput } from "./commands/GetPbxCallGroupsCommand";
3
6
  import { GetPbxColleaguesCommandInput, GetPbxColleaguesCommandOutput } from "./commands/GetPbxColleaguesCommand";
7
+ import { GetPbxOAuth2ClientsCommandInput, GetPbxOAuth2ClientsCommandOutput } from "./commands/GetPbxOAuth2ClientsCommand";
8
+ import { UpdatePbxOAuth2ClientCommandInput, UpdatePbxOAuth2ClientCommandOutput } from "./commands/UpdatePbxOAuth2ClientCommand";
4
9
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
5
10
  export interface WmsApi {
11
+ /**
12
+ * @see {@link CreatePbxOAuth2ClientCommand}
13
+ */
14
+ createPbxOAuth2Client(args: CreatePbxOAuth2ClientCommandInput, options?: __HttpHandlerOptions): Promise<CreatePbxOAuth2ClientCommandOutput>;
15
+ createPbxOAuth2Client(args: CreatePbxOAuth2ClientCommandInput, cb: (err: any, data?: CreatePbxOAuth2ClientCommandOutput) => void): void;
16
+ createPbxOAuth2Client(args: CreatePbxOAuth2ClientCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreatePbxOAuth2ClientCommandOutput) => void): void;
17
+ /**
18
+ * @see {@link DeletePbxOAuth2ClientCommand}
19
+ */
20
+ deletePbxOAuth2Client(args: DeletePbxOAuth2ClientCommandInput, options?: __HttpHandlerOptions): Promise<DeletePbxOAuth2ClientCommandOutput>;
21
+ deletePbxOAuth2Client(args: DeletePbxOAuth2ClientCommandInput, cb: (err: any, data?: DeletePbxOAuth2ClientCommandOutput) => void): void;
22
+ deletePbxOAuth2Client(args: DeletePbxOAuth2ClientCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeletePbxOAuth2ClientCommandOutput) => void): void;
6
23
  /**
7
24
  * @see {@link GetPbxAclGroupsPermissionsCommand}
8
25
  */
9
26
  getPbxAclGroupsPermissions(args: GetPbxAclGroupsPermissionsCommandInput, options?: __HttpHandlerOptions): Promise<GetPbxAclGroupsPermissionsCommandOutput>;
10
27
  getPbxAclGroupsPermissions(args: GetPbxAclGroupsPermissionsCommandInput, cb: (err: any, data?: GetPbxAclGroupsPermissionsCommandOutput) => void): void;
11
28
  getPbxAclGroupsPermissions(args: GetPbxAclGroupsPermissionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPbxAclGroupsPermissionsCommandOutput) => void): void;
29
+ /**
30
+ * @see {@link GetPbxCallGroupsCommand}
31
+ */
32
+ getPbxCallGroups(args: GetPbxCallGroupsCommandInput, options?: __HttpHandlerOptions): Promise<GetPbxCallGroupsCommandOutput>;
33
+ getPbxCallGroups(args: GetPbxCallGroupsCommandInput, cb: (err: any, data?: GetPbxCallGroupsCommandOutput) => void): void;
34
+ getPbxCallGroups(args: GetPbxCallGroupsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPbxCallGroupsCommandOutput) => void): void;
12
35
  /**
13
36
  * @see {@link GetPbxColleaguesCommand}
14
37
  */
15
38
  getPbxColleagues(args: GetPbxColleaguesCommandInput, options?: __HttpHandlerOptions): Promise<GetPbxColleaguesCommandOutput>;
16
39
  getPbxColleagues(args: GetPbxColleaguesCommandInput, cb: (err: any, data?: GetPbxColleaguesCommandOutput) => void): void;
17
40
  getPbxColleagues(args: GetPbxColleaguesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPbxColleaguesCommandOutput) => void): void;
41
+ /**
42
+ * @see {@link GetPbxOAuth2ClientsCommand}
43
+ */
44
+ getPbxOAuth2Clients(args: GetPbxOAuth2ClientsCommandInput, options?: __HttpHandlerOptions): Promise<GetPbxOAuth2ClientsCommandOutput>;
45
+ getPbxOAuth2Clients(args: GetPbxOAuth2ClientsCommandInput, cb: (err: any, data?: GetPbxOAuth2ClientsCommandOutput) => void): void;
46
+ getPbxOAuth2Clients(args: GetPbxOAuth2ClientsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPbxOAuth2ClientsCommandOutput) => void): void;
47
+ /**
48
+ * @see {@link UpdatePbxOAuth2ClientCommand}
49
+ */
50
+ updatePbxOAuth2Client(args: UpdatePbxOAuth2ClientCommandInput, options?: __HttpHandlerOptions): Promise<UpdatePbxOAuth2ClientCommandOutput>;
51
+ updatePbxOAuth2Client(args: UpdatePbxOAuth2ClientCommandInput, cb: (err: any, data?: UpdatePbxOAuth2ClientCommandOutput) => void): void;
52
+ updatePbxOAuth2Client(args: UpdatePbxOAuth2ClientCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdatePbxOAuth2ClientCommandOutput) => void): void;
18
53
  }
19
54
  /**
20
55
  * @public
@@ -1,5 +1,10 @@
1
+ import { CreatePbxOAuth2ClientCommandInput, CreatePbxOAuth2ClientCommandOutput } from "./commands/CreatePbxOAuth2ClientCommand";
2
+ import { DeletePbxOAuth2ClientCommandInput, DeletePbxOAuth2ClientCommandOutput } from "./commands/DeletePbxOAuth2ClientCommand";
1
3
  import { GetPbxAclGroupsPermissionsCommandInput, GetPbxAclGroupsPermissionsCommandOutput } from "./commands/GetPbxAclGroupsPermissionsCommand";
4
+ import { GetPbxCallGroupsCommandInput, GetPbxCallGroupsCommandOutput } from "./commands/GetPbxCallGroupsCommand";
2
5
  import { GetPbxColleaguesCommandInput, GetPbxColleaguesCommandOutput } from "./commands/GetPbxColleaguesCommand";
6
+ import { GetPbxOAuth2ClientsCommandInput, GetPbxOAuth2ClientsCommandOutput } from "./commands/GetPbxOAuth2ClientsCommand";
7
+ import { UpdatePbxOAuth2ClientCommandInput, UpdatePbxOAuth2ClientCommandOutput } from "./commands/UpdatePbxOAuth2ClientCommand";
3
8
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
4
9
  import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
5
10
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
@@ -9,11 +14,11 @@ export { __Client };
9
14
  /**
10
15
  * @public
11
16
  */
12
- export type ServiceInputTypes = GetPbxAclGroupsPermissionsCommandInput | GetPbxColleaguesCommandInput;
17
+ export type ServiceInputTypes = CreatePbxOAuth2ClientCommandInput | DeletePbxOAuth2ClientCommandInput | GetPbxAclGroupsPermissionsCommandInput | GetPbxCallGroupsCommandInput | GetPbxColleaguesCommandInput | GetPbxOAuth2ClientsCommandInput | UpdatePbxOAuth2ClientCommandInput;
13
18
  /**
14
19
  * @public
15
20
  */
16
- export type ServiceOutputTypes = GetPbxAclGroupsPermissionsCommandOutput | GetPbxColleaguesCommandOutput;
21
+ export type ServiceOutputTypes = CreatePbxOAuth2ClientCommandOutput | DeletePbxOAuth2ClientCommandOutput | GetPbxAclGroupsPermissionsCommandOutput | GetPbxCallGroupsCommandOutput | GetPbxColleaguesCommandOutput | GetPbxOAuth2ClientsCommandOutput | UpdatePbxOAuth2ClientCommandOutput;
17
22
  /**
18
23
  * @public
19
24
  */
@@ -0,0 +1,91 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, WmsApiClientResolvedConfig } from "../WmsApiClient";
2
+ import { CreatePbxOAuth2ClientInput, CreatePbxOAuth2ClientOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { Handler, MiddlewareStack, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export { __MetadataBearer, $Command };
9
+ /**
10
+ * @public
11
+ *
12
+ * The input for {@link CreatePbxOAuth2ClientCommand}.
13
+ */
14
+ export interface CreatePbxOAuth2ClientCommandInput extends CreatePbxOAuth2ClientInput {
15
+ }
16
+ /**
17
+ * @public
18
+ *
19
+ * The output of {@link CreatePbxOAuth2ClientCommand}.
20
+ */
21
+ export interface CreatePbxOAuth2ClientCommandOutput extends CreatePbxOAuth2ClientOutput, __MetadataBearer {
22
+ }
23
+ /**
24
+ * @public
25
+ * Create new OAuth2 client in the PBX.
26
+ * @example
27
+ * Use a bare-bones client and the command you need to make an API call.
28
+ * ```javascript
29
+ * import { WmsApiClient, CreatePbxOAuth2ClientCommand } from "@wildix/wms-api-client"; // ES Modules import
30
+ * // const { WmsApiClient, CreatePbxOAuth2ClientCommand } = require("@wildix/wms-api-client"); // CommonJS import
31
+ * const client = new WmsApiClient(config);
32
+ * const input = { // CreatePbxOAuth2ClientInput
33
+ * name: "STRING_VALUE", // required
34
+ * redirectUri: [ // PbxOAuth2RedirectUrls // required
35
+ * "STRING_VALUE",
36
+ * ],
37
+ * };
38
+ * const command = new CreatePbxOAuth2ClientCommand(input);
39
+ * const response = await client.send(command);
40
+ * // { // CreatePbxOAuth2ClientOutput
41
+ * // type: "result" || "error", // required
42
+ * // result: { // PbxOAuth2Client
43
+ * // id: "STRING_VALUE", // required
44
+ * // name: "STRING_VALUE", // required
45
+ * // redirectUri: [ // PbxOAuth2RedirectUrls // required
46
+ * // "STRING_VALUE",
47
+ * // ],
48
+ * // secret: "STRING_VALUE", // required
49
+ * // created: Number("int"), // required
50
+ * // origins: [ // PbxOAuth2Origins // required
51
+ * // "STRING_VALUE",
52
+ * // ],
53
+ * // accessTokenTtl: Number("int"), // required
54
+ * // },
55
+ * // };
56
+ *
57
+ * ```
58
+ *
59
+ * @param CreatePbxOAuth2ClientCommandInput - {@link CreatePbxOAuth2ClientCommandInput}
60
+ * @returns {@link CreatePbxOAuth2ClientCommandOutput}
61
+ * @see {@link CreatePbxOAuth2ClientCommandInput} for command's `input` shape.
62
+ * @see {@link CreatePbxOAuth2ClientCommandOutput} for command's `response` shape.
63
+ * @see {@link WmsApiClientResolvedConfig | config} for WmsApiClient's `config` shape.
64
+ *
65
+ * @throws {@link WmsUnauthorizedException} (client fault)
66
+ *
67
+ * @throws {@link WmsValidationException} (client fault)
68
+ *
69
+ * @throws {@link WmsApiServiceException}
70
+ * <p>Base exception class for all service exceptions from WmsApi service.</p>
71
+ *
72
+ */
73
+ export declare class CreatePbxOAuth2ClientCommand extends $Command<CreatePbxOAuth2ClientCommandInput, CreatePbxOAuth2ClientCommandOutput, WmsApiClientResolvedConfig> {
74
+ readonly input: CreatePbxOAuth2ClientCommandInput;
75
+ /**
76
+ * @public
77
+ */
78
+ constructor(input: CreatePbxOAuth2ClientCommandInput);
79
+ /**
80
+ * @internal
81
+ */
82
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: WmsApiClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreatePbxOAuth2ClientCommandInput, CreatePbxOAuth2ClientCommandOutput>;
83
+ /**
84
+ * @internal
85
+ */
86
+ private serialize;
87
+ /**
88
+ * @internal
89
+ */
90
+ private deserialize;
91
+ }
@@ -0,0 +1,76 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, WmsApiClientResolvedConfig } from "../WmsApiClient";
2
+ import { DeletePbxOAuth2ClientInput, DeletePbxOAuth2ClientOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { Handler, MiddlewareStack, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export { __MetadataBearer, $Command };
9
+ /**
10
+ * @public
11
+ *
12
+ * The input for {@link DeletePbxOAuth2ClientCommand}.
13
+ */
14
+ export interface DeletePbxOAuth2ClientCommandInput extends DeletePbxOAuth2ClientInput {
15
+ }
16
+ /**
17
+ * @public
18
+ *
19
+ * The output of {@link DeletePbxOAuth2ClientCommand}.
20
+ */
21
+ export interface DeletePbxOAuth2ClientCommandOutput extends DeletePbxOAuth2ClientOutput, __MetadataBearer {
22
+ }
23
+ /**
24
+ * @public
25
+ * Update OAuth2 client in the PBX. Only for root admin.
26
+ * @example
27
+ * Use a bare-bones client and the command you need to make an API call.
28
+ * ```javascript
29
+ * import { WmsApiClient, DeletePbxOAuth2ClientCommand } from "@wildix/wms-api-client"; // ES Modules import
30
+ * // const { WmsApiClient, DeletePbxOAuth2ClientCommand } = require("@wildix/wms-api-client"); // CommonJS import
31
+ * const client = new WmsApiClient(config);
32
+ * const input = { // DeletePbxOAuth2ClientInput
33
+ * id: "STRING_VALUE", // required
34
+ * };
35
+ * const command = new DeletePbxOAuth2ClientCommand(input);
36
+ * const response = await client.send(command);
37
+ * // { // DeletePbxOAuth2ClientOutput
38
+ * // type: "result" || "error", // required
39
+ * // result: "STRING_VALUE", // required
40
+ * // };
41
+ *
42
+ * ```
43
+ *
44
+ * @param DeletePbxOAuth2ClientCommandInput - {@link DeletePbxOAuth2ClientCommandInput}
45
+ * @returns {@link DeletePbxOAuth2ClientCommandOutput}
46
+ * @see {@link DeletePbxOAuth2ClientCommandInput} for command's `input` shape.
47
+ * @see {@link DeletePbxOAuth2ClientCommandOutput} for command's `response` shape.
48
+ * @see {@link WmsApiClientResolvedConfig | config} for WmsApiClient's `config` shape.
49
+ *
50
+ * @throws {@link WmsUnauthorizedException} (client fault)
51
+ *
52
+ * @throws {@link WmsNotFoundException} (client fault)
53
+ *
54
+ * @throws {@link WmsApiServiceException}
55
+ * <p>Base exception class for all service exceptions from WmsApi service.</p>
56
+ *
57
+ */
58
+ export declare class DeletePbxOAuth2ClientCommand extends $Command<DeletePbxOAuth2ClientCommandInput, DeletePbxOAuth2ClientCommandOutput, WmsApiClientResolvedConfig> {
59
+ readonly input: DeletePbxOAuth2ClientCommandInput;
60
+ /**
61
+ * @public
62
+ */
63
+ constructor(input: DeletePbxOAuth2ClientCommandInput);
64
+ /**
65
+ * @internal
66
+ */
67
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: WmsApiClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeletePbxOAuth2ClientCommandInput, DeletePbxOAuth2ClientCommandOutput>;
68
+ /**
69
+ * @internal
70
+ */
71
+ private serialize;
72
+ /**
73
+ * @internal
74
+ */
75
+ private deserialize;
76
+ }
@@ -66,6 +66,8 @@ export interface GetPbxAclGroupsPermissionsCommandOutput extends GetPbxAclGroups
66
66
  * @see {@link GetPbxAclGroupsPermissionsCommandOutput} for command's `response` shape.
67
67
  * @see {@link WmsApiClientResolvedConfig | config} for WmsApiClient's `config` shape.
68
68
  *
69
+ * @throws {@link WmsUnauthorizedException} (client fault)
70
+ *
69
71
  * @throws {@link WmsApiServiceException}
70
72
  * <p>Base exception class for all service exceptions from WmsApi service.</p>
71
73
  *