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
@@ -69,40 +69,38 @@ var UserCipherUse = /*#__PURE__*/(0, _createClass2.default)(function UserCipherU
69
69
  response,
70
70
  _args = arguments;
71
71
  return _regenerator.default.wrap(function _callee$(_context) {
72
- while (1) {
73
- switch (_context.prev = _context.next) {
74
- case 0:
75
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
76
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
77
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
78
- _context.next = 4;
79
- break;
80
- }
81
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
82
- case 4:
83
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
84
- _context.next = 6;
85
- break;
86
- }
87
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
88
- case 6:
89
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
90
- _context.next = 8;
91
- break;
92
- }
93
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
94
- case 8:
95
- _context.next = 10;
96
- return _Api.default.sendRequest("/user_cipher_uses", 'GET', params, options);
97
- case 10:
98
- response = _context.sent;
99
- 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) {
100
- return new UserCipherUse(obj, options);
101
- })) || []);
102
- case 12:
103
- case "end":
104
- return _context.stop();
105
- }
72
+ while (1) switch (_context.prev = _context.next) {
73
+ case 0:
74
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
75
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
76
+ if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
77
+ _context.next = 4;
78
+ break;
79
+ }
80
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
81
+ case 4:
82
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
83
+ _context.next = 6;
84
+ break;
85
+ }
86
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
87
+ case 6:
88
+ if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
89
+ _context.next = 8;
90
+ break;
91
+ }
92
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
93
+ case 8:
94
+ _context.next = 10;
95
+ return _Api.default.sendRequest("/user_cipher_uses", 'GET', params, options);
96
+ case 10:
97
+ response = _context.sent;
98
+ 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) {
99
+ return new UserCipherUse(obj, options);
100
+ })) || []);
101
+ case 12:
102
+ case "end":
103
+ return _context.stop();
106
104
  }
107
105
  }, _callee);
108
106
  })));
@@ -60,52 +60,50 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
60
60
  response,
61
61
  _args = arguments;
62
62
  return _regenerator.default.wrap(function _callee$(_context) {
63
- while (1) {
64
- switch (_context.prev = _context.next) {
65
- case 0:
66
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
67
- if (_this.attributes.id) {
68
- _context.next = 3;
69
- break;
70
- }
71
- throw new errors.EmptyPropertyError('Current object has no id');
72
- case 3:
73
- if ((0, _utils.isObject)(params)) {
74
- _context.next = 5;
75
- break;
76
- }
77
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
78
- case 5:
79
- params.id = _this.attributes.id;
80
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
81
- _context.next = 8;
82
- break;
83
- }
84
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
85
- case 8:
86
- if (params['id']) {
87
- _context.next = 14;
88
- break;
89
- }
90
- if (!_this.attributes.id) {
91
- _context.next = 13;
92
- break;
93
- }
94
- params['id'] = _this.id;
63
+ while (1) switch (_context.prev = _context.next) {
64
+ case 0:
65
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
66
+ if (_this.attributes.id) {
67
+ _context.next = 3;
68
+ break;
69
+ }
70
+ throw new errors.EmptyPropertyError('Current object has no id');
71
+ case 3:
72
+ if ((0, _utils.isObject)(params)) {
73
+ _context.next = 5;
74
+ break;
75
+ }
76
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
77
+ case 5:
78
+ params.id = _this.attributes.id;
79
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
80
+ _context.next = 8;
81
+ break;
82
+ }
83
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
84
+ case 8:
85
+ if (params['id']) {
95
86
  _context.next = 14;
96
87
  break;
97
- case 13:
98
- throw new errors.MissingParameterError('Parameter missing: id');
99
- case 14:
100
- _context.next = 16;
101
- return _Api.default.sendRequest("/user_requests/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
102
- case 16:
103
- response = _context.sent;
104
- return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
105
- case 18:
106
- case "end":
107
- return _context.stop();
108
- }
88
+ }
89
+ if (!_this.attributes.id) {
90
+ _context.next = 13;
91
+ break;
92
+ }
93
+ params['id'] = _this.id;
94
+ _context.next = 14;
95
+ break;
96
+ case 13:
97
+ throw new errors.MissingParameterError('Parameter missing: id');
98
+ case 14:
99
+ _context.next = 16;
100
+ return _Api.default.sendRequest("/user_requests/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
101
+ case 16:
102
+ response = _context.sent;
103
+ return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
104
+ case 18:
105
+ case "end":
106
+ return _context.stop();
109
107
  }
110
108
  }, _callee);
111
109
  })));
