files.com 1.0.242 → 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.242
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
@@ -6,6 +6,7 @@
6
6
  {
7
7
  "id": 1,
8
8
  "created_at": 1,
9
+ "created_at_iso8601": 1,
9
10
  "user_id": 1,
10
11
  "file_id": 1,
11
12
  "parent_id": 1,
@@ -32,6 +33,7 @@
32
33
 
33
34
  * `id` (int64): Action ID
34
35
  * `created_at` (int64): When the action happened
36
+ * `created_at_iso8601` (int64): When the action happened, in ISO8601 format.
35
37
  * `user_id` (int64): User ID
36
38
  * `file_id` (int64): File ID related to the action
37
39
  * `parent_id` (int64): ID of the parent folder
@@ -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
  }
@@ -37,6 +37,9 @@ var HistoryExportResult = /*#__PURE__*/(0, _createClass2.default)(function Histo
37
37
  (0, _defineProperty2.default)(this, "getCreatedAt", function () {
38
38
  return _this.attributes.created_at;
39
39
  });
40
+ (0, _defineProperty2.default)(this, "getCreatedAtIso8601", function () {
41
+ return _this.attributes.created_at_iso8601;
42
+ });
40
43
  (0, _defineProperty2.default)(this, "getUserId", function () {
41
44
  return _this.attributes.user_id;
42
45
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.242",
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
  }
@@ -29,6 +29,9 @@ class HistoryExportResult {
29
29
  // int64 # When the action happened
30
30
  getCreatedAt = () => this.attributes.created_at
31
31
 
32
+ // int64 # When the action happened, in ISO8601 format.
33
+ getCreatedAtIso8601 = () => this.attributes.created_at_iso8601
34
+
32
35
  // int64 # User ID
33
36
  getUserId = () => this.attributes.user_id
34
37