files.com 1.0.236 → 1.0.237

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 (69) hide show
  1. package/_VERSION +1 -1
  2. package/docs/models/BundleNotification.md +35 -0
  3. package/lib/Api.js +153 -159
  4. package/lib/isomorphic/File.node.js +24 -28
  5. package/lib/models/ActionNotificationExport.js +97 -101
  6. package/lib/models/ActionNotificationExportResult.js +44 -46
  7. package/lib/models/ActionWebhookFailure.js +42 -44
  8. package/lib/models/ApiKey.js +271 -287
  9. package/lib/models/App.js +26 -28
  10. package/lib/models/As2IncomingMessage.js +32 -34
  11. package/lib/models/As2OutgoingMessage.js +32 -34
  12. package/lib/models/As2Partner.js +231 -241
  13. package/lib/models/As2Station.js +219 -229
  14. package/lib/models/Automation.js +333 -343
  15. package/lib/models/AutomationRun.js +75 -79
  16. package/lib/models/BandwidthSnapshot.js +26 -28
  17. package/lib/models/Behavior.js +323 -337
  18. package/lib/models/Bundle.js +375 -387
  19. package/lib/models/BundleDownload.js +38 -40
  20. package/lib/models/BundleNotification.js +223 -173
  21. package/lib/models/BundleRecipient.js +104 -108
  22. package/lib/models/BundleRegistration.js +38 -40
  23. package/lib/models/Clickwrap.js +213 -223
  24. package/lib/models/DnsRecord.js +26 -28
  25. package/lib/models/ExternalEvent.js +93 -99
  26. package/lib/models/File.js +726 -766
  27. package/lib/models/FileComment.js +180 -188
  28. package/lib/models/FileCommentReaction.js +84 -88
  29. package/lib/models/FileMigration.js +31 -33
  30. package/lib/models/Folder.js +94 -98
  31. package/lib/models/FormFieldSet.js +189 -199
  32. package/lib/models/Group.js +207 -217
  33. package/lib/models/GroupUser.js +230 -238
  34. package/lib/models/History.js +266 -276
  35. package/lib/models/HistoryExport.js +175 -179
  36. package/lib/models/HistoryExportResult.js +44 -46
  37. package/lib/models/InboxRecipient.js +104 -108
  38. package/lib/models/InboxRegistration.js +32 -34
  39. package/lib/models/InboxUpload.js +38 -40
  40. package/lib/models/Invoice.js +57 -61
  41. package/lib/models/IpAddress.js +78 -84
  42. package/lib/models/Lock.js +148 -154
  43. package/lib/models/Message.js +267 -277
  44. package/lib/models/MessageComment.js +207 -217
  45. package/lib/models/MessageCommentReaction.js +147 -155
  46. package/lib/models/MessageReaction.js +147 -155
  47. package/lib/models/Notification.js +255 -265
  48. package/lib/models/Payment.js +57 -61
  49. package/lib/models/Permission.js +128 -134
  50. package/lib/models/Priority.js +45 -47
  51. package/lib/models/Project.js +183 -193
  52. package/lib/models/PublicKey.js +207 -217
  53. package/lib/models/RemoteBandwidthSnapshot.js +26 -28
  54. package/lib/models/RemoteServer.js +805 -819
  55. package/lib/models/Request.js +166 -174
  56. package/lib/models/Session.js +47 -51
  57. package/lib/models/SettingsChange.js +26 -28
  58. package/lib/models/SftpHostKey.js +177 -187
  59. package/lib/models/Site.js +412 -418
  60. package/lib/models/SsoStrategy.js +99 -105
  61. package/lib/models/Style.js +127 -133
  62. package/lib/models/UsageDailySnapshot.js +26 -28
  63. package/lib/models/UsageSnapshot.js +26 -28
  64. package/lib/models/User.js +587 -603
  65. package/lib/models/UserCipherUse.js +32 -34
  66. package/lib/models/UserRequest.js +147 -155
  67. package/lib/models/WebhookTest.js +54 -56
  68. package/package.json +1 -1
  69. package/src/models/BundleNotification.js +39 -1
