@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
@@ -21,7 +21,7 @@ const getRuntimeConfig = (config) => {
21
21
  runtime: "browser",
22
22
  defaultsMode,
23
23
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
24
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
24
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
25
25
  maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
26
26
  requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
27
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
@@ -25,12 +25,13 @@ const getRuntimeConfig = (config) => {
25
25
  runtime: "node",
26
26
  defaultsMode,
27
27
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
28
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
29
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
28
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
29
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
30
30
  requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
- retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }),
31
+ retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }, config),
32
32
  sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
33
33
  streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
34
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
34
35
  };
35
36
  };
36
37
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -3,17 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveRuntimeExtensions = void 0;
4
4
  const protocol_http_1 = require("@smithy/protocol-http");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
- const asPartial = (t) => t;
7
6
  const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
8
- const extensionConfiguration = {
9
- ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
10
- ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
11
- };
7
+ const extensionConfiguration = Object.assign((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig));
12
8
  extensions.forEach(extension => extension.configure(extensionConfiguration));
13
- return {
14
- ...runtimeConfig,
15
- ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
16
- ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
17
- };
9
+ return Object.assign(runtimeConfig, (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration));
18
10
  };
19
11
  exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
package/dist-es/WmsApi.js CHANGED
@@ -15,6 +15,7 @@ import { GetPersonalInfoCommand, } from "./commands/GetPersonalInfoCommand";
15
15
  import { NotificationsCommand, } from "./commands/NotificationsCommand";
16
16
  import { OriginateCallCommand, } from "./commands/OriginateCallCommand";
17
17
  import { OriginateCommand, } from "./commands/OriginateCommand";
18
+ import { ReloadBroadcastsCommand, } from "./commands/ReloadBroadcastsCommand";
18
19
  import { UpdatePbxOAuth2ClientCommand, } from "./commands/UpdatePbxOAuth2ClientCommand";
19
20
  import { createAggregatedClient } from "@smithy/smithy-client";
