files.com 1.0.415 → 1.0.417
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/Site.md +4 -0
- package/lib/Api.js +1 -2
- package/lib/Errors.js +165 -330
- package/lib/Files.js +2 -3
- package/lib/Logger.js +2 -4
- package/lib/isomorphic/File.node.js +6 -11
- package/lib/models/AccountLineItem.js +1 -2
- package/lib/models/Action.js +1 -2
- package/lib/models/ActionNotificationExport.js +1 -2
- package/lib/models/ActionNotificationExportResult.js +1 -2
- package/lib/models/ActionWebhookFailure.js +1 -2
- package/lib/models/ApiKey.js +1 -2
- package/lib/models/App.js +1 -2
- package/lib/models/As2IncomingMessage.js +1 -2
- package/lib/models/As2OutgoingMessage.js +1 -2
- package/lib/models/As2Partner.js +1 -2
- package/lib/models/As2Station.js +1 -2
- package/lib/models/Auto.js +1 -2
- package/lib/models/Automation.js +1 -2
- package/lib/models/AutomationRun.js +1 -2
- package/lib/models/BandwidthSnapshot.js +1 -2
- package/lib/models/Behavior.js +1 -2
- package/lib/models/Bundle.js +1 -2
- package/lib/models/BundleDownload.js +1 -2
- package/lib/models/BundleNotification.js +1 -2
- package/lib/models/BundleRecipient.js +1 -2
- package/lib/models/BundleRegistration.js +1 -2
- package/lib/models/Clickwrap.js +1 -2
- package/lib/models/DnsRecord.js +1 -2
- package/lib/models/EmailIncomingMessage.js +1 -2
- package/lib/models/Errors.js +1 -2
- package/lib/models/ExternalEvent.js +1 -2
- package/lib/models/File.js +1 -2
- package/lib/models/FileAction.js +1 -2
- package/lib/models/FileComment.js +1 -2
- package/lib/models/FileCommentReaction.js +1 -2
- package/lib/models/FileMigration.js +1 -2
- package/lib/models/FileUploadPart.js +1 -2
- package/lib/models/Folder.js +1 -2
- package/lib/models/FormField.js +1 -2
- package/lib/models/FormFieldSet.js +1 -2
- package/lib/models/GpgKey.js +1 -2
- package/lib/models/Group.js +1 -2
- package/lib/models/GroupUser.js +1 -2
- package/lib/models/History.js +1 -2
- package/lib/models/HistoryExport.js +1 -2
- package/lib/models/HistoryExportResult.js +1 -2
- package/lib/models/Image.js +1 -2
- package/lib/models/InboxRecipient.js +1 -2
- package/lib/models/InboxRegistration.js +1 -2
- package/lib/models/InboxUpload.js +1 -2
- package/lib/models/Invoice.js +1 -2
- package/lib/models/InvoiceLineItem.js +1 -2
- package/lib/models/IpAddress.js +1 -2
- package/lib/models/Lock.js +1 -2
- package/lib/models/Message.js +1 -2
- package/lib/models/MessageComment.js +1 -2
- package/lib/models/MessageCommentReaction.js +1 -2
- package/lib/models/MessageReaction.js +1 -2
- package/lib/models/Notification.js +1 -2
- package/lib/models/Payment.js +1 -2
- package/lib/models/PaymentLineItem.js +1 -2
- package/lib/models/Permission.js +1 -2
- package/lib/models/Preview.js +1 -2
- package/lib/models/Priority.js +1 -2
- package/lib/models/Project.js +1 -2
- package/lib/models/PublicIpAddress.js +1 -2
- package/lib/models/PublicKey.js +1 -2
- package/lib/models/RemoteBandwidthSnapshot.js +1 -2
- package/lib/models/RemoteServer.js +1 -2
- package/lib/models/RemoteServerConfigurationFile.js +1 -2
- package/lib/models/Request.js +1 -2
- package/lib/models/Session.js +1 -2
- package/lib/models/SettingsChange.js +1 -2
- package/lib/models/SftpHostKey.js +1 -2
- package/lib/models/ShareGroup.js +1 -2
- package/lib/models/ShareGroupMember.js +1 -2
- package/lib/models/Site.js +91 -81
- package/lib/models/Snapshot.js +1 -2
- package/lib/models/SsoStrategy.js +1 -2
- package/lib/models/Status.js +1 -2
- package/lib/models/Style.js +1 -2
- package/lib/models/UsageDailySnapshot.js +1 -2
- package/lib/models/UsageSnapshot.js +1 -2
- package/lib/models/User.js +1 -2
- package/lib/models/UserCipherUse.js +1 -2
- package/lib/models/UserRequest.js +1 -2
- package/lib/models/WebhookTest.js +1 -2
- package/lib/utils.js +8 -15
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Site.js +8 -0
package/lib/utils.js
CHANGED
|
@@ -4,31 +4,24 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.isString = exports.isObject = exports.isInt = exports.isEmpty = exports.isBrowser = exports.isArray = exports.getType = void 0;
|
|
6
6
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
7
|
-
var isArray = function isArray(value) {
|
|
7
|
+
var isArray = exports.isArray = function isArray(value) {
|
|
8
8
|
return Array.isArray(value);
|
|
9
9
|
};
|
|
10
|
-
exports.
|
|
11
|
-
var isInt = function isInt(value) {
|
|
10
|
+
var isInt = exports.isInt = function isInt(value) {
|
|
12
11
|
return typeof value === 'number';
|
|
13
12
|
};
|
|
14
|
-
exports.
|
|
15
|
-
var isObject = function isObject(value) {
|
|
13
|
+
var isObject = exports.isObject = function isObject(value) {
|
|
16
14
|
return value && (0, _typeof2.default)(value) === 'object' && !Array.isArray(value);
|
|
17
15
|
};
|
|
18
|
-
exports.
|
|
19
|
-
var isString = function isString(value) {
|
|
16
|
+
var isString = exports.isString = function isString(value) {
|
|
20
17
|
return typeof value === 'string';
|
|
21
18
|
};
|
|
22
|
-
exports.
|
|
23
|
-
var isEmpty = function isEmpty(value) {
|
|
19
|
+
var isEmpty = exports.isEmpty = function isEmpty(value) {
|
|
24
20
|
return !value || isArray(value) && value.length === 0 || isObject(value) && Object.keys(value).length === 0;
|
|
25
21
|
};
|
|
26
|
-
exports.
|
|
27
|
-
var getType = function getType(value) {
|
|
22
|
+
var getType = exports.getType = function getType(value) {
|
|
28
23
|
return isArray(value) ? 'array' : (0, _typeof2.default)(value);
|
|
29
24
|
};
|
|
30
|
-
exports.
|
|
31
|
-
var isBrowser = function isBrowser() {
|
|
25
|
+
var isBrowser = exports.isBrowser = function isBrowser() {
|
|
32
26
|
return typeof self !== 'undefined' && typeof self.document !== 'undefined';
|
|
33
|
-
};
|
|
34
|
-
exports.isBrowser = isBrowser;
|
|
27
|
+
};
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Site.js
CHANGED
|
@@ -65,6 +65,9 @@ class Site {
|
|
|
65
65
|
// int64 # Site-wide Bundle expiration in days
|
|
66
66
|
getBundleExpiration = () => this.attributes.bundle_expiration
|
|
67
67
|
|
|
68
|
+
// string # Custom error message to show when bundle is not found.
|
|
69
|
+
getBundleNotFoundMessage = () => this.attributes.bundle_not_found_message
|
|
70
|
+
|
|
68
71
|
// boolean # Do Bundles require password protection?
|
|
69
72
|
getBundlePasswordRequired = () => this.attributes.bundle_password_required
|
|
70
73
|
|
|
@@ -534,6 +537,7 @@ class Site {
|
|
|
534
537
|
// disable_password_reset - boolean - Is password reset disabled?
|
|
535
538
|
// immutable_files - boolean - Are files protected from modification?
|
|
536
539
|
// 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?)
|
|
540
|
+
// bundle_not_found_message - string - Custom error message to show when bundle is not found.
|
|
537
541
|
// bundle_password_required - boolean - Do Bundles require password protection?
|
|
538
542
|
// bundle_require_registration - boolean - Do Bundles require registration?
|
|
539
543
|
// bundle_require_share_recipient - boolean - Do Bundles require recipients for sharing?
|
|
@@ -723,6 +727,10 @@ class Site {
|
|
|
723
727
|
throw new errors.InvalidParameterError(`Bad parameter: password_min_length must be of type Int, received ${getType(params['password_min_length'])}`)
|
|
724
728
|
}
|
|
725
729
|
|
|
730
|
+
if (params['bundle_not_found_message'] && !isString(params['bundle_not_found_message'])) {
|
|
731
|
+
throw new errors.InvalidParameterError(`Bad parameter: bundle_not_found_message must be of type String, received ${getType(params['bundle_not_found_message'])}`)
|
|
732
|
+
}
|
|
733
|
+
|
|
726
734
|
if (params['bundle_registration_notifications'] && !isString(params['bundle_registration_notifications'])) {
|
|
727
735
|
throw new errors.InvalidParameterError(`Bad parameter: bundle_registration_notifications must be of type String, received ${getType(params['bundle_registration_notifications'])}`)
|
|
728
736
|
}
|