@wildix/wms-api-client 1.1.21 → 1.1.23

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 (56) hide show
  1. package/dist-cjs/WmsApi.js +16 -0
  2. package/dist-cjs/commands/CallControlAnswerCommand.js +21 -0
  3. package/dist-cjs/commands/CallControlHangupCommand.js +21 -0
  4. package/dist-cjs/commands/CallControlHoldCommand.js +21 -0
  5. package/dist-cjs/commands/CallControlMakeCallCommand.js +21 -0
  6. package/dist-cjs/commands/CallControlTransferCommand.js +21 -0
  7. package/dist-cjs/commands/CallControlUnholdCommand.js +21 -0
  8. package/dist-cjs/commands/ListUserActiveCallsCommand.js +21 -0
  9. package/dist-cjs/commands/ListUserDevicesCommand.js +21 -0
  10. package/dist-cjs/commands/index.js +8 -0
  11. package/dist-cjs/models/models_0.js +35 -1
  12. package/dist-cjs/protocols/Aws_restJson1.js +318 -1
  13. package/dist-es/WmsApi.js +16 -0
  14. package/dist-es/commands/CallControlAnswerCommand.js +17 -0
  15. package/dist-es/commands/CallControlHangupCommand.js +17 -0
  16. package/dist-es/commands/CallControlHoldCommand.js +17 -0
  17. package/dist-es/commands/CallControlMakeCallCommand.js +17 -0
  18. package/dist-es/commands/CallControlTransferCommand.js +17 -0
  19. package/dist-es/commands/CallControlUnholdCommand.js +17 -0
  20. package/dist-es/commands/ListUserActiveCallsCommand.js +17 -0
  21. package/dist-es/commands/ListUserDevicesCommand.js +17 -0
  22. package/dist-es/commands/index.js +8 -0
  23. package/dist-es/models/models_0.js +32 -0
  24. package/dist-es/protocols/Aws_restJson1.js +301 -1
  25. package/dist-types/WmsApi.d.ts +58 -0
  26. package/dist-types/WmsApiClient.d.ts +10 -2
  27. package/dist-types/commands/CallControlAnswerCommand.d.ts +83 -0
  28. package/dist-types/commands/CallControlHangupCommand.d.ts +83 -0
  29. package/dist-types/commands/CallControlHoldCommand.d.ts +82 -0
  30. package/dist-types/commands/CallControlMakeCallCommand.d.ts +81 -0
  31. package/dist-types/commands/CallControlTransferCommand.d.ts +83 -0
  32. package/dist-types/commands/CallControlUnholdCommand.d.ts +82 -0
  33. package/dist-types/commands/CreatePbxAclGroupCommand.d.ts +2 -0
  34. package/dist-types/commands/CreatePbxColleagueCommand.d.ts +2 -0
  35. package/dist-types/commands/CreatePbxOAuth2ClientCommand.d.ts +2 -0
  36. package/dist-types/commands/DeletePbxAclGroupCommand.d.ts +2 -0
  37. package/dist-types/commands/DeletePbxColleagueCommand.d.ts +2 -0
  38. package/dist-types/commands/DeletePbxOAuth2ClientCommand.d.ts +2 -0
  39. package/dist-types/commands/GetColleagueByIdCommand.d.ts +2 -0
  40. package/dist-types/commands/GetPbxAclGroupsPermissionsCommand.d.ts +2 -0
  41. package/dist-types/commands/GetPbxCallGroupsCommand.d.ts +2 -0
  42. package/dist-types/commands/GetPbxColleaguesCommand.d.ts +2 -0
  43. package/dist-types/commands/GetPbxOAuth2ClientsCommand.d.ts +2 -0
  44. package/dist-types/commands/GetPbxesCommand.d.ts +2 -0
  45. package/dist-types/commands/GetPersonalInfoCommand.d.ts +2 -0
  46. package/dist-types/commands/ListUserActiveCallsCommand.d.ts +85 -0
  47. package/dist-types/commands/ListUserDevicesCommand.d.ts +85 -0
  48. package/dist-types/commands/NotificationsCommand.d.ts +2 -0
  49. package/dist-types/commands/OriginateCallCommand.d.ts +2 -0
  50. package/dist-types/commands/OriginateCommand.d.ts +2 -0
  51. package/dist-types/commands/ReloadBroadcastsCommand.d.ts +2 -0
  52. package/dist-types/commands/UpdatePbxOAuth2ClientCommand.d.ts +2 -0
  53. package/dist-types/commands/index.d.ts +8 -0
  54. package/dist-types/models/models_0.d.ts +246 -7
  55. package/dist-types/protocols/Aws_restJson1.d.ts +72 -0
  56. package/package.json +1 -1
