files.com 1.0.243 → 1.0.244

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.243
1
+ 1.0.244
@@ -67,7 +67,7 @@ await BundleNotification.create({
67
67
 
68
68
  ### Parameters
69
69
 
70
- * `user_id` (int64): Required - The id of the user to notify.
70
+ * `user_id` (int64): The id of the user to notify.
71
71
  * `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
72
72
  * `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
73
73
  * `bundle_id` (int64): Required - Bundle ID to notify on
@@ -304,36 +304,30 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
304
304
  case 0:
305
305
  params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
306
306
  options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
307
- if (params['user_id']) {
308
- _context5.next = 4;
309
- break;
310
- }
311
- throw new errors.MissingParameterError('Parameter missing: user_id');
312
- case 4:
313
307
  if (params['bundle_id']) {
314
- _context5.next = 6;
308
+ _context5.next = 4;
315
309
  break;
316
310
  }
317
311
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
318
- case 6:
312
+ case 4:
319
313
  if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
320
- _context5.next = 8;
314
+ _context5.next = 6;
321
315
  break;
322
316
  }
323
317
  throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
324
- case 8:
318
+ case 6:
325
319
  if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
326
- _context5.next = 10;
320
+ _context5.next = 8;
327
321
  break;
328
322
  }
329
323
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
330
- case 10:
331
- _context5.next = 12;
324
+ case 8:
325
+ _context5.next = 10;
332
326
  return _Api.default.sendRequest("/bundle_notifications", 'POST', params, options);
333
- case 12:
327
+ case 10:
334
328
  response = _context5.sent;
335
329
  return _context5.abrupt("return", new BundleNotification(response === null || response === void 0 ? void 0 : response.data, options));
336
- case 14:
330
+ case 12:
337
331
  case "end":
338
332
  return _context5.stop();
339
333
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.243",
3
+ "version": "1.0.244",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -185,15 +185,11 @@ class BundleNotification {
185
185
  BundleNotification.find(id, params, options)
186
186
 
187
187
  // Parameters:
188
- // user_id (required) - int64 - The id of the user to notify.
188
+ // user_id - int64 - The id of the user to notify.
189
189
  // notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
190
190
  // notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
191
191
  // bundle_id (required) - int64 - Bundle ID to notify on
192
192
  static create = async (params = {}, options = {}) => {
193
- if (!params['user_id']) {
194
- throw new errors.MissingParameterError('Parameter missing: user_id')
195
- }
196
-
197
193
  if (!params['bundle_id']) {
198
194
  throw new errors.MissingParameterError('Parameter missing: bundle_id')
199
195
  }