20
21
  const commands = {
@@ -34,6 +35,7 @@ const commands = {
34
35
  NotificationsCommand,
35
36
  OriginateCommand,
36
37
  OriginateCallCommand,
38
+ ReloadBroadcastsCommand,
37
39
  UpdatePbxOAuth2ClientCommand,
38
40
  };
39
41
  export class WmsApi extends WmsApiClient {
@@ -7,8 +7,11 @@ import { Client as __Client, } from "@smithy/smithy-client";
7
7
  import { authorizationMiddleware } from '@wildix/smithy-utils';
8
8
  export { __Client };
9
9
  export class WmsApiClient extends __Client {
10
+ config;
10
11
  constructor(...[configuration]) {
11
12
  let _config_0 = __getRuntimeConfig(configuration || {});
13
+ super(_config_0);
14
+ this.initConfig = _config_0;
12
15
  let _config_1 = resolveUserAgentConfig(_config_0);
13
16
  let _config_2 = resolveRetryConfig(_config_1);
14
17
  let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
@@ -21,11 +24,7 @@ export class WmsApiClient extends __Client {
21
24
  path: ''
22
25
  };
23
26
  };
24
- const config = {
25
- ..._config_3,
26
- endpoint,
27
- };
28
- super(config);
27
+ const config = { ..._config_3, endpoint };
29
28
  this.config = config;
30
29
  this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
31
30
  this.middlewareStack.use(getUserAgentPlugin(this.config));
@@ -0,0 +1,17 @@
1
+ import { de_ReloadBroadcastsCommand, se_ReloadBroadcastsCommand, } 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 ReloadBroadcastsCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WmsApi", "ReloadBroadcasts", {})
12
+ .n("WmsApiClient", "ReloadBroadcastsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_ReloadBroadcastsCommand)
15
+ .de(de_ReloadBroadcastsCommand)
16
+ .build() {
17
+ }
@@ -14,4 +14,5 @@ export * from "./GetPersonalInfoCommand";
14
14
  export * from "./NotificationsCommand";
15
15
  export * from "./OriginateCommand";
16
16
  export * from "./OriginateCallCommand";
17
+ export * from "./ReloadBroadcastsCommand";
17
18
  export * from "./UpdatePbxOAuth2ClientCommand";
@@ -19,14 +19,16 @@ export const ResponseType = {
19
19
  RESULT: "result",
20
20
  };
21
21
  export class WmsUnauthorizedException extends __BaseException {
22
+ name = "WmsUnauthorizedException";
23
+ $fault = "client";
24
+ type;
25
+ reason;
22
26
  constructor(opts) {
23
27
  super({
24
28
  name: "WmsUnauthorizedException",
25
29
  $fault: "client",
26
30
  ...opts
27
31
  });
28
- this.name = "WmsUnauthorizedException";
29
- this.$fault = "client";
30
32
  Object.setPrototypeOf(this, WmsUnauthorizedException.prototype);
31
33
  this.type = opts.type;
32
34
  this.reason = opts.reason;
@@ -40,14 +42,17 @@ export const PbxColleagueRole = {
40
42
  USER: "user",
41
43
  };
42
44
  export class WmsValidationException extends __BaseException {
45
+ name = "WmsValidationException";
46
+ $fault = "client";
47
+ type;
48
+ reason;
49
+ errors;
43
50
  constructor(opts) {
44
51
  super({
45
52
  name: "WmsValidationException",
46
53
  $fault: "client",
47
54
  ...opts
48
55
  });
49
- this.name = "WmsValidationException";
50
- this.$fault = "client";
51
56
  Object.setPrototypeOf(this, WmsValidationException.prototype);
52
57
  this.type = opts.type;
53
58
  this.reason = opts.reason;
@@ -55,14 +60,16 @@ export class WmsValidationException extends __BaseException {
55
60
  }
56
61
  }
57
62
  export class WmsNotFoundException extends __BaseException {
63
+ name = "WmsNotFoundException";
64
+ $fault = "client";
65
+ type;
66
+ reason;
58
67
  constructor(opts) {
59
68
  super({
60
69
  name: "WmsNotFoundException",
61
70
  $fault: "client",
62
71
  ...opts
63
72
  });
64
- this.name = "WmsNotFoundException";
65
- this.$fault = "client";
66
73
  Object.setPrototypeOf(this, WmsNotFoundException.prototype);
67
74
  this.type = opts.type;
68
75
  this.reason = opts.reason;
@@ -1,5 +1,6 @@
1
1
  import { WmsApiServiceException as __BaseException } from "../models/WmsApiServiceException";
2
2
  import { WmsNotFoundException, WmsUnauthorizedException, WmsValidationException, } from "../models/models_0";
3
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
3
4
  import { requestBuilder as rb } from "@smithy/core";
4
5
  import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
6
  export const se_CreatePbxAclGroupCommand = async (input, context) => {
@@ -115,8 +116,8 @@ export const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
115
116
  const headers = {};
116
117
  b.bp("/api/v1/pbx/aclgroups/permissions");
117
118
  const query = map({
118
- [_gr]: [() => input.groups !== void 0, () => ((input[_g] || []).map(_entry => _entry))],
119
- [_pe]: [() => input.permissions !== void 0, () => ((input[_p] || []).map(_entry => _entry))],
119
+ [_gr]: [() => input.groups !== void 0, () => ((input[_g] || []))],
120
+ [_pe]: [() => input.permissions !== void 0, () => ((input[_p] || []))],
120
121
  });
121
122
  let body;
122
123
  b.m("GET")
@@ -127,12 +128,9 @@ export const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
127
128
  };
128
129
  export const se_GetPbxCallGroupsCommand = async (input, context) => {
129
130
  const b = rb(input, context);
130
- const headers = {
131
- 'content-type': 'application/json',
132
- };
131
+ const headers = {};
133
132
  b.bp("/api/v1/Dialplan/CallGroups");
134
133
  let body;
135
- body = "";
136
134
  b.m("GET")
137
135
  .h(headers)
138
136
  .b(body);
@@ -143,24 +141,24 @@ export const se_GetPbxColleaguesCommand = async (input, context) => {
143
141
  const headers = {};
144
142
  b.bp("/api/v1/PBX/Colleagues");
145
143
  const query = map({
146
- [_f]: [() => input.extension !== void 0, () => ((input[_e] || []).map(_entry => _entry))],
147
- [_fi]: [() => input.id !== void 0, () => ((input[_i] || []).map(_entry => _entry))],
148
- [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []).map(_entry => _entry))],
149
- [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []).map(_entry => _entry))],
150
- [_fil]: [() => input.name !== void 0, () => ((input[_n] || []).map(_entry => _entry))],
151
- [_filt]: [() => input.email !== void 0, () => ((input[_em] || []).map(_entry => _entry))],
152
- [_filte]: [() => input.role !== void 0, () => ((input[_r] || []).map(_entry => _entry))],
153
- [_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []).map(_entry => _entry))],
154
- [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []).map(_entry => _entry))],
155
- [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []).map(_entry => _entry))],
156
- [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []).map(_entry => _entry))],
157
- [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []).map(_entry => _entry))],
158
- [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []).map(_entry => _entry))],
159
- [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []).map(_entry => _entry))],
144
+ [_f]: [() => input.extension !== void 0, () => ((input[_e] || []))],
145
+ [_fi]: [() => input.id !== void 0, () => ((input[_i] || []))],
146
+ [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []))],
147
+ [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []))],
148
+ [_fil]: [() => input.name !== void 0, () => ((input[_n] || []))],
149
+ [_filt]: [() => input.email !== void 0, () => ((input[_em] || []))],
150
+ [_filte]: [() => input.role !== void 0, () => ((input[_r] || []))],
151
+ [_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []))],
152
+ [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []))],
153
+ [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []))],
154
+ [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []))],
155
+ [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []))],
156
+ [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []))],
157
+ [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []))],
160
158
  [_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []).join(','))],
