files.com 1.0.307 → 1.0.309

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.307
1
+ 1.0.309
@@ -38,6 +38,7 @@
38
38
  },
39
39
  "skip_name": true,
40
40
  "skip_email": true,
41
+ "start_access_on_date": "2000-01-01T01:00:00Z",
41
42
  "skip_company": true,
42
43
  "id": 1,
43
44
  "created_at": "2000-01-01T01:00:00Z",
@@ -81,6 +82,7 @@
81
82
  * `form_field_set` (FormFieldSet): Custom Form to use
82
83
  * `skip_name` (boolean): BundleRegistrations can be saved without providing name?
83
84
  * `skip_email` (boolean): BundleRegistrations can be saved without providing email?
85
+ * `start_access_on_date` (date-time): Date when share will start to be accessible. If `nil` access granted right after create.
84
86
  * `skip_company` (boolean): BundleRegistrations can be saved without providing company?
85
87
  * `id` (int64): Bundle ID
86
88
  * `created_at` (date-time): Bundle created at date/time
@@ -171,6 +173,7 @@ await Bundle.create({
171
173
  'skip_email': true,
172
174
  'skip_name': true,
173
175
  'skip_company': true,
176
+ 'start_access_on_date': "2000-01-01T01:00:00Z",
174
177
  'snapshot_id': 1,
175
178
  })