@@ -142,34 +140,32 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
142
140
  response,
143
141
  _args2 = arguments;
144
142
  return _regenerator.default.wrap(function _callee2$(_context2) {
145
- while (1) {
146
- switch (_context2.prev = _context2.next) {
147
- case 0:
148
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
149
- options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
150
- if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
151
- _context2.next = 4;
152
- break;
153
- }
154
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
155
- case 4:
156
- if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
157
- _context2.next = 6;
158
- break;
159
- }
160
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
161
- case 6:
162
- _context2.next = 8;
163
- return _Api.default.sendRequest("/user_requests", 'GET', params, options);
164
- case 8:
165
- response = _context2.sent;
166
- 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) {
167
- return new UserRequest(obj, options);
168
- })) || []);
169
- case 10:
170
- case "end":
171
- return _context2.stop();
172
- }
143
+ while (1) switch (_context2.prev = _context2.next) {
144
+ case 0:
145
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
146
+ options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
147
+ if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
148
+ _context2.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
+ _context2.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
+ _context2.next = 8;
160
+ return _Api.default.sendRequest("/user_requests", 'GET', params, options);
161
+ case 8:
162
+ response = _context2.sent;
163
+ 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) {
164
+ return new UserRequest(obj, options);
165
+ })) || []);
166
+ case 10:
167
+ case "end":
168
+ return _context2.stop();
173
169
  }
174
170
  }, _callee2);
175
171
  })));
@@ -185,39 +181,37 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
185
181
  response,
186
182
  _args3 = arguments;
187
183
  return _regenerator.default.wrap(function _callee3$(_context3) {
188
- while (1) {
189
- switch (_context3.prev = _context3.next) {
190
- case 0:
191
- params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
192
- options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
193
- if ((0, _utils.isObject)(params)) {
194
- _context3.next = 4;
195
- break;
196
- }
197
- throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
198
- case 4:
199
- params['id'] = id;
200
- if (params['id']) {
201
- _context3.next = 7;
202
- break;
203
- }
204
- throw new errors.MissingParameterError('Parameter missing: id');
205
- case 7:
206
- if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
207
- _context3.next = 9;
208
- break;
209
- }
210
- throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
211
- case 9:
212
- _context3.next = 11;
213
- return _Api.default.sendRequest("/user_requests/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
214
- case 11:
215
- response = _context3.sent;
216
- return _context3.abrupt("return", new UserRequest(response === null || response === void 0 ? void 0 : response.data, options));
217
- case 13:
218
- case "end":
219
- return _context3.stop();
220
- }
184
+ while (1) switch (_context3.prev = _context3.next) {
185
+ case 0:
186
+ params = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
187
+ options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};
188
+ if ((0, _utils.isObject)(params)) {
189
+ _context3.next = 4;
190
+ break;
191
+ }
192
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
193
+ case 4:
194
+ params['id'] = id;
195
+ if (params['id']) {
196
+ _context3.next = 7;
197
+ break;
198
+ }
199
+ throw new errors.MissingParameterError('Parameter missing: id');
200
+ case 7:
201
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
202
+ _context3.next = 9;
203
+ break;
204
+ }
205
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
206
+ case 9:
207
+ _context3.next = 11;
208
+ return _Api.default.sendRequest("/user_requests/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
209
+ case 11:
210
+ response = _context3.sent;
211
+ return _context3.abrupt("return", new UserRequest(response === null || response === void 0 ? void 0 : response.data, options));
212
+ case 13:
213
+ case "end":
214
+ return _context3.stop();
221
215
  }
222
216
  }, _callee3);