161
159
  [_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []).join(','))],
162
160
  [_s]: [, input[_s]],
163
- [_so]: [() => input.sort !== void 0, () => ((input[_so] || []).map(_entry => _entry))],
161
+ [_so]: [() => input.sort !== void 0, () => ((input[_so] || []))],
164
162
  [_st]: [() => input.start !== void 0, () => (input[_st].toString())],
165
163
  [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
166
164
  [_di]: [, input[_di]],
@@ -175,12 +173,9 @@ export const se_GetPbxColleaguesCommand = async (input, context) => {
175
173
  };
176
174
  export const se_GetPbxesCommand = async (input, context) => {
177
175
  const b = rb(input, context);
178
- const headers = {
179
- 'content-type': 'application/json',
180
- };
176
+ const headers = {};
181
177
  b.bp("/api/v1/network/pbxes");
182
178
  let body;
183
- body = "";
184
179
  b.m("GET")
185
180
  .h(headers)
186
181
  .b(body);
@@ -188,12 +183,9 @@ export const se_GetPbxesCommand = async (input, context) => {
188
183
  };
189
184
  export const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
190
185
  const b = rb(input, context);
191
- const headers = {
192
- 'content-type': 'application/json',
193
- };
186
+ const headers = {};
194
187
  b.bp("/api/v1/pbx/applications/oauth2");
195
188
  let body;
196
- body = "";
197
189
  b.m("GET")
198
190
  .h(headers)
199
191
  .b(body);
@@ -204,24 +196,24 @@ export const se_GetPersonalInfoCommand = async (input, context) => {
204
196
  const headers = {};
205
197
  b.bp("/api/v1/personal/info");
206
198
  const query = map({
207
- [_f]: [() => input.extension !== void 0, () => ((input[_e] || []).map(_entry => _entry))],
208
- [_fi]: [() => input.id !== void 0, () => ((input[_i] || []).map(_entry => _entry))],
209
- [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []).map(_entry => _entry))],
210
- [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []).map(_entry => _entry))],
211
- [_fil]: [() => input.name !== void 0, () => ((input[_n] || []).map(_entry => _entry))],
212
- [_filt]: [() => input.email !== void 0, () => ((input[_em] || []).map(_entry => _entry))],
213
- [_filte]: [() => input.role !== void 0, () => ((input[_r] || []).map(_entry => _entry))],
214
- [_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []).map(_entry => _entry))],
215
- [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []).map(_entry => _entry))],
216
- [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []).map(_entry => _entry))],
217
- [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []).map(_entry => _entry))],
218
- [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []).map(_entry => _entry))],
219
- [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []).map(_entry => _entry))],
220
- [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []).map(_entry => _entry))],
221
- [_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []).map(_entry => _entry))],
222
- [_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []).map(_entry => _entry))],
199
+ [_f]: [() => input.extension !== void 0, () => ((input[_e] || []))],
200
+ [_fi]: [() => input.id !== void 0, () => ((input[_i] || []))],
201
+ [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []))],
202
+ [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []))],
203
+ [_fil]: [() => input.name !== void 0, () => ((input[_n] || []))],
204
+ [_filt]: [() => input.email !== void 0, () => ((input[_em] || []))],
205
+ [_filte]: [() => input.role !== void 0, () => ((input[_r] || []))],
206
+ [_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || []))],
207
+ [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []))],
208
+ [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []))],
209
+ [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []))],
210
+ [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []))],
211
+ [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []))],
212
+ [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []))],
213
+ [_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []))],
214
+ [_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []))],
223
215
  [_s]: [, input[_s]],