@@ -63,34 +63,32 @@ var IpAddress = /*#__PURE__*/(0, _createClass2.default)(function IpAddress() {
63
63
  response,
64
64
  _args = arguments;
65
65
  return _regenerator.default.wrap(function _callee$(_context) {
66
- while (1) {
67
- switch (_context.prev = _context.next) {
68
- case 0:
69
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
70
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
71
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
72
- _context.next = 4;
73
- break;
74
- }
75
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
76
- case 4:
77
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
78
- _context.next = 6;
79
- break;
80
- }
81
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
82
- case 6:
83
- _context.next = 8;
84
- return _Api.default.sendRequest("/ip_addresses", 'GET', params, options);
85
- case 8:
86
- response = _context.sent;
87
- return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
88
- return new IpAddress(obj, options);
89
- })) || []);
90
- case 10:
91
- case "end":
92
- return _context.stop();
93
- }
66
+ while (1) switch (_context.prev = _context.next) {
67
+ case 0:
68
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
69
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
70
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
71
+ _context.next = 4;
72
+ break;
73
+ }
74
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
75
+ case 4:
76
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
77
+ _context.next = 6;
78
+ break;
79
+ }
80
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
81
+ case 6:
82
+ _context.next = 8;
83
+ return _Api.default.sendRequest("/ip_addresses", 'GET', params, options);
84
+ case 8:
85
+ response = _context.sent;
86
+ return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
87
+ return new IpAddress(obj, options);
88
+ })) || []);
89
+ case 10:
90
+ case "end":
91
+ return _context.stop();
94
92
  }
95
93
  }, _callee);
96
94
  })));
@@ -106,34 +104,32 @@ var IpAddress = /*#__PURE__*/(0, _createClass2.default)(function IpAddress() {
106
104
  response,
107
105
  _args2 = arguments;
108
106
  return _regenerator.default.wrap(function _callee2$(_context2) {
109
- while (1) {
110
- switch (_context2.prev = _context2.next) {
111
- case 0:
112
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
113
- options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
114
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
115
- _context2.next = 4;
116
- break;
117
- }
118
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
119
- case 4:
120
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
121
- _context2.next = 6;
122
- break;
123
- }
124
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
125
- case 6:
126
- _context2.next = 8;
127
- return _Api.default.sendRequest("/ip_addresses/exavault-reserved", 'GET', params, options);
128
- case 8:
129
- response = _context2.sent;
130
- return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
131
- return new PublicIpAddress(obj, options);
132
- })) || []);
133
- case 10:
134
- case "end":
135
- return _context2.stop();
136
- }
107
+ while (1) switch (_context2.prev = _context2.next) {
108
+ case 0:
109
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
110
+ options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
111
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
112
+ _context2.next = 4;
113
+ break;
114
+ }
115
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
116
+ case 4:
117
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
118
+ _context2.next = 6;
119
+ break;
120
+ }
121
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
122
+ case 6:
123
+ _context2.next = 8;
124
+ return _Api.default.sendRequest("/ip_addresses/exavault-reserved", 'GET', params, options);
125
+ case 8:
126
+ response = _context2.sent;
127
+ return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.map(function (obj) {
128
+ return new PublicIpAddress(obj, options);
129
+ })) || []);
130
+ case 10:
131
+ case "end":
132
+ return _context2.stop();
137
133
  }
138
134
  }, _callee2);
139
135
  })));
