@wildix/wms-api-client 1.1.17 → 1.1.19
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.
- package/dist-cjs/WmsApiClient.js +4 -5
- package/dist-cjs/models/models_0.js +13 -6
- package/dist-cjs/protocols/Aws_restJson1.js +76 -130
- package/dist-cjs/runtimeConfig.browser.js +1 -1
- package/dist-cjs/runtimeConfig.js +4 -3
- package/dist-cjs/runtimeExtensions.js +2 -10
- package/dist-es/WmsApiClient.js +4 -5
- package/dist-es/models/models_0.js +13 -6
- package/dist-es/protocols/Aws_restJson1.js +39 -93
- package/dist-es/runtimeConfig.browser.js +2 -2
- package/dist-es/runtimeConfig.js +5 -4
- package/dist-es/runtimeExtensions.js +2 -10
- package/dist-types/commands/CreatePbxAclGroupCommand.d.ts +12 -0
- package/dist-types/commands/CreatePbxColleagueCommand.d.ts +12 -0
- package/dist-types/commands/CreatePbxOAuth2ClientCommand.d.ts +12 -0
- package/dist-types/commands/DeletePbxAclGroupCommand.d.ts +12 -0
- package/dist-types/commands/DeletePbxColleagueCommand.d.ts +12 -0
- package/dist-types/commands/DeletePbxOAuth2ClientCommand.d.ts +12 -0
- package/dist-types/commands/GetColleagueByIdCommand.d.ts +12 -0
- package/dist-types/commands/GetPbxAclGroupsPermissionsCommand.d.ts +12 -0
- package/dist-types/commands/GetPbxCallGroupsCommand.d.ts +12 -0
- package/dist-types/commands/GetPbxColleaguesCommand.d.ts +33 -0
- package/dist-types/commands/GetPbxOAuth2ClientsCommand.d.ts +12 -0
- package/dist-types/commands/GetPbxesCommand.d.ts +12 -0
- package/dist-types/commands/GetPersonalInfoCommand.d.ts +12 -0
- package/dist-types/commands/NotificationsCommand.d.ts +13 -1
- package/dist-types/commands/OriginateCallCommand.d.ts +12 -0
- package/dist-types/commands/OriginateCommand.d.ts +12 -0
- package/dist-types/commands/UpdatePbxOAuth2ClientCommand.d.ts +12 -0
- package/dist-types/models/models_0.d.ts +119 -119
- package/dist-types/runtimeConfig.browser.d.ts +2 -1
- package/dist-types/runtimeConfig.d.ts +2 -1
- package/dist-types/runtimeConfig.native.d.ts +2 -1
- package/package.json +37 -33
package/dist-cjs/WmsApiClient.js
CHANGED
|
@@ -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));
|
|
@@ -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;
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
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;
|
|
4
4
|
const WmsApiServiceException_1 = require("../models/WmsApiServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
|
-
const core_1 = require("@
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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] || [])
|
|
129
|
-
[_pe]: [() => input.permissions !== void 0, () => ((input[_p] || [])
|
|
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,
|
|
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,
|
|
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] || [])
|
|
159
|
-
[_fi]: [() => input.id !== void 0, () => ((input[_i] || [])
|
|
160
|
-
[_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || [])
|
|
161
|
-
[_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || [])
|
|
162
|
-
[_fil]: [() => input.name !== void 0, () => ((input[_n] || [])
|
|
163
|
-
[_filt]: [() => input.email !== void 0, () => ((input[_em] || [])
|
|
164
|
-
[_filte]: [() => input.role !== void 0, () => ((input[_r] || [])
|
|
165
|
-
[_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || [])
|
|
166
|
-
[_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || [])
|
|
167
|
-
[_filterd]: [() => input.department !== void 0, () => ((input[_de] || [])
|
|
168
|
-
[_filterl]: [() => input.login !== void 0, () => ((input[_l] || [])
|
|
169
|
-
[_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || [])
|
|
170
|
-
[_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || [])
|
|
171
|
-
[_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || [])
|
|
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] || [])
|
|
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,
|
|
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,
|
|
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,
|
|
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] || [])
|
|
223
|
-
[_fi]: [() => input.id !== void 0, () => ((input[_i] || [])
|
|
224
|
-
[_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || [])
|
|
225
|
-
[_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || [])
|
|
226
|
-
[_fil]: [() => input.name !== void 0, () => ((input[_n] || [])
|
|
227
|
-
[_filt]: [() => input.email !== void 0, () => ((input[_em] || [])
|
|
228
|
-
[_filte]: [() => input.role !== void 0, () => ((input[_r] || [])
|
|
229
|
-
[_filter]: [() => input.dialplan !== void 0, () => ((input[_d] || [])
|
|
230
|
-
[_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || [])
|
|
231
|
-
[_filterd]: [() => input.department !== void 0, () => ((input[_de] || [])
|
|
232
|
-
[_filterl]: [() => input.login !== void 0, () => ((input[_l] || [])
|
|
233
|
-
[_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || [])
|
|
234
|
-
[_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || [])
|
|
235
|
-
[_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || [])
|
|
236
|
-
[_fie]: [() => input.fields !== void 0, () => ((input[_fie] || [])
|
|
237
|
-
[_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || [])
|
|
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] || [])
|
|
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,15 +243,15 @@ 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,
|
|
246
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
255
247
|
const headers = {
|
|
256
248
|
'content-type': 'application/json',
|
|
257
249
|
};
|
|
258
250
|
b.bp("/api/v1/notifications");
|
|
259
251
|
let body;
|
|
260
252
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
253
|
+
'broadcastId': [],
|
|
261
254
|
'broadcastMessage': [],
|
|
262
|
-
'conferenceId': [],
|
|
263
255
|
'confirmationTimeout': [],
|
|
264
256
|
'customRid': [],
|
|
265
257
|
'event': [],
|
|
@@ -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,
|
|
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,
|
|
299
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
308
300
|
const headers = {
|
|
309
301
|
'content-type': 'application/json',
|
|
310
302
|
};
|
|
@@ -322,7 +314,7 @@ const se_OriginateCallCommand = async (input, context) => {
|
|
|
322
314
|
};
|
|
323
315
|
exports.se_OriginateCallCommand = se_OriginateCallCommand;
|
|
324
316
|
const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
|
|
325
|
-
const b = (0,
|
|
317
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
326
318
|
const headers = {
|
|
327
319
|
'content-type': 'application/json',
|
|
328
320
|
};
|
|
@@ -346,7 +338,7 @@ const de_CreatePbxAclGroupCommand = async (output, context) => {
|
|
|
346
338
|
const contents = (0, smithy_client_1.map)({
|
|
347
339
|
$metadata: deserializeMetadata(output),
|
|
348
340
|
});
|
|
349
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
341
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
350
342
|
const doc = (0, smithy_client_1.take)(data, {
|
|
351
343
|
'result': smithy_client_1._json,
|
|
352
344
|
'type': smithy_client_1.expectString,
|
|
@@ -362,7 +354,7 @@ const de_CreatePbxColleagueCommand = async (output, context) => {
|
|
|
362
354
|
const contents = (0, smithy_client_1.map)({
|
|
363
355
|
$metadata: deserializeMetadata(output),
|
|
364
356
|
});
|
|
365
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
357
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
366
358
|
const doc = (0, smithy_client_1.take)(data, {
|
|
367
359
|
'result': smithy_client_1._json,
|
|
368
360
|
'type': smithy_client_1.expectString,
|
|
@@ -378,7 +370,7 @@ const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
378
370
|
const contents = (0, smithy_client_1.map)({
|
|
379
371
|
$metadata: deserializeMetadata(output),
|
|
380
372
|
});
|
|
381
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
373
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
382
374
|
const doc = (0, smithy_client_1.take)(data, {
|
|
383
375
|
'result': smithy_client_1._json,
|
|
384
376
|
'type': smithy_client_1.expectString,
|
|
@@ -394,7 +386,7 @@ const de_DeletePbxAclGroupCommand = async (output, context) => {
|
|
|
394
386
|
const contents = (0, smithy_client_1.map)({
|
|
395
387
|
$metadata: deserializeMetadata(output),
|
|
396
388
|
});
|
|
397
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
389
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
398
390
|
const doc = (0, smithy_client_1.take)(data, {
|
|
399
391
|
'result': smithy_client_1.expectString,
|
|
400
392
|
'type': smithy_client_1.expectString,
|
|
@@ -410,7 +402,7 @@ const de_DeletePbxColleagueCommand = async (output, context) => {
|
|
|
410
402
|
const contents = (0, smithy_client_1.map)({
|
|
411
403
|
$metadata: deserializeMetadata(output),
|
|
412
404
|
});
|
|
413
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
405
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
414
406
|
const doc = (0, smithy_client_1.take)(data, {
|
|
415
407
|
'result': smithy_client_1.expectString,
|
|
416
408
|
'type': smithy_client_1.expectString,
|
|
@@ -426,7 +418,7 @@ const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
426
418
|
const contents = (0, smithy_client_1.map)({
|
|
427
419
|
$metadata: deserializeMetadata(output),
|
|
428
420
|
});
|
|
429
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
421
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
430
422
|
const doc = (0, smithy_client_1.take)(data, {
|
|
431
423
|
'result': smithy_client_1.expectString,
|
|
432
424
|
'type': smithy_client_1.expectString,
|
|
@@ -442,7 +434,7 @@ const de_GetColleagueByIdCommand = async (output, context) => {
|
|
|
442
434
|
const contents = (0, smithy_client_1.map)({
|
|
443
435
|
$metadata: deserializeMetadata(output),
|
|
444
436
|
});
|
|
445
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
437
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
446
438
|
const doc = (0, smithy_client_1.take)(data, {
|
|
447
439
|
'result': smithy_client_1._json,
|
|
448
440
|
'type': smithy_client_1.expectString,
|
|
@@ -458,7 +450,7 @@ const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
|
|
|
458
450
|
const contents = (0, smithy_client_1.map)({
|
|
459
451
|
$metadata: deserializeMetadata(output),
|
|
460
452
|
});
|
|
461
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
453
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
462
454
|
const doc = (0, smithy_client_1.take)(data, {
|
|
463
455
|
'result': smithy_client_1._json,
|
|
464
456
|
'type': smithy_client_1.expectString,
|
|
@@ -474,7 +466,7 @@ const de_GetPbxCallGroupsCommand = async (output, context) => {
|
|
|
474
466
|
const contents = (0, smithy_client_1.map)({
|
|
475
467
|
$metadata: deserializeMetadata(output),
|
|
476
468
|
});
|
|
477
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
469
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
478
470
|
const doc = (0, smithy_client_1.take)(data, {
|
|
479
471
|
'result': smithy_client_1._json,
|
|
480
472
|
'type': smithy_client_1.expectString,
|
|
@@ -490,7 +482,7 @@ const de_GetPbxColleaguesCommand = async (output, context) => {
|
|
|
490
482
|
const contents = (0, smithy_client_1.map)({
|
|
491
483
|
$metadata: deserializeMetadata(output),
|
|
492
484
|
});
|
|
493
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
485
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
494
486
|
const doc = (0, smithy_client_1.take)(data, {
|
|
495
487
|
'result': smithy_client_1._json,
|
|
496
488
|
'type': smithy_client_1.expectString,
|
|
@@ -506,7 +498,7 @@ const de_GetPbxesCommand = async (output, context) => {
|
|
|
506
498
|
const contents = (0, smithy_client_1.map)({
|
|
507
499
|
$metadata: deserializeMetadata(output),
|
|
508
500
|
});
|
|
509
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
501
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
510
502
|
const doc = (0, smithy_client_1.take)(data, {
|
|
511
503
|
'result': smithy_client_1._json,
|
|
512
504
|
'type': smithy_client_1.expectString,
|
|
@@ -522,7 +514,7 @@ const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
|
|
|
522
514
|
const contents = (0, smithy_client_1.map)({
|
|
523
515
|
$metadata: deserializeMetadata(output),
|
|
524
516
|
});
|
|
525
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
517
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
526
518
|
const doc = (0, smithy_client_1.take)(data, {
|
|
527
519
|
'result': smithy_client_1._json,
|
|
528
520
|
'type': smithy_client_1.expectString,
|
|
@@ -538,7 +530,7 @@ const de_GetPersonalInfoCommand = async (output, context) => {
|
|
|
538
530
|
const contents = (0, smithy_client_1.map)({
|
|
539
531
|
$metadata: deserializeMetadata(output),
|
|
540
532
|
});
|
|
541
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
533
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
542
534
|
const doc = (0, smithy_client_1.take)(data, {
|
|
543
535
|
'result': smithy_client_1._json,
|
|
544
536
|
'type': smithy_client_1.expectString,
|
|
@@ -554,7 +546,7 @@ const de_NotificationsCommand = async (output, context) => {
|
|
|
554
546
|
const contents = (0, smithy_client_1.map)({
|
|
555
547
|
$metadata: deserializeMetadata(output),
|
|
556
548
|
});
|
|
557
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
549
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
558
550
|
const doc = (0, smithy_client_1.take)(data, {
|
|
559
551
|
'result': smithy_client_1._json,
|
|
560
552
|
'type': smithy_client_1.expectString,
|
|
@@ -570,7 +562,7 @@ const de_OriginateCommand = async (output, context) => {
|
|
|
570
562
|
const contents = (0, smithy_client_1.map)({
|
|
571
563
|
$metadata: deserializeMetadata(output),
|
|
572
564
|
});
|
|
573
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
565
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
574
566
|
const doc = (0, smithy_client_1.take)(data, {
|
|
575
567
|
'result': smithy_client_1.expectString,
|
|
576
568
|
'type': smithy_client_1.expectString,
|
|
@@ -586,7 +578,7 @@ const de_OriginateCallCommand = async (output, context) => {
|
|
|
586
578
|
const contents = (0, smithy_client_1.map)({
|
|
587
579
|
$metadata: deserializeMetadata(output),
|
|
588
580
|
});
|
|
589
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
581
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
590
582
|
const doc = (0, smithy_client_1.take)(data, {
|
|
591
583
|
'result': smithy_client_1.expectString,
|
|
592
584
|
'type': smithy_client_1.expectString,
|
|
@@ -602,7 +594,7 @@ const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
|
|
|
602
594
|
const contents = (0, smithy_client_1.map)({
|
|
603
595
|
$metadata: deserializeMetadata(output),
|
|
604
596
|
});
|
|
605
|
-
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await
|
|
597
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
606
598
|
const doc = (0, smithy_client_1.take)(data, {
|
|
607
599
|
'result': smithy_client_1._json,
|
|
608
600
|
'type': smithy_client_1.expectString,
|
|
@@ -614,9 +606,9 @@ exports.de_UpdatePbxOAuth2ClientCommand = de_UpdatePbxOAuth2ClientCommand;
|
|
|
614
606
|
const de_CommandError = async (output, context) => {
|
|
615
607
|
const parsedOutput = {
|
|
616
608
|
...output,
|
|
617
|
-
body: await
|
|
609
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context)
|
|
618
610
|
};
|
|
619
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
611
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
620
612
|
switch (errorCode) {
|
|
621
613
|
case "WmsUnauthorizedException":
|
|
622
614
|
case "wildix.wms.api#WmsUnauthorizedException":
|
|
@@ -687,12 +679,6 @@ const deserializeMetadata = (output) => ({
|
|
|
687
679
|
cfId: output.headers["x-amz-cf-id"],
|
|
688
680
|
});
|
|
689
681
|
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
682
|
const _c = "count";
|
|
697
683
|
const _d = "dialplan";
|
|
698
684
|
const _de = "department";
|
|
@@ -733,43 +719,3 @@ const _sF = "searchFields";
|
|
|
733
719
|
const _sS = "searchStrategy";
|
|
734
720
|
const _so = "sort";
|
|
735
721
|
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
|
-
};
|
|
@@ -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.
|
|
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.
|
|
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/WmsApiClient.js
CHANGED
|
@@ -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));
|