224
- [_so]: [() => input.sort !== void 0, () => ((input[_so] || []).map(_entry => _entry))],
216
+ [_so]: [() => input.sort !== void 0, () => ((input[_so] || []))],
225
217
  [_st]: [() => input.start !== void 0, () => (input[_st].toString())],
226
218
  [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
227
219
  [_di]: [, input[_di]],
@@ -302,6 +294,16 @@ export const se_OriginateCallCommand = async (input, context) => {
302
294
  .b(body);
303
295
  return b.build();
304
296
  };
297
+ export const se_ReloadBroadcastsCommand = async (input, context) => {
298
+ const b = rb(input, context);
299
+ const headers = {};
300
+ b.bp("/api/v1/broadcasts/reload");
301
+ let body;
302
+ b.m("POST")
303
+ .h(headers)
304
+ .b(body);
305
+ return b.build();
306
+ };
305
307
  export const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
306
308
  const b = rb(input, context);
307
309
  const headers = {
@@ -559,6 +561,21 @@ export const de_OriginateCallCommand = async (output, context) => {
559
561
  Object.assign(contents, doc);
560
562
  return contents;
561
563
  };
564
+ export const de_ReloadBroadcastsCommand = async (output, context) => {
565
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
566
+ return de_CommandError(output, context);
567
+ }
568
+ const contents = map({
569
+ $metadata: deserializeMetadata(output),
570
+ });
571
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
572
+ const doc = take(data, {
573
+ 'result': __expectString,
574
+ 'type': __expectString,
575
+ });
576
+ Object.assign(contents, doc);
577
+ return contents;
578
+ };
562
579
  export const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
563
580
  if (output.statusCode !== 200 && output.statusCode >= 300) {
564
581
  return de_CommandError(output, context);
@@ -650,12 +667,6 @@ const deserializeMetadata = (output) => ({
650
667
  cfId: output.headers["x-amz-cf-id"],
651
668
  });
652
669
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
653
- const isSerializableHeaderValue = (value) => value !== undefined &&
654
- value !== null &&
655
- value !== "" &&
656
- (!Object.getOwnPropertyNames(value).includes("length") ||
657
- value.length != 0) &&
658
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
659
670
  const _c = "count";
660
671
  const _d = "dialplan";
661
672
  const _de = "department";
@@ -696,43 +707,3 @@ const _sF = "searchFields";
696
707
  const _sS = "searchStrategy";
697
708
  const _so = "sort";
698
709
  const _st = "start";
699
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
700
- if (encoded.length) {
701
- return JSON.parse(encoded);
702
- }
703
- return {};
704
- });
705
- const parseErrorBody = async (errorBody, context) => {
706
- const value = await parseBody(errorBody, context);
707
- value.message = value.message ?? value.Message;
708
- return value;
709
- };
710
- const loadRestJsonErrorCode = (output, data) => {
711
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
712
- const sanitizeErrorCode = (rawValue) => {
713
- let cleanValue = rawValue;
714
- if (typeof cleanValue === "number") {
715
- cleanValue = cleanValue.toString();
716
- }
717
- if (cleanValue.indexOf(",") >= 0) {
718
- cleanValue = cleanValue.split(",")[0];
719
- }
720
- if (cleanValue.indexOf(":") >= 0) {
721
- cleanValue = cleanValue.split(":")[0];
722
- }
723
- if (cleanValue.indexOf("#") >= 0) {
724
- cleanValue = cleanValue.split("#")[1];
725
- }
726
- return cleanValue;
727
- };
728
- const headerKey = findKey(output.headers, "x-amzn-errortype");
729
- if (headerKey !== undefined) {
730
- return sanitizeErrorCode(output.headers[headerKey]);
731
- }
732
- if (data.code !== undefined) {
733
- return sanitizeErrorCode(data.code);
734
- }
735
- if (data["__type"] !== undefined) {
736
- return sanitizeErrorCode(data["__type"]);
737
- }
738
- };
@@ -1,6 +1,6 @@
1
1
  import packageInfo from "../package.json";
