@wildix/wms-api-client 1.1.18 → 1.1.20

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 (45) hide show
  1. package/dist-cjs/WmsApi.js +2 -0
  2. package/dist-cjs/WmsApiClient.js +4 -5
  3. package/dist-cjs/commands/ReloadBroadcastsCommand.js +21 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/models/models_0.js +13 -6
  6. package/dist-cjs/protocols/Aws_restJson1.js +103 -130
  7. package/dist-cjs/runtimeConfig.browser.js +1 -1
  8. package/dist-cjs/runtimeConfig.js +4 -3
  9. package/dist-cjs/runtimeExtensions.js +2 -10
  10. package/dist-es/WmsApi.js +2 -0
  11. package/dist-es/WmsApiClient.js +4 -5
  12. package/dist-es/commands/ReloadBroadcastsCommand.js +17 -0
  13. package/dist-es/commands/index.js +1 -0
  14. package/dist-es/models/models_0.js +13 -6
  15. package/dist-es/protocols/Aws_restJson1.js +63 -92
  16. package/dist-es/runtimeConfig.browser.js +2 -2
  17. package/dist-es/runtimeConfig.js +5 -4
  18. package/dist-es/runtimeExtensions.js +2 -10
  19. package/dist-types/WmsApi.d.ts +8 -0
  20. package/dist-types/WmsApiClient.d.ts +3 -2
  21. package/dist-types/commands/CreatePbxAclGroupCommand.d.ts +12 -0
  22. package/dist-types/commands/CreatePbxColleagueCommand.d.ts +12 -0
  23. package/dist-types/commands/CreatePbxOAuth2ClientCommand.d.ts +12 -0
  24. package/dist-types/commands/DeletePbxAclGroupCommand.d.ts +12 -0
  25. package/dist-types/commands/DeletePbxColleagueCommand.d.ts +12 -0
  26. package/dist-types/commands/DeletePbxOAuth2ClientCommand.d.ts +12 -0
  27. package/dist-types/commands/GetColleagueByIdCommand.d.ts +12 -0
  28. package/dist-types/commands/GetPbxAclGroupsPermissionsCommand.d.ts +12 -0
  29. package/dist-types/commands/GetPbxCallGroupsCommand.d.ts +12 -0
  30. package/dist-types/commands/GetPbxColleaguesCommand.d.ts +33 -0
  31. package/dist-types/commands/GetPbxOAuth2ClientsCommand.d.ts +12 -0
  32. package/dist-types/commands/GetPbxesCommand.d.ts +12 -0
  33. package/dist-types/commands/GetPersonalInfoCommand.d.ts +12 -0
  34. package/dist-types/commands/NotificationsCommand.d.ts +12 -0
  35. package/dist-types/commands/OriginateCallCommand.d.ts +12 -0
  36. package/dist-types/commands/OriginateCommand.d.ts +12 -0
  37. package/dist-types/commands/ReloadBroadcastsCommand.d.ts +73 -0
  38. package/dist-types/commands/UpdatePbxOAuth2ClientCommand.d.ts +12 -0
  39. package/dist-types/commands/index.d.ts +1 -0
  40. package/dist-types/models/models_0.d.ts +129 -117
  41. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  42. package/dist-types/runtimeConfig.browser.d.ts +2 -1
  43. package/dist-types/runtimeConfig.d.ts +2 -1
  44. package/dist-types/runtimeConfig.native.d.ts +2 -1
  45. package/package.json +37 -33
@@ -18,6 +18,7 @@ const GetPersonalInfoCommand_1 = require("./commands/GetPersonalInfoCommand");
18
18
  const NotificationsCommand_1 = require("./commands/NotificationsCommand");
19
19
  const OriginateCallCommand_1 = require("./commands/OriginateCallCommand");
20
20
  const OriginateCommand_1 = require("./commands/OriginateCommand");
21
+ const ReloadBroadcastsCommand_1 = require("./commands/ReloadBroadcastsCommand");
21
22
  const UpdatePbxOAuth2ClientCommand_1 = require("./commands/UpdatePbxOAuth2ClientCommand");
22
23
  const smithy_client_1 = require("@smithy/smithy-client");