package/dist-es/WmsApi.js CHANGED
@@ -1,4 +1,10 @@
1
1
  import { WmsApiClient, } from "./WmsApiClient";
2
+ import { CallControlAnswerCommand, } from "./commands/CallControlAnswerCommand";
3
+ import { CallControlHangupCommand, } from "./commands/CallControlHangupCommand";
4
+ import { CallControlHoldCommand, } from "./commands/CallControlHoldCommand";
5
+ import { CallControlMakeCallCommand, } from "./commands/CallControlMakeCallCommand";
6
+ import { CallControlTransferCommand, } from "./commands/CallControlTransferCommand";
7
+ import { CallControlUnholdCommand, } from "./commands/CallControlUnholdCommand";
2
8
  import { CreatePbxAclGroupCommand, } from "./commands/CreatePbxAclGroupCommand";
3
9
  import { CreatePbxColleagueCommand, } from "./commands/CreatePbxColleagueCommand";
4
10
  import { CreatePbxOAuth2ClientCommand, } from "./commands/CreatePbxOAuth2ClientCommand";
@@ -12,6 +18,8 @@ import { GetPbxColleaguesCommand, } from "./commands/GetPbxColleaguesCommand";
12
18
  import { GetPbxOAuth2ClientsCommand, } from "./commands/GetPbxOAuth2ClientsCommand";
13
19
  import { GetPbxesCommand, } from "./commands/GetPbxesCommand";
14
20
  import { GetPersonalInfoCommand, } from "./commands/GetPersonalInfoCommand";
21
+ import { ListUserActiveCallsCommand, } from "./commands/ListUserActiveCallsCommand";
22
+ import { ListUserDevicesCommand, } from "./commands/ListUserDevicesCommand";
15
23
  import { NotificationsCommand, } from "./commands/NotificationsCommand";
16
24
  import { OriginateCallCommand, } from "./commands/OriginateCallCommand";
17
25
  import { OriginateCommand, } from "./commands/OriginateCommand";
@@ -19,6 +27,12 @@ import { ReloadBroadcastsCommand, } from "./commands/ReloadBroadcastsCommand";
19
27
  import { UpdatePbxOAuth2ClientCommand, } from "./commands/UpdatePbxOAuth2ClientCommand";
20
28
  import { createAggregatedClient } from "@smithy/smithy-client";