176
179
  ```
@@ -201,6 +204,7 @@ await Bundle.create({
201
204
  * `skip_email` (boolean): BundleRegistrations can be saved without providing email?
202
205
  * `skip_name` (boolean): BundleRegistrations can be saved without providing name?
203
206
  * `skip_company` (boolean): BundleRegistrations can be saved without providing company?
207
+ * `start_access_on_date` (string): Date when share will start to be accessible. If `nil` access granted right after create.
204
208
  * `snapshot_id` (int64): ID of the snapshot containing this bundle's contents.
205
209
  * `watermark_attachment_file` (file): Preview watermark image applied to all bundle items.
206
210
 
@@ -254,6 +258,7 @@ await bundle.update({
254
258
  'require_share_recipient': true,
255
259
  'send_email_receipt_to_uploader': true,
256
260
  'skip_company': true,
261
+ 'start_access_on_date': "2000-01-01T01:00:00Z",
257
262
  'skip_email': true,
258
263
  'skip_name': true,
259
264
  'watermark_attachment_delete': true,
@@ -283,6 +288,7 @@ await bundle.update({
283
288
  * `require_share_recipient` (boolean): Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
284
289
  * `send_email_receipt_to_uploader` (boolean): Send delivery receipt to the uploader. Note: For writable share only
285
290
  * `skip_company` (boolean): BundleRegistrations can be saved without providing company?
291
+ * `start_access_on_date` (string): Date when share will start to be accessible. If `nil` access granted right after create.
286
292
  * `skip_email` (boolean): BundleRegistrations can be saved without providing email?
287
293
  * `skip_name` (boolean): BundleRegistrations can be saved without providing name?
288
294
  * `watermark_attachment_delete` (boolean): If true, will delete the file stored in watermark_attachment
@@ -326,6 +332,7 @@ await bundle.update({
326
332
  },
327
333
  "skip_name": true,
328
334
  "skip_email": true,
335
+ "start_access_on_date": "2000-01-01T01:00:00Z",
329
336
  "skip_company": true,
330
337
  "id": 1,
331
338
  "created_at": "2000-01-01T01:00:00Z",
@@ -20,6 +20,7 @@
20
20
  "bundle_expiration": 1,
21
21
  "bundle_password_required": true,
22
22
  "bundle_registration_notifications": "never",
23
+ "bundle_require_registration": true,
23
24
  "bundle_require_share_recipient": true,
24
25
  "bundle_upload_receipt_notifications": "never",
25
26
  "bundle_watermark_attachment": null,
@@ -237,6 +238,7 @@
237
238
  * `bundle_expiration` (int64): Site-wide Bundle expiration in days
238
239
  * `bundle_password_required` (boolean): Do Bundles require password protection?
239
240
  * `bundle_registration_notifications` (string): Do Bundle owners receive registration notification?
241
+ * `bundle_require_registration` (boolean): Do Bundles require registration?
240
242
  * `bundle_require_share_recipient` (boolean): Do Bundles require recipients for sharing?
241
243
  * `bundle_upload_receipt_notifications` (string): Do Bundle uploaders receive upload confirmation notifications?
242
244
  * `bundle_watermark_attachment` (Image): Preview watermark image applied to all bundle items.
@@ -450,6 +452,7 @@ await Site.update({
450
452
  'immutable_files': true,
451
453
  'session_pinned_by_ip': true,
452
454
  'bundle_password_required': true,
455
+ 'bundle_require_registration': true,
453
456
  'bundle_require_share_recipient': true,
454
457
  'bundle_registration_notifications': "never",
455
458
  'bundle_activity_notifications': "never",
@@ -583,6 +586,7 @@ await Site.update({
583
586
  * `immutable_files` (boolean): Are files protected from modification?
584
587
  * `session_pinned_by_ip` (boolean): Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
585
588
  * `bundle_password_required` (boolean): Do Bundles require password protection?
589
+ * `bundle_require_registration` (boolean): Do Bundles require registration?
586
590
  * `bundle_require_share_recipient` (boolean): Do Bundles require recipients for sharing?
587
591
  * `bundle_registration_notifications` (string): Do Bundle owners receive registration notification?
588
592
  * `bundle_activity_notifications` (string): Do Bundle owners receive activity notifications?
@@ -164,6 +164,13 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
164
164
  (0, _defineProperty2.default)(this, "setSkipEmail", function (value) {
165
165
  _this.attributes.skip_email = value;
166
166
  });
167
+ // date-time # Date when share will start to be accessible. If `nil` access granted right after create.
168
+ (0, _defineProperty2.default)(this, "getStartAccessOnDate", function () {
169
+ return _this.attributes.start_access_on_date;
170
+ });
171
+ (0, _defineProperty2.default)(this, "setStartAccessOnDate", function (value) {
172
+ _this.attributes.start_access_on_date = value;
173
+ });
167
174
  // boolean # BundleRegistrations can be saved without providing company?
168
175
  (0, _defineProperty2.default)(this, "getSkipCompany", function () {
169
176
  return _this.attributes.skip_company;
@@ -419,6 +426,7 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
419
426
  // require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
420
427
  // send_email_receipt_to_uploader - boolean - Send delivery receipt to the uploader. Note: For writable share only
421
428
  // skip_company - boolean - BundleRegistrations can be saved without providing company?
429
+ // start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
422
430
  // skip_email - boolean - BundleRegistrations can be saved without providing email?
423
431
  // skip_name - boolean - BundleRegistrations can be saved without providing name?
424
432
  // watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
@@ -522,26 +530,32 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
522
530
  }
523
531
  throw new errors.InvalidParameterError("Bad parameter: permissions must be of type String, received ".concat((0, _utils.getType)(permissions)));
524
532
  case 32:
533
+ if (!(params['start_access_on_date'] && !(0, _utils.isString)(params['start_access_on_date']))) {
534
+ _context2.next = 34;
535
+ break;
536
+ }
537
+ throw new errors.InvalidParameterError("Bad parameter: start_access_on_date must be of type String, received ".concat((0, _utils.getType)(start_access_on_date)));
538
+ case 34:
525
539
  if (params['id']) {
526
- _context2.next = 38;
540
+ _context2.next = 40;
527
541
  break;
528
542
  }
529
543
  if (!_this.attributes.id) {
530
- _context2.next = 37;
544
+ _context2.next = 39;
531
545
  break;
532
546
  }
533
547
  params['id'] = _this.id;
534
- _context2.next = 38;
548
+ _context2.next = 40;
535
549
  break;
536
- case 37:
550
+ case 39:
537
551
  throw new errors.MissingParameterError('Parameter missing: id');
538
- case 38:
539
- _context2.next = 40;
540
- return _Api.default.sendRequest("/bundles/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
541
552
  case 40:
553
+ _context2.next = 42;
554
+ return _Api.default.sendRequest("/bundles/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
555
+ case 42:
542
556
  response = _context2.sent;
543
557
  return _context2.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, _this.options));
544
- case 42:
558
+ case 44:
545
559
  case "end":
546
560
  return _context2.stop();
547
561
  }
@@ -758,6 +772,7 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
758
772
  // skip_email - boolean - BundleRegistrations can be saved without providing email?
759
773
  // skip_name - boolean - BundleRegistrations can be saved without providing name?
760
774
  // skip_company - boolean - BundleRegistrations can be saved without providing company?
775
+ // start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
761
776
  // snapshot_id - int64 - ID of the snapshot containing this bundle's contents.
762
777
  // watermark_attachment_file - file - Preview watermark image applied to all bundle items.
763
778
  (0, _defineProperty2.default)(Bundle, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
@@ -854,18 +869,24 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
854
869
  }
855
870
  throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
856
871
  case 30:
857
- if (!(params['snapshot_id'] && !(0, _utils.isInt)(params['snapshot_id']))) {
872
+ if (!(params['start_access_on_date'] && !(0, _utils.isString)(params['start_access_on_date']))) {
858
873
  _context6.next = 32;
859
874
  break;
860
875
  }
861
- throw new errors.InvalidParameterError("Bad parameter: snapshot_id must be of type Int, received ".concat((0, _utils.getType)(params['snapshot_id'])));
876
+ throw new errors.InvalidParameterError("Bad parameter: start_access_on_date must be of type String, received ".concat((0, _utils.getType)(params['start_access_on_date'])));
862
877
  case 32:
863
- _context6.next = 34;
864
- return _Api.default.sendRequest("/bundles", 'POST', params, options);
878
+ if (!(params['snapshot_id'] && !(0, _utils.isInt)(params['snapshot_id']))) {
879
+ _context6.next = 34;
880
+ break;
881
+ }
882
+ throw new errors.InvalidParameterError("Bad parameter: snapshot_id must be of type Int, received ".concat((0, _utils.getType)(params['snapshot_id'])));
865
883
  case 34:
884
+ _context6.next = 36;
885
+ return _Api.default.sendRequest("/bundles", 'POST', params, options);
886
+ case 36:
866
887
  response = _context6.sent;
867
888
  return _context6.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, options));
868
- case 36:
889
+ case 38:
869
890
  case "end":
870
891
  return _context6.stop();
871
892
  }
@@ -95,6 +95,10 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
95
95
  (0, _defineProperty2.default)(this, "getBundleRegistrationNotifications", function () {
96
96
  return _this.attributes.bundle_registration_notifications;
97
97
  });
98
+ // boolean # Do Bundles require registration?
99
+ (0, _defineProperty2.default)(this, "getBundleRequireRegistration", function () {
100
+ return _this.attributes.bundle_require_registration;
101
+ });
98
102
  // boolean # Do Bundles require recipients for sharing?
99
103
  (0, _defineProperty2.default)(this, "getBundleRequireShareRecipient", function () {
100
104
  return _this.attributes.bundle_require_share_recipient;
@@ -719,6 +723,7 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
719
723
  // immutable_files - boolean - Are files protected from modification?
720
724
  // session_pinned_by_ip - boolean - Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
721
725
  // bundle_password_required - boolean - Do Bundles require password protection?
726
+ // bundle_require_registration - boolean - Do Bundles require registration?
722
727
  // bundle_require_share_recipient - boolean - Do Bundles require recipients for sharing?
723
728
  // bundle_registration_notifications - string - Do Bundle owners receive registration notification?
724
729
  // bundle_activity_notifications - string - Do Bundle owners receive activity notifications?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.307",
3
+ "version": "1.0.309",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -156,6 +156,13 @@ class Bundle {
156
156
  this.attributes.skip_email = value
157
157
  }
158
158
 
159
+ // date-time # Date when share will start to be accessible. If `nil` access granted right after create.
160
+ getStartAccessOnDate = () => this.attributes.start_access_on_date
161
+
162
+ setStartAccessOnDate = value => {
163
+ this.attributes.start_access_on_date = value
164
+ }
165
+
159
166
  // boolean # BundleRegistrations can be saved without providing company?
160
167
  getSkipCompany = () => this.attributes.skip_company
161
168
 
@@ -377,6 +384,7 @@ class Bundle {
377
384
  // require_share_recipient - boolean - Only allow access to recipients who have explicitly received the share via an email sent through the Files.com UI?
378
385
  // send_email_receipt_to_uploader - boolean - Send delivery receipt to the uploader. Note: For writable share only
379
386
  // skip_company - boolean - BundleRegistrations can be saved without providing company?
387
+ // start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
380
388
  // skip_email - boolean - BundleRegistrations can be saved without providing email?
381
389
  // skip_name - boolean - BundleRegistrations can be saved without providing name?
382
390
  // watermark_attachment_delete - boolean - If true, will delete the file stored in watermark_attachment
@@ -430,6 +438,9 @@ class Bundle {
430
438
  if (params['permissions'] && !isString(params['permissions'])) {
431
439
  throw new errors.InvalidParameterError(`Bad parameter: permissions must be of type String, received ${getType(permissions)}`)
432
440
  }
441
+ if (params['start_access_on_date'] && !isString(params['start_access_on_date'])) {
442
+ throw new errors.InvalidParameterError(`Bad parameter: start_access_on_date must be of type String, received ${getType(start_access_on_date)}`)
443
+ }
433
444
 
434
445
  if (!params['id']) {
435
446
  if (this.attributes.id) {
@@ -564,6 +575,7 @@ class Bundle {
564
575
  // skip_email - boolean - BundleRegistrations can be saved without providing email?
565
576
  // skip_name - boolean - BundleRegistrations can be saved without providing name?
566
577
  // skip_company - boolean - BundleRegistrations can be saved without providing company?
578
+ // start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
567
579
  // snapshot_id - int64 - ID of the snapshot containing this bundle's contents.
568
580
  // watermark_attachment_file - file - Preview watermark image applied to all bundle items.
569
581
  static create = async (params = {}, options = {}) => {
@@ -623,6 +635,10 @@ class Bundle {
623
635
  throw new errors.InvalidParameterError(`Bad parameter: inbox_id must be of type Int, received ${getType(params['inbox_id'])}`)
624
636
  }
625
637
 
638
+ if (params['start_access_on_date'] && !isString(params['start_access_on_date'])) {
639
+ throw new errors.InvalidParameterError(`Bad parameter: start_access_on_date must be of type String, received ${getType(params['start_access_on_date'])}`)
640
+ }
641
+
626
642
  if (params['snapshot_id'] && !isInt(params['snapshot_id'])) {
627
643
  throw new errors.InvalidParameterError(`Bad parameter: snapshot_id must be of type Int, received ${getType(params['snapshot_id'])}`)
628
644
  }
@@ -71,6 +71,9 @@ class Site {
71
71
  // string # Do Bundle owners receive registration notification?
72
72
  getBundleRegistrationNotifications = () => this.attributes.bundle_registration_notifications
73
73
 
74
+ // boolean # Do Bundles require registration?
75
+ getBundleRequireRegistration = () => this.attributes.bundle_require_registration
76
+
74
77
  // boolean # Do Bundles require recipients for sharing?
75
78
  getBundleRequireShareRecipient = () => this.attributes.bundle_require_share_recipient
76
79
 
@@ -529,6 +532,7 @@ class Site {
529
532
  // immutable_files - boolean - Are files protected from modification?
530
533
  // session_pinned_by_ip - boolean - Are sessions locked to the same IP? (i.e. do users need to log in again if they change IPs?)
531
534
  // bundle_password_required - boolean - Do Bundles require password protection?
535
+ // bundle_require_registration - boolean - Do Bundles require registration?
532
536
  // bundle_require_share_recipient - boolean - Do Bundles require recipients for sharing?
533
537
  // bundle_registration_notifications - string - Do Bundle owners receive registration notification?
534
538
  // bundle_activity_notifications - string - Do Bundle owners receive activity notifications?