23
24
  const commands = {
@@ -37,6 +38,7 @@ const commands = {
37
38
  NotificationsCommand: NotificationsCommand_1.NotificationsCommand,
38
39
  OriginateCommand: OriginateCommand_1.OriginateCommand,
39
40
  OriginateCallCommand: OriginateCallCommand_1.OriginateCallCommand,
41
+ ReloadBroadcastsCommand: ReloadBroadcastsCommand_1.ReloadBroadcastsCommand,
40
42
  UpdatePbxOAuth2ClientCommand: UpdatePbxOAuth2ClientCommand_1.UpdatePbxOAuth2ClientCommand,
41
43
  };
42
44
  class WmsApi extends WmsApiClient_1.WmsApiClient {
@@ -10,8 +10,11 @@ const smithy_client_1 = require("@smithy/smithy-client");
10
10
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
11
11
  const smithy_utils_1 = require("@wildix/smithy-utils");
12
12
  class WmsApiClient extends smithy_client_1.Client {
13
+ config;
13
14
  constructor(...[configuration]) {
14
15
  let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
16
+ super(_config_0);
17
+ this.initConfig = _config_0;
15
18
  let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
16
19
  let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
17
20
  let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
@@ -24,11 +27,7 @@ class WmsApiClient extends smithy_client_1.Client {
24
27
  path: ''
25
28
  };
26
29
  };
27
- const config = {
28
- ..._config_3,
29
- endpoint,
30
- };
31
- super(config);
30
+ const config = { ..._config_3, endpoint };
32
31
  this.config = config;
33
32
  this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
34
33
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReloadBroadcastsCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class ReloadBroadcastsCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("WmsApi", "ReloadBroadcasts", {})
15
+ .n("WmsApiClient", "ReloadBroadcastsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ReloadBroadcastsCommand)
18
+ .de(Aws_restJson1_1.de_ReloadBroadcastsCommand)
19
+ .build() {
20
+ }
21
+ exports.ReloadBroadcastsCommand = ReloadBroadcastsCommand;
@@ -17,4 +17,5 @@ tslib_1.__exportStar(require("./GetPersonalInfoCommand"), exports);
17
17
  tslib_1.__exportStar(require("./NotificationsCommand"), exports);
18
18
  tslib_1.__exportStar(require("./OriginateCommand"), exports);
19
19
  tslib_1.__exportStar(require("./OriginateCallCommand"), exports);
20
+ tslib_1.__exportStar(require("./ReloadBroadcastsCommand"), exports);
20
21
  tslib_1.__exportStar(require("./UpdatePbxOAuth2ClientCommand"), exports);
@@ -22,14 +22,16 @@ exports.ResponseType = {
22
22
  RESULT: "result",
23
23
  };
24
24
  class WmsUnauthorizedException extends WmsApiServiceException_1.WmsApiServiceException {
25
+ name = "WmsUnauthorizedException";
26
+ $fault = "client";
27
+ type;
28
+ reason;
25
29
  constructor(opts) {
26
30
  super({
27
31
  name: "WmsUnauthorizedException",
28
32
  $fault: "client",
29
33
  ...opts
30
34
  });
31
- this.name = "WmsUnauthorizedException";
32
- this.$fault = "client";
33
35
  Object.setPrototypeOf(this, WmsUnauthorizedException.prototype);
34
36
  this.type = opts.type;
35
37
  this.reason = opts.reason;
@@ -44,14 +46,17 @@ exports.PbxColleagueRole = {
44
46
  USER: "user",
45
47
  };
46
48
  class WmsValidationException extends WmsApiServiceException_1.WmsApiServiceException {
49
+ name = "WmsValidationException";
50
+ $fault = "client";
51
+ type;
52
+ reason;
53
+ errors;
47
54
  constructor(opts) {
48
55
  super({
49
56
  name: "WmsValidationException",
50
57
  $fault: "client",
51
58
  ...opts
52
59
  });
53
- this.name = "WmsValidationException";
54
- this.$fault = "client";
55
60
  Object.setPrototypeOf(this, WmsValidationException.prototype);
56
61
  this.type = opts.type;
57
62
  this.reason = opts.reason;
@@ -60,14 +65,16 @@ class WmsValidationException extends WmsApiServiceException_1.WmsApiServiceExcep
60
65
  }
61
66
  exports.WmsValidationException = WmsValidationException;
62
67
  class WmsNotFoundException extends WmsApiServiceException_1.WmsApiServiceException {
68
+ name = "WmsNotFoundException";
69
+ $fault = "client";
70
+ type;
71
+ reason;
63
72
  constructor(opts) {
64
73
  super({
65
74
  name: "WmsNotFoundException",
66
75
  $fault: "client",
67
76
  ...opts
68
77
  });
69
- this.name = "WmsNotFoundException";
70
- this.$fault = "client";
71
78
  Object.setPrototypeOf(this, WmsNotFoundException.prototype);
72
79
  this.type = opts.type;
73
80
  this.reason = opts.reason;
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdatePbxOAuth2ClientCommand = exports.de_OriginateCallCommand = exports.de_OriginateCommand = exports.de_NotificationsCommand = exports.de_GetPersonalInfoCommand = exports.de_GetPbxOAuth2ClientsCommand = exports.de_GetPbxesCommand = exports.de_GetPbxColleaguesCommand = exports.de_GetPbxCallGroupsCommand = exports.de_GetPbxAclGroupsPermissionsCommand = exports.de_GetColleagueByIdCommand = exports.de_DeletePbxOAuth2ClientCommand = exports.de_DeletePbxColleagueCommand = exports.de_DeletePbxAclGroupCommand = exports.de_CreatePbxOAuth2ClientCommand = exports.de_CreatePbxColleagueCommand = exports.de_CreatePbxAclGroupCommand = exports.se_UpdatePbxOAuth2ClientCommand = exports.se_OriginateCallCommand = exports.se_OriginateCommand = exports.se_NotificationsCommand = exports.se_GetPersonalInfoCommand = exports.se_GetPbxOAuth2ClientsCommand = exports.se_GetPbxesCommand = exports.se_GetPbxColleaguesCommand = exports.se_GetPbxCallGroupsCommand = exports.se_GetPbxAclGroupsPermissionsCommand = exports.se_GetColleagueByIdCommand = exports.se_DeletePbxOAuth2ClientCommand = exports.se_DeletePbxColleagueCommand = exports.se_DeletePbxAclGroupCommand = exports.se_CreatePbxOAuth2ClientCommand = exports.se_CreatePbxColleagueCommand = exports.se_CreatePbxAclGroupCommand = void 0;
3
+ exports.de_UpdatePbxOAuth2ClientCommand = exports.de_ReloadBroadcastsCommand = exports.de_OriginateCallCommand = exports.de_OriginateCommand = exports.de_NotificationsCommand = exports.de_GetPersonalInfoCommand = exports.de_GetPbxOAuth2ClientsCommand = exports.de_GetPbxesCommand = exports.de_GetPbxColleaguesCommand = exports.de_GetPbxCallGroupsCommand = exports.de_GetPbxAclGroupsPermissionsCommand = exports.de_GetColleagueByIdCommand = exports.de_DeletePbxOAuth2ClientCommand = exports.de_DeletePbxColleagueCommand = exports.de_DeletePbxAclGroupCommand = exports.de_CreatePbxOAuth2ClientCommand = exports.de_CreatePbxColleagueCommand = exports.de_CreatePbxAclGroupCommand = exports.se_UpdatePbxOAuth2ClientCommand = exports.se_ReloadBroadcastsCommand = exports.se_OriginateCallCommand = exports.se_OriginateCommand = exports.se_NotificationsCommand = exports.se_GetPersonalInfoCommand = exports.se_GetPbxOAuth2ClientsCommand = exports.se_GetPbxesCommand = exports.se_GetPbxColleaguesCommand = exports.se_GetPbxCallGroupsCommand = exports.se_GetPbxAclGroupsPermissionsCommand = exports.se_GetColleagueByIdCommand = exports.se_DeletePbxOAuth2ClientCommand = exports.se_DeletePbxColleagueCommand = exports.se_DeletePbxAclGroupCommand = exports.se_CreatePbxOAuth2ClientCommand = exports.se_CreatePbxColleagueCommand = exports.se_CreatePbxAclGroupCommand = void 0;
4
4
  const WmsApiServiceException_1 = require("../models/WmsApiServiceException");
5
5
  const models_0_1 = require("../models/models_0");
6
- const core_1 = require("@smithy/core");
6
+ const core_1 = require("@aws-sdk/core");
7
+ const core_2 = require("@smithy/core");
7
8
  const smithy_client_1 = require("@smithy/smithy-client");
8
9
  const se_CreatePbxAclGroupCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
+ const b = (0, core_2.requestBuilder)(input, context);
10
11
  const headers = {
11
12
  'content-type': 'application/json',
12
13
  };
@@ -25,7 +26,7 @@ const se_CreatePbxAclGroupCommand = async (input, context) => {
25
26
  };
26
27
  exports.se_CreatePbxAclGroupCommand = se_CreatePbxAclGroupCommand;
27
28
  const se_CreatePbxColleagueCommand = async (input, context) => {
28
- const b = (0, core_1.requestBuilder)(input, context);
29
+ const b = (0, core_2.requestBuilder)(input, context);
29
30
  const headers = {
30
31
  'content-type': 'application/json',
31
32
  };
@@ -56,7 +57,7 @@ const se_CreatePbxColleagueCommand = async (input, context) => {
56
57
  };
57
58
  exports.se_CreatePbxColleagueCommand = se_CreatePbxColleagueCommand;
58
59
  const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
59
- const b = (0, core_1.requestBuilder)(input, context);
60
+ const b = (0, core_2.requestBuilder)(input, context);
60
61
  const headers = {
61
62
  'content-type': 'application/json',
62
63
  };
@@ -73,7 +74,7 @@ const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
73
74
  };
74
75
  exports.se_CreatePbxOAuth2ClientCommand = se_CreatePbxOAuth2ClientCommand;
75
76
  const se_DeletePbxAclGroupCommand = async (input, context) => {
76
- const b = (0, core_1.requestBuilder)(input, context);
77
+ const b = (0, core_2.requestBuilder)(input, context);
77
78
  const headers = {};
78
79
  b.bp("/api/v1/pbx/aclgroups/{id}");
79
80
  b.p('id', () => input.id.toString(), '{id}', false);
@@ -85,7 +86,7 @@ const se_DeletePbxAclGroupCommand = async (input, context) => {
85
86
  };
86
87
  exports.se_DeletePbxAclGroupCommand = se_DeletePbxAclGroupCommand;
87
88
  const se_DeletePbxColleagueCommand = async (input, context) => {
88
- const b = (0, core_1.requestBuilder)(input, context);
89
+ const b = (0, core_2.requestBuilder)(input, context);
89
90
  const headers = {};
90
91
  b.bp("/api/v1/PBX/Colleagues/{id}");
91
92
  b.p('id', () => input.id.toString(), '{id}', false);
@@ -97,7 +98,7 @@ const se_DeletePbxColleagueCommand = async (input, context) => {
97
98
  };
98
99
  exports.se_DeletePbxColleagueCommand = se_DeletePbxColleagueCommand;
99
100
  const se_DeletePbxOAuth2ClientCommand = async (input, context) => {
100
- const b = (0, core_1.requestBuilder)(input, context);
101
+ const b = (0, core_2.requestBuilder)(input, context);
101
102
  const headers = {};
102
103
  b.bp("/api/v1/pbx/applications/oauth2/{id}");
103
104
  b.p('id', () => input.id, '{id}', false);
@@ -109,7 +110,7 @@ const se_DeletePbxOAuth2ClientCommand = async (input, context) => {
109
110
  };
110
111
  exports.se_DeletePbxOAuth2ClientCommand = se_DeletePbxOAuth2ClientCommand;
111
112
  const se_GetColleagueByIdCommand = async (input, context) => {
112
- const b = (0, core_1.requestBuilder)(input, context);
113
+ const b = (0, core_2.requestBuilder)(input, context);
113
114
  const headers = {};
114
115
  b.bp("/api/v1/Colleagues/{id}");
115
116
  b.p('id', () => input.id.toString(), '{id}', false);
@@ -121,12 +122,12 @@ const se_GetColleagueByIdCommand = async (input, context) => {
121
122
  };
122
123
  exports.se_GetColleagueByIdCommand = se_GetColleagueByIdCommand;
123
124
  const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
124
- const b = (0, core_1.requestBuilder)(input, context);
125
+ const b = (0, core_2.requestBuilder)(input, context);
125
126
  const headers = {};
126
127
  b.bp("/api/v1/pbx/aclgroups/permissions");
127
128
  const query = (0, smithy_client_1.map)({
128
- [_gr]: [() => input.groups !== void 0, () => ((input[_g] || []).map(_entry => _entry))],
129
- [_pe]: [() => input.permissions !== void 0, () => ((input[_p] || []).map(_entry => _entry))],
129
+ [_gr]: [() => input.groups !== void 0, () => ((input[_g] || []))],
130
+ [_pe]: [() => input.permissions !== void 0, () => ((input[_p] || []))],
130
131
  });
131
132
  let body;
132
133
  b.m("GET")
@@ -137,13 +138,10 @@ const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
137
138
  };
138
139
  exports.se_GetPbxAclGroupsPermissionsCommand = se_GetPbxAclGroupsPermissionsCommand;
139
140
  const se_GetPbxCallGroupsCommand = async (input, context) => {
140
- const b = (0, core_1.requestBuilder)(input, context);
141
- const headers = {
142
- 'content-type': 'application/json',
143
- };
141
+ const b = (0, core_2.requestBuilder)(input, context);
142
+ const headers = {};
144
143
  b.bp("/api/v1/Dialplan/CallGroups");
145
144
  let body;
146
- body = "";
147
145
  b.m("GET")
148
146
  .h(headers)
149
147
  .b(body);
@@ -151,28 +149,28 @@ const se_GetPbxCallGroupsCommand = async (input, context) => {
151
149
  };
152
150
  exports.se_GetPbxCallGroupsCommand = se_GetPbxCallGroupsCommand;
153
151
  const se_GetPbxColleaguesCommand = async (input, context) => {
154
- const b = (0, core_1.requestBuilder)(input, context);
152
+ const b = (0, core_2.requestBuilder)(input, context);
155
153
  const headers = {};
156
154
  b.bp("/api/v1/PBX/Colleagues");
157
155
  const query = (0, smithy_client_1.map)({
158
- [_f]: [() => input.extension !== void 0, () => ((input[_e] || []).map(_entry => _entry))],
159
- [_fi]: [() => input.id !== void 0, () => ((input[_i] || []).map(_entry => _entry))],
160
- [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []).map(_entry => _entry))],
161
- [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []).map(_entry => _entry))],
162
- [_fil]: [() => input.name !== void 0, () => ((input[_n] || []).map(_entry => _entry))],
163
- [_filt]: [() => input.email !== void 0, () => ((input[_em] || []).map(_entry => _entry))],
164
- [_filte]: [() => input.role !== void 0, () => ((input[_r] || []).map(_entry => _entry))],
165
- [_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []).map(_entry => _entry))],
166
- [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []).map(_entry => _entry))],
167
- [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []).map(_entry => _entry))],
168
- [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []).map(_entry => _entry))],
169
- [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []).map(_entry => _entry))],
170
- [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []).map(_entry => _entry))],
171
- [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []).map(_entry => _entry))],
156
+ [_f]: [() => input.extension !== void 0, () => ((input[_e] || []))],
157
+ [_fi]: [() => input.id !== void 0, () => ((input[_i] || []))],
158
+ [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []))],
159
+ [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []))],
160
+ [_fil]: [() => input.name !== void 0, () => ((input[_n] || []))],
161
+ [_filt]: [() => input.email !== void 0, () => ((input[_em] || []))],
162
+ [_filte]: [() => input.role !== void 0, () => ((input[_r] || []))],
163
+ [_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []))],
164
+ [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []))],
165
+ [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []))],
166
+ [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []))],
167
+ [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []))],
168
+ [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []))],
169
+ [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []))],
172
170
  [_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []).join(','))],