@@ -144,34 +140,32 @@ var IpAddress = /*#__PURE__*/(0, _createClass2.default)(function IpAddress() {
144
140
  response,
145
141
  _args3 = arguments;
146
142
  return _regenerator.default.wrap(function _callee3$(_context3) {
147
- while (1) {
148
- switch (_context3.prev = _context3.next) {
149
- case 0:
150
- params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
151
- options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
152
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
153
- _context3.next = 4;
154
- break;
155
- }
156
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
157
- case 4:
158
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
159
- _context3.next = 6;
160
- break;
161
- }
162
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
163
- case 6:
164
- _context3.next = 8;
165
- return _Api.default.sendRequest("/ip_addresses/reserved", 'GET', params, options);
166
- case 8:
167
- response = _context3.sent;
168
- return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.map(function (obj) {
169
- return new PublicIpAddress(obj, options);
170
- })) || []);
171
- case 10:
172
- case "end":
173
- return _context3.stop();
174
- }
143
+ while (1) switch (_context3.prev = _context3.next) {
144
+ case 0:
145
+ params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
146
+ options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
147
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
148
+ _context3.next = 4;
149
+ break;
150
+ }
151
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
152
+ case 4:
153
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
154
+ _context3.next = 6;
155
+ break;
156
+ }
157
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
158
+ case 6:
159
+ _context3.next = 8;
160
+ return _Api.default.sendRequest("/ip_addresses/reserved", 'GET', params, options);
161
+ case 8:
162
+ response = _context3.sent;
163
+ return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.map(function (obj) {
164
+ return new PublicIpAddress(obj, options);
165
+ })) || []);
166
+ case 10:
167
+ case "end":
168
+ return _context3.stop();
175
169
  }
176
170
  }, _callee3);
177
171
  })));
@@ -108,72 +108,70 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
108
108
  response,
109
109
  _args = arguments;
110
110
  return _regenerator.default.wrap(function _callee$(_context) {
111
- while (1) {
112
- switch (_context.prev = _context.next) {
113
- case 0:
114
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
115
- if (_this.attributes.path) {
116
- _context.next = 3;
117
- break;
118
- }
119
- throw new errors.EmptyPropertyError('Current object has no path');
120
- case 3:
121
- if ((0, _utils.isObject)(params)) {
122
- _context.next = 5;
123
- break;
124
- }
125
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
126
- case 5:
127
- params.path = _this.attributes.path;
128
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
129
- _context.next = 8;
130
- break;
131
- }
132
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
133
- case 8:
134
- if (!(params['token'] && !(0, _utils.isString)(params['token']))) {
135
- _context.next = 10;
136
- break;
137
- }
138
- throw new errors.InvalidParameterError("Bad parameter: token must be of type String, received ".concat((0, _utils.getType)(token)));
139
- case 10:
140
- if (params['path']) {
141
- _context.next = 16;
142
- break;
143
- }
144
- if (!_this.attributes.path) {
145
- _context.next = 15;
146
- break;
147
- }
148
- params['path'] = _this.path;
111
+ while (1) switch (_context.prev = _context.next) {
112
+ case 0:
113
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
114
+ if (_this.attributes.path) {
115
+ _context.next = 3;
116
+ break;
117
+ }
118
+ throw new errors.EmptyPropertyError('Current object has no path');
119
+ case 3:
120
+ if ((0, _utils.isObject)(params)) {
121
+ _context.next = 5;
122
+ break;
123
+ }
124
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
125
+ case 5:
126
+ params.path = _this.attributes.path;
127
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
128
+ _context.next = 8;
129
+ break;
130
+ }
131
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
132
+ case 8:
133
+ if (!(params['token'] && !(0, _utils.isString)(params['token']))) {
134
+ _context.next = 10;
135
+ break;
136
+ }
137
+ throw new errors.InvalidParameterError("Bad parameter: token must be of type String, received ".concat((0, _utils.getType)(token)));
138
+ case 10:
139
+ if (params['path']) {
149
140
  _context.next = 16;
150
141
  break;
151
- case 15:
152
- throw new errors.MissingParameterError('Parameter missing: path');
153
- case 16:
154
- if (params['token']) {
155
- _context.next = 22;
156
- break;
157
- }
158
- if (!_this.attributes.token) {
159
- _context.next = 21;
160
- break;
161
- }
162
- params['token'] = _this.token;
142
+ }
143
+ if (!_this.attributes.path) {
144
+ _context.next = 15;
145
+ break;
146
+ }
147
+ params['path'] = _this.path;
148
+ _context.next = 16;
149
+ break;
150
+ case 15:
151
+ throw new errors.MissingParameterError('Parameter missing: path');
152
+ case 16:
153
+ if (params['token']) {
163
154
  _context.next = 22;
164
155
  break;
165
- case 21:
166
- throw new errors.MissingParameterError('Parameter missing: token');
167
- case 22:
168
- _context.next = 24;
169
- return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params['path'])), 'DELETE', params, _this.options);
170
- case 24:
171
- response = _context.sent;
172
- return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
173
- case 26:
174
- case "end":
175
- return _context.stop();
176
- }
156
+ }
157
+ if (!_this.attributes.token) {
158
+ _context.next = 21;
159
+ break;
160
+ }
161
+ params['token'] = _this.token;
162
+ _context.next = 22;
163
+ break;
164
+ case 21:
165
+ throw new errors.MissingParameterError('Parameter missing: token');
166
+ case 22:
167
+ _context.next = 24;
168
+ return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params['path'])), 'DELETE', params, _this.options);
169
+ case 24:
170
+ response = _context.sent;
171
+ return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
172
+ case 26:
173
+ case "end":
174
+ return _context.stop();
177
175
  }