21
29
  const commands = {
30
+ CallControlAnswerCommand,
31
+ CallControlHangupCommand,
32
+ CallControlHoldCommand,
33
+ CallControlMakeCallCommand,
34
+ CallControlTransferCommand,
35
+ CallControlUnholdCommand,
22
36
  CreatePbxAclGroupCommand,
23
37
  CreatePbxColleagueCommand,
24
38
  CreatePbxOAuth2ClientCommand,
@@ -32,6 +46,8 @@ const commands = {
32
46
  GetPbxesCommand,
33
47
  GetPbxOAuth2ClientsCommand,
34
48
  GetPersonalInfoCommand,
49
+ ListUserActiveCallsCommand,
50
+ ListUserDevicesCommand,
35
51
  NotificationsCommand,
36
52
  OriginateCommand,
37
53
  OriginateCallCommand,
@@ -0,0 +1,17 @@
1
+ import { de_CallControlAnswerCommand, se_CallControlAnswerCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class CallControlAnswerCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "CallControlAnswer", {})
12
+ .n("WmsApiClient", "CallControlAnswerCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CallControlAnswerCommand)
15
+ .de(de_CallControlAnswerCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_CallControlHangupCommand, se_CallControlHangupCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class CallControlHangupCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "CallControlHangup", {})
12
+ .n("WmsApiClient", "CallControlHangupCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CallControlHangupCommand)
15
+ .de(de_CallControlHangupCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_CallControlHoldCommand, se_CallControlHoldCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class CallControlHoldCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "CallControlHold", {})
12
+ .n("WmsApiClient", "CallControlHoldCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CallControlHoldCommand)
15
+ .de(de_CallControlHoldCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_CallControlMakeCallCommand, se_CallControlMakeCallCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class CallControlMakeCallCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "CallControlMakeCall", {})
12
+ .n("WmsApiClient", "CallControlMakeCallCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CallControlMakeCallCommand)
15
+ .de(de_CallControlMakeCallCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_CallControlTransferCommand, se_CallControlTransferCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class CallControlTransferCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "CallControlTransfer", {})
12
+ .n("WmsApiClient", "CallControlTransferCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CallControlTransferCommand)
15
+ .de(de_CallControlTransferCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_CallControlUnholdCommand, se_CallControlUnholdCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class CallControlUnholdCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "CallControlUnhold", {})
12
+ .n("WmsApiClient", "CallControlUnholdCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CallControlUnholdCommand)
15
+ .de(de_CallControlUnholdCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_ListUserActiveCallsCommand, se_ListUserActiveCallsCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class ListUserActiveCallsCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "ListUserActiveCalls", {})
12
+ .n("WmsApiClient", "ListUserActiveCallsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_ListUserActiveCallsCommand)
15
+ .de(de_ListUserActiveCallsCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_ListUserDevicesCommand, se_ListUserDevicesCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class ListUserDevicesCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "ListUserDevices", {})
12
+ .n("WmsApiClient", "ListUserDevicesCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_ListUserDevicesCommand)
15
+ .de(de_ListUserDevicesCommand)
16
+ .build() {
17
+ }
@@ -1,3 +1,9 @@
1
+ export * from "./CallControlAnswerCommand";
2
+ export * from "./CallControlHangupCommand";
3
+ export * from "./CallControlHoldCommand";
4
+ export * from "./CallControlMakeCallCommand";
5
+ export * from "./CallControlTransferCommand";
6
+ export * from "./CallControlUnholdCommand";
1
7
  export * from "./CreatePbxAclGroupCommand";
2
8
  export * from "./CreatePbxColleagueCommand";
3
9
  export * from "./CreatePbxOAuth2ClientCommand";
@@ -11,6 +17,8 @@ export * from "./GetPbxColleaguesCommand";
11
17
  export * from "./GetPbxesCommand";
12
18
  export * from "./GetPbxOAuth2ClientsCommand";
13
19
  export * from "./GetPersonalInfoCommand";
20
+ export * from "./ListUserActiveCallsCommand";
21
+ export * from "./ListUserDevicesCommand";
14
22
  export * from "./NotificationsCommand";
15
23
  export * from "./OriginateCommand";
16
24
  export * from "./OriginateCallCommand";
@@ -18,6 +18,38 @@ export const ResponseType = {
18
18
  ERROR: "error",
19
19
  RESULT: "result",
20
20
  };
21
+ export class ChannelNotFoundException extends __BaseException {
22
+ name = "ChannelNotFoundException";
23
+ $fault = "client";
24
+ type;
25
+ reason;
26
+ constructor(opts) {
27
+ super({
28
+ name: "ChannelNotFoundException",
29
+ $fault: "client",
30
+ ...opts
31
+ });
32
+ Object.setPrototypeOf(this, ChannelNotFoundException.prototype);
33
+ this.type = opts.type;
34
+ this.reason = opts.reason;
35
+ }
36
+ }
37
+ export class WmsForbiddenException extends __BaseException {
38
+ name = "WmsForbiddenException";
39
+ $fault = "client";
40
+ type;
41
+ reason;
42
+ constructor(opts) {
43
+ super({
44
+ name: "WmsForbiddenException",
45
+ $fault: "client",
46
+ ...opts
47
+ });
48
+ Object.setPrototypeOf(this, WmsForbiddenException.prototype);
49
+ this.type = opts.type;
50
+ this.reason = opts.reason;
51
+ }
52
+ }
21
53
  export class WmsUnauthorizedException extends __BaseException {
22
54
  name = "WmsUnauthorizedException";
23
55
  $fault = "client";
@@ -1,8 +1,126 @@
1
1
  import { WmsApiServiceException as __BaseException } from "../models/WmsApiServiceException";
2
- import { WmsNotFoundException, WmsUnauthorizedException, WmsValidationException, } from "../models/models_0";
2
+ import { ChannelNotFoundException, WmsForbiddenException, WmsNotFoundException, WmsUnauthorizedException, WmsValidationException, } from "../models/models_0";
3
3
  import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
4
4
  import { requestBuilder as rb } from "@smithy/core";
5
5
  import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
6
+ export const se_CallControlAnswerCommand = async (input, context) => {
7
+ const b = rb(input, context);
8
+ const headers = {
9
+ 'content-type': 'application/json',
10
+ };
11
+ b.bp("/api/v1/call-control/answer");
12
+ const query = map({
13
+ [_u]: [, input[_u]],
14
+ });
15
+ let body;
16
+ body = JSON.stringify(take(input, {
17
+ 'device': [],
18
+ 'sipCallId': [],
19
+ }));
20
+ b.m("POST")
21
+ .h(headers)
22
+ .q(query)
23
+ .b(body);
24
+ return b.build();
25
+ };
26
+ export const se_CallControlHangupCommand = async (input, context) => {
27
+ const b = rb(input, context);
28
+ const headers = {
29
+ 'content-type': 'application/json',
30
+ };
31
+ b.bp("/api/v1/call-control/hangup");
32
+ const query = map({
33
+ [_u]: [, input[_u]],
34
+ });
35
+ let body;
36
+ body = JSON.stringify(take(input, {
37
+ 'reason': [],
38
+ 'sipCallId': [],
39
+ }));
40
+ b.m("POST")
41
+ .h(headers)
42
+ .q(query)
43
+ .b(body);
44
+ return b.build();
45
+ };
46
+ export const se_CallControlHoldCommand = async (input, context) => {
47
+ const b = rb(input, context);
48
+ const headers = {
49
+ 'content-type': 'application/json',
50
+ };
51
+ b.bp("/api/v1/call-control/hold");
52
+ const query = map({
53
+ [_u]: [, input[_u]],
54
+ });
55
+ let body;
56
+ body = JSON.stringify(take(input, {
57
+ 'sipCallId': [],
58
+ }));
59
+ b.m("POST")
60
+ .h(headers)
61
+ .q(query)
62
+ .b(body);
63
+ return b.build();
64
+ };
65
+ export const se_CallControlMakeCallCommand = async (input, context) => {
66
+ const b = rb(input, context);
67
+ const headers = {
68
+ 'content-type': 'application/json',
69
+ };
70
+ b.bp("/api/v1/call-control/make-call");
71
+ const query = map({
72
+ [_u]: [, input[_u]],
73
+ });
74
+ let body;
75
+ body = JSON.stringify(take(input, {
76
+ 'destination': [],
77
+ 'device': [],
78
+ }));
79
+ b.m("POST")
80
+ .h(headers)
81
+ .q(query)
82
+ .b(body);
83
+ return b.build();
84
+ };
85
+ export const se_CallControlTransferCommand = async (input, context) => {
86
+ const b = rb(input, context);
87
+ const headers = {
88
+ 'content-type': 'application/json',
89
+ };
90
+ b.bp("/api/v1/call-control/transfer");
91
+ const query = map({
92
+ [_u]: [, input[_u]],
93
+ });
94
+ let body;
95
+ body = JSON.stringify(take(input, {
96
+ 'destination': [],
97
+ 'sipCallId': [],
98
+ }));
99
+ b.m("POST")
100
+ .h(headers)
101
+ .q(query)
102
+ .b(body);
103
+ return b.build();
104
+ };
105
+ export const se_CallControlUnholdCommand = async (input, context) => {
106
+ const b = rb(input, context);
107
+ const headers = {
108
+ 'content-type': 'application/json',
109
+ };
110
+ b.bp("/api/v1/call-control/unhold");
111
+ const query = map({
112
+ [_u]: [, input[_u]],
113
+ });
114
+ let body;
115
+ body = JSON.stringify(take(input, {
116
+ 'sipCallId': [],
117
+ }));
118
+ b.m("POST")
119
+ .h(headers)
120
+ .q(query)
121
+ .b(body);
122
+ return b.build();
123
+ };
6
124
  export const se_CreatePbxAclGroupCommand = async (input, context) => {
7
125
  const b = rb(input, context);
8
126
  const headers = {
@@ -227,6 +345,34 @@ export const se_GetPersonalInfoCommand = async (input, context) => {
227
345
  .b(body);
228
346
  return b.build();
229
347
  };
348
+ export const se_ListUserActiveCallsCommand = async (input, context) => {
349
+ const b = rb(input, context);
350
+ const headers = {};
351
+ b.bp("/api/v1/call-control/list-calls");
352
+ const query = map({
353
+ [_u]: [, input[_u]],
354
+ });
355
+ let body;
356
+ b.m("GET")
357
+ .h(headers)
358
+ .q(query)
359
+ .b(body);
360
+ return b.build();
361
+ };
362
+ export const se_ListUserDevicesCommand = async (input, context) => {
363
+ const b = rb(input, context);
364
+ const headers = {};
365
+ b.bp("/api/v1/call-control/list-devices");
366
+ const query = map({
367
+ [_u]: [, input[_u]],
368
+ });
369
+ let body;
370
+ b.m("GET")
371
+ .h(headers)
372
+ .q(query)
373
+ .b(body);
374
+ return b.build();
375
+ };
230
376
  export const se_NotificationsCommand = async (input, context) => {
231
377
  const b = rb(input, context);
232
378
  const headers = {
@@ -322,6 +468,96 @@ export const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
322
468
  .b(body);
323
469
  return b.build();
324
470
  };
471
+ export const de_CallControlAnswerCommand = async (output, context) => {
472
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
473
+ return de_CommandError(output, context);
474
+ }
475
+ const contents = map({
476
+ $metadata: deserializeMetadata(output),
477
+ });
478
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
479
+ const doc = take(data, {
480
+ 'result': _json,
481
+ 'type': __expectString,
482
+ });
483
+ Object.assign(contents, doc);
484
+ return contents;
485
+ };
486
+ export const de_CallControlHangupCommand = async (output, context) => {
487
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
488
+ return de_CommandError(output, context);
489
+ }
490
+ const contents = map({
491
+ $metadata: deserializeMetadata(output),
492
+ });
493
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
494
+ const doc = take(data, {
495
+ 'result': _json,
496
+ 'type': __expectString,
497
+ });
498
+ Object.assign(contents, doc);
499
+ return contents;
500
+ };
501
+ export const de_CallControlHoldCommand = async (output, context) => {
502
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
503
+ return de_CommandError(output, context);
504
+ }
505
+ const contents = map({
506
+ $metadata: deserializeMetadata(output),
507
+ });
508
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
509
+ const doc = take(data, {
510
+ 'result': _json,
511
+ 'type': __expectString,
512
+ });
513
+ Object.assign(contents, doc);
514
+ return contents;
515
+ };
516
+ export const de_CallControlMakeCallCommand = async (output, context) => {
517
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
518
+ return de_CommandError(output, context);
519
+ }
520
+ const contents = map({
521
+ $metadata: deserializeMetadata(output),
522
+ });
523
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
524
+ const doc = take(data, {
525
+ 'result': _json,
526
+ 'type': __expectString,
527
+ });
528
+ Object.assign(contents, doc);
529
+ return contents;
530
+ };
531
+ export const de_CallControlTransferCommand = async (output, context) => {
532
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
533
+ return de_CommandError(output, context);
534
+ }
535
+ const contents = map({
536
+ $metadata: deserializeMetadata(output),
537
+ });
538
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
539
+ const doc = take(data, {
540
+ 'result': _json,
541
+ 'type': __expectString,
542
+ });
543
+ Object.assign(contents, doc);
544
+ return contents;
545
+ };
546
+ export const de_CallControlUnholdCommand = async (output, context) => {
547
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
548
+ return de_CommandError(output, context);
549
+ }
550
+ const contents = map({
551
+ $metadata: deserializeMetadata(output),
552
+ });
553
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
554
+ const doc = take(data, {
555
+ 'result': _json,
556
+ 'type': __expectString,
557
+ });
558
+ Object.assign(contents, doc);
559
+ return contents;
560
+ };
325
561
  export const de_CreatePbxAclGroupCommand = async (output, context) => {
326
562
  if (output.statusCode !== 200 && output.statusCode >= 300) {
327
563
  return de_CommandError(output, context);
@@ -517,6 +753,35 @@ export const de_GetPersonalInfoCommand = async (output, context) => {
517
753
  Object.assign(contents, doc);
518
754
  return contents;
519
755
  };
756
+ export const de_ListUserActiveCallsCommand = async (output, context) => {
757
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
758
+ return de_CommandError(output, context);
759
+ }
760
+ const contents = map({
761
+ $metadata: deserializeMetadata(output),
762
+ });
763
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
764
+ const doc = take(data, {
765
+ 'calls': _json,
766
+ });
767
+ Object.assign(contents, doc);
768
+ return contents;
769
+ };
770
+ export const de_ListUserDevicesCommand = async (output, context) => {
771
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
772
+ return de_CommandError(output, context);
773
+ }
774
+ const contents = map({
775
+ $metadata: deserializeMetadata(output),
776
+ });
777
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
778
+ const doc = take(data, {
779
+ 'active_device': _json,
780
+ 'devices': _json,
781
+ });
782
+ Object.assign(contents, doc);
783
+ return contents;
784
+ };
520
785
  export const de_NotificationsCommand = async (output, context) => {
521
786
  if (output.statusCode !== 200 && output.statusCode >= 300) {
522
787
  return de_CommandError(output, context);
@@ -599,6 +864,12 @@ const de_CommandError = async (output, context) => {
599
864
  };
600
865
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
601
866
  switch (errorCode) {
867
+ case "ChannelNotFoundException":
868
+ case "wildix.wms.api#ChannelNotFoundException":
869
+ throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
870
+ case "WmsForbiddenException":
871
+ case "wildix.wms.api#WmsForbiddenException":
872
+ throw await de_WmsForbiddenExceptionRes(parsedOutput, context);
602
873
  case "WmsUnauthorizedException":
603
874
  case "wildix.wms.api#WmsUnauthorizedException":
604
875
  throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
@@ -618,6 +889,34 @@ const de_CommandError = async (output, context) => {
618
889
  }
619
890
  };
620
891
  const throwDefaultError = withBaseException(__BaseException);
892
+ const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
893
+ const contents = map({});
894
+ const data = parsedOutput.body;
895
+ const doc = take(data, {
896
+ 'reason': __expectString,
897
+ 'type': __expectString,
898
+ });
899
+ Object.assign(contents, doc);
900
+ const exception = new ChannelNotFoundException({
901
+ $metadata: deserializeMetadata(parsedOutput),
902
+ ...contents
903
+ });
904
+ return __decorateServiceException(exception, parsedOutput.body);
905
+ };
906
+ const de_WmsForbiddenExceptionRes = async (parsedOutput, context) => {
907
+ const contents = map({});
908
+ const data = parsedOutput.body;
909
+ const doc = take(data, {
910
+ 'reason': __expectString,
911
+ 'type': __expectString,
912
+ });
913
+ Object.assign(contents, doc);
914
+ const exception = new WmsForbiddenException({
915
+ $metadata: deserializeMetadata(parsedOutput),
916
+ ...contents
917
+ });
918
+ return __decorateServiceException(exception, parsedOutput.body);
919
+ };
621
920
  const de_WmsNotFoundExceptionRes = async (parsedOutput, context) => {
622
921
  const contents = map({});
623
922
  const data = parsedOutput.body;
@@ -708,3 +1007,4 @@ const _sF = "searchFields";
708
1007
  const _sS = "searchStrategy";
709
1008
  const _so = "sort";
710
1009
  const _st = "start";
1010
+ const _u = "user";
@@ -1,4 +1,10 @@
1
1
  import { WmsApiClient } from "./WmsApiClient";
2
+ import { CallControlAnswerCommandInput, CallControlAnswerCommandOutput } from "./commands/CallControlAnswerCommand";
3
+ import { CallControlHangupCommandInput, CallControlHangupCommandOutput } from "./commands/CallControlHangupCommand";
4
+ import { CallControlHoldCommandInput, CallControlHoldCommandOutput } from "./commands/CallControlHoldCommand";
5
+ import { CallControlMakeCallCommandInput, CallControlMakeCallCommandOutput } from "./commands/CallControlMakeCallCommand";
6
+ import { CallControlTransferCommandInput, CallControlTransferCommandOutput } from "./commands/CallControlTransferCommand";
7
+ import { CallControlUnholdCommandInput, CallControlUnholdCommandOutput } from "./commands/CallControlUnholdCommand";
2
8
  import { CreatePbxAclGroupCommandInput, CreatePbxAclGroupCommandOutput } from "./commands/CreatePbxAclGroupCommand";
3
9
  import { CreatePbxColleagueCommandInput, CreatePbxColleagueCommandOutput } from "./commands/CreatePbxColleagueCommand";
4
10
  import { CreatePbxOAuth2ClientCommandInput, CreatePbxOAuth2ClientCommandOutput } from "./commands/CreatePbxOAuth2ClientCommand";
@@ -12,6 +18,8 @@ import { GetPbxColleaguesCommandInput, GetPbxColleaguesCommandOutput } from "./c
12
18
  import { GetPbxOAuth2ClientsCommandInput, GetPbxOAuth2ClientsCommandOutput } from "./commands/GetPbxOAuth2ClientsCommand";
13
19
  import { GetPbxesCommandInput, GetPbxesCommandOutput } from "./commands/GetPbxesCommand";
14
20
  import { GetPersonalInfoCommandInput, GetPersonalInfoCommandOutput } from "./commands/GetPersonalInfoCommand";
21
+ import { ListUserActiveCallsCommandInput, ListUserActiveCallsCommandOutput } from "./commands/ListUserActiveCallsCommand";
22
+ import { ListUserDevicesCommandInput, ListUserDevicesCommandOutput } from "./commands/ListUserDevicesCommand";
15
23
  import { NotificationsCommandInput, NotificationsCommandOutput } from "./commands/NotificationsCommand";
16
24
  import { OriginateCallCommandInput, OriginateCallCommandOutput } from "./commands/OriginateCallCommand";
17
25
  import { OriginateCommandInput, OriginateCommandOutput } from "./commands/OriginateCommand";
@@ -19,6 +27,42 @@ import { ReloadBroadcastsCommandInput, ReloadBroadcastsCommandOutput } from "./c
19
27
  import { UpdatePbxOAuth2ClientCommandInput, UpdatePbxOAuth2ClientCommandOutput } from "./commands/UpdatePbxOAuth2ClientCommand";
20
28
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
21
29
  export interface WmsApi {
30
+ /**
31
+ * @see {@link CallControlAnswerCommand}
32
+ */
33
+ callControlAnswer(args: CallControlAnswerCommandInput, options?: __HttpHandlerOptions): Promise<CallControlAnswerCommandOutput>;
34
+ callControlAnswer(args: CallControlAnswerCommandInput, cb: (err: any, data?: CallControlAnswerCommandOutput) => void): void;
35
+ callControlAnswer(args: CallControlAnswerCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CallControlAnswerCommandOutput) => void): void;
36
+ /**
37
+ * @see {@link CallControlHangupCommand}
38
+ */
39
+ callControlHangup(args: CallControlHangupCommandInput, options?: __HttpHandlerOptions): Promise<CallControlHangupCommandOutput>;
40
+ callControlHangup(args: CallControlHangupCommandInput, cb: (err: any, data?: CallControlHangupCommandOutput) => void): void;
41
+ callControlHangup(args: CallControlHangupCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CallControlHangupCommandOutput) => void): void;
42
+ /**
43
+ * @see {@link CallControlHoldCommand}
44
+ */
45
+ callControlHold(args: CallControlHoldCommandInput, options?: __HttpHandlerOptions): Promise<CallControlHoldCommandOutput>;
46
+ callControlHold(args: CallControlHoldCommandInput, cb: (err: any, data?: CallControlHoldCommandOutput) => void): void;
47
+ callControlHold(args: CallControlHoldCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CallControlHoldCommandOutput) => void): void;
48
+ /**
49
+ * @see {@link CallControlMakeCallCommand}
50
+ */
51
+ callControlMakeCall(args: CallControlMakeCallCommandInput, options?: __HttpHandlerOptions): Promise<CallControlMakeCallCommandOutput>;
52
+ callControlMakeCall(args: CallControlMakeCallCommandInput, cb: (err: any, data?: CallControlMakeCallCommandOutput) => void): void;
53
+ callControlMakeCall(args: CallControlMakeCallCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CallControlMakeCallCommandOutput) => void): void;
54
+ /**
55
+ * @see {@link CallControlTransferCommand}
56
+ */
57
+ callControlTransfer(args: CallControlTransferCommandInput, options?: __HttpHandlerOptions): Promise<CallControlTransferCommandOutput>;
58
+ callControlTransfer(args: CallControlTransferCommandInput, cb: (err: any, data?: CallControlTransferCommandOutput) => void): void;
59
+ callControlTransfer(args: CallControlTransferCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CallControlTransferCommandOutput) => void): void;
60
+ /**
61
+ * @see {@link CallControlUnholdCommand}
62
+ */
63
+ callControlUnhold(args: CallControlUnholdCommandInput, options?: __HttpHandlerOptions): Promise<CallControlUnholdCommandOutput>;
64
+ callControlUnhold(args: CallControlUnholdCommandInput, cb: (err: any, data?: CallControlUnholdCommandOutput) => void): void;
65
+ callControlUnhold(args: CallControlUnholdCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CallControlUnholdCommandOutput) => void): void;
22
66
  /**
23
67
  * @see {@link CreatePbxAclGroupCommand}
24
68
  */
@@ -103,6 +147,20 @@ export interface WmsApi {
103
147
  getPersonalInfo(args: GetPersonalInfoCommandInput, options?: __HttpHandlerOptions): Promise<GetPersonalInfoCommandOutput>;
104
148
  getPersonalInfo(args: GetPersonalInfoCommandInput, cb: (err: any, data?: GetPersonalInfoCommandOutput) => void): void;
105
149
  getPersonalInfo(args: GetPersonalInfoCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPersonalInfoCommandOutput) => void): void;
150
+ /**
151
+ * @see {@link ListUserActiveCallsCommand}
152
+ */
153
+ listUserActiveCalls(): Promise<ListUserActiveCallsCommandOutput>;
154
+ listUserActiveCalls(args: ListUserActiveCallsCommandInput, options?: __HttpHandlerOptions): Promise<ListUserActiveCallsCommandOutput>;
155
+ listUserActiveCalls(args: ListUserActiveCallsCommandInput, cb: (err: any, data?: ListUserActiveCallsCommandOutput) => void): void;
156
+ listUserActiveCalls(args: ListUserActiveCallsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListUserActiveCallsCommandOutput) => void): void;
157
+ /**
158
+ * @see {@link ListUserDevicesCommand}
159
+ */
160
+ listUserDevices(): Promise<ListUserDevicesCommandOutput>;
161
+ listUserDevices(args: ListUserDevicesCommandInput, options?: __HttpHandlerOptions): Promise<ListUserDevicesCommandOutput>;
162
+ listUserDevices(args: ListUserDevicesCommandInput, cb: (err: any, data?: ListUserDevicesCommandOutput) => void): void;
163
+ listUserDevices(args: ListUserDevicesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListUserDevicesCommandOutput) => void): void;
106
164
  /**
107
165
  * @see {@link NotificationsCommand}
108
166
  */