@wildix/wms-api-client 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist-cjs/WmsApi.js +4 -0
  2. package/dist-cjs/WmsApiClient.js +6 -3
  3. package/dist-cjs/commands/CreatePbxColleagueCommand.js +21 -0
  4. package/dist-cjs/commands/CreatePbxOAuth2ClientCommand.js +12 -32
  5. package/dist-cjs/commands/DeletePbxColleagueCommand.js +21 -0
  6. package/dist-cjs/commands/DeletePbxOAuth2ClientCommand.js +12 -32
  7. package/dist-cjs/commands/GetPbxAclGroupsPermissionsCommand.js +12 -32
  8. package/dist-cjs/commands/GetPbxCallGroupsCommand.js +12 -32
  9. package/dist-cjs/commands/GetPbxColleaguesCommand.js +12 -32
  10. package/dist-cjs/commands/GetPbxOAuth2ClientsCommand.js +12 -32
  11. package/dist-cjs/commands/UpdatePbxOAuth2ClientCommand.js +12 -32
  12. package/dist-cjs/commands/index.js +2 -0
  13. package/dist-cjs/models/models_0.js +29 -14
  14. package/dist-cjs/protocols/Aws_restJson1.js +220 -236
  15. package/dist-cjs/runtimeConfig.browser.js +5 -1
  16. package/dist-cjs/runtimeConfig.js +5 -1
  17. package/dist-cjs/runtimeConfig.shared.js +13 -11
  18. package/dist-es/WmsApi.js +4 -0
  19. package/dist-es/WmsApiClient.js +6 -3
  20. package/dist-es/commands/CreatePbxColleagueCommand.js +17 -0
  21. package/dist-es/commands/CreatePbxOAuth2ClientCommand.js +12 -32
  22. package/dist-es/commands/DeletePbxColleagueCommand.js +17 -0
  23. package/dist-es/commands/DeletePbxOAuth2ClientCommand.js +12 -32
  24. package/dist-es/commands/GetPbxAclGroupsPermissionsCommand.js +12 -32
  25. package/dist-es/commands/GetPbxCallGroupsCommand.js +12 -32
  26. package/dist-es/commands/GetPbxColleaguesCommand.js +12 -32
  27. package/dist-es/commands/GetPbxOAuth2ClientsCommand.js +12 -32
  28. package/dist-es/commands/UpdatePbxOAuth2ClientCommand.js +12 -32
  29. package/dist-es/commands/index.js +2 -0
  30. package/dist-es/models/models_0.js +28 -13
  31. package/dist-es/protocols/Aws_restJson1.js +214 -234
  32. package/dist-es/runtimeConfig.browser.js +4 -1
  33. package/dist-es/runtimeConfig.js +4 -1
  34. package/dist-es/runtimeConfig.shared.js +13 -11
  35. package/dist-types/WmsApi.d.ts +18 -0
  36. package/dist-types/WmsApiClient.d.ts +17 -9
  37. package/dist-types/commands/CreatePbxColleagueCommand.d.ts +96 -0
  38. package/dist-types/commands/CreatePbxOAuth2ClientCommand.d.ts +8 -20
  39. package/dist-types/commands/DeletePbxColleagueCommand.d.ts +65 -0
  40. package/dist-types/commands/DeletePbxOAuth2ClientCommand.d.ts +8 -20
  41. package/dist-types/commands/GetPbxAclGroupsPermissionsCommand.d.ts +7 -19
  42. package/dist-types/commands/GetPbxCallGroupsCommand.d.ts +8 -20
  43. package/dist-types/commands/GetPbxColleaguesCommand.d.ts +7 -19
  44. package/dist-types/commands/GetPbxOAuth2ClientsCommand.d.ts +8 -20
  45. package/dist-types/commands/UpdatePbxOAuth2ClientCommand.d.ts +8 -20
  46. package/dist-types/commands/index.d.ts +2 -0
  47. package/dist-types/index.d.ts +2 -0
  48. package/dist-types/models/models_0.d.ts +154 -70
  49. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  50. package/dist-types/runtimeConfig.browser.d.ts +3 -4
  51. package/dist-types/runtimeConfig.d.ts +3 -4
  52. package/dist-types/runtimeConfig.native.d.ts +3 -4
  53. package/package.json +31 -30