223
217
  }));
@@ -236,56 +230,54 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
236
230
  response,
237
231
  _args4 = arguments;
238
232
  return _regenerator.default.wrap(function _callee4$(_context4) {
239
- while (1) {
240
- switch (_context4.prev = _context4.next) {
241
- case 0:
242
- params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
243
- options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
244
- if (params['name']) {
245
- _context4.next = 4;
246
- break;
247
- }
248
- throw new errors.MissingParameterError('Parameter missing: name');
249
- case 4:
250
- if (params['email']) {
251
- _context4.next = 6;
252
- break;
253
- }
254
- throw new errors.MissingParameterError('Parameter missing: email');
255
- case 6:
256
- if (params['details']) {
257
- _context4.next = 8;
258
- break;
259
- }
260
- throw new errors.MissingParameterError('Parameter missing: details');
261
- case 8:
262
- if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
263
- _context4.next = 10;
264
- break;
265
- }
266
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
267
- case 10:
268
- if (!(params['email'] && !(0, _utils.isString)(params['email']))) {
269
- _context4.next = 12;
270
- break;
271
- }
272
- throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params['email'])));
273
- case 12:
274
- if (!(params['details'] && !(0, _utils.isString)(params['details']))) {
275
- _context4.next = 14;
276
- break;
277
- }
278
- throw new errors.InvalidParameterError("Bad parameter: details must be of type String, received ".concat((0, _utils.getType)(params['details'])));
279
- case 14:
280
- _context4.next = 16;
281
- return _Api.default.sendRequest("/user_requests", 'POST', params, options);
282
- case 16:
283
- response = _context4.sent;
284
- return _context4.abrupt("return", new UserRequest(response === null || response === void 0 ? void 0 : response.data, options));
285
- case 18:
286
- case "end":
287
- return _context4.stop();
288
- }
233
+ while (1) switch (_context4.prev = _context4.next) {
234
+ case 0:
235
+ params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
236
+ options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
237
+ if (params['name']) {
238
+ _context4.next = 4;
239
+ break;
240
+ }
241
+ throw new errors.MissingParameterError('Parameter missing: name');
242
+ case 4:
243
+ if (params['email']) {
244
+ _context4.next = 6;
245
+ break;
246
+ }
247
+ throw new errors.MissingParameterError('Parameter missing: email');
248
+ case 6:
249
+ if (params['details']) {
250
+ _context4.next = 8;
251
+ break;
252
+ }
253
+ throw new errors.MissingParameterError('Parameter missing: details');
254
+ case 8:
255
+ if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
256
+ _context4.next = 10;
257
+ break;
258
+ }
259
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
260
+ case 10:
261
+ if (!(params['email'] && !(0, _utils.isString)(params['email']))) {
262
+ _context4.next = 12;
263
+ break;
264
+ }
265
+ throw new errors.InvalidParameterError("Bad parameter: email must be of type String, received ".concat((0, _utils.getType)(params['email'])));
266
+ case 12:
267
+ if (!(params['details'] && !(0, _utils.isString)(params['details']))) {
268
+ _context4.next = 14;
269
+ break;
270
+ }
271
+ throw new errors.InvalidParameterError("Bad parameter: details must be of type String, received ".concat((0, _utils.getType)(params['details'])));
272
+ case 14:
273
+ _context4.next = 16;
274
+ return _Api.default.sendRequest("/user_requests", 'POST', params, options);
275
+ case 16:
276
+ response = _context4.sent;
277
+ return _context4.abrupt("return", new UserRequest(response === null || response === void 0 ? void 0 : response.data, options));
278
+ case 18:
279
+ case "end":
280
+ return _context4.stop();
289
281
  }
290
282
  }, _callee4);
291
283
  })));