2
2
  import { Sha256 } from "@aws-crypto/sha256-browser";
3
- import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
3
+ import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
4
4
  import { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
5
5
  import { calculateBodyLength } from "@smithy/util-body-length-browser";
6
6
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
@@ -17,7 +17,7 @@ export const getRuntimeConfig = (config) => {
17
17
  runtime: "browser",
18
18
  defaultsMode,
19
19
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
20
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
21
21
  maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
22
22
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
23
23
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
@@ -1,5 +1,5 @@
1
1
  import packageInfo from "../package.json";
2
- import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
2
+ import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider, } from "@aws-sdk/util-user-agent-node";
3
3
  import { Hash } from "@smithy/hash-node";
4
4
  import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
5
5
  import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
@@ -21,11 +21,12 @@ export const getRuntimeConfig = (config) => {
21
21
  runtime: "node",
22
22
  defaultsMode,
23
23
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
24
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
25
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
24
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
26
26
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
- retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }),
27
+ retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }, config),
28
28
  sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
29
29
  streamCollector: config?.streamCollector ?? streamCollector,
30
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
30
31
  };
31
32
  };
@@ -1,15 +1,7 @@
1
1
  import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, } from "@smithy/protocol-http";
2
2
  import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, } from "@smithy/smithy-client";
3
- const asPartial = (t) => t;
4
3
  export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
5
- const extensionConfiguration = {
6
- ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
7
- ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
8
- };
4
+ const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig));
9
5
  extensions.forEach(extension => extension.configure(extensionConfiguration));
10
- return {
11
- ...runtimeConfig,
12
- ...resolveDefaultRuntimeConfig(extensionConfiguration),
13
- ...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
14
- };
6
+ return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration));
15
7
  };
@@ -15,6 +15,7 @@ import { GetPersonalInfoCommandInput, GetPersonalInfoCommandOutput } from "./com
15
15
  import { NotificationsCommandInput, NotificationsCommandOutput } from "./commands/NotificationsCommand";
16
16
  import { OriginateCallCommandInput, OriginateCallCommandOutput } from "./commands/OriginateCallCommand";
17
17
  import { OriginateCommandInput, OriginateCommandOutput } from "./commands/OriginateCommand";
18
+ import { ReloadBroadcastsCommandInput, ReloadBroadcastsCommandOutput } from "./commands/ReloadBroadcastsCommand";
18
19
  import { UpdatePbxOAuth2ClientCommandInput, UpdatePbxOAuth2ClientCommandOutput } from "./commands/UpdatePbxOAuth2ClientCommand";
19
20
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
20
21
  export interface WmsApi {
@@ -120,6 +121,13 @@ export interface WmsApi {
120
121
  originateCall(args: OriginateCallCommandInput, options?: __HttpHandlerOptions): Promise<OriginateCallCommandOutput>;
121
122
  originateCall(args: OriginateCallCommandInput, cb: (err: any, data?: OriginateCallCommandOutput) => void): void;
122
123
  originateCall(args: OriginateCallCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: OriginateCallCommandOutput) => void): void;
124
+ /**
125
+ * @see {@link ReloadBroadcastsCommand}
126
+ */
127
+ reloadBroadcasts(): Promise<ReloadBroadcastsCommandOutput>;
128
+ reloadBroadcasts(args: ReloadBroadcastsCommandInput, options?: __HttpHandlerOptions): Promise<ReloadBroadcastsCommandOutput>;
129
+ reloadBroadcasts(args: ReloadBroadcastsCommandInput, cb: (err: any, data?: ReloadBroadcastsCommandOutput) => void): void;
130
+ reloadBroadcasts(args: ReloadBroadcastsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ReloadBroadcastsCommandOutput) => void): void;
123
131
  /**
124
132
  * @see {@link UpdatePbxOAuth2ClientCommand}
125
133
  */
@@ -14,6 +14,7 @@ import { GetPersonalInfoCommandInput, GetPersonalInfoCommandOutput } from "./com
14
14
  import { NotificationsCommandInput, NotificationsCommandOutput } from "./commands/NotificationsCommand";
15
15
  import { OriginateCallCommandInput, OriginateCallCommandOutput } from "./commands/OriginateCallCommand";
16
16
  import { OriginateCommandInput, OriginateCommandOutput } from "./commands/OriginateCommand";