@@ -1,175 +1,222 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdatePbxOAuth2ClientCommand = exports.de_GetPbxOAuth2ClientsCommand = exports.de_GetPbxColleaguesCommand = exports.de_GetPbxCallGroupsCommand = exports.de_GetPbxAclGroupsPermissionsCommand = exports.de_DeletePbxOAuth2ClientCommand = exports.de_CreatePbxOAuth2ClientCommand = exports.se_UpdatePbxOAuth2ClientCommand = exports.se_GetPbxOAuth2ClientsCommand = exports.se_GetPbxColleaguesCommand = exports.se_GetPbxCallGroupsCommand = exports.se_GetPbxAclGroupsPermissionsCommand = exports.se_DeletePbxOAuth2ClientCommand = exports.se_CreatePbxOAuth2ClientCommand = void 0;
3
+ exports.de_UpdatePbxOAuth2ClientCommand = exports.de_GetPbxOAuth2ClientsCommand = exports.de_GetPbxColleaguesCommand = exports.de_GetPbxCallGroupsCommand = exports.de_GetPbxAclGroupsPermissionsCommand = exports.de_DeletePbxOAuth2ClientCommand = exports.de_DeletePbxColleagueCommand = exports.de_CreatePbxOAuth2ClientCommand = exports.de_CreatePbxColleagueCommand = exports.se_UpdatePbxOAuth2ClientCommand = exports.se_GetPbxOAuth2ClientsCommand = exports.se_GetPbxColleaguesCommand = exports.se_GetPbxCallGroupsCommand = exports.se_GetPbxAclGroupsPermissionsCommand = exports.se_DeletePbxOAuth2ClientCommand = exports.se_DeletePbxColleagueCommand = exports.se_CreatePbxOAuth2ClientCommand = exports.se_CreatePbxColleagueCommand = void 0;
4
4
  const WmsApiServiceException_1 = require("../models/WmsApiServiceException");
5
5
  const models_0_1 = require("../models/models_0");
6
- const protocol_http_1 = require("@smithy/protocol-http");
6
+ const core_1 = require("@smithy/core");
7
7
  const smithy_client_1 = require("@smithy/smithy-client");
8
+ const se_CreatePbxColleagueCommand = async (input, context) => {
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
+ const headers = {
11
+ 'content-type': 'application/json',
12
+ };
13
+ b.bp("/api/v1/PBX/Colleagues");
14
+ let body;
15
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ 'department': [],
17
+ 'dialplan': [],
18
+ 'email': [],
19
+ 'extension': [],
20
+ 'faxDialplan': [],
21
+ 'faxNumber': [],
22
+ 'groupDn': [],
23
+ 'language': [],
24
+ 'licenseType': [],
25
+ 'login': [],
26
+ 'mobilePhone': [],
27
+ 'name': [],
28
+ 'officePhone': [],
29
+ 'password': [],
30
+ 'role': [],
31
+ 'sipPassword': [],
32
+ }));
33
+ b.m("POST")
34
+ .h(headers)
35
+ .b(body);
36
+ return b.build();
37
+ };
38
+ exports.se_CreatePbxColleagueCommand = se_CreatePbxColleagueCommand;
8
39
  const se_CreatePbxOAuth2ClientCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = (0, core_1.requestBuilder)(input, context);
10
41
  const headers = {
11
42
  'content-type': 'application/json',
12
43
  };
13
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2";
44
+ b.bp("/api/v1/pbx/applications/oauth2");
14
45
  let body;
15
46
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
47
  'name': [],
17
48
  'redirectUri': _ => (0, smithy_client_1._json)(_),
18
49
  }));
19
- return new protocol_http_1.HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
50
+ b.m("POST")
51
+ .h(headers)
52
+ .b(body);
53
+ return b.build();
28
54
  };
29
55
  exports.se_CreatePbxOAuth2ClientCommand = se_CreatePbxOAuth2ClientCommand;