178
176
  }, _callee);
179
177
  })));
@@ -207,53 +205,51 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
207
205
  response,
208
206
  _args2 = arguments;
209
207
  return _regenerator.default.wrap(function _callee2$(_context2) {
210
- while (1) {
211
- switch (_context2.prev = _context2.next) {
212
- case 0:
213
- params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
214
- options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
215
- if ((0, _utils.isObject)(params)) {
216
- _context2.next = 4;
217
- break;
218
- }
219
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
220
- case 4:
221
- params['path'] = path;
222
- if (params['path']) {
223
- _context2.next = 7;
224
- break;
225
- }
226
- throw new errors.MissingParameterError('Parameter missing: path');
227
- case 7:
228
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
229
- _context2.next = 9;
230
- break;
231
- }
232
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
233
- case 9:
234
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
235
- _context2.next = 11;
236
- break;
237
- }
238
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
239
- case 11:
240
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
241
- _context2.next = 13;
242
- break;
243
- }
244
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
245
- case 13:
246
- _context2.next = 15;
247
- return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
248
- case 15:
249
- response = _context2.sent;
250
- return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
251
- return new Lock(obj, options);
252
- })) || []);
253
- case 17:
254
- case "end":
255
- return _context2.stop();
256
- }
208
+ while (1) switch (_context2.prev = _context2.next) {
209
+ case 0:
210
+ params = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
211
+ options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};
212
+ if ((0, _utils.isObject)(params)) {
213
+ _context2.next = 4;
214
+ break;
215
+ }
216
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
217
+ case 4:
218
+ params['path'] = path;
219
+ if (params['path']) {
220
+ _context2.next = 7;
221
+ break;
222
+ }
223
+ throw new errors.MissingParameterError('Parameter missing: path');
224
+ case 7:
225
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
226
+ _context2.next = 9;
227
+ break;
228
+ }
229
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
230
+ case 9:
231
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
232
+ _context2.next = 11;
233
+ break;
234
+ }
235
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
236
+ case 11:
237
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
238
+ _context2.next = 13;
239
+ break;
240
+ }
241
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
242
+ case 13:
243
+ _context2.next = 15;
244
+ return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params['path'])), 'GET', params, options);
245
+ case 15:
246
+ response = _context2.sent;
247
+ return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
248
+ return new Lock(obj, options);
249
+ })) || []);
250
+ case 17:
251
+ case "end":
252
+ return _context2.stop();
257
253
  }