17
+ import { ReloadBroadcastsCommandInput, ReloadBroadcastsCommandOutput } from "./commands/ReloadBroadcastsCommand";
17
18
  import { UpdatePbxOAuth2ClientCommandInput, UpdatePbxOAuth2ClientCommandOutput } from "./commands/UpdatePbxOAuth2ClientCommand";
18
19
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
19
20
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
@@ -26,11 +27,11 @@ export { __Client };
26
27
  /**
27
28
  * @public
28
29
  */
29
- export type ServiceInputTypes = CreatePbxAclGroupCommandInput | CreatePbxColleagueCommandInput | CreatePbxOAuth2ClientCommandInput | DeletePbxAclGroupCommandInput | DeletePbxColleagueCommandInput | DeletePbxOAuth2ClientCommandInput | GetColleagueByIdCommandInput | GetPbxAclGroupsPermissionsCommandInput | GetPbxCallGroupsCommandInput | GetPbxColleaguesCommandInput | GetPbxOAuth2ClientsCommandInput | GetPbxesCommandInput | GetPersonalInfoCommandInput | NotificationsCommandInput | OriginateCallCommandInput | OriginateCommandInput | UpdatePbxOAuth2ClientCommandInput;
30
+ export type ServiceInputTypes = CreatePbxAclGroupCommandInput | CreatePbxColleagueCommandInput | CreatePbxOAuth2ClientCommandInput | DeletePbxAclGroupCommandInput | DeletePbxColleagueCommandInput | DeletePbxOAuth2ClientCommandInput | GetColleagueByIdCommandInput | GetPbxAclGroupsPermissionsCommandInput | GetPbxCallGroupsCommandInput | GetPbxColleaguesCommandInput | GetPbxOAuth2ClientsCommandInput | GetPbxesCommandInput | GetPersonalInfoCommandInput | NotificationsCommandInput | OriginateCallCommandInput | OriginateCommandInput | ReloadBroadcastsCommandInput | UpdatePbxOAuth2ClientCommandInput;
30
31
  /**
31
32
  * @public
32
33
  */
33
- export type ServiceOutputTypes = CreatePbxAclGroupCommandOutput | CreatePbxColleagueCommandOutput | CreatePbxOAuth2ClientCommandOutput | DeletePbxAclGroupCommandOutput | DeletePbxColleagueCommandOutput | DeletePbxOAuth2ClientCommandOutput | GetColleagueByIdCommandOutput | GetPbxAclGroupsPermissionsCommandOutput | GetPbxCallGroupsCommandOutput | GetPbxColleaguesCommandOutput | GetPbxOAuth2ClientsCommandOutput | GetPbxesCommandOutput | GetPersonalInfoCommandOutput | NotificationsCommandOutput | OriginateCallCommandOutput | OriginateCommandOutput | UpdatePbxOAuth2ClientCommandOutput;
34
+ export type ServiceOutputTypes = CreatePbxAclGroupCommandOutput | CreatePbxColleagueCommandOutput | CreatePbxOAuth2ClientCommandOutput | DeletePbxAclGroupCommandOutput | DeletePbxColleagueCommandOutput | DeletePbxOAuth2ClientCommandOutput | GetColleagueByIdCommandOutput | GetPbxAclGroupsPermissionsCommandOutput | GetPbxCallGroupsCommandOutput | GetPbxColleaguesCommandOutput | GetPbxOAuth2ClientsCommandOutput | GetPbxesCommandOutput | GetPersonalInfoCommandOutput | NotificationsCommandOutput | OriginateCallCommandOutput | OriginateCommandOutput | ReloadBroadcastsCommandOutput | UpdatePbxOAuth2ClientCommandOutput;
34
35
  /**
35
36
  * @public
36
37
  */