56
+ const se_DeletePbxColleagueCommand = async (input, context) => {
57
+ const b = (0, core_1.requestBuilder)(input, context);
58
+ const headers = {};
59
+ b.bp("/api/v1/PBX/Colleagues/{colleagueId}");
60
+ b.p('colleagueId', () => input.colleagueId.toString(), '{colleagueId}', false);
61
+ const query = (0, smithy_client_1.map)({
62
+ [_d]: [() => input.data !== void 0, () => ((input[_d] || []).map(_entry => _entry))],
63
+ });
64
+ let body;
65
+ b.m("DELETE")
66
+ .h(headers)
67
+ .q(query)
68
+ .b(body);
69
+ return b.build();
70
+ };
71
+ exports.se_DeletePbxColleagueCommand = se_DeletePbxColleagueCommand;
30
72
  const se_DeletePbxOAuth2ClientCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = (0, core_1.requestBuilder)(input, context);
32
74
  const headers = {};
33
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2/{id}";
34
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'id', () => input.id, '{id}', false);
75
+ b.bp("/api/v1/pbx/applications/oauth2/{id}");
76
+ b.p('id', () => input.id, '{id}', false);
35
77
  let body;
36
- return new protocol_http_1.HttpRequest({
37
- protocol,
38
- hostname,
39
- port,
40
- method: "DELETE",
41
- headers,
42
- path: resolvedPath,
43
- body,
44
- });
78
+ b.m("DELETE")
79
+ .h(headers)
80
+ .b(body);
81
+ return b.build();
45
82
  };
46
83
  exports.se_DeletePbxOAuth2ClientCommand = se_DeletePbxOAuth2ClientCommand;
47
84
  const se_GetPbxAclGroupsPermissionsCommand = async (input, context) => {
48
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
85
+ const b = (0, core_1.requestBuilder)(input, context);
49
86
  const headers = {};
50
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/aclgroups/permissions";
87
+ b.bp("/api/v1/pbx/aclgroups/permissions");
51
88
  const query = (0, smithy_client_1.map)({
52
- "groups[]": [() => input.groups !== void 0, () => ((input.groups || []).map(_entry => _entry))],
53
- "permissions[]": [() => input.permissions !== void 0, () => ((input.permissions || []).map(_entry => _entry))],
89
+ [_gr]: [() => input.groups !== void 0, () => ((input[_g] || []).map(_entry => _entry))],
90
+ [_pe]: [() => input.permissions !== void 0, () => ((input[_p] || []).map(_entry => _entry))],
54
91
  });
55
92
  let body;
56
- return new protocol_http_1.HttpRequest({
57
- protocol,
58
- hostname,
59
- port,
60
- method: "GET",
61
- headers,
62
- path: resolvedPath,
63
- query,
64
- body,
65
- });
93
+ b.m("GET")
94
+ .h(headers)
95
+ .q(query)
96
+ .b(body);
97
+ return b.build();
66
98
  };
67
99
  exports.se_GetPbxAclGroupsPermissionsCommand = se_GetPbxAclGroupsPermissionsCommand;
68
100
  const se_GetPbxCallGroupsCommand = async (input, context) => {
69
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
101
+ const b = (0, core_1.requestBuilder)(input, context);
70
102
  const headers = {
71
103
  'content-type': 'application/json',
72
104
  };
73
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/Dialplan/CallGroups";
105
+ b.bp("/api/v1/Dialplan/CallGroups");
74
106
  let body;
75
107
  body = "";
76
- return new protocol_http_1.HttpRequest({
77
- protocol,
78
- hostname,
79
- port,
80
- method: "GET",
81
- headers,
82
- path: resolvedPath,
83
- body,
84
- });
108
+ b.m("GET")
109
+ .h(headers)
110
+ .b(body);
111
+ return b.build();
85
112
  };
86
113
  exports.se_GetPbxCallGroupsCommand = se_GetPbxCallGroupsCommand;
