files.com 1.0.243 → 1.0.244
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.244
|
@@ -67,7 +67,7 @@ await BundleNotification.create({
|
|
67
67
|
|
68
68
|
### Parameters
|
69
69
|
|
70
|
-
* `user_id` (int64):
|
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 =
|
308
|
+
_context5.next = 4;
|
315
309
|
break;
|
316
310
|
}
|
317
311
|
throw new errors.MissingParameterError('Parameter missing: bundle_id');
|
318
|
-
case
|
312
|
+
case 4:
|
319
313
|
if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
|
320
|
-
_context5.next =
|
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
|
318
|
+
case 6:
|
325
319
|
if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
|
326
|
-
_context5.next =
|
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
|
331
|
-
_context5.next =
|
324
|
+
case 8:
|
325
|
+
_context5.next = 10;
|
332
326
|
return _Api.default.sendRequest("/bundle_notifications", 'POST', params, options);
|
333
|
-
case
|
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
|
330
|
+
case 12:
|
337
331
|
case "end":
|
338
332
|
return _context5.stop();
|
339
333
|
}
|
package/package.json
CHANGED
@@ -185,15 +185,11 @@ class BundleNotification {
|
|
185
185
|
BundleNotification.find(id, params, options)
|
186
186
|
|
187
187
|
// Parameters:
|
188
|
-
// user_id
|
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
|
}
|