@@ -143,62 +143,60 @@ var WebhookTest = /*#__PURE__*/(0, _createClass2.default)(function WebhookTest()
143
143
  response,
144
144
  _args = arguments;
145
145
  return _regenerator.default.wrap(function _callee$(_context) {
146
- while (1) {
147
- switch (_context.prev = _context.next) {
148
- case 0:
149
- params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
150
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
151
- if (params['url']) {
152
- _context.next = 4;
153
- break;
154
- }
155
- throw new errors.MissingParameterError('Parameter missing: url');
156
- case 4:
157
- if (!(params['url'] && !(0, _utils.isString)(params['url']))) {
158
- _context.next = 6;
159
- break;
160
- }
161
- throw new errors.InvalidParameterError("Bad parameter: url must be of type String, received ".concat((0, _utils.getType)(params['url'])));
162
- case 6:
163
- if (!(params['method'] && !(0, _utils.isString)(params['method']))) {
164
- _context.next = 8;
165
- break;
166
- }
167
- throw new errors.InvalidParameterError("Bad parameter: method must be of type String, received ".concat((0, _utils.getType)(params['method'])));
168
- case 8:
169
- if (!(params['encoding'] && !(0, _utils.isString)(params['encoding']))) {
170
- _context.next = 10;
171
- break;
172
- }
173
- throw new errors.InvalidParameterError("Bad parameter: encoding must be of type String, received ".concat((0, _utils.getType)(params['encoding'])));
174
- case 10:
175
- if (!(params['raw_body'] && !(0, _utils.isString)(params['raw_body']))) {
176
- _context.next = 12;
177
- break;
178
- }
179
- throw new errors.InvalidParameterError("Bad parameter: raw_body must be of type String, received ".concat((0, _utils.getType)(params['raw_body'])));
180
- case 12:
181
- if (!(params['file_form_field'] && !(0, _utils.isString)(params['file_form_field']))) {
182
- _context.next = 14;
183
- break;
184
- }
185
- throw new errors.InvalidParameterError("Bad parameter: file_form_field must be of type String, received ".concat((0, _utils.getType)(params['file_form_field'])));
186
- case 14:
187
- if (!(params['action'] && !(0, _utils.isString)(params['action']))) {
188
- _context.next = 16;
189
- break;
190
- }
191
- throw new errors.InvalidParameterError("Bad parameter: action must be of type String, received ".concat((0, _utils.getType)(params['action'])));
192
- case 16:
193
- _context.next = 18;
194
- return _Api.default.sendRequest("/webhook_tests", 'POST', params, options);
195
- case 18:
196
- response = _context.sent;
197
- return _context.abrupt("return", new WebhookTest(response === null || response === void 0 ? void 0 : response.data, options));
198
- case 20:
199
- case "end":
200
- return _context.stop();
201
- }
146
+ while (1) switch (_context.prev = _context.next) {
147
+ case 0:
148
+ params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
149
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
150
+ if (params['url']) {
151
+ _context.next = 4;
152
+ break;
153
+ }
154
+ throw new errors.MissingParameterError('Parameter missing: url');
155
+ case 4:
156
+ if (!(params['url'] && !(0, _utils.isString)(params['url']))) {
157
+ _context.next = 6;
158
+ break;
159
+ }
160
+ throw new errors.InvalidParameterError("Bad parameter: url must be of type String, received ".concat((0, _utils.getType)(params['url'])));
161
+ case 6:
162
+ if (!(params['method'] && !(0, _utils.isString)(params['method']))) {
163
+ _context.next = 8;
164
+ break;
165
+ }
166
+ throw new errors.InvalidParameterError("Bad parameter: method must be of type String, received ".concat((0, _utils.getType)(params['method'])));
167
+ case 8:
168
+ if (!(params['encoding'] && !(0, _utils.isString)(params['encoding']))) {
169
+ _context.next = 10;
170
+ break;
171
+ }
172
+ throw new errors.InvalidParameterError("Bad parameter: encoding must be of type String, received ".concat((0, _utils.getType)(params['encoding'])));
173
+ case 10:
174
+ if (!(params['raw_body'] && !(0, _utils.isString)(params['raw_body']))) {
175
+ _context.next = 12;
176
+ break;
177
+ }
178
+ throw new errors.InvalidParameterError("Bad parameter: raw_body must be of type String, received ".concat((0, _utils.getType)(params['raw_body'])));
179
+ case 12:
180
+ if (!(params['file_form_field'] && !(0, _utils.isString)(params['file_form_field']))) {
181
+ _context.next = 14;
182
+ break;
183
+ }
184
+ throw new errors.InvalidParameterError("Bad parameter: file_form_field must be of type String, received ".concat((0, _utils.getType)(params['file_form_field'])));
185
+ case 14:
186
+ if (!(params['action'] && !(0, _utils.isString)(params['action']))) {
187
+ _context.next = 16;
188
+ break;
189
+ }
190
+ throw new errors.InvalidParameterError("Bad parameter: action must be of type String, received ".concat((0, _utils.getType)(params['action'])));
191
+ case 16:
192
+ _context.next = 18;
193
+ return _Api.default.sendRequest("/webhook_tests", 'POST', params, options);
194
+ case 18:
195
+ response = _context.sent;
196
+ return _context.abrupt("return", new WebhookTest(response === null || response === void 0 ? void 0 : response.data, options));
197
+ case 20:
198
+ case "end":
199
+ return _context.stop();
202
200
  }
203
201
  }, _callee);
204
202
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.236",
3
+ "version": "1.0.237",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -44,6 +44,13 @@ class BundleNotification {
44
44
  this.attributes.notify_on_registration = value
45
45
  }
46
46
 
47
+ // boolean # Triggers bundle notification when a upload action occurs for it.
48
+ getNotifyOnUpload = () => this.attributes.notify_on_upload
49
+
50
+ setNotifyOnUpload = value => {
51
+ this.attributes.notify_on_upload = value
52
+ }
53
+
47
54
  // int64 # The id of the user to notify.
48
55
  getUserId = () => this.attributes.user_id
49
56
 
@@ -52,6 +59,36 @@ class BundleNotification {
52
59
  }
53
60
 
54
61
 
62
+ // Parameters:
63
+ // notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
64
+ // notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
65
+ update = async (params = {}) => {
66
+ if (!this.attributes.id) {
67
+ throw new errors.EmptyPropertyError('Current object has no id')
68
+ }
69
+
70
+ if (!isObject(params)) {
71
+ throw new errors.InvalidParameterError(`Bad parameter: params must be of type object, received ${getType(params)}`)
72
+ }
73
+
74
+ params.id = this.attributes.id
75
+ if (params['id'] && !isInt(params['id'])) {
76
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
77
+ }
78
+
79
+ if (!params['id']) {
80
+ if (this.attributes.id) {
81
+ params['id'] = this.id
82
+ } else {
83
+ throw new errors.MissingParameterError('Parameter missing: id')
84
+ }
85
+ }
86
+
87
+ const response = await Api.sendRequest(`/bundle_notifications/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
88
+
89
+ return new BundleNotification(response?.data, this.options)
90
+ }
91
+
55
92
  delete = async (params = {}) => {
56
93
  if (!this.attributes.id) {
57
94
  throw new errors.EmptyPropertyError('Current object has no id')
@@ -84,7 +121,7 @@ class BundleNotification {
84
121
 
85
122
  save = () => {
86
123
  if (this.attributes['id']) {
87
- throw new errors.NotImplementedError('The BundleNotification object doesn\'t support updates.')
124
+ return this.update(this.attributes)
88
125
  } else {
89
126
  const newObject = BundleNotification.create(this.attributes, this.options)
90
127
  this.attributes = { ...newObject.attributes }
@@ -150,6 +187,7 @@ class BundleNotification {
150
187
  // Parameters:
151
188
  // user_id (required) - int64 - The id of the user to notify.
152
189
  // notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
190
+ // notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
153
191
  // bundle_id (required) - int64 - Bundle ID to notify on
154
192
  static create = async (params = {}, options = {}) => {
155
193
  if (!params['user_id']) {