87
114
  const se_GetPbxColleaguesCommand = async (input, context) => {
88
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
115
+ const b = (0, core_1.requestBuilder)(input, context);
89
116
  const headers = {};
90
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/PBX/Colleagues";
117
+ b.bp("/api/v1/PBX/Colleagues");
91
118
  const query = (0, smithy_client_1.map)({
92
- "filter[extension][]": [() => input.extension !== void 0, () => ((input.extension || []).map(_entry => _entry))],
93
- "filter[id][]": [() => input.id !== void 0, () => ((input.id || []).map(_entry => _entry))],
94
- "filter[officePhone][]": [() => input.officePhone !== void 0, () => ((input.officePhone || []).map(_entry => _entry))],
95
- "filter[mobilePhone][]": [() => input.mobilePhone !== void 0, () => ((input.mobilePhone || []).map(_entry => _entry))],
96
- "filter[name][]": [() => input.name !== void 0, () => ((input.name || []).map(_entry => _entry))],
97
- "filter[email][]": [() => input.email !== void 0, () => ((input.email || []).map(_entry => _entry))],
98
- "filter[role][]": [() => input.role !== void 0, () => ((input.role || []).map(_entry => _entry))],
99
- "filter[dialplan][]": [() => input.dialplan !== void 0, () => ((input.dialplan || []).map(_entry => _entry))],
100
- "filter[faxDialplan][]": [() => input.faxDialplan !== void 0, () => ((input.faxDialplan || []).map(_entry => _entry))],
101
- "filter[department][]": [() => input.department !== void 0, () => ((input.department || []).map(_entry => _entry))],
102
- "filter[login][]": [() => input.login !== void 0, () => ((input.login || []).map(_entry => _entry))],
103
- "filter[groupDn][]": [() => input.groupDn !== void 0, () => ((input.groupDn || []).map(_entry => _entry))],
104
- "filter[pbxDn][]": [() => input.pbxDn !== void 0, () => ((input.pbxDn || []).map(_entry => _entry))],
105
- "filter[licenseType][]": [() => input.licenseType !== void 0, () => ((input.licenseType || []).map(_entry => _entry))],
106
- "fields": [() => input.fields !== void 0, () => ((input.fields || []).join(','))],
107
- "searchFields": [() => input.searchFields !== void 0, () => ((input.searchFields || []).join(','))],
108
- "search": [, input.search],
109
- "sort": [() => input.sort !== void 0, () => ((input.sort || []).map(_entry => _entry))],
110
- "start": [() => input.start !== void 0, () => (input.start.toString())],
111
- "count": [() => input.count !== void 0, () => (input.count.toString())],
112
- "dir": [, input.dir],
113
- "searchStrategy": [, input.searchStrategy],
119
+ [_f]: [() => input.extension !== void 0, () => ((input[_e] || []).map(_entry => _entry))],
120
+ [_fi]: [() => input.id !== void 0, () => ((input[_i] || []).map(_entry => _entry))],
121
+ [_fP]: [() => input.officePhone !== void 0, () => ((input[_oP] || []).map(_entry => _entry))],
122
+ [_fPi]: [() => input.mobilePhone !== void 0, () => ((input[_mP] || []).map(_entry => _entry))],
123
+ [_fil]: [() => input.name !== void 0, () => ((input[_n] || []).map(_entry => _entry))],
124
+ [_filt]: [() => input.email !== void 0, () => ((input[_em] || []).map(_entry => _entry))],
125
+ [_filte]: [() => input.role !== void 0, () => ((input[_r] || []).map(_entry => _entry))],
126
+ [_filter]: [() => input.dialplan !== void 0, () => ((input[_di] || []).map(_entry => _entry))],
127
+ [_fDi]: [() => input.faxDialplan !== void 0, () => ((input[_fD] || []).map(_entry => _entry))],
128
+ [_filterd]: [() => input.department !== void 0, () => ((input[_de] || []).map(_entry => _entry))],
129
+ [_filterl]: [() => input.login !== void 0, () => ((input[_l] || []).map(_entry => _entry))],
130
+ [_fDil]: [() => input.groupDn !== void 0, () => ((input[_gD] || []).map(_entry => _entry))],
131
+ [_fDilt]: [() => input.pbxDn !== void 0, () => ((input[_pD] || []).map(_entry => _entry))],
132
+ [_fT]: [() => input.licenseType !== void 0, () => ((input[_lT] || []).map(_entry => _entry))],
133
+ [_fie]: [() => input.fields !== void 0, () => ((input[_fie] || []).join(','))],
134
+ [_sF]: [() => input.searchFields !== void 0, () => ((input[_sF] || []).join(','))],
135
+ [_s]: [, input[_s]],
136
+ [_so]: [() => input.sort !== void 0, () => ((input[_so] || []).map(_entry => _entry))],
137
+ [_st]: [() => input.start !== void 0, () => (input[_st].toString())],
138
+ [_c]: [() => input.count !== void 0, () => (input[_c].toString())],
139
+ [_dir]: [, input[_dir]],
140
+ [_sS]: [, input[_sS]],
114
141
  });
115
142
  let body;
116
- return new protocol_http_1.HttpRequest({
117
- protocol,
118
- hostname,
119
- port,
120
- method: "GET",
121
- headers,
122
- path: resolvedPath,
123
- query,
124
- body,
125
- });
143
+ b.m("GET")
144
+ .h(headers)
145
+ .q(query)
146
+ .b(body);
147
+ return b.build();
126
148
  };