258
254
  }, _callee2);
259
255
  }));
@@ -268,51 +264,49 @@ var Lock = /*#__PURE__*/(0, _createClass2.default)(function Lock() {
268
264
  response,
269
265
  _args3 = arguments;
270
266
  return _regenerator.default.wrap(function _callee3$(_context3) {
271
- while (1) {
272
- switch (_context3.prev = _context3.next) {
273
- case 0:
274
- params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
275
- options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
276
- if ((0, _utils.isObject)(params)) {
277
- _context3.next = 4;
278
- break;
279
- }
280
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
281
- case 4:
282
- params['path'] = path;
283
- if (params['path']) {
284
- _context3.next = 7;
285
- break;
286
- }
287
- throw new errors.MissingParameterError('Parameter missing: path');
288
- case 7:
289
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
290
- _context3.next = 9;
291
- break;
292
- }
293
- throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
294
- case 9:
295
- if (!(params['recursive'] && !(0, _utils.isString)(params['recursive']))) {
296
- _context3.next = 11;
297
- break;
298
- }
299
- throw new errors.InvalidParameterError("Bad parameter: recursive must be of type String, received ".concat((0, _utils.getType)(params['recursive'])));
300
- case 11:
301
- if (!(params['timeout'] && !(0, _utils.isInt)(params['timeout']))) {
302
- _context3.next = 13;
303
- break;
304
- }
305
- throw new errors.InvalidParameterError("Bad parameter: timeout must be of type Int, received ".concat((0, _utils.getType)(params['timeout'])));
306
- case 13:
307
- _context3.next = 15;
308
- return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params['path'])), 'POST', params, options);
309
- case 15:
310
- response = _context3.sent;
311
- return _context3.abrupt("return", new Lock(response === null || response === void 0 ? void 0 : response.data, options));
312
- case 17:
313
- case "end":
314
- return _context3.stop();
315
- }
267
+ while (1) switch (_context3.prev = _context3.next) {
268
+ case 0:
269
+ params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
270
+ options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
271
+ if ((0, _utils.isObject)(params)) {
272
+ _context3.next = 4;
273
+ break;
274
+ }
275
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
276
+ case 4:
277
+ params['path'] = path;
278
+ if (params['path']) {
279
+ _context3.next = 7;
280
+ break;
281
+ }
282
+ throw new errors.MissingParameterError('Parameter missing: path');
283
+ case 7:
284
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
285
+ _context3.next = 9;
286
+ break;
287
+ }
288
+ throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params['path'])));
289
+ case 9:
290
+ if (!(params['recursive'] && !(0, _utils.isString)(params['recursive']))) {
291
+ _context3.next = 11;
292
+ break;
293
+ }
294
+ throw new errors.InvalidParameterError("Bad parameter: recursive must be of type String, received ".concat((0, _utils.getType)(params['recursive'])));
295
+ case 11:
296
+ if (!(params['timeout'] && !(0, _utils.isInt)(params['timeout']))) {
297
+ _context3.next = 13;
298
+ break;
299
+ }
300
+ throw new errors.InvalidParameterError("Bad parameter: timeout must be of type Int, received ".concat((0, _utils.getType)(params['timeout'])));
301
+ case 13:
302
+ _context3.next = 15;
303
+ return _Api.default.sendRequest("/locks/".concat(encodeURIComponent(params['path'])), 'POST', params, options);
304
+ case 15:
305
+ response = _context3.sent;
306
+ return _context3.abrupt("return", new Lock(response === null || response === void 0 ? void 0 : response.data, options));
307
+ case 17:
308
+ case "end":
309
+ return _context3.stop();
316
310
  }
317
311
  }, _callee3);
318
312
  }));