@@ -81,6 +81,18 @@ declare const CreatePbxAclGroupCommand_base: {
81
81
  * @throws {@link WmsApiServiceException}
82
82
  * <p>Base exception class for all service exceptions from WmsApi service.</p>
83
83
  *
84
+ *
84
85
  */
85
86
  export declare class CreatePbxAclGroupCommand extends CreatePbxAclGroupCommand_base {
87
+ /** @internal type navigation helper, not in runtime. */
88
+ protected static __types: {
89
+ api: {
90
+ input: CreatePbxAclGroupInput;
91
+ output: CreatePbxAclGroupOutput;
92
+ };
93
+ sdk: {
94
+ input: CreatePbxAclGroupCommandInput;
95
+ output: CreatePbxAclGroupCommandOutput;
96
+ };
97
+ };
86
98
  }
@@ -95,6 +95,18 @@ declare const CreatePbxColleagueCommand_base: {
95
95
  * @throws {@link WmsApiServiceException}
96
96
  * <p>Base exception class for all service exceptions from WmsApi service.</p>
97
97
  *
98
+ *
98
99
  */
99
100
  export declare class CreatePbxColleagueCommand extends CreatePbxColleagueCommand_base {
101
+ /** @internal type navigation helper, not in runtime. */
102
+ protected static __types: {
103
+ api: {
104
+ input: CreatePbxColleagueInput;
105
+ output: CreatePbxColleagueOutput;
106
+ };
107
+ sdk: {
108
+ input: CreatePbxColleagueCommandInput;
109
+ output: CreatePbxColleagueCommandOutput;
110
+ };
111
+ };
100
112
  }
@@ -74,7 +74,19 @@ declare const CreatePbxOAuth2ClientCommand_base: {
74
74
  * @throws {@link WmsApiServiceException}
75
75
  * <p>Base exception class for all service exceptions from WmsApi service.</p>
76
76
  *
77
+ *
77
78
  * @public
78
79
  */
79
80
  export declare class CreatePbxOAuth2ClientCommand extends CreatePbxOAuth2ClientCommand_base {
81
+ /** @internal type navigation helper, not in runtime. */
82
+ protected static __types: {
83
+ api: {
84
+ input: CreatePbxOAuth2ClientInput;
85
+ output: CreatePbxOAuth2ClientOutput;
86
+ };
87
+ sdk: {
88
+ input: CreatePbxOAuth2ClientCommandInput;
89
+ output: CreatePbxOAuth2ClientCommandOutput;
90
+ };
91
+ };
80
92
  }
@@ -58,6 +58,18 @@ declare const DeletePbxAclGroupCommand_base: {
58
58
  * @throws {@link WmsApiServiceException}
59
59
  * <p>Base exception class for all service exceptions from WmsApi service.</p>
60
60
  *
61
+ *
61
62
  */
62
63
  export declare class DeletePbxAclGroupCommand extends DeletePbxAclGroupCommand_base {
64
+ /** @internal type navigation helper, not in runtime. */
65
+ protected static __types: {
66
+ api: {
67
+ input: DeletePbxAclGroupInput;
68
+ output: DeletePbxAclGroupOutput;
69
+ };
70
+ sdk: {
71
+ input: DeletePbxAclGroupCommandInput;
72
+ output: DeletePbxAclGroupCommandOutput;
73
+ };
74
+ };
63
75
  }
@@ -58,6 +58,18 @@ declare const DeletePbxColleagueCommand_base: {
58
58
  * @throws {@link WmsApiServiceException}
59
59
  * <p>Base exception class for all service exceptions from WmsApi service.</p>
60
60
  *
61
+ *
61
62
  */
62
63
  export declare class DeletePbxColleagueCommand extends DeletePbxColleagueCommand_base {
64
+ /** @internal type navigation helper, not in runtime. */
65
+ protected static __types: {
66
+ api: {
67
+ input: DeletePbxColleagueInput;
68
+ output: DeletePbxColleagueOutput;
69
+ };
70
+ sdk: {
71
+ input: DeletePbxColleagueCommandInput;
72
+ output: DeletePbxColleagueCommandOutput;
73
+ };
74
+ };
63
75
  }
@@ -59,7 +59,19 @@ declare const DeletePbxOAuth2ClientCommand_base: {
59
59
  * @throws {@link WmsApiServiceException}
60
60
  * <p>Base exception class for all service exceptions from WmsApi service.</p>
61
61
  *
62
+ *
62
63
  * @public
63
64
  */
64
65
  export declare class DeletePbxOAuth2ClientCommand extends DeletePbxOAuth2ClientCommand_base {
66
+ /** @internal type navigation helper, not in runtime. */
67
+ protected static __types: {
68
+ api: {
69
+ input: DeletePbxOAuth2ClientInput;
70
+ output: DeletePbxOAuth2ClientOutput;
71
+ };
72
+ sdk: {
73
+ input: DeletePbxOAuth2ClientCommandInput;
74
+ output: DeletePbxOAuth2ClientCommandOutput;
75
+ };
76
+ };
65
77
  }