127
149
  exports.se_GetPbxColleaguesCommand = se_GetPbxColleaguesCommand;
128
150
  const se_GetPbxOAuth2ClientsCommand = async (input, context) => {
129
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
151
+ const b = (0, core_1.requestBuilder)(input, context);
130
152
  const headers = {
131
153
  'content-type': 'application/json',
132
154
  };
133
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2";
155
+ b.bp("/api/v1/pbx/applications/oauth2");
134
156
  let body;
135
157
  body = "";
136
- return new protocol_http_1.HttpRequest({
137
- protocol,
138
- hostname,
139
- port,
140
- method: "GET",
141
- headers,
142
- path: resolvedPath,
143
- body,
144
- });
158
+ b.m("GET")
159
+ .h(headers)
160
+ .b(body);
161
+ return b.build();
145
162
  };
146
163
  exports.se_GetPbxOAuth2ClientsCommand = se_GetPbxOAuth2ClientsCommand;
147
164
  const se_UpdatePbxOAuth2ClientCommand = async (input, context) => {
148
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
165
+ const b = (0, core_1.requestBuilder)(input, context);
149
166
  const headers = {
150
167
  'content-type': 'application/json',
151
168
  };
152
- let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/api/v1/pbx/applications/oauth2/{id}";
153
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, 'id', () => input.id, '{id}', false);
169
+ b.bp("/api/v1/pbx/applications/oauth2/{id}");
170
+ b.p('id', () => input.id, '{id}', false);
154
171
  let body;
155
172
  body = JSON.stringify((0, smithy_client_1.take)(input, {
156
173
  'name': [],
157
174
  'redirectUri': _ => (0, smithy_client_1._json)(_),
158
175
  }));
159
- return new protocol_http_1.HttpRequest({
160
- protocol,
161
- hostname,
162
- port,
163
- method: "PUT",
164
- headers,
165
- path: resolvedPath,
166
- body,
167
- });
176
+ b.m("PUT")
177
+ .h(headers)
178
+ .b(body);
179
+ return b.build();
168
180
  };
169
181
  exports.se_UpdatePbxOAuth2ClientCommand = se_UpdatePbxOAuth2ClientCommand;
182
+ const de_CreatePbxColleagueCommand = async (output, context) => {
183
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
184
+ return de_CommandError(output, context);
185
+ }
186
+ const contents = (0, smithy_client_1.map)({
187
+ $metadata: deserializeMetadata(output),
188
+ });
189
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
190
+ const doc = (0, smithy_client_1.take)(data, {
191
+ 'department': smithy_client_1.expectString,
192
+ 'dialplan': smithy_client_1.expectString,
193
+ 'email': smithy_client_1.expectString,
194
+ 'extension': smithy_client_1.expectString,
195
+ 'faxDialplan': smithy_client_1.expectString,
196
+ 'faxNumber': smithy_client_1.expectString,
197
+ 'groupDn': smithy_client_1.expectString,
198
+ 'groupName': smithy_client_1.expectString,
199
+ 'id': smithy_client_1.expectString,
200
+ 'jid': smithy_client_1.expectString,
201
+ 'language': smithy_client_1.expectString,
202
+ 'licenseType': smithy_client_1.expectString,
203
+ 'login': smithy_client_1.expectString,
204
+ 'mobilePhone': smithy_client_1.expectString,
205
+ 'name': smithy_client_1.expectString,
206
+ 'officePhone': smithy_client_1.expectString,
207
+ 'pbx': smithy_client_1.expectString,
208
+ 'pbxDn': smithy_client_1.expectString,
209
+ 'picture': smithy_client_1.expectString,
210
+ 'role': smithy_client_1.expectString,
211
+ 'sourceId': smithy_client_1.expectString,
212
+ });
213
+ Object.assign(contents, doc);
214
+ return contents;
215
+ };
216
+ exports.de_CreatePbxColleagueCommand = de_CreatePbxColleagueCommand;
170
217
  const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