173
171
  [_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []).join(','))],
174
172
  [_s]: [, input[_s]],
175
- [_so]: [() => input.sort !== void 0, () => ((input[_so] || []).map(_entry => _entry))],
173
+ [_so]: [() => input.sort !== void 0, () => ((input[_so] || []))],
176
174
  [_st]: [() => input.start !== void 0, () => (input[_st].toString())],
177
175
  [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
178
176
  [_di]: [, input[_di]],
@@ -187,13 +185,10 @@ const se_GetPbxColleaguesCommand = async (input, context) => {
187
185
  };
188
186
  exports.se_GetPbxColleaguesCommand = se_GetPbxColleaguesCommand;
189
187
  const se_GetPbxesCommand = async (input, context) => {
190
- const b = (0, core_1.requestBuilder)(input, context);
191
- const headers = {
192
- 'content-type': 'application/json',
193
- };
188
+ const b = (0, core_2.requestBuilder)(input, context);
189
+ const headers = {};
194
190
  b.bp("/api/v1/network/pbxes");
195
191
  let body;
196
- body = "";
197
192
  b.m("GET")
198
193
  .h(headers)
199
194
  .b(body);
@@ -201,13 +196,10 @@ const se_GetPbxesCommand = async (input, context) => {
201
196
  };
202
197
  exports.se_GetPbxesCommand = se_GetPbxesCommand;
203
198
  const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
204
- const b = (0, core_1.requestBuilder)(input, context);
205
- const headers = {
206
- 'content-type': 'application/json',
207
- };
199
+ const b = (0, core_2.requestBuilder)(input, context);
200
+ const headers = {};
208
201
  b.bp("/api/v1/pbx/applications/oauth2");
209
202
  let body;
210
- body = "";
211
203
  b.m("GET")
212
204
  .h(headers)
213
205
  .b(body);
@@ -215,28 +207,28 @@ const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
215
207
  };
216
208
  exports.se_GetPbxOAuth2ClientsCommand = se_GetPbxOAuth2ClientsCommand;
217
209
  const se_GetPersonalInfoCommand = async (input, context) => {
218
- const b = (0, core_1.requestBuilder)(input, context);
210
+ const b = (0, core_2.requestBuilder)(input, context);
219
211
  const headers = {};
220
212
  b.bp("/api/v1/personal/info");
221
213
  const query = (0, smithy_client_1.map)({
222
- [_f]: [() => input.extension !== void 0, () => ((input[_e] || []).map(_entry => _entry))],
223
- [_fi]: [() => input.id !== void 0, () => ((input[_i] || []).map(_entry => _entry))],
224
- [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []).map(_entry => _entry))],
225
- [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []).map(_entry => _entry))],
226
- [_fil]: [() => input.name !== void 0, () => ((input[_n] || []).map(_entry => _entry))],
227
- [_filt]: [() => input.email !== void 0, () => ((input[_em] || []).map(_entry => _entry))],
228
- [_filte]: [() => input.role !== void 0, () => ((input[_r] || []).map(_entry => _entry))],
229
- [_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []).map(_entry => _entry))],
230
- [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []).map(_entry => _entry))],
231
- [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []).map(_entry => _entry))],
232
- [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []).map(_entry => _entry))],
233
- [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []).map(_entry => _entry))],
234
- [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []).map(_entry => _entry))],
235
- [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []).map(_entry => _entry))],
236
- [_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []).map(_entry => _entry))],
237
- [_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []).map(_entry => _entry))],
214
+ [_f]: [() => input.extension !== void 0, () => ((input[_e] || []))],
215
+ [_fi]: [() => input.id !== void 0, () => ((input[_i] || []))],
216
+ [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []))],
217
+ [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []))],
218
+ [_fil]: [() => input.name !== void 0, () => ((input[_n] || []))],
219
+ [_filt]: [() => input.email !== void 0, () => ((input[_em] || []))],
220
+ [_filte]: [() => input.role !== void 0, () => ((input[_r] || []))],
221
+ [_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []))],
222
+ [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []))],
223
+ [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []))],
224
+ [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []))],
225
+ [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []))],
226
+ [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []))],
227
+ [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []))],
228
+ [_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []))],
229
+ [_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []))],
238
230
  [_s]: [, input[_s]],
