files.com 1.0.203 → 1.0.206
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/Errors.md +1 -0
- package/docs/models/Site.md +1 -0
- package/docs/models/UsageDailySnapshot.md +2 -4
- package/lib/Errors.js +61 -41
- package/lib/models/File.js +18 -18
- package/package.json +1 -1
- package/src/Errors.js +1 -0
- package/src/models/File.js +15 -8
- package/src/models/Site.js +1 -0
- package/src/models/UsageDailySnapshot.js +1 -1
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.206
|
package/docs/Errors.md
CHANGED
@@ -176,6 +176,7 @@ These errors are derived from the error groups listed above.
|
|
176
176
|
### RateLimited_TooManyConcurrentRequestsError
|
177
177
|
### RateLimited_TooManyLoginAttemptsError
|
178
178
|
### RateLimited_TooManyRequestsError
|
179
|
+
### RateLimited_TooManySharesError
|
179
180
|
### ServiceUnavailable_UploadsUnavailableError
|
180
181
|
### SiteConfiguration_AccountAlreadyExistsError
|
181
182
|
### SiteConfiguration_AccountOverdueError
|
package/docs/models/Site.md
CHANGED
@@ -562,6 +562,7 @@ await Site.update({
|
|
562
562
|
* `user_requests_notify_admins` (boolean): Send email to site admins when a user request is received?
|
563
563
|
* `ftp_enabled` (boolean): Is FTP enabled?
|
564
564
|
* `sftp_enabled` (boolean): Is SFTP enabled?
|
565
|
+
* `bundle_watermark_value` (object): Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
|
565
566
|
* `allowed_2fa_method_sms` (boolean): Is SMS two factor authentication allowed?
|
566
567
|
* `allowed_2fa_method_u2f` (boolean): Is U2F two factor authentication allowed?
|
567
568
|
* `allowed_2fa_method_totp` (boolean): Is TOTP two factor authentication allowed?
|
@@ -14,9 +14,7 @@
|
|
14
14
|
"deleted_files_storage": "65536",
|
15
15
|
"deleted_files_counted_in_minimum": "65536",
|
16
16
|
"root_storage": "65536",
|
17
|
-
"usage_by_top_level_dir":
|
18
|
-
""
|
19
|
-
]
|
17
|
+
"usage_by_top_level_dir": ""
|
20
18
|
}
|
21
19
|
```
|
22
20
|
|
@@ -30,7 +28,7 @@
|
|
30
28
|
* `deleted_files_storage` (int64): GB of Files Native Storage used on this day for files that have been deleted and are stored as backups.
|
31
29
|
* `deleted_files_counted_in_minimum` (int64): GB of Files Native Storage used on this day for files that have been permanently deleted but were uploaded less than 30 days ago, and are still billable.
|
32
30
|
* `root_storage` (int64): GB of Files Native Storage used for the root folder. Included here because this value will not be part of `usage_by_top_level_dir`
|
33
|
-
* `usage_by_top_level_dir` (
|
31
|
+
* `usage_by_top_level_dir` (object): Usage broken down by each top-level folder
|
34
32
|
|
35
33
|
---
|
36
34
|
|
package/lib/Errors.js
CHANGED
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
4
4
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
exports.NotFound_SiteNotFoundError = exports.NotFound_PlanNotFoundError = exports.NotFound_NestedNotFoundError = exports.NotFound_InboxNotFoundError = exports.NotFound_GroupNotFoundError = exports.NotFound_FolderNotFoundError = exports.NotFound_FileUploadNotFoundError = exports.NotFound_FileNotFoundError = exports.NotFound_CodeNotFoundError = exports.NotFound_BundlePathNotFoundError = exports.NotFound_ApiKeyNotFoundError = exports.NotFoundError = exports.NotAuthorized_ZipDownloadIpMismatchError = exports.NotAuthorized_WritePermissionRequiredError = exports.NotAuthorized_UserIdWithoutSiteAdminError = exports.NotAuthorized_TwoFactorAuthenticationRequiredError = exports.NotAuthorized_SiteFilesAreImmutableError = exports.NotAuthorized_SiteAdminRequiredError = exports.NotAuthorized_SelfManagedRequiredError = exports.NotAuthorized_ReauthenticationNeededActionError = exports.NotAuthorized_ReauthenticationFailedFinalError = exports.NotAuthorized_ReauthenticationFailedError = exports.NotAuthorized_ReadPermissionRequiredError = exports.NotAuthorized_ReadOnlySessionError = exports.NotAuthorized_PasswordChangeRequiredError = exports.NotAuthorized_PasswordChangeNotRequiredError = exports.NotAuthorized_NotAllowedToCreateBundleError = exports.NotAuthorized_NonAdminsMustQueryByFolderOrPathError = exports.NotAuthorized_NeedAdminPermissionForInboxError = exports.NotAuthorized_MustAuthenticateWithApiKeyError = exports.NotAuthorized_InsufficientPermissionForParamsError = exports.NotAuthorized_HistoryPermissionRequiredError = exports.NotAuthorized_FullPermissionRequiredError = exports.NotAuthorized_FolderAdminPermissionRequiredError = exports.NotAuthorized_FolderAdminOrBillingPermissionRequiredError = exports.NotAuthorized_ContactAdminForPasswordChangeHelpError = exports.NotAuthorized_CantActForOtherUserError = exports.NotAuthorized_CannotLoginWhileUsingKeyError = exports.NotAuthorized_BundleMaximumUsesReachedError = exports.NotAuthorized_BillingPermissionRequiredError = exports.NotAuthorized_ApiKeyOnlyForOfficeIntegrationError = exports.NotAuthorized_ApiKeyOnlyForMobileAppError = exports.NotAuthorized_ApiKeyOnlyForDesktopAppError = exports.NotAuthorized_ApiKeyIsPathRestrictedError = exports.NotAuthorized_ApiKeyIsDisabledError = exports.NotAuthorizedError = exports.NotAuthenticated_TwoFactorAuthenticationSetupExpiredError = exports.NotAuthenticated_TwoFactorAuthenticationErrorError = exports.NotAuthenticated_OneTimePasswordIncorrectError = exports.NotAuthenticated_LockoutRegionMismatchError = exports.NotAuthenticated_LockedOutError = exports.NotAuthenticated_InvalidUsernameOrPasswordError = exports.NotAuthenticated_InvalidOrExpiredCodeError = exports.NotAuthenticated_InvalidOauthError = exports.NotAuthenticated_InvalidCredentialsError = exports.NotAuthenticated_InboxRegistrationCodeFailedError = exports.NotAuthenticated_BundleRegistrationCodeFailedError = exports.NotAuthenticated_AuthenticationRequiredError = exports.NotAuthenticatedError = exports.MissingParameterError = exports.InvalidParameterError = exports.FilesError = exports.FilesApiError = exports.EmptyPropertyError = exports.ConfigurationError = exports.BadRequest_UserRequiredError = exports.BadRequest_UserIdOnUserEndpointError = exports.BadRequest_UserIdInvalidError = exports.BadRequest_UnsupportedMediaTypeError = exports.BadRequest_UnsupportedHttpResponseFormatError = exports.BadRequest_UnsupportedCurrencyError = exports.BadRequest_SearchAllOnChildPathError = exports.BadRequest_RequestParamsRequiredError = exports.BadRequest_RequestParamsInvalidError = exports.BadRequest_RequestParamsContainInvalidCharacterError = exports.BadRequest_RequestParamPathCannotHaveTrailingWhitespaceError = exports.BadRequest_ReauthenticationNeededFieldsError = exports.BadRequest_PartNumberTooLargeError = exports.BadRequest_OperationOnNonScimResourceError = exports.BadRequest_NoValidInputParamsError = exports.BadRequest_MethodNotAllowedError = exports.BadRequest_InvalidUploadPartSizeError = exports.BadRequest_InvalidUploadPartGapError = exports.BadRequest_InvalidUploadOffsetError = exports.BadRequest_InvalidReturnToUrlError = exports.BadRequest_InvalidOauthProviderError = exports.BadRequest_InvalidInterfaceError = exports.BadRequest_InvalidInputEncodingError = exports.BadRequest_InvalidFilterFieldError = exports.BadRequest_InvalidFilterCombinationError = exports.BadRequest_InvalidEtagsError = exports.BadRequest_InvalidCursorError = exports.BadRequest_InvalidBodyError = exports.BadRequest_FolderMustNotBeAFileError = exports.BadRequest_DestinationSameError = exports.BadRequest_DatetimeParseError = exports.BadRequest_CantMoveWithMultipleLocationsError = exports.BadRequest_CannotDownloadDirectoryError = exports.BadRequest_AttachmentTooLargeError = exports.BadRequestError = void 0;
|
7
|
-
exports.handleErrorResponse = exports.SiteConfiguration_UserRequestsEnabledRequiredError = exports.SiteConfiguration_TrialLockedError = exports.SiteConfiguration_TrialExpiredError = exports.SiteConfiguration_SiteWasRemovedError = exports.SiteConfiguration_NoAccountForSiteError = exports.SiteConfiguration_AccountOverdueError = exports.SiteConfiguration_AccountAlreadyExistsError = exports.SiteConfigurationError = exports.ServiceUnavailable_UploadsUnavailableError = exports.ServiceUnavailableError = exports.RateLimited_TooManyRequestsError = exports.RateLimited_TooManyLoginAttemptsError = exports.RateLimited_TooManyConcurrentRequestsError = exports.RateLimited_ReauthenticationRateLimitedError = exports.RateLimitedError = exports.ProcessingFailure_UpdatesNotAllowedForRemotesError = exports.ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError = exports.ProcessingFailure_SubfolderLockedError = exports.ProcessingFailure_ResourceLockedError = exports.ProcessingFailure_RemoteServerErrorError = exports.ProcessingFailure_RecipientAlreadySharedError = exports.ProcessingFailure_PathTooLongError = exports.ProcessingFailure_MultipleProcessingErrorsError = exports.ProcessingFailure_MultipartUploadsRequiredForRemotesError = exports.ProcessingFailure_ModelSaveErrorError = exports.ProcessingFailure_InvalidRangeError = exports.ProcessingFailure_InvalidFilenameError = exports.ProcessingFailure_InvalidFileTypeError = exports.ProcessingFailure_InvalidBundleCodeError = exports.ProcessingFailure_HistoryUnavailableError = exports.ProcessingFailure_FolderNotEmptyError = exports.ProcessingFailure_FolderLockedError = exports.ProcessingFailure_FileUploadedToWrongRegionError = exports.ProcessingFailure_FileTooBigToEncryptError = exports.ProcessingFailure_FileTooBigToDecryptError = exports.ProcessingFailure_FilePendingProcessingError = exports.ProcessingFailure_FileNotUploadedError = exports.ProcessingFailure_FileLockedError = exports.ProcessingFailure_FailedToChangePasswordError = exports.ProcessingFailure_ExportNotReadyError = exports.ProcessingFailure_ExportFailureError = exports.ProcessingFailure_ExpiredPublicKeyError = exports.ProcessingFailure_ExpiredPrivateKeyError = exports.ProcessingFailure_DestinationParentDoesNotExistError = exports.ProcessingFailure_DestinationParentConflictError = exports.ProcessingFailure_DestinationFolderLimitedError = exports.ProcessingFailure_DestinationExistsError = exports.ProcessingFailure_CouldNotCreateParentError = exports.ProcessingFailure_BundleOnlyAllowsPreviewsError = exports.ProcessingFailureError = exports.NotImplementedError = exports.NotFound_UserNotFoundError = void 0;
|
7
|
+
exports.handleErrorResponse = exports.SiteConfiguration_UserRequestsEnabledRequiredError = exports.SiteConfiguration_TrialLockedError = exports.SiteConfiguration_TrialExpiredError = exports.SiteConfiguration_SiteWasRemovedError = exports.SiteConfiguration_NoAccountForSiteError = exports.SiteConfiguration_AccountOverdueError = exports.SiteConfiguration_AccountAlreadyExistsError = exports.SiteConfigurationError = exports.ServiceUnavailable_UploadsUnavailableError = exports.ServiceUnavailableError = exports.RateLimited_TooManySharesError = exports.RateLimited_TooManyRequestsError = exports.RateLimited_TooManyLoginAttemptsError = exports.RateLimited_TooManyConcurrentRequestsError = exports.RateLimited_ReauthenticationRateLimitedError = exports.RateLimitedError = exports.ProcessingFailure_UpdatesNotAllowedForRemotesError = exports.ProcessingFailure_TwoFactorAuthenticationCodeAlreadySentError = exports.ProcessingFailure_SubfolderLockedError = exports.ProcessingFailure_ResourceLockedError = exports.ProcessingFailure_RemoteServerErrorError = exports.ProcessingFailure_RecipientAlreadySharedError = exports.ProcessingFailure_PathTooLongError = exports.ProcessingFailure_MultipleProcessingErrorsError = exports.ProcessingFailure_MultipartUploadsRequiredForRemotesError = exports.ProcessingFailure_ModelSaveErrorError = exports.ProcessingFailure_InvalidRangeError = exports.ProcessingFailure_InvalidFilenameError = exports.ProcessingFailure_InvalidFileTypeError = exports.ProcessingFailure_InvalidBundleCodeError = exports.ProcessingFailure_HistoryUnavailableError = exports.ProcessingFailure_FolderNotEmptyError = exports.ProcessingFailure_FolderLockedError = exports.ProcessingFailure_FileUploadedToWrongRegionError = exports.ProcessingFailure_FileTooBigToEncryptError = exports.ProcessingFailure_FileTooBigToDecryptError = exports.ProcessingFailure_FilePendingProcessingError = exports.ProcessingFailure_FileNotUploadedError = exports.ProcessingFailure_FileLockedError = exports.ProcessingFailure_FailedToChangePasswordError = exports.ProcessingFailure_ExportNotReadyError = exports.ProcessingFailure_ExportFailureError = exports.ProcessingFailure_ExpiredPublicKeyError = exports.ProcessingFailure_ExpiredPrivateKeyError = exports.ProcessingFailure_DestinationParentDoesNotExistError = exports.ProcessingFailure_DestinationParentConflictError = exports.ProcessingFailure_DestinationFolderLimitedError = exports.ProcessingFailure_DestinationExistsError = exports.ProcessingFailure_CouldNotCreateParentError = exports.ProcessingFailure_BundleOnlyAllowsPreviewsError = exports.ProcessingFailureError = exports.NotImplementedError = exports.NotFound_UserNotFoundError = void 0;
|
8
8
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
10
10
|
|
@@ -2968,18 +2968,38 @@ var RateLimited_TooManyRequestsError = /*#__PURE__*/function (_RateLimitedError4
|
|
2968
2968
|
exports.RateLimited_TooManyRequestsError = RateLimited_TooManyRequestsError;
|
2969
2969
|
errorClasses.RateLimited_TooManyRequestsError = RateLimited_TooManyRequestsError;
|
2970
2970
|
|
2971
|
+
var RateLimited_TooManySharesError = /*#__PURE__*/function (_RateLimitedError5) {
|
2972
|
+
(0, _inherits2.default)(RateLimited_TooManySharesError, _RateLimitedError5);
|
2973
|
+
|
2974
|
+
var _super145 = _createSuper(RateLimited_TooManySharesError);
|
2975
|
+
|
2976
|
+
function RateLimited_TooManySharesError(message, code) {
|
2977
|
+
var _this145;
|
2978
|
+
|
2979
|
+
(0, _classCallCheck2.default)(this, RateLimited_TooManySharesError);
|
2980
|
+
_this145 = _super145.call(this, message, code);
|
2981
|
+
_this145.name = 'RateLimited_TooManySharesError';
|
2982
|
+
return _this145;
|
2983
|
+
}
|
2984
|
+
|
2985
|
+
return (0, _createClass2.default)(RateLimited_TooManySharesError);
|
2986
|
+
}(RateLimitedError);
|
2987
|
+
|
2988
|
+
exports.RateLimited_TooManySharesError = RateLimited_TooManySharesError;
|
2989
|
+
errorClasses.RateLimited_TooManySharesError = RateLimited_TooManySharesError;
|
2990
|
+
|
2971
2991
|
var ServiceUnavailable_UploadsUnavailableError = /*#__PURE__*/function (_ServiceUnavailableEr) {
|
2972
2992
|
(0, _inherits2.default)(ServiceUnavailable_UploadsUnavailableError, _ServiceUnavailableEr);
|
2973
2993
|
|
2974
|
-
var
|
2994
|
+
var _super146 = _createSuper(ServiceUnavailable_UploadsUnavailableError);
|
2975
2995
|
|
2976
2996
|
function ServiceUnavailable_UploadsUnavailableError(message, code) {
|
2977
|
-
var
|
2997
|
+
var _this146;
|
2978
2998
|
|
2979
2999
|
(0, _classCallCheck2.default)(this, ServiceUnavailable_UploadsUnavailableError);
|
2980
|
-
|
2981
|
-
|
2982
|
-
return
|
3000
|
+
_this146 = _super146.call(this, message, code);
|
3001
|
+
_this146.name = 'ServiceUnavailable_UploadsUnavailableError';
|
3002
|
+
return _this146;
|
2983
3003
|
}
|
2984
3004
|
|
2985
3005
|
return (0, _createClass2.default)(ServiceUnavailable_UploadsUnavailableError);
|
@@ -2991,15 +3011,15 @@ errorClasses.ServiceUnavailable_UploadsUnavailableError = ServiceUnavailable_Upl
|
|
2991
3011
|
var SiteConfiguration_AccountAlreadyExistsError = /*#__PURE__*/function (_SiteConfigurationErr) {
|
2992
3012
|
(0, _inherits2.default)(SiteConfiguration_AccountAlreadyExistsError, _SiteConfigurationErr);
|
2993
3013
|
|
2994
|
-
var
|
3014
|
+
var _super147 = _createSuper(SiteConfiguration_AccountAlreadyExistsError);
|
2995
3015
|
|
2996
3016
|
function SiteConfiguration_AccountAlreadyExistsError(message, code) {
|
2997
|
-
var
|
3017
|
+
var _this147;
|
2998
3018
|
|
2999
3019
|
(0, _classCallCheck2.default)(this, SiteConfiguration_AccountAlreadyExistsError);
|
3000
|
-
|
3001
|
-
|
3002
|
-
return
|
3020
|
+
_this147 = _super147.call(this, message, code);
|
3021
|
+
_this147.name = 'SiteConfiguration_AccountAlreadyExistsError';
|
3022
|
+
return _this147;
|
3003
3023
|
}
|
3004
3024
|
|
3005
3025
|
return (0, _createClass2.default)(SiteConfiguration_AccountAlreadyExistsError);
|
@@ -3011,15 +3031,15 @@ errorClasses.SiteConfiguration_AccountAlreadyExistsError = SiteConfiguration_Acc
|
|
3011
3031
|
var SiteConfiguration_AccountOverdueError = /*#__PURE__*/function (_SiteConfigurationErr2) {
|
3012
3032
|
(0, _inherits2.default)(SiteConfiguration_AccountOverdueError, _SiteConfigurationErr2);
|
3013
3033
|
|
3014
|
-
var
|
3034
|
+
var _super148 = _createSuper(SiteConfiguration_AccountOverdueError);
|
3015
3035
|
|
3016
3036
|
function SiteConfiguration_AccountOverdueError(message, code) {
|
3017
|
-
var
|
3037
|
+
var _this148;
|
3018
3038
|
|
3019
3039
|
(0, _classCallCheck2.default)(this, SiteConfiguration_AccountOverdueError);
|
3020
|
-
|
3021
|
-
|
3022
|
-
return
|
3040
|
+
_this148 = _super148.call(this, message, code);
|
3041
|
+
_this148.name = 'SiteConfiguration_AccountOverdueError';
|
3042
|
+
return _this148;
|
3023
3043
|
}
|
3024
3044
|
|
3025
3045
|
return (0, _createClass2.default)(SiteConfiguration_AccountOverdueError);
|
@@ -3031,15 +3051,15 @@ errorClasses.SiteConfiguration_AccountOverdueError = SiteConfiguration_AccountOv
|
|
3031
3051
|
var SiteConfiguration_NoAccountForSiteError = /*#__PURE__*/function (_SiteConfigurationErr3) {
|
3032
3052
|
(0, _inherits2.default)(SiteConfiguration_NoAccountForSiteError, _SiteConfigurationErr3);
|
3033
3053
|
|
3034
|
-
var
|
3054
|
+
var _super149 = _createSuper(SiteConfiguration_NoAccountForSiteError);
|
3035
3055
|
|
3036
3056
|
function SiteConfiguration_NoAccountForSiteError(message, code) {
|
3037
|
-
var
|
3057
|
+
var _this149;
|
3038
3058
|
|
3039
3059
|
(0, _classCallCheck2.default)(this, SiteConfiguration_NoAccountForSiteError);
|
3040
|
-
|
3041
|
-
|
3042
|
-
return
|
3060
|
+
_this149 = _super149.call(this, message, code);
|
3061
|
+
_this149.name = 'SiteConfiguration_NoAccountForSiteError';
|
3062
|
+
return _this149;
|
3043
3063
|
}
|
3044
3064
|
|
3045
3065
|
return (0, _createClass2.default)(SiteConfiguration_NoAccountForSiteError);
|
@@ -3051,15 +3071,15 @@ errorClasses.SiteConfiguration_NoAccountForSiteError = SiteConfiguration_NoAccou
|
|
3051
3071
|
var SiteConfiguration_SiteWasRemovedError = /*#__PURE__*/function (_SiteConfigurationErr4) {
|
3052
3072
|
(0, _inherits2.default)(SiteConfiguration_SiteWasRemovedError, _SiteConfigurationErr4);
|
3053
3073
|
|
3054
|
-
var
|
3074
|
+
var _super150 = _createSuper(SiteConfiguration_SiteWasRemovedError);
|
3055
3075
|
|
3056
3076
|
function SiteConfiguration_SiteWasRemovedError(message, code) {
|
3057
|
-
var
|
3077
|
+
var _this150;
|
3058
3078
|
|
3059
3079
|
(0, _classCallCheck2.default)(this, SiteConfiguration_SiteWasRemovedError);
|
3060
|
-
|
3061
|
-
|
3062
|
-
return
|
3080
|
+
_this150 = _super150.call(this, message, code);
|
3081
|
+
_this150.name = 'SiteConfiguration_SiteWasRemovedError';
|
3082
|
+
return _this150;
|
3063
3083
|
}
|
3064
3084
|
|
3065
3085
|
return (0, _createClass2.default)(SiteConfiguration_SiteWasRemovedError);
|
@@ -3071,15 +3091,15 @@ errorClasses.SiteConfiguration_SiteWasRemovedError = SiteConfiguration_SiteWasRe
|
|
3071
3091
|
var SiteConfiguration_TrialExpiredError = /*#__PURE__*/function (_SiteConfigurationErr5) {
|
3072
3092
|
(0, _inherits2.default)(SiteConfiguration_TrialExpiredError, _SiteConfigurationErr5);
|
3073
3093
|
|
3074
|
-
var
|
3094
|
+
var _super151 = _createSuper(SiteConfiguration_TrialExpiredError);
|
3075
3095
|
|
3076
3096
|
function SiteConfiguration_TrialExpiredError(message, code) {
|
3077
|
-
var
|
3097
|
+
var _this151;
|
3078
3098
|
|
3079
3099
|
(0, _classCallCheck2.default)(this, SiteConfiguration_TrialExpiredError);
|
3080
|
-
|
3081
|
-
|
3082
|
-
return
|
3100
|
+
_this151 = _super151.call(this, message, code);
|
3101
|
+
_this151.name = 'SiteConfiguration_TrialExpiredError';
|
3102
|
+
return _this151;
|
3083
3103
|
}
|
3084
3104
|
|
3085
3105
|
return (0, _createClass2.default)(SiteConfiguration_TrialExpiredError);
|
@@ -3091,15 +3111,15 @@ errorClasses.SiteConfiguration_TrialExpiredError = SiteConfiguration_TrialExpire
|
|
3091
3111
|
var SiteConfiguration_TrialLockedError = /*#__PURE__*/function (_SiteConfigurationErr6) {
|
3092
3112
|
(0, _inherits2.default)(SiteConfiguration_TrialLockedError, _SiteConfigurationErr6);
|
3093
3113
|
|
3094
|
-
var
|
3114
|
+
var _super152 = _createSuper(SiteConfiguration_TrialLockedError);
|
3095
3115
|
|
3096
3116
|
function SiteConfiguration_TrialLockedError(message, code) {
|
3097
|
-
var
|
3117
|
+
var _this152;
|
3098
3118
|
|
3099
3119
|
(0, _classCallCheck2.default)(this, SiteConfiguration_TrialLockedError);
|
3100
|
-
|
3101
|
-
|
3102
|
-
return
|
3120
|
+
_this152 = _super152.call(this, message, code);
|
3121
|
+
_this152.name = 'SiteConfiguration_TrialLockedError';
|
3122
|
+
return _this152;
|
3103
3123
|
}
|
3104
3124
|
|
3105
3125
|
return (0, _createClass2.default)(SiteConfiguration_TrialLockedError);
|
@@ -3111,15 +3131,15 @@ errorClasses.SiteConfiguration_TrialLockedError = SiteConfiguration_TrialLockedE
|
|
3111
3131
|
var SiteConfiguration_UserRequestsEnabledRequiredError = /*#__PURE__*/function (_SiteConfigurationErr7) {
|
3112
3132
|
(0, _inherits2.default)(SiteConfiguration_UserRequestsEnabledRequiredError, _SiteConfigurationErr7);
|
3113
3133
|
|
3114
|
-
var
|
3134
|
+
var _super153 = _createSuper(SiteConfiguration_UserRequestsEnabledRequiredError);
|
3115
3135
|
|
3116
3136
|
function SiteConfiguration_UserRequestsEnabledRequiredError(message, code) {
|
3117
|
-
var
|
3137
|
+
var _this153;
|
3118
3138
|
|
3119
3139
|
(0, _classCallCheck2.default)(this, SiteConfiguration_UserRequestsEnabledRequiredError);
|
3120
|
-
|
3121
|
-
|
3122
|
-
return
|
3140
|
+
_this153 = _super153.call(this, message, code);
|
3141
|
+
_this153.name = 'SiteConfiguration_UserRequestsEnabledRequiredError';
|
3142
|
+
return _this153;
|
3123
3143
|
}
|
3124
3144
|
|
3125
3145
|
return (0, _createClass2.default)(SiteConfiguration_UserRequestsEnabledRequiredError);
|
package/lib/models/File.js
CHANGED
@@ -900,15 +900,15 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
900
900
|
this.options = _objectSpread({}, options);
|
901
901
|
});
|
902
902
|
(0, _defineProperty2.default)(File, "_openUpload", /*#__PURE__*/function () {
|
903
|
-
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(path) {
|
903
|
+
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(path, paramsRaw) {
|
904
904
|
var params, response, partData;
|
905
905
|
return _regenerator.default.wrap(function _callee11$(_context11) {
|
906
906
|
while (1) {
|
907
907
|
switch (_context11.prev = _context11.next) {
|
908
908
|
case 0:
|
909
|
-
params = {
|
909
|
+
params = _objectSpread(_objectSpread({}, paramsRaw), {}, {
|
910
910
|
action: 'put'
|
911
|
-
};
|
911
|
+
});
|
912
912
|
_context11.next = 3;
|
913
913
|
return _Api.default.sendRequest("/files/".concat(encodeURIComponent(path)), 'POST', params);
|
914
914
|
|
@@ -937,7 +937,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
937
937
|
}, _callee11);
|
938
938
|
}));
|
939
939
|
|
940
|
-
return function (_x5) {
|
940
|
+
return function (_x5, _x6) {
|
941
941
|
return _ref13.apply(this, arguments);
|
942
942
|
};
|
943
943
|
}());
|
@@ -981,7 +981,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
981
981
|
}, _callee12);
|
982
982
|
}));
|
983
983
|
|
984
|
-
return function (
|
984
|
+
return function (_x7, _x8, _x9) {
|
985
985
|
return _ref14.apply(this, arguments);
|
986
986
|
};
|
987
987
|
}());
|
@@ -1006,19 +1006,19 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1006
1006
|
}, _callee13);
|
1007
1007
|
}));
|
1008
1008
|
|
1009
|
-
return function (
|
1009
|
+
return function (_x10) {
|
1010
1010
|
return _ref15.apply(this, arguments);
|
1011
1011
|
};
|
1012
1012
|
}());
|
1013
1013
|
(0, _defineProperty2.default)(File, "uploadStream", /*#__PURE__*/function () {
|
1014
|
-
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(destinationPath, readableStream) {
|
1014
|
+
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(destinationPath, readableStream, params) {
|
1015
1015
|
var fileUploadPart, file;
|
1016
1016
|
return _regenerator.default.wrap(function _callee16$(_context16) {
|
1017
1017
|
while (1) {
|
1018
1018
|
switch (_context16.prev = _context16.next) {
|
1019
1019
|
case 0:
|
1020
1020
|
_context16.next = 2;
|
1021
|
-
return File._openUpload(destinationPath);
|
1021
|
+
return File._openUpload(destinationPath, params);
|
1022
1022
|
|
1023
1023
|
case 2:
|
1024
1024
|
fileUploadPart = _context16.sent;
|
@@ -1080,7 +1080,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1080
1080
|
}, _callee14);
|
1081
1081
|
}));
|
1082
1082
|
|
1083
|
-
return function (
|
1083
|
+
return function (_x14) {
|
1084
1084
|
return _ref17.apply(this, arguments);
|
1085
1085
|
};
|
1086
1086
|
}());
|
@@ -1139,12 +1139,12 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1139
1139
|
}, _callee16, null, [[5, 12]]);
|
1140
1140
|
}));
|
1141
1141
|
|
1142
|
-
return function (
|
1142
|
+
return function (_x11, _x12, _x13) {
|
1143
1143
|
return _ref16.apply(this, arguments);
|
1144
1144
|
};
|
1145
1145
|
}());
|
1146
1146
|
(0, _defineProperty2.default)(File, "uploadData", /*#__PURE__*/function () {
|
1147
|
-
var _ref19 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(destinationPath, data) {
|
1147
|
+
var _ref19 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(destinationPath, data, params) {
|
1148
1148
|
return _regenerator.default.wrap(function _callee17$(_context17) {
|
1149
1149
|
while (1) {
|
1150
1150
|
switch (_context17.prev = _context17.next) {
|
@@ -1157,7 +1157,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1157
1157
|
throw new errors.MissingParameterError('Upload data was not provided');
|
1158
1158
|
|
1159
1159
|
case 2:
|
1160
|
-
return _context17.abrupt("return", File.uploadStream(destinationPath, _readableStream.default.from(data)));
|
1160
|
+
return _context17.abrupt("return", File.uploadStream(destinationPath, _readableStream.default.from(data), params));
|
1161
1161
|
|
1162
1162
|
case 3:
|
1163
1163
|
case "end":
|
@@ -1167,12 +1167,12 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1167
1167
|
}, _callee17);
|
1168
1168
|
}));
|
1169
1169
|
|
1170
|
-
return function (
|
1170
|
+
return function (_x15, _x16, _x17) {
|
1171
1171
|
return _ref19.apply(this, arguments);
|
1172
1172
|
};
|
1173
1173
|
}());
|
1174
1174
|
(0, _defineProperty2.default)(File, "uploadFile", /*#__PURE__*/function () {
|
1175
|
-
var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(destinationPath, sourceFilePath) {
|
1175
|
+
var _ref20 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(destinationPath, sourceFilePath, params) {
|
1176
1176
|
var _require3, openDiskFileReadStream, stream;
|
1177
1177
|
|
1178
1178
|
return _regenerator.default.wrap(function _callee18$(_context18) {
|
@@ -1189,7 +1189,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1189
1189
|
case 2:
|
1190
1190
|
_require3 = require('../isomorphic/File.node.js'), openDiskFileReadStream = _require3.openDiskFileReadStream;
|
1191
1191
|
stream = openDiskFileReadStream(sourceFilePath);
|
1192
|
-
return _context18.abrupt("return", File.uploadStream(destinationPath, stream));
|
1192
|
+
return _context18.abrupt("return", File.uploadStream(destinationPath, stream, params));
|
1193
1193
|
|
1194
1194
|
case 5:
|
1195
1195
|
case "end":
|
@@ -1199,7 +1199,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1199
1199
|
}, _callee18);
|
1200
1200
|
}));
|
1201
1201
|
|
1202
|
-
return function (
|
1202
|
+
return function (_x18, _x19, _x20) {
|
1203
1203
|
return _ref20.apply(this, arguments);
|
1204
1204
|
};
|
1205
1205
|
}());
|
@@ -1329,7 +1329,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1329
1329
|
}, _callee19);
|
1330
1330
|
}));
|
1331
1331
|
|
1332
|
-
return function (
|
1332
|
+
return function (_x21) {
|
1333
1333
|
return _ref21.apply(this, arguments);
|
1334
1334
|
};
|
1335
1335
|
}());
|
@@ -1395,7 +1395,7 @@ var File = /*#__PURE__*/(0, _createClass2.default)(function File() {
|
|
1395
1395
|
}, _callee20);
|
1396
1396
|
}));
|
1397
1397
|
|
1398
|
-
return function (
|
1398
|
+
return function (_x22) {
|
1399
1399
|
return _ref22.apply(this, arguments);
|
1400
1400
|
};
|
1401
1401
|
}());
|
package/package.json
CHANGED
package/src/Errors.js
CHANGED
@@ -215,6 +215,7 @@ export class RateLimited_ReauthenticationRateLimitedError extends RateLimitedErr
|
|
215
215
|
export class RateLimited_TooManyConcurrentRequestsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyConcurrentRequestsError' } } errorClasses.RateLimited_TooManyConcurrentRequestsError = RateLimited_TooManyConcurrentRequestsError
|
216
216
|
export class RateLimited_TooManyLoginAttemptsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyLoginAttemptsError' } } errorClasses.RateLimited_TooManyLoginAttemptsError = RateLimited_TooManyLoginAttemptsError
|
217
217
|
export class RateLimited_TooManyRequestsError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManyRequestsError' } } errorClasses.RateLimited_TooManyRequestsError = RateLimited_TooManyRequestsError
|
218
|
+
export class RateLimited_TooManySharesError extends RateLimitedError { constructor(message, code) { super(message, code); this.name = 'RateLimited_TooManySharesError' } } errorClasses.RateLimited_TooManySharesError = RateLimited_TooManySharesError
|
218
219
|
export class ServiceUnavailable_UploadsUnavailableError extends ServiceUnavailableError { constructor(message, code) { super(message, code); this.name = 'ServiceUnavailable_UploadsUnavailableError' } } errorClasses.ServiceUnavailable_UploadsUnavailableError = ServiceUnavailable_UploadsUnavailableError
|
219
220
|
export class SiteConfiguration_AccountAlreadyExistsError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_AccountAlreadyExistsError' } } errorClasses.SiteConfiguration_AccountAlreadyExistsError = SiteConfiguration_AccountAlreadyExistsError
|
220
221
|
export class SiteConfiguration_AccountOverdueError extends SiteConfigurationError { constructor(message, code) { super(message, code); this.name = 'SiteConfiguration_AccountOverdueError' } } errorClasses.SiteConfiguration_AccountOverdueError = SiteConfiguration_AccountOverdueError
|
package/src/models/File.js
CHANGED
@@ -28,8 +28,8 @@ class File {
|
|
28
28
|
}
|
29
29
|
|
30
30
|
isLoaded = () => !!this.attributes.path
|
31
|
-
static _openUpload = async path => {
|
32
|
-
const params = { action: 'put' }
|
31
|
+
static _openUpload = async (path, paramsRaw) => {
|
32
|
+
const params = { ...paramsRaw, action: 'put' }
|
33
33
|
const response = await Api.sendRequest(`/files/${encodeURIComponent(path)}`, 'POST', params)
|
34
34
|
|
35
35
|
if (!response) {
|
@@ -76,8 +76,11 @@ class File {
|
|
76
76
|
return Api.sendRequest(`/files/${encodeURIComponent(fileUploadPart.path)}`, 'POST', params)
|
77
77
|
}
|
78
78
|
|
79
|
-
|
80
|
-
|
79
|
+
/**
|
80
|
+
* @note see File.copy() for list of supported params
|
81
|
+
*/
|
82
|
+
static uploadStream = async (destinationPath, readableStream, params) => {
|
83
|
+
const fileUploadPart = await File._openUpload(destinationPath, params)
|
81
84
|
|
82
85
|
if (!fileUploadPart) {
|
83
86
|
return
|
@@ -134,16 +137,20 @@ class File {
|
|
134
137
|
|
135
138
|
/**
|
136
139
|
* data - string, Buffer, Stream, any object implementing Symbol.iterator or Symbol.asyncIterator
|
140
|
+
* @note see File.copy() for list of supported params
|
137
141
|
*/
|
138
|
-
static uploadData = async (destinationPath, data) => {
|
142
|
+
static uploadData = async (destinationPath, data, params) => {
|
139
143
|
if (!data) {
|
140
144
|
throw new errors.MissingParameterError('Upload data was not provided')
|
141
145
|
}
|
142
146
|
|
143
|
-
return File.uploadStream(destinationPath, Readable.from(data))
|
147
|
+
return File.uploadStream(destinationPath, Readable.from(data), params)
|
144
148
|
}
|
145
149
|
|
146
|
-
|
150
|
+
/**
|
151
|
+
* @note see File.copy() for list of supported params
|
152
|
+
*/
|
153
|
+
static uploadFile = async (destinationPath, sourceFilePath, params) => {
|
147
154
|
if (isBrowser()) {
|
148
155
|
throw new errors.NotImplementedError('Disk file uploads are only available in a NodeJS environment')
|
149
156
|
}
|
@@ -151,7 +158,7 @@ class File {
|
|
151
158
|
const { openDiskFileReadStream } = require('../isomorphic/File.node.js')
|
152
159
|
const stream = openDiskFileReadStream(sourceFilePath)
|
153
160
|
|
154
|
-
return File.uploadStream(destinationPath, stream)
|
161
|
+
return File.uploadStream(destinationPath, stream, params)
|
155
162
|
}
|
156
163
|
|
157
164
|
downloadToStream = async writableStream => {
|
package/src/models/Site.js
CHANGED
@@ -498,6 +498,7 @@ class Site {
|
|
498
498
|
// user_requests_notify_admins - boolean - Send email to site admins when a user request is received?
|
499
499
|
// ftp_enabled - boolean - Is FTP enabled?
|
500
500
|
// sftp_enabled - boolean - Is SFTP enabled?
|
501
|
+
// bundle_watermark_value - object - Preview watermark settings applied to all bundle items. Uses the same keys as Behavior.value
|
501
502
|
// allowed_2fa_method_sms - boolean - Is SMS two factor authentication allowed?
|
502
503
|
// allowed_2fa_method_u2f - boolean - Is U2F two factor authentication allowed?
|
503
504
|
// allowed_2fa_method_totp - boolean - Is TOTP two factor authentication allowed?
|
@@ -53,7 +53,7 @@ class UsageDailySnapshot {
|
|
53
53
|
// int64 # GB of Files Native Storage used for the root folder. Included here because this value will not be part of `usage_by_top_level_dir`
|
54
54
|
getRootStorage = () => this.attributes.root_storage
|
55
55
|
|
56
|
-
//
|
56
|
+
// object # Usage broken down by each top-level folder
|
57
57
|
getUsageByTopLevelDir = () => this.attributes.usage_by_top_level_dir
|
58
58
|
|
59
59
|
|