171
218
  if (output.statusCode !== 200 && output.statusCode >= 300) {
172
- return de_CreatePbxOAuth2ClientCommandError(output, context);
219
+ return de_CommandError(output, context);
173
220
  }
174
221
  const contents = (0, smithy_client_1.map)({
175
222
  $metadata: deserializeMetadata(output),
@@ -183,31 +230,25 @@ const de_CreatePbxOAuth2ClientCommand = async (output, context) => {
183
230
  return contents;
184
231
  };
185
232
  exports.de_CreatePbxOAuth2ClientCommand = de_CreatePbxOAuth2ClientCommand;
186
- const de_CreatePbxOAuth2ClientCommandError = async (output, context) => {
187
- const parsedOutput = {
188
- ...output,
189
- body: await parseErrorBody(output.body, context)
190
- };
191
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
192
- switch (errorCode) {
193
- case "WmsUnauthorizedException":
194
- case "wildix.wms.api#WmsUnauthorizedException":
195
- throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
196
- case "WmsValidationException":
197
- case "wildix.wms.api#WmsValidationException":
198
- throw await de_WmsValidationExceptionRes(parsedOutput, context);
199
- default:
200
- const parsedBody = parsedOutput.body;
201
- return throwDefaultError({
202
- output,
203
- parsedBody,
204
- errorCode
205
- });
233
+ const de_DeletePbxColleagueCommand = async (output, context) => {
234
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
235
+ return de_CommandError(output, context);
206
236
  }
237
+ const contents = (0, smithy_client_1.map)({
238
+ $metadata: deserializeMetadata(output),
239
+ });
240
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
241
+ const doc = (0, smithy_client_1.take)(data, {
242
+ 'result': smithy_client_1.expectString,
243
+ 'type': smithy_client_1.expectString,
244
+ });
245
+ Object.assign(contents, doc);
246
+ return contents;
207
247
  };
248
+ exports.de_DeletePbxColleagueCommand = de_DeletePbxColleagueCommand;
208
249
  const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
209
250
  if (output.statusCode !== 200 && output.statusCode >= 300) {
210
- return de_DeletePbxOAuth2ClientCommandError(output, context);
251
+ return de_CommandError(output, context);
211
252
  }
212
253
  const contents = (0, smithy_client_1.map)({
213
254
  $metadata: deserializeMetadata(output),
@@ -221,31 +262,9 @@ const de_DeletePbxOAuth2ClientCommand = async (output, context) => {
221
262
  return contents;
222
263
  };
223
264
  exports.de_DeletePbxOAuth2ClientCommand = de_DeletePbxOAuth2ClientCommand;
224
- const de_DeletePbxOAuth2ClientCommandError = async (output, context) => {
225
- const parsedOutput = {
226
- ...output,
227
- body: await parseErrorBody(output.body, context)
228
- };
229
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
230
- switch (errorCode) {
231
- case "WmsNotFoundException":
232
- case "wildix.wms.api#WmsNotFoundException":
233
- throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
234
- case "WmsUnauthorizedException":
235
- case "wildix.wms.api#WmsUnauthorizedException":
236
- throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
237
- default:
238
- const parsedBody = parsedOutput.body;
239
- return throwDefaultError({
240
- output,
241
- parsedBody,
242
- errorCode
243
- });
244
- }
245
- };
246
265
  const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
247
266
  if (output.statusCode !== 200 && output.statusCode >= 300) {
248
- return de_GetPbxAclGroupsPermissionsCommandError(output, context);
267
+ return de_CommandError(output, context);
249
268
  }
250
269
  const contents = (0, smithy_client_1.map)({
251
270
  $metadata: deserializeMetadata(output),
@@ -259,28 +278,9 @@ const de_GetPbxAclGroupsPermissionsCommand = async (output, context) => {
259
278
  return contents;
260
279
  };
261
280
  exports.de_GetPbxAclGroupsPermissionsCommand = de_GetPbxAclGroupsPermissionsCommand;
262
- const de_GetPbxAclGroupsPermissionsCommandError = async (output, context) => {
263
- const parsedOutput = {
264
- ...output,
265
- body: await parseErrorBody(output.body, context)
266
- };
267
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
268
- switch (errorCode) {
269
- case "WmsUnauthorizedException":
270
- case "wildix.wms.api#WmsUnauthorizedException":
271
- throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
272
- default:
273
- const parsedBody = parsedOutput.body;
274
- return throwDefaultError({
275
- output,
276
- parsedBody,
277
- errorCode
278
- });
279
- }
280
- };
281
281
  const de_GetPbxCallGroupsCommand = async (output, context) => {
282
282
  if (output.statusCode !== 200 && output.statusCode >= 300) {
283
- return de_GetPbxCallGroupsCommandError(output, context);
283
+ return de_CommandError(output, context);
284
284
  }
285
285
  const contents = (0, smithy_client_1.map)({
286
286
  $metadata: deserializeMetadata(output),
@@ -294,28 +294,9 @@ const de_GetPbxCallGroupsCommand = async (output, context) => {
294
294
  return contents;
295
295
  };
296
296
  exports.de_GetPbxCallGroupsCommand = de_GetPbxCallGroupsCommand;
297
- const de_GetPbxCallGroupsCommandError = async (output, context) => {
298
- const parsedOutput = {
299
- ...output,
300
- body: await parseErrorBody(output.body, context)
301
- };
302
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
303
- switch (errorCode) {
304
- case "WmsUnauthorizedException":
305
- case "wildix.wms.api#WmsUnauthorizedException":
306
- throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
307
- default:
308
- const parsedBody = parsedOutput.body;
309
- return throwDefaultError({
310
- output,
311
- parsedBody,
312
- errorCode
313
- });
314
- }
315
- };
316
297
  const de_GetPbxColleaguesCommand = async (output, context) => {
317
298
  if (output.statusCode !== 200 && output.statusCode >= 300) {
318
- return de_GetPbxColleaguesCommandError(output, context);
299
+ return de_CommandError(output, context);
319
300
  }
320
301
  const contents = (0, smithy_client_1.map)({
321
302
  $metadata: deserializeMetadata(output),
@@ -329,28 +310,9 @@ const de_GetPbxColleaguesCommand = async (output, context) => {
329
310
  return contents;
330
311
  };
331
312
  exports.de_GetPbxColleaguesCommand = de_GetPbxColleaguesCommand;
332
- const de_GetPbxColleaguesCommandError = async (output, context) => {
333
- const parsedOutput = {
334
- ...output,
335
- body: await parseErrorBody(output.body, context)
336
- };
337
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
338
- switch (errorCode) {
339
- case "WmsUnauthorizedException":
340
- case "wildix.wms.api#WmsUnauthorizedException":
341
- throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
342
- default:
343
- const parsedBody = parsedOutput.body;
344
- return throwDefaultError({
345
- output,
346
- parsedBody,
347
- errorCode
348
- });
349
- }
350
- };
351
313
  const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
352
314
  if (output.statusCode !== 200 && output.statusCode >= 300) {
353
- return de_GetPbxOAuth2ClientsCommandError(output, context);
315
+ return de_CommandError(output, context);
354
316
  }
355
317
  const contents = (0, smithy_client_1.map)({
356
318
  $metadata: deserializeMetadata(output),
@@ -364,28 +326,9 @@ const de_GetPbxOAuth2ClientsCommand = async (output, context) => {
364
326
  return contents;
365
327
  };
366
328
  exports.de_GetPbxOAuth2ClientsCommand = de_GetPbxOAuth2ClientsCommand;
367
- const de_GetPbxOAuth2ClientsCommandError = async (output, context) => {
368
- const parsedOutput = {
369
- ...output,
370
- body: await parseErrorBody(output.body, context)
371
- };
372
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
373
- switch (errorCode) {
374
- case "WmsUnauthorizedException":
375
- case "wildix.wms.api#WmsUnauthorizedException":
376
- throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
377
- default:
378
- const parsedBody = parsedOutput.body;
379
- return throwDefaultError({
380
- output,
381
- parsedBody,
382
- errorCode
383
- });
384
- }
385
- };
386
329
  const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
387
330
  if (output.statusCode !== 200 && output.statusCode >= 300) {
388
- return de_UpdatePbxOAuth2ClientCommandError(output, context);
331
+ return de_CommandError(output, context);
389
332
  }
390
333
  const contents = (0, smithy_client_1.map)({
391
334
  $metadata: deserializeMetadata(output),
@@ -399,22 +342,22 @@ const de_UpdatePbxOAuth2ClientCommand = async (output, context) => {
399
342
  return contents;
400
343
  };
401
344
  exports.de_UpdatePbxOAuth2ClientCommand = de_UpdatePbxOAuth2ClientCommand;
402
- const de_UpdatePbxOAuth2ClientCommandError = async (output, context) => {
345
+ const de_CommandError = async (output, context) => {
403
346
  const parsedOutput = {
404
347
  ...output,
405
348
  body: await parseErrorBody(output.body, context)
406
349
  };
407
350
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
408
351
  switch (errorCode) {
409
- case "WmsNotFoundException":
410
- case "wildix.wms.api#WmsNotFoundException":
411
- throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
412
352
  case "WmsUnauthorizedException":
413
353
  case "wildix.wms.api#WmsUnauthorizedException":
414
354
  throw await de_WmsUnauthorizedExceptionRes(parsedOutput, context);
415
355
  case "WmsValidationException":
416
356
  case "wildix.wms.api#WmsValidationException":
417
357
  throw await de_WmsValidationExceptionRes(parsedOutput, context);
358
+ case "WmsNotFoundException":
359
+ case "wildix.wms.api#WmsNotFoundException":
360
+ throw await de_WmsNotFoundExceptionRes(parsedOutput, context);
418
361
  default:
419
362
  const parsedBody = parsedOutput.body;
420
363
  return throwDefaultError({
@@ -481,6 +424,47 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
481
424
  (!Object.getOwnPropertyNames(value).includes("length") ||
482
425
  value.length != 0) &&
483
426
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
427
+ const _c = "count";
428
+ const _d = "data";
429
+ const _de = "department";
430
+ const _di = "dialplan";
431
+ const _dir = "dir";
432
+ const _e = "extension";
433
+ const _em = "email";
434
+ const _f = "filter[extension][]";
435
+ const _fD = "faxDialplan";
436
+ const _fDi = "filter[faxDialplan][]";
437
+ const _fDil = "filter[groupDn][]";
438
+ const _fDilt = "filter[pbxDn][]";
439
+ const _fP = "filter[officePhone][]";
440
+ const _fPi = "filter[mobilePhone][]";
441
+ const _fT = "filter[licenseType][]";
442
+ const _fi = "filter[id][]";
443
+ const _fie = "fields";
444
+ const _fil = "filter[name][]";
445
+ const _filt = "filter[email][]";
446
+ const _filte = "filter[role][]";
447
+ const _filter = "filter[dialplan][]";
448
+ const _filterd = "filter[department][]";
449
+ const _filterl = "filter[login][]";
450
+ const _g = "groups";
451
+ const _gD = "groupDn";
452
+ const _gr = "groups[]";
453
+ const _i = "id";
454
+ const _l = "login";
455
+ const _lT = "licenseType";
456
+ const _mP = "mobilePhone";
457
+ const _n = "name";
458
+ const _oP = "officePhone";
459
+ const _p = "permissions";
460
+ const _pD = "pbxDn";
461
+ const _pe = "permissions[]";
462
+ const _r = "role";
463
+ const _s = "search";
464
+ const _sF = "searchFields";
465
+ const _sS = "searchStrategy";
466
+ const _so = "sort";
467
+ const _st = "start";
484
468
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
485
469
  if (encoded.length) {
486
470
  return JSON.parse(encoded);
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
4
6
  const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
5
8
  const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
6
9
  const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
7
10
  const util_retry_1 = require("@smithy/util-retry");
@@ -18,8 +21,9 @@ const getRuntimeConfig = (config) => {
18
21
  runtime: "browser",
19
22
  defaultsMode,
20
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 }),
21
25
  maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
22
- requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
26
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
23
27
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
24
28
  sha256: config?.sha256 ?? sha256_browser_1.Sha256,
25
29
  streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
4
7
  const hash_node_1 = require("@smithy/hash-node");
5
8
  const middleware_retry_1 = require("@smithy/middleware-retry");
6
9
  const node_config_provider_1 = require("@smithy/node-config-provider");
@@ -22,8 +25,9 @@ const getRuntimeConfig = (config) => {
22
25
  runtime: "node",
23
26
  defaultsMode,
24
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 }),
25
29
  maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
26
- requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
30
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
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, }),
28
32
  sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
29
33
  streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,