239
- [_so]: [() => input.sort !== void 0, () => ((input[_so] || []).map(_entry => _entry))],
231
+ [_so]: [() => input.sort !== void 0, () => ((input[_so] || []))],
240
232
  [_st]: [() => input.start !== void 0, () => (input[_st].toString())],
241
233
  [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
242
234
  [_di]: [, input[_di]],
@@ -251,7 +243,7 @@ const se_GetPersonalInfoCommand = async (input, context) => {
251
243
  };
252
244
  exports.se_GetPersonalInfoCommand = se_GetPersonalInfoCommand;
253
245
  const se_NotificationsCommand = async (input, context) => {
254
- const b = (0, core_1.requestBuilder)(input, context);
246
+ const b = (0, core_2.requestBuilder)(input, context);
255
247
  const headers = {
256
248
  'content-type': 'application/json',
257
249
  };
@@ -277,7 +269,7 @@ const se_NotificationsCommand = async (input, context) => {
277
269
  };
278
270
  exports.se_NotificationsCommand = se_NotificationsCommand;
279
271
  const se_OriginateCommand = async (input, context) => {
280
- const b = (0, core_1.requestBuilder)(input, context);
272
+ const b = (0, core_2.requestBuilder)(input, context);
281
273
  const headers = {
282
274
  'content-type': 'application/json',
283
275
  };
@@ -304,7 +296,7 @@ const se_OriginateCommand = async (input, context) => {
304
296
  };
305
297
  exports.se_OriginateCommand = se_OriginateCommand;
306
298
  const se_OriginateCallCommand = async (input, context) => {
307
- const b = (0, core_1.requestBuilder)(input, context);
299
+ const b = (0, core_2.requestBuilder)(input, context);
308
300
  const headers = {
309
301
  'content-type': 'application/json',
310
302
  };
@@ -321,8 +313,19 @@ const se_OriginateCallCommand = async (input, context) => {
321
313
  return b.build();
322
314
  };
323
315
  exports.se_OriginateCallCommand = se_OriginateCallCommand;
316
+ const se_ReloadBroadcastsCommand = async (input, context) => {
317
+ const b = (0, core_2.requestBuilder)(input, context);
318
+ const headers = {};
319
+ b.bp("/api/v1/broadcasts/reload");
320
+ let body;
321
+ b.m("POST")
322
+ .h(headers)
323
+ .b(body);
324
+ return b.build();
325
+ };
326
+ exports.se_ReloadBroadcastsCommand = se_ReloadBroadcastsCommand;
324
327
  const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
325
- const b = (0, core_1.requestBuilder)(input, context);
328
+ const b = (0, core_2.requestBuilder)(input, context);
326
329
  const headers = {
327
330
  'content-type': 'application/json',
328
331
  };
@@ -346,7 +349,7 @@ const de_CreatePbxAclGroupCommand = async (output, context) => {
346
349
  const contents = (0, smithy_client_1.map)({
347
350
  $metadata: deserializeMetadata(output),
348
351
  });
349
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
352
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
350
353
  const doc = (0, smithy_client_1.take)(data, {
351
354
  'result': smithy_client_1._json,
352
355
  'type': smithy_client_1.expectString,
@@ -362,7 +365,7 @@ const de_CreatePbxColleagueCommand = async (output, context) => {
362
365
  const contents = (0, smithy_client_1.map)({
363
366
  $metadata: deserializeMetadata(output),
364
367
  });
365
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
368
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
366
369
  const doc = (0, smithy_client_1.take)(data, {
367
370
  'result': smithy_client_1._json,
368
371
  'type': smithy_client_1.expectString,
@@ -378,7 +381,7 @@ const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
378
381
  const contents = (0, smithy_client_1.map)({
379
382
  $metadata: deserializeMetadata(output),
380
383
  });
381
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
384
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
382
385
  const doc = (0, smithy_client_1.take)(data, {
383
386
  'result': smithy_client_1._json,
384
387
  'type': smithy_client_1.expectString,
@@ -394,7 +397,7 @@ const de_DeletePbxAclGroupCommand = async (output, context) => {
394
397
  const contents = (0, smithy_client_1.map)({
395
398
  $metadata: deserializeMetadata(output),
396
399
  });
397
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
400
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
398
401
  const doc = (0, smithy_client_1.take)(data, {
399
402
  'result': smithy_client_1.expectString,
400
403
  'type': smithy_client_1.expectString,
@@ -410,7 +413,7 @@ const de_DeletePbxColleagueCommand = async (output, context) => {
410
413
  const contents = (0, smithy_client_1.map)({
411
414
  $metadata: deserializeMetadata(output),
412
415
  });
413
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
416
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
414
417
  const doc = (0, smithy_client_1.take)(data, {
415
418
  'result': smithy_client_1.expectString,
416
419
  'type': smithy_client_1.expectString,
@@ -426,7 +429,7 @@ const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
426
429
  const contents = (0, smithy_client_1.map)({
427
430
  $metadata: deserializeMetadata(output),
428
431
  });
429
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
432
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
430
433
  const doc = (0, smithy_client_1.take)(data, {
431
434
  'result': smithy_client_1.expectString,
432
435
  'type': smithy_client_1.expectString,
@@ -442,7 +445,7 @@ const de_GetColleagueByIdCommand = async (output, context) => {
442
445
  const contents = (0, smithy_client_1.map)({
443
446
  $metadata: deserializeMetadata(output),
444
447
  });
445
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
448
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
446
449
  const doc = (0, smithy_client_1.take)(data, {
447
450
  'result': smithy_client_1._json,
448
451
  'type': smithy_client_1.expectString,
@@ -458,7 +461,7 @@ const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
458
461
  const contents = (0, smithy_client_1.map)({
459
462
  $metadata: deserializeMetadata(output),
460
463
  });
461
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
464
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
462
465
  const doc = (0, smithy_client_1.take)(data, {
463
466
  'result': smithy_client_1._json,
464
467
  'type': smithy_client_1.expectString,
@@ -474,7 +477,7 @@ const de_GetPbxCallGroupsCommand = async (output, context) => {
474
477
  const contents = (0, smithy_client_1.map)({
475
478
  $metadata: deserializeMetadata(output),
476
479
  });
477
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
480
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
478
481
  const doc = (0, smithy_client_1.take)(data, {
479
482
  'result': smithy_client_1._json,
480
483
  'type': smithy_client_1.expectString,
@@ -490,7 +493,7 @@ const de_GetPbxColleaguesCommand = async (output, context) => {
490
493
  const contents = (0, smithy_client_1.map)({
491
494
  $metadata: deserializeMetadata(output),
492
495
  });
493
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
496
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
494
497
  const doc = (0, smithy_client_1.take)(data, {
495
498
  'result': smithy_client_1._json,
496
499
  'type': smithy_client_1.expectString,
@@ -506,7 +509,7 @@ const de_GetPbxesCommand = async (output, context) => {
506
509
  const contents = (0, smithy_client_1.map)({
507
510
  $metadata: deserializeMetadata(output),
508
511
  });
509
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
512
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
510
513
  const doc = (0, smithy_client_1.take)(data, {
511
514
  'result': smithy_client_1._json,
512
515
  'type': smithy_client_1.expectString,
@@ -522,7 +525,7 @@ const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
522
525
  const contents = (0, smithy_client_1.map)({
523
526
  $metadata: deserializeMetadata(output),
524
527
  });
525
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
528
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
526
529
  const doc = (0, smithy_client_1.take)(data, {
527
530
  'result': smithy_client_1._json,
528
531
  'type': smithy_client_1.expectString,
@@ -538,7 +541,7 @@ const de_GetPersonalInfoCommand = async (output, context) => {
538
541
  const contents = (0, smithy_client_1.map)({
539
542
  $metadata: deserializeMetadata(output),
540
543
  });
541
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
544
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
542
545
  const doc = (0, smithy_client_1.take)(data, {
543
546
  'result': smithy_client_1._json,
544
547
  'type': smithy_client_1.expectString,
@@ -554,7 +557,7 @@ const de_NotificationsCommand = async (output, context) => {
554
557
  const contents = (0, smithy_client_1.map)({
555
558
  $metadata: deserializeMetadata(output),
556
559
  });
557
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
560
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
558
561
  const doc = (0, smithy_client_1.take)(data, {
559
562
  'result': smithy_client_1._json,
560
563
  'type': smithy_client_1.expectString,
@@ -570,7 +573,7 @@ const de_OriginateCommand = async (output, context) => {
570
573
  const contents = (0, smithy_client_1.map)({
571
574
  $metadata: deserializeMetadata(output),
572
575
  });
573
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
576
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
574
577
  const doc = (0, smithy_client_1.take)(data, {
575
578
  'result': smithy_client_1.expectString,
576
579
  'type': smithy_client_1.expectString,
@@ -586,7 +589,7 @@ const de_OriginateCallCommand = async (output, context) => {
586
589
  const contents = (0, smithy_client_1.map)({
587
590
  $metadata: deserializeMetadata(output),
588
591
  });
589
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
592
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
590
593
  const doc = (0, smithy_client_1.take)(data, {
591
594
  'result': smithy_client_1.expectString,
592
595
  'type': smithy_client_1.expectString,
@@ -595,6 +598,22 @@ const de_OriginateCallCommand = async (output, context) => {
595
598
  return contents;
596
599
  };
597
600
  exports.de_OriginateCallCommand = de_OriginateCallCommand;
601
+ const de_ReloadBroadcastsCommand = async (output, context) => {
602
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
603
+ return de_CommandError(output, context);
604
+ }
605
+ const contents = (0, smithy_client_1.map)({
606
+ $metadata: deserializeMetadata(output),
607
+ });
608
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
609
+ const doc = (0, smithy_client_1.take)(data, {
610
+ 'result': smithy_client_1.expectString,
611
+ 'type': smithy_client_1.expectString,
612
+ });
613
+ Object.assign(contents, doc);
614
+ return contents;
615
+ };
616
+ exports.de_ReloadBroadcastsCommand = de_ReloadBroadcastsCommand;
598
617
  const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
599
618
  if (output.statusCode !== 200 && output.statusCode >= 300) {
600
619
  return de_CommandError(output, context);
@@ -602,7 +621,7 @@ const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
602
621
  const contents = (0, smithy_client_1.map)({
603
622
  $metadata: deserializeMetadata(output),
604
623
  });
605
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
624
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
606
625
  const doc = (0, smithy_client_1.take)(data, {
607
626
  'result': smithy_client_1._json,
608
627
  'type': smithy_client_1.expectString,
@@ -614,9 +633,9 @@ exports.de_UpdatePbxOAuth2ClientCommand = de_UpdatePbxOAuth2ClientCommand;
614
633
  const de_CommandError = async (output, context) => {
615
634
  const parsedOutput = {
616
635
  ...output,
617
- body: await parseErrorBody(output.body, context)
636
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context)
618
637
  };
619
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
638
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
620
639
  switch (errorCode) {
621
640
  case "WmsUnauthorizedException":
622
641
  case "wildix.wms.api#WmsUnauthorizedException":
@@ -687,12 +706,6 @@ const deserializeMetadata = (output) => ({
687
706
  cfId: output.headers["x-amz-cf-id"],
688
707
  });
689
708
  const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
690
- const isSerializableHeaderValue = (value) => value !== undefined &&
691
- value !== null &&
692
- value !== "" &&
693
- (!Object.getOwnPropertyNames(value).includes("length") ||
694
- value.length != 0) &&
695
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
696
709
  const _c = "count";
697
710
  const _d = "dialplan";
698
711
  const _de = "department";
@@ -733,43 +746,3 @@ const _sF = "searchFields";
733
746
  const _sS = "searchStrategy";
734
747
  const _so = "sort";
735
748
  const _st = "start";
736
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
737
- if (encoded.length) {
738
- return JSON.parse(encoded);
739
- }
740
- return {};
741
- });
742
- const parseErrorBody = async (errorBody, context) => {
743
- const value = await parseBody(errorBody, context);
744
- value.message = value.message ?? value.Message;
745
- return value;
746
- };
747
- const loadRestJsonErrorCode = (output, data) => {
748
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
749
- const sanitizeErrorCode = (rawValue) => {
750
- let cleanValue = rawValue;
751
- if (typeof cleanValue === "number") {
752
- cleanValue = cleanValue.toString();
753
- }
754
- if (cleanValue.indexOf(",") >= 0) {
755
- cleanValue = cleanValue.split(",")[0];
756
- }
757
- if (cleanValue.indexOf(":") >= 0) {
758
- cleanValue = cleanValue.split(":")[0];
759
- }
760
- if (cleanValue.indexOf("#") >= 0) {
761
- cleanValue = cleanValue.split("#")[1];
762
- }
763
- return cleanValue;
764
- };
765
- const headerKey = findKey(output.headers, "x-amzn-errortype");
766
- if (headerKey !== undefined) {
767
- return sanitizeErrorCode(output.headers[headerKey]);
768
- }
769
- if (data.code !== undefined) {
770
- return sanitizeErrorCode(data.code);
771
- }
772
- if (data["__type"] !== undefined) {
773
- return sanitizeErrorCode(data["__type"]);
774
- }
775
- };