files.com 1.0.307 → 1.0.308
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 +1 -1
- package/docs/models/Bundle.md +5 -0
- package/docs/models/Site.md +4 -0
- package/lib/models/Bundle.js +19 -5
- package/lib/models/Site.js +5 -0
- package/package.json +1 -1
- package/src/models/Bundle.js +12 -0
- package/src/models/Site.js +4 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.308
|
package/docs/models/Bundle.md
CHANGED
|
@@ -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
|
|
|
@@ -326,6 +330,7 @@ await bundle.update({
|
|
|
326
330
|
},
|
|
327
331
|
"skip_name": true,
|
|
328
332
|
"skip_email": true,
|
|
333
|
+
"start_access_on_date": "2000-01-01T01:00:00Z",
|
|
329
334
|
"skip_company": true,
|
|
330
335
|
"id": 1,
|
|
331
336
|
"created_at": "2000-01-01T01:00:00Z",
|
package/docs/models/Site.md
CHANGED
|
@@ -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?
|
package/lib/models/Bundle.js
CHANGED
|
@@ -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;
|
|
@@ -758,6 +765,7 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
|
758
765
|
// skip_email - boolean - BundleRegistrations can be saved without providing email?
|
|
759
766
|
// skip_name - boolean - BundleRegistrations can be saved without providing name?
|
|
760
767
|
// skip_company - boolean - BundleRegistrations can be saved without providing company?
|
|
768
|
+
// start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
|
|
761
769
|
// snapshot_id - int64 - ID of the snapshot containing this bundle's contents.
|
|
762
770
|
// watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
|
763
771
|
(0, _defineProperty2.default)(Bundle, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
@@ -854,18 +862,24 @@ var Bundle = /*#__PURE__*/(0, _createClass2.default)(function Bundle() {
|
|
|
854
862
|
}
|
|
855
863
|
throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
|
|
856
864
|
case 30:
|
|
857
|
-
if (!(params['
|
|
865
|
+
if (!(params['start_access_on_date'] && !(0, _utils.isString)(params['start_access_on_date']))) {
|
|
858
866
|
_context6.next = 32;
|
|
859
867
|
break;
|
|
860
868
|
}
|
|
861
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
869
|
+
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
870
|
case 32:
|
|
863
|
-
|
|
864
|
-
|
|
871
|
+
if (!(params['snapshot_id'] && !(0, _utils.isInt)(params['snapshot_id']))) {
|
|
872
|
+
_context6.next = 34;
|
|
873
|
+
break;
|
|
874
|
+
}
|
|
875
|
+
throw new errors.InvalidParameterError("Bad parameter: snapshot_id must be of type Int, received ".concat((0, _utils.getType)(params['snapshot_id'])));
|
|
865
876
|
case 34:
|
|
877
|
+
_context6.next = 36;
|
|
878
|
+
return _Api.default.sendRequest("/bundles", 'POST', params, options);
|
|
879
|
+
case 36:
|
|
866
880
|
response = _context6.sent;
|
|
867
881
|
return _context6.abrupt("return", new Bundle(response === null || response === void 0 ? void 0 : response.data, options));
|
|
868
|
-
case
|
|
882
|
+
case 38:
|
|
869
883
|
case "end":
|
|
870
884
|
return _context6.stop();
|
|
871
885
|
}
|
package/lib/models/Site.js
CHANGED
|
@@ -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
package/src/models/Bundle.js
CHANGED
|
@@ -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
|
|
|
@@ -564,6 +571,7 @@ class Bundle {
|
|
|
564
571
|
// skip_email - boolean - BundleRegistrations can be saved without providing email?
|
|
565
572
|
// skip_name - boolean - BundleRegistrations can be saved without providing name?
|
|
566
573
|
// skip_company - boolean - BundleRegistrations can be saved without providing company?
|
|
574
|
+
// start_access_on_date - string - Date when share will start to be accessible. If `nil` access granted right after create.
|
|
567
575
|
// snapshot_id - int64 - ID of the snapshot containing this bundle's contents.
|
|
568
576
|
// watermark_attachment_file - file - Preview watermark image applied to all bundle items.
|
|
569
577
|
static create = async (params = {}, options = {}) => {
|
|
@@ -623,6 +631,10 @@ class Bundle {
|
|
|
623
631
|
throw new errors.InvalidParameterError(`Bad parameter: inbox_id must be of type Int, received ${getType(params['inbox_id'])}`)
|
|
624
632
|
}
|
|
625
633
|
|
|
634
|
+
if (params['start_access_on_date'] && !isString(params['start_access_on_date'])) {
|
|
635
|
+
throw new errors.InvalidParameterError(`Bad parameter: start_access_on_date must be of type String, received ${getType(params['start_access_on_date'])}`)
|
|
636
|
+
}
|
|
637
|
+
|
|
626
638
|
if (params['snapshot_id'] && !isInt(params['snapshot_id'])) {
|
|
627
639
|
throw new errors.InvalidParameterError(`Bad parameter: snapshot_id must be of type Int, received ${getType(params['snapshot_id'])}`)
|
|
628
640
|
}
|
package/src/models/Site.js
CHANGED
|
@@ -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?
|