├── .gitignore ├── CONTRIBUTORS ├── LICENSE ├── README.md ├── SECURITY.md ├── _VERSION ├── composer.json ├── docs └── Model │ ├── AccountLineItem.md │ ├── Action.md │ ├── ActionNotificationExport.md │ ├── ActionNotificationExportResult.md │ ├── ApiKey.md │ ├── ApiRequestLog.md │ ├── App.md │ ├── As2IncomingMessage.md │ ├── As2OutgoingMessage.md │ ├── As2Partner.md │ ├── As2Station.md │ ├── Auto.md │ ├── Automation.md │ ├── AutomationLog.md │ ├── AutomationRun.md │ ├── BandwidthSnapshot.md │ ├── Behavior.md │ ├── Bundle.md │ ├── BundleAction.md │ ├── BundleDownload.md │ ├── BundleNotification.md │ ├── BundlePath.md │ ├── BundleRecipient.md │ ├── BundleRegistration.md │ ├── Clickwrap.md │ ├── DnsRecord.md │ ├── EmailIncomingMessage.md │ ├── EmailLog.md │ ├── Errors.md │ ├── ExavaultApiRequestLog.md │ ├── ExternalEvent.md │ ├── File.md │ ├── FileAction.md │ ├── FileComment.md │ ├── FileCommentReaction.md │ ├── FileMigration.md │ ├── FileMigrationLog.md │ ├── FileUploadPart.md │ ├── Folder.md │ ├── FormField.md │ ├── FormFieldSet.md │ ├── FtpActionLog.md │ ├── GpgKey.md │ ├── Group.md │ ├── GroupUser.md │ ├── History.md │ ├── HistoryExport.md │ ├── HistoryExportResult.md │ ├── Image.md │ ├── InboxRecipient.md │ ├── InboxRegistration.md │ ├── InboxUpload.md │ ├── Invoice.md │ ├── InvoiceLineItem.md │ ├── IpAddress.md │ ├── Lock.md │ ├── Message.md │ ├── MessageComment.md │ ├── MessageCommentReaction.md │ ├── MessageReaction.md │ ├── Notification.md │ ├── OutboundConnectionLog.md │ ├── Payment.md │ ├── PaymentLineItem.md │ ├── Permission.md │ ├── Preview.md │ ├── Priority.md │ ├── Project.md │ ├── PublicHostingRequestLog.md │ ├── PublicIpAddress.md │ ├── PublicKey.md │ ├── RemoteBandwidthSnapshot.md │ ├── RemoteServer.md │ ├── RemoteServerConfigurationFile.md │ ├── Request.md │ ├── Restore.md │ ├── Session.md │ ├── SettingsChange.md │ ├── SftpActionLog.md │ ├── SftpHostKey.md │ ├── ShareGroup.md │ ├── ShareGroupMember.md │ ├── SiemHttpDestination.md │ ├── Site.md │ ├── Snapshot.md │ ├── SsoStrategy.md │ ├── Status.md │ ├── Style.md │ ├── SyncLog.md │ ├── UsageByTopLevelDir.md │ ├── UsageDailySnapshot.md │ ├── UsageSnapshot.md │ ├── User.md │ ├── UserCipherUse.md │ ├── UserLifecycleRule.md │ ├── UserRequest.md │ ├── UserSftpClientUse.md │ ├── WebDavActionLog.md │ └── WebhookTest.md ├── lib ├── Api.php ├── Errors.php ├── Exception │ ├── ApiBadResponseException.php │ ├── ApiClientException.php │ ├── ApiConnectException.php │ ├── ApiException.php │ ├── ApiRequestException.php │ ├── ApiServerException.php │ ├── ApiTooManyRedirectsException.php │ ├── ApiTransferException.php │ ├── BadRequest │ │ ├── AgentUpgradeRequiredException.php │ │ ├── AttachmentTooLargeException.php │ │ ├── CannotDownloadDirectoryException.php │ │ ├── CantMoveWithMultipleLocationsException.php │ │ ├── DatetimeParseException.php │ │ ├── DestinationSameException.php │ │ ├── DoesNotSupportSortingException.php │ │ ├── FolderMustNotBeAFileException.php │ │ ├── FoldersNotAllowedException.php │ │ ├── InvalidBodyException.php │ │ ├── InvalidCursorException.php │ │ ├── InvalidCursorTypeForSortException.php │ │ ├── InvalidEtagsException.php │ │ ├── InvalidFilterAliasCombinationException.php │ │ ├── InvalidFilterFieldException.php │ │ ├── InvalidFilterParamException.php │ │ ├── InvalidFilterParamFormatException.php │ │ ├── InvalidFilterParamValueException.php │ │ ├── InvalidInputEncodingException.php │ │ ├── InvalidInterfaceException.php │ │ ├── InvalidOauthProviderException.php │ │ ├── InvalidPathException.php │ │ ├── InvalidReturnToUrlException.php │ │ ├── InvalidSortFieldException.php │ │ ├── InvalidSortFilterCombinationException.php │ │ ├── InvalidUploadOffsetException.php │ │ ├── InvalidUploadPartGapException.php │ │ ├── InvalidUploadPartSizeException.php │ │ ├── MethodNotAllowedException.php │ │ ├── MultipleSortParamsNotAllowedException.php │ │ ├── NoValidInputParamsException.php │ │ ├── PartNumberTooLargeException.php │ │ ├── PathCannotHaveTrailingWhitespaceException.php │ │ ├── ReauthenticationNeededFieldsException.php │ │ ├── RequestParamsContainInvalidCharacterException.php │ │ ├── RequestParamsInvalidException.php │ │ ├── RequestParamsRequiredException.php │ │ ├── SearchAllOnChildPathException.php │ │ ├── UnrecognizedSortIndexException.php │ │ ├── UnsupportedCurrencyException.php │ │ ├── UnsupportedHttpResponseFormatException.php │ │ ├── UnsupportedMediaTypeException.php │ │ ├── UserIdInvalidException.php │ │ ├── UserIdOnUserEndpointException.php │ │ └── UserRequiredException.php │ ├── BadRequestException.php │ ├── ConfigurationException.php │ ├── EmptyPropertyException.php │ ├── FilesException.php │ ├── InvalidParameterException.php │ ├── MissingParameterException.php │ ├── NotAuthenticated │ │ ├── AdditionalAuthenticationRequiredException.php │ │ ├── ApiKeySessionsNotSupportedException.php │ │ ├── AuthenticationRequiredException.php │ │ ├── BundleRegistrationCodeFailedException.php │ │ ├── FilesAgentTokenFailedException.php │ │ ├── InboxRegistrationCodeFailedException.php │ │ ├── InvalidCredentialsException.php │ │ ├── InvalidOauthException.php │ │ ├── InvalidOrExpiredCodeException.php │ │ ├── InvalidSessionException.php │ │ ├── InvalidUsernameOrPasswordException.php │ │ ├── LockedOutException.php │ │ ├── LockoutRegionMismatchException.php │ │ ├── OneTimePasswordIncorrectException.php │ │ ├── TwoFactorAuthenticationErrorException.php │ │ └── TwoFactorAuthenticationSetupExpiredException.php │ ├── NotAuthenticatedException.php │ ├── NotAuthorized │ │ ├── ApiKeyIsDisabledException.php │ │ ├── ApiKeyIsPathRestrictedException.php │ │ ├── ApiKeyOnlyForDesktopAppException.php │ │ ├── ApiKeyOnlyForMobileAppException.php │ │ ├── ApiKeyOnlyForOfficeIntegrationException.php │ │ ├── BillingOrSiteAdminPermissionRequiredException.php │ │ ├── BillingPermissionRequiredException.php │ │ ├── BundleMaximumUsesReachedException.php │ │ ├── BundlePermissionRequiredException.php │ │ ├── CannotLoginWhileUsingKeyException.php │ │ ├── CantActForOtherUserException.php │ │ ├── ContactAdminForPasswordChangeHelpException.php │ │ ├── FilesAgentFailedAuthorizationException.php │ │ ├── FolderAdminOrBillingPermissionRequiredException.php │ │ ├── FolderAdminPermissionRequiredException.php │ │ ├── FullPermissionRequiredException.php │ │ ├── HistoryPermissionRequiredException.php │ │ ├── InsufficientPermissionForParamsException.php │ │ ├── InsufficientPermissionForSiteException.php │ │ ├── MustAuthenticateWithApiKeyException.php │ │ ├── NeedAdminPermissionForInboxException.php │ │ ├── NonAdminsMustQueryByFolderOrPathException.php │ │ ├── NotAllowedToCreateBundleException.php │ │ ├── PasswordChangeNotRequiredException.php │ │ ├── PasswordChangeRequiredException.php │ │ ├── ReadOnlySessionException.php │ │ ├── ReadPermissionRequiredException.php │ │ ├── ReauthenticationFailedException.php │ │ ├── ReauthenticationFailedFinalException.php │ │ ├── ReauthenticationNeededActionException.php │ │ ├── RecaptchaFailedException.php │ │ ├── SelfManagedRequiredException.php │ │ ├── SiteAdminRequiredException.php │ │ ├── SiteFilesAreImmutableException.php │ │ ├── TwoFactorAuthenticationRequiredException.php │ │ ├── UserIdWithoutSiteAdminException.php │ │ ├── WriteAndBundlePermissionRequiredException.php │ │ └── WritePermissionRequiredException.php │ ├── NotAuthorizedException.php │ ├── NotFound │ │ ├── ApiKeyNotFoundException.php │ │ ├── BundlePathNotFoundException.php │ │ ├── BundleRegistrationNotFoundException.php │ │ ├── CodeNotFoundException.php │ │ ├── FileNotFoundException.php │ │ ├── FileUploadNotFoundException.php │ │ ├── FolderNotFoundException.php │ │ ├── GroupNotFoundException.php │ │ ├── InboxNotFoundException.php │ │ ├── NestedNotFoundException.php │ │ ├── PlanNotFoundException.php │ │ ├── SiteNotFoundException.php │ │ └── UserNotFoundException.php │ ├── NotFoundException.php │ ├── NotImplementedException.php │ ├── ProcessingFailure │ │ ├── AlreadyCompletedException.php │ │ ├── AutomationCannotBeRunManuallyException.php │ │ ├── BehaviorNotAllowedOnRemoteServerException.php │ │ ├── BundleOnlyAllowsPreviewsException.php │ │ ├── BundleOperationRequiresSubfolderException.php │ │ ├── CouldNotCreateParentException.php │ │ ├── DestinationExistsException.php │ │ ├── DestinationFolderLimitedException.php │ │ ├── DestinationParentConflictException.php │ │ ├── DestinationParentDoesNotExistException.php │ │ ├── ExceededRuntimeLimitException.php │ │ ├── ExpiredPrivateKeyException.php │ │ ├── ExpiredPublicKeyException.php │ │ ├── ExportFailureException.php │ │ ├── ExportNotReadyException.php │ │ ├── FailedToChangePasswordException.php │ │ ├── FileLockedException.php │ │ ├── FileNotUploadedException.php │ │ ├── FilePendingProcessingException.php │ │ ├── FileProcessingErrorException.php │ │ ├── FileTooBigToDecryptException.php │ │ ├── FileTooBigToEncryptException.php │ │ ├── FileUploadedToWrongRegionException.php │ │ ├── FilenameTooLongException.php │ │ ├── FolderLockedException.php │ │ ├── FolderNotEmptyException.php │ │ ├── HistoryUnavailableException.php │ │ ├── InvalidBundleCodeException.php │ │ ├── InvalidFileTypeException.php │ │ ├── InvalidFilenameException.php │ │ ├── InvalidPriorityColorException.php │ │ ├── InvalidRangeException.php │ │ ├── InvalidSiteException.php │ │ ├── ModelSaveErrorException.php │ │ ├── MultipleProcessingErrorsException.php │ │ ├── PathTooLongException.php │ │ ├── RecipientAlreadySharedException.php │ │ ├── RemoteServerErrorException.php │ │ ├── ResourceBelongsToParentSiteException.php │ │ ├── ResourceLockedException.php │ │ ├── SubfolderLockedException.php │ │ ├── TwoFactorAuthenticationCodeAlreadySentException.php │ │ ├── TwoFactorAuthenticationCountryBlacklistedException.php │ │ ├── TwoFactorAuthenticationGeneralErrorException.php │ │ ├── TwoFactorAuthenticationMethodUnsupportedErrorException.php │ │ ├── TwoFactorAuthenticationUnsubscribedRecipientException.php │ │ └── UpdatesNotAllowedForRemotesException.php │ ├── ProcessingFailureException.php │ ├── RateLimited │ │ ├── DuplicateShareRecipientException.php │ │ ├── ReauthenticationRateLimitedException.php │ │ ├── TooManyConcurrentLoginsException.php │ │ ├── TooManyConcurrentRequestsException.php │ │ ├── TooManyLoginAttemptsException.php │ │ ├── TooManyRequestsException.php │ │ └── TooManySharesException.php │ ├── RateLimitedException.php │ ├── ServiceUnavailable │ │ ├── AgentUnavailableException.php │ │ ├── AutomationsUnavailableException.php │ │ ├── MigrationInProgressException.php │ │ ├── SiteDisabledException.php │ │ └── UploadsUnavailableException.php │ ├── ServiceUnavailableException.php │ ├── SiteConfiguration │ │ ├── AccountAlreadyExistsException.php │ │ ├── AccountOverdueException.php │ │ ├── NoAccountForSiteException.php │ │ ├── SiteWasRemovedException.php │ │ ├── TrialExpiredException.php │ │ ├── TrialLockedException.php │ │ └── UserRequestsEnabledRequiredException.php │ └── SiteConfigurationException.php ├── Files.php ├── LogLevel.php ├── Logger.php ├── Model │ ├── AccountLineItem.php │ ├── Action.php │ ├── ActionNotificationExport.php │ ├── ActionNotificationExportResult.php │ ├── ApiKey.php │ ├── ApiRequestLog.php │ ├── App.php │ ├── As2IncomingMessage.php │ ├── As2OutgoingMessage.php │ ├── As2Partner.php │ ├── As2Station.php │ ├── Auto.php │ ├── Automation.php │ ├── AutomationLog.php │ ├── AutomationRun.php │ ├── BandwidthSnapshot.php │ ├── Behavior.php │ ├── Bundle.php │ ├── BundleAction.php │ ├── BundleDownload.php │ ├── BundleNotification.php │ ├── BundlePath.php │ ├── BundleRecipient.php │ ├── BundleRegistration.php │ ├── Clickwrap.php │ ├── DnsRecord.php │ ├── EmailIncomingMessage.php │ ├── EmailLog.php │ ├── Errors.php │ ├── ExavaultApiRequestLog.php │ ├── ExternalEvent.php │ ├── File.php │ ├── FileAction.php │ ├── FileComment.php │ ├── FileCommentReaction.php │ ├── FileMigration.php │ ├── FileMigrationLog.php │ ├── FileUploadPart.php │ ├── Folder.php │ ├── FormField.php │ ├── FormFieldSet.php │ ├── FtpActionLog.php │ ├── GpgKey.php │ ├── Group.php │ ├── GroupUser.php │ ├── History.php │ ├── HistoryExport.php │ ├── HistoryExportResult.php │ ├── Image.php │ ├── InboxRecipient.php │ ├── InboxRegistration.php │ ├── InboxUpload.php │ ├── Invoice.php │ ├── InvoiceLineItem.php │ ├── IpAddress.php │ ├── Lock.php │ ├── Message.php │ ├── MessageComment.php │ ├── MessageCommentReaction.php │ ├── MessageReaction.php │ ├── Notification.php │ ├── OutboundConnectionLog.php │ ├── Payment.php │ ├── PaymentLineItem.php │ ├── Permission.php │ ├── Preview.php │ ├── Priority.php │ ├── Project.php │ ├── PublicHostingRequestLog.php │ ├── PublicIpAddress.php │ ├── PublicKey.php │ ├── RemoteBandwidthSnapshot.php │ ├── RemoteServer.php │ ├── RemoteServerConfigurationFile.php │ ├── Request.php │ ├── Restore.php │ ├── Session.php │ ├── SettingsChange.php │ ├── SftpActionLog.php │ ├── SftpHostKey.php │ ├── ShareGroup.php │ ├── ShareGroupMember.php │ ├── SiemHttpDestination.php │ ├── Site.php │ ├── Snapshot.php │ ├── SsoStrategy.php │ ├── Status.php │ ├── Style.php │ ├── SyncLog.php │ ├── UsageByTopLevelDir.php │ ├── UsageDailySnapshot.php │ ├── UsageSnapshot.php │ ├── User.php │ ├── UserCipherUse.php │ ├── UserLifecycleRule.php │ ├── UserRequest.php │ ├── UserSftpClientUse.php │ ├── WebDavActionLog.php │ └── WebhookTest.php └── Util │ └── PathUtil.php ├── phpcs.phar ├── shared ├── header_test_data.json ├── normalization_for_comparison_test_data.json └── url_test_data.json ├── test.sh └── test ├── composer.json ├── integration └── test-file.php ├── phpunit.xml └── tests └── Util ├── ApiTest.php ├── ConfigTest.php └── PathUtilTest.php /.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | composer.phar 4 | test/vendor 5 | test/composer.lock 6 | test/.phpunit.result.cache 7 | coverage/ 8 | .php-cs-fixer.cache 9 | php-cs-fixer.phar 10 | php-cs-fixer-v2.phar 11 | php-cs-fixer-v3.phar -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Daniel Cowgill 2 | Dustin Zeisler 3 | Jesse Harris 4 | Kevin Bombino 5 | Kevin Killingsworth 6 | Martyn Garcia 7 | Rommel Santor 8 | Sam Harrison 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2019- Action Verb, LLC (https://www.files.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Thank you for your interest in Files.com security. We recognize that your data is very personal and sensitive and we work hard to keep it protected. 4 | 5 | 6 | ## Supported Versions 7 | 8 | Only the latest version will be supported with security updates. 9 | 10 | 11 | ## Reporting a Vulnerability 12 | 13 | Here at Files.com, we celebrate security and we encourage independent security researchers to help us keep our products secure. 14 | 15 | We offer a Security Bug Bounty Program to create an incentive and reward structure so that researchers are able to devote resources to working on Files.com. 16 | 17 | We offer our Bug Bounty Program on HackerOne at https://hackerone.com/files 18 | 19 | We prefer to receive reports of vulnerabilities there. 20 | 21 | If you do not wish to use HackerOne, alternate submission instructions are available at: 22 | https://www.files.com/legal/security-bounty/ 23 | 24 | Thank you for helping keep the Files.com community secure! 25 | -------------------------------------------------------------------------------- /_VERSION: -------------------------------------------------------------------------------- 1 | 2.0.196 2 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "files.com/files-php-sdk", 3 | "description": "Files.com PHP SDK", 4 | "keywords": [ 5 | "files.com", 6 | "cloud storage", 7 | "api" 8 | ], 9 | "homepage": "https://www.files.com/", 10 | "license": "MIT", 11 | "authors": [ 12 | { 13 | "name": "Files.com and Contributors", 14 | "homepage": "https://www.files.com/" 15 | } 16 | ], 17 | "require": { 18 | "php": ">=5.5.0", 19 | "ext-curl": "*", 20 | "ext-json": "*", 21 | "ext-mbstring": "*", 22 | "ext-intl": "*", 23 | "guzzlehttp/guzzle": "^6 || ^7" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "Files\\": "lib/" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/Model/AccountLineItem.md: -------------------------------------------------------------------------------- 1 | # AccountLineItem 2 | 3 | ## Example AccountLineItem Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "amount": 1.0, 9 | "balance": 1.0, 10 | "created_at": "2000-01-01T01:00:00Z", 11 | "currency": "USD", 12 | "download_uri": "https://url...", 13 | "invoice_line_items": [ 14 | { 15 | "amount": 1.0, 16 | "created_at": "2000-01-01T01:00:00Z", 17 | "description": "Service from 2019-01-01 through 2019-12-31", 18 | "type": "invoice", 19 | "service_end_at": "2000-01-01T01:00:00Z", 20 | "service_start_at": "2000-01-01T01:00:00Z", 21 | "plan": "Premier", 22 | "site": "My site" 23 | } 24 | ], 25 | "method": "paypal", 26 | "payment_line_items": [ 27 | { 28 | "amount": 1.0, 29 | "created_at": "2000-01-01T01:00:00Z", 30 | "invoice_id": 1, 31 | "payment_id": 1 32 | } 33 | ], 34 | "payment_reversed_at": "2000-01-01T01:00:00Z", 35 | "payment_type": "example", 36 | "site_name": "My Site", 37 | "type": "invoice" 38 | } 39 | ``` 40 | 41 | * `id` (int64): Line item Id 42 | * `amount` (double): Line item amount 43 | * `balance` (double): Line item balance 44 | * `created_at` (date-time): Line item created at 45 | * `currency` (string): Line item currency 46 | * `download_uri` (string): Line item download uri 47 | * `invoice_line_items` (array(object)): Associated invoice line items 48 | * `method` (string): Line item payment method 49 | * `payment_line_items` (array(object)): Associated payment line items 50 | * `payment_reversed_at` (date-time): Date/time payment was reversed if applicable 51 | * `payment_type` (string): Type of payment if applicable 52 | * `site_name` (string): Site name this line item is for 53 | * `type` (string): Type of line item, either payment or invoice 54 | -------------------------------------------------------------------------------- /docs/Model/Action.md: -------------------------------------------------------------------------------- 1 | # Action 2 | 3 | ## Example Action Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "path": "", 9 | "when": "2000-01-01T01:00:00Z", 10 | "destination": "/to_path", 11 | "display": "Actual text of the action here.", 12 | "ip": "192.283.128.182", 13 | "source": "/from_path", 14 | "targets": null, 15 | "user_id": 1, 16 | "username": "user", 17 | "user_is_from_parent_site": true, 18 | "action": "create", 19 | "failure_type": "none", 20 | "interface": "web" 21 | } 22 | ``` 23 | 24 | * `id` (int64): Action ID 25 | * `path` (string): Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 26 | * `when` (date-time): Action occurrence date/time 27 | * `destination` (string): The destination path for this action, if applicable 28 | * `display` (string): Friendly displayed output 29 | * `ip` (string): IP Address that performed this action 30 | * `source` (string): The source path for this action, if applicable 31 | * `targets` (object): Targets 32 | * `user_id` (int64): User ID 33 | * `username` (string): Username 34 | * `user_is_from_parent_site` (boolean): true if this change was performed by a user on a parent site. 35 | * `action` (string): Type of action 36 | * `failure_type` (string): Failure type. If action was a user login or session failure, why did it fail? 37 | * `interface` (string): Interface on which this action occurred. 38 | -------------------------------------------------------------------------------- /docs/Model/ActionNotificationExportResult.md: -------------------------------------------------------------------------------- 1 | # ActionNotificationExportResult 2 | 3 | ## Example ActionNotificationExportResult Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "created_at": 1, 9 | "status": 200, 10 | "message": "Success", 11 | "success": true, 12 | "request_headers": "{\"User-Agent\":\"Files.com Webhook\"}", 13 | "request_method": "GET", 14 | "request_url": "www.example.com/webhook_receiver", 15 | "path": "MyFolder/MyFile.txt", 16 | "folder": "MyFolder" 17 | } 18 | ``` 19 | 20 | * `id` (int64): Notification ID 21 | * `created_at` (int64): When the notification was sent. 22 | * `status` (int64): HTTP status code returned in the webhook response. 23 | * `message` (string): A message indicating the overall status of the webhook notification. 24 | * `success` (boolean): `true` if the webhook succeeded by receiving a 200 or 204 response. 25 | * `request_headers` (string): A JSON-encoded string with headers that were sent with the webhook. 26 | * `request_method` (string): The HTTP verb used to perform the webhook. 27 | * `request_url` (string): The webhook request URL. 28 | * `path` (string): The path to the actual file that triggered this notification. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 29 | * `folder` (string): The folder associated with the triggering action for this notification. 30 | 31 | --- 32 | 33 | ## List Action Notification Export Results 34 | 35 | ``` 36 | $action_notification_export_result = new \Files\Model\ActionNotificationExportResult(); 37 | $action_notification_export_result->list(, [ 38 | 'user_id' => 1, 39 | 'action_notification_export_id' => 1, 40 | ]); 41 | ``` 42 | 43 | 44 | ### Parameters 45 | 46 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 47 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 48 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 49 | * `action_notification_export_id` (int64): Required - ID of the associated action notification export. 50 | -------------------------------------------------------------------------------- /docs/Model/Auto.md: -------------------------------------------------------------------------------- 1 | # Auto 2 | 3 | ## Example Auto Object 4 | 5 | ``` 6 | { 7 | "dynamic": null 8 | } 9 | ``` 10 | 11 | * `dynamic` (object): 12 | -------------------------------------------------------------------------------- /docs/Model/AutomationRun.md: -------------------------------------------------------------------------------- 1 | # AutomationRun 2 | 3 | ## Example AutomationRun Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "automation_id": 1, 9 | "completed_at": "2000-01-01T01:00:00Z", 10 | "created_at": "2000-01-01T01:00:00Z", 11 | "retry_at": "2000-01-01T01:00:00Z", 12 | "retried_at": "2000-01-01T01:00:00Z", 13 | "retried_in_run_id": 1, 14 | "retry_of_run_id": 1, 15 | "runtime": 1.0, 16 | "status": "success", 17 | "successful_operations": 1, 18 | "failed_operations": 1, 19 | "status_messages_url": "https://www.example.com/log_file.txt" 20 | } 21 | ``` 22 | 23 | * `id` (int64): ID. 24 | * `automation_id` (int64): ID of the associated Automation. 25 | * `completed_at` (date-time): Automation run completion/failure date/time. 26 | * `created_at` (date-time): Automation run start date/time. 27 | * `retry_at` (date-time): If set, this automation will be retried at this date/time due to `failure` or `partial_failure`. 28 | * `retried_at` (date-time): If set, this Automation run was retried due to `failure` or `partial_failure`. 29 | * `retried_in_run_id` (int64): ID of the run that is or will be retrying this run. 30 | * `retry_of_run_id` (int64): ID of the original run that this run is retrying. 31 | * `runtime` (double): Automation run runtime. 32 | * `status` (string): The success status of the AutomationRun. One of `running`, `success`, `partial_failure`, or `failure`. 33 | * `successful_operations` (int64): Count of successful operations. 34 | * `failed_operations` (int64): Count of failed operations. 35 | * `status_messages_url` (string): Link to status messages log file. 36 | 37 | --- 38 | 39 | ## List Automation Runs 40 | 41 | ``` 42 | $automation_run = new \Files\Model\AutomationRun(); 43 | $automation_run->list(, [ 44 | 'user_id' => 1, 45 | 'automation_id' => 1, 46 | ]); 47 | ``` 48 | 49 | 50 | ### Parameters 51 | 52 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 53 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 54 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 55 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`. 56 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `status` and `automation_id`. Valid field combinations are `[ automation_id, status ]`. 57 | * `automation_id` (int64): Required - ID of the associated Automation. 58 | 59 | --- 60 | 61 | ## Show Automation Run 62 | 63 | ``` 64 | $automation_run = new \Files\Model\AutomationRun(); 65 | $automation_run->find($id); 66 | ``` 67 | 68 | 69 | ### Parameters 70 | 71 | * `id` (int64): Required - Automation Run ID. 72 | -------------------------------------------------------------------------------- /docs/Model/BandwidthSnapshot.md: -------------------------------------------------------------------------------- 1 | # BandwidthSnapshot 2 | 3 | ## Example BandwidthSnapshot Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "bytes_received": 1.0, 9 | "bytes_sent": 1.0, 10 | "sync_bytes_received": 1.0, 11 | "sync_bytes_sent": 1.0, 12 | "requests_get": 1.0, 13 | "requests_put": 1.0, 14 | "requests_other": 1.0, 15 | "logged_at": "2000-01-01T01:00:00Z" 16 | } 17 | ``` 18 | 19 | * `id` (int64): Site bandwidth ID 20 | * `bytes_received` (double): Site bandwidth report bytes received 21 | * `bytes_sent` (double): Site bandwidth report bytes sent 22 | * `sync_bytes_received` (double): Site sync bandwidth report bytes received 23 | * `sync_bytes_sent` (double): Site sync bandwidth report bytes sent 24 | * `requests_get` (double): Site bandwidth report get requests 25 | * `requests_put` (double): Site bandwidth report put requests 26 | * `requests_other` (double): Site bandwidth report other requests 27 | * `logged_at` (date-time): Time the site bandwidth report was logged 28 | 29 | --- 30 | 31 | ## List Bandwidth Snapshots 32 | 33 | ``` 34 | $bandwidth_snapshot = new \Files\Model\BandwidthSnapshot(); 35 | $bandwidth_snapshot->list 36 | ``` 37 | 38 | 39 | ### Parameters 40 | 41 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 42 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 43 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `logged_at`. 44 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `logged_at`. 45 | * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `logged_at`. 46 | * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `logged_at`. 47 | * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `logged_at`. 48 | * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `logged_at`. 49 | -------------------------------------------------------------------------------- /docs/Model/BundleAction.md: -------------------------------------------------------------------------------- 1 | # BundleAction 2 | 3 | ## Example BundleAction Object 4 | 5 | ``` 6 | { 7 | "action": "create", 8 | "bundle_registration": { 9 | "code": "abc123", 10 | "name": "account", 11 | "company": "Action Verb", 12 | "email": "john.doe@files.com", 13 | "ip": "10.1.1.1", 14 | "inbox_code": "abc123", 15 | "clickwrap_body": "example", 16 | "form_field_set_id": 1, 17 | "form_field_data": { 18 | "key": "example value" 19 | }, 20 | "bundle_code": "example", 21 | "bundle_id": 1, 22 | "bundle_recipient_id": 1, 23 | "created_at": "2000-01-01T01:00:00Z" 24 | }, 25 | "created_at": "2000-01-01T01:00:00Z", 26 | "destination": "/to_path", 27 | "path": "", 28 | "source": "/from_path" 29 | } 30 | ``` 31 | 32 | * `action` (string): Type of action 33 | * `bundle_registration` (BundleRegistration): Object that contains bundle registration information 34 | * `created_at` (date-time): Action occurrence date/time 35 | * `destination` (string): The destination path for this bundle action, if applicable 36 | * `path` (string): Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 37 | * `source` (string): The source path for this bundle action, if applicable 38 | 39 | --- 40 | 41 | ## List Bundle Actions 42 | 43 | ``` 44 | $bundle_action = new \Files\Model\BundleAction(); 45 | $bundle_action->list(, [ 46 | 'user_id' => 1, 47 | ]); 48 | ``` 49 | 50 | 51 | ### Parameters 52 | 53 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 54 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 55 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 56 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`. 57 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `bundle_id` or `bundle_registration_id`. Valid field combinations are `[ bundle_id, created_at ]`, `[ bundle_registration_id, created_at ]`, `[ bundle_id, bundle_registration_id ]` or `[ bundle_id, bundle_registration_id, created_at ]`. 58 | * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. 59 | * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. 60 | * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. 61 | * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. 62 | -------------------------------------------------------------------------------- /docs/Model/BundleDownload.md: -------------------------------------------------------------------------------- 1 | # BundleDownload 2 | 3 | ## Example BundleDownload Object 4 | 5 | ``` 6 | { 7 | "bundle_registration": { 8 | "code": "abc123", 9 | "name": "account", 10 | "company": "Action Verb", 11 | "email": "john.doe@files.com", 12 | "ip": "10.1.1.1", 13 | "inbox_code": "abc123", 14 | "clickwrap_body": "example", 15 | "form_field_set_id": 1, 16 | "form_field_data": { 17 | "key": "example value" 18 | }, 19 | "bundle_code": "example", 20 | "bundle_id": 1, 21 | "bundle_recipient_id": 1, 22 | "created_at": "2000-01-01T01:00:00Z" 23 | }, 24 | "download_method": "file", 25 | "path": "a/b/test.txt", 26 | "created_at": "2000-01-01T01:00:00Z" 27 | } 28 | ``` 29 | 30 | * `bundle_registration` (BundleRegistration): 31 | * `download_method` (string): Download method (file or full_zip) 32 | * `path` (string): Download path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 33 | * `created_at` (date-time): Download date/time 34 | 35 | --- 36 | 37 | ## List Bundle Downloads 38 | 39 | ``` 40 | $bundle_download = new \Files\Model\BundleDownload(); 41 | $bundle_download->list(, [ 42 | 'bundle_id' => 1, 43 | 'bundle_registration_id' => 1, 44 | ]); 45 | ``` 46 | 47 | 48 | ### Parameters 49 | 50 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 51 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 52 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`. 53 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`. 54 | * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. 55 | * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. 56 | * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. 57 | * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. 58 | * `bundle_id` (int64): Bundle ID 59 | * `bundle_registration_id` (int64): BundleRegistration ID 60 | -------------------------------------------------------------------------------- /docs/Model/BundlePath.md: -------------------------------------------------------------------------------- 1 | # BundlePath 2 | 3 | ## Example BundlePath Object 4 | 5 | ``` 6 | { 7 | "recursive": true, 8 | "path": "example" 9 | } 10 | ``` 11 | 12 | * `recursive` (boolean): Allow access to subfolders content? 13 | * `path` (string): The path to the resource relative to filesystem. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 14 | -------------------------------------------------------------------------------- /docs/Model/BundleRecipient.md: -------------------------------------------------------------------------------- 1 | # BundleRecipient 2 | 3 | ## Example BundleRecipient Object 4 | 5 | ``` 6 | { 7 | "company": "Acme Inc.", 8 | "name": "John Doe", 9 | "note": "Some note.", 10 | "recipient": "john.doe@example.com", 11 | "sent_at": "2000-01-01T01:00:00Z" 12 | } 13 | ``` 14 | 15 | * `company` (string): The recipient's company. 16 | * `name` (string): The recipient's name. 17 | * `note` (string): A note sent to the recipient with the bundle. 18 | * `recipient` (string): The recipient's email address. 19 | * `sent_at` (date-time): When the Bundle was shared with this recipient. 20 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 21 | * `bundle_id` (int64): Bundle to share. 22 | * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation. 23 | 24 | --- 25 | 26 | ## List Bundle Recipients 27 | 28 | ``` 29 | $bundle_recipient = new \Files\Model\BundleRecipient(); 30 | $bundle_recipient->list(, [ 31 | 'user_id' => 1, 32 | 'bundle_id' => 1, 33 | ]); 34 | ``` 35 | 36 | 37 | ### Parameters 38 | 39 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 40 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 41 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 42 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are . 43 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `has_registrations`. 44 | * `bundle_id` (int64): Required - List recipients for the bundle with this ID. 45 | 46 | --- 47 | 48 | ## Create Bundle Recipient 49 | 50 | ``` 51 | $bundle_recipient = new \Files\Model\BundleRecipient(); 52 | $bundle_recipient->create(, [ 53 | 'user_id' => 1, 54 | 'bundle_id' => 1, 55 | 'recipient' => "johndoe@gmail.com", 56 | 'name' => "John Smith", 57 | 'company' => "Acme Ltd", 58 | 'note' => "Just a note.", 59 | 'share_after_create' => false, 60 | ]); 61 | ``` 62 | 63 | 64 | ### Parameters 65 | 66 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 67 | * `bundle_id` (int64): Required - Bundle to share. 68 | * `recipient` (string): Required - Email addresses to share this bundle with. 69 | * `name` (string): Name of recipient. 70 | * `company` (string): Company of recipient. 71 | * `note` (string): Note to include in email. 72 | * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation. 73 | -------------------------------------------------------------------------------- /docs/Model/BundleRegistration.md: -------------------------------------------------------------------------------- 1 | # BundleRegistration 2 | 3 | ## Example BundleRegistration Object 4 | 5 | ``` 6 | { 7 | "code": "abc123", 8 | "name": "account", 9 | "company": "Action Verb", 10 | "email": "john.doe@files.com", 11 | "ip": "10.1.1.1", 12 | "inbox_code": "abc123", 13 | "clickwrap_body": "example", 14 | "form_field_set_id": 1, 15 | "form_field_data": { 16 | "key": "example value" 17 | }, 18 | "bundle_code": "example", 19 | "bundle_id": 1, 20 | "bundle_recipient_id": 1, 21 | "created_at": "2000-01-01T01:00:00Z" 22 | } 23 | ``` 24 | 25 | * `code` (string): Registration cookie code 26 | * `name` (string): Registrant name 27 | * `company` (string): Registrant company name 28 | * `email` (string): Registrant email address 29 | * `ip` (string): Registrant IP Address 30 | * `inbox_code` (string): InboxRegistration cookie code, if there is an associated InboxRegistration 31 | * `clickwrap_body` (string): Clickwrap text that was shown to the registrant 32 | * `form_field_set_id` (int64): Id of associated form field set 33 | * `form_field_data` (object): Data for form field set with form field ids as keys and user data as values 34 | * `bundle_code` (string): Bundle URL code 35 | * `bundle_id` (int64): Id of associated bundle 36 | * `bundle_recipient_id` (int64): Id of associated bundle recipient 37 | * `created_at` (date-time): Registration creation date/time 38 | 39 | --- 40 | 41 | ## List Bundle Registrations 42 | 43 | ``` 44 | $bundle_registration = new \Files\Model\BundleRegistration(); 45 | $bundle_registration->list(, [ 46 | 'user_id' => 1, 47 | 'bundle_id' => 1, 48 | ]); 49 | ``` 50 | 51 | 52 | ### Parameters 53 | 54 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 55 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 56 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 57 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`. 58 | * `bundle_id` (int64): ID of the associated Bundle 59 | -------------------------------------------------------------------------------- /docs/Model/DnsRecord.md: -------------------------------------------------------------------------------- 1 | # DnsRecord 2 | 3 | ## Example DnsRecord Object 4 | 5 | ``` 6 | { 7 | "id": "customdomain.com-CNAME-site.files.com", 8 | "domain": "my-custom-domain.com", 9 | "rrtype": "CNAME", 10 | "value": "mysite.files.com" 11 | } 12 | ``` 13 | 14 | * `id` (string): Unique label for DNS record; used by Zapier and other integrations. 15 | * `domain` (string): DNS record domain name 16 | * `rrtype` (string): DNS record type 17 | * `value` (string): DNS record value 18 | 19 | --- 20 | 21 | ## Show Site DNS Configuration 22 | 23 | ``` 24 | $dns_record = new \Files\Model\DnsRecord(); 25 | $dns_record->list 26 | ``` 27 | 28 | 29 | ### Parameters 30 | 31 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 32 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 33 | -------------------------------------------------------------------------------- /docs/Model/EmailIncomingMessage.md: -------------------------------------------------------------------------------- 1 | # EmailIncomingMessage 2 | 3 | ## Example EmailIncomingMessage Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "inbox_id": 1, 9 | "sender": "example", 10 | "sender_name": "example", 11 | "status": "success", 12 | "body": "example", 13 | "message": "example", 14 | "created_at": "2000-01-01T01:00:00Z", 15 | "inbox_title": "Inbox Title" 16 | } 17 | ``` 18 | 19 | * `id` (int64): Id of the Email Incoming Message 20 | * `inbox_id` (int64): Id of the Inbox associated with this message 21 | * `sender` (string): Sender of the email 22 | * `sender_name` (string): Sender name 23 | * `status` (string): Status of the message 24 | * `body` (string): Body of the email 25 | * `message` (string): Message describing the failure 26 | * `created_at` (date-time): Message creation date/time 27 | * `inbox_title` (string): Title of the Inbox associated with this message 28 | 29 | --- 30 | 31 | ## List Email Incoming Messages 32 | 33 | ``` 34 | $email_incoming_message = new \Files\Model\EmailIncomingMessage(); 35 | $email_incoming_message->list 36 | ``` 37 | 38 | 39 | ### Parameters 40 | 41 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 42 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 43 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`, `sender`, `status` or `inbox_id`. 44 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `inbox_id`, `sender` or `status`. Valid field combinations are `[ inbox_id, created_at ]`, `[ sender, created_at ]`, `[ status, created_at ]`, `[ inbox_id, status ]`, `[ status, sender ]`, `[ inbox_id, status, created_at ]`, `[ status, sender, created_at ]`, `[ inbox_id, status, sender ]` or `[ inbox_id, status, sender, created_at ]`. 45 | * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. 46 | * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. 47 | * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `sender`. 48 | * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. 49 | * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. 50 | -------------------------------------------------------------------------------- /docs/Model/EmailLog.md: -------------------------------------------------------------------------------- 1 | # EmailLog 2 | 3 | ## Example EmailLog Object 4 | 5 | ``` 6 | { 7 | "timestamp": "2000-01-01T01:00:00Z", 8 | "message": "example", 9 | "status": "example", 10 | "subject": "example", 11 | "to": "example", 12 | "cc": "example", 13 | "delivery_method": "example", 14 | "smtp_hostname": "example", 15 | "smtp_ip": "example" 16 | } 17 | ``` 18 | 19 | * `timestamp` (date-time): Start Time of Action 20 | * `message` (string): Log Message 21 | * `status` (string): Status of E-Mail delivery 22 | * `subject` (string): Subject line of E-Mail 23 | * `to` (string): To field of E-Mail 24 | * `cc` (string): CC field of E-Mail 25 | * `delivery_method` (string): How was the email delivered? `customer_smtp` or `files.com` 26 | * `smtp_hostname` (string): Customer SMTP Hostname used. 27 | * `smtp_ip` (string): Customer SMTP IP address as resolved for use (useful for troubleshooting DNS issues with customer SMTP). 28 | 29 | --- 30 | 31 | ## List Email Logs 32 | 33 | ``` 34 | $email_log = new \Files\Model\EmailLog(); 35 | $email_log->list 36 | ``` 37 | 38 | 39 | ### Parameters 40 | 41 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 42 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 43 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `start_date`, `end_date` or `status`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ status ]`, `[ start_date, end_date ]`, `[ start_date, status ]` or `[ end_date, status ]`. 44 | * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `status`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ status ]`, `[ start_date, end_date ]`, `[ start_date, status ]` or `[ end_date, status ]`. 45 | -------------------------------------------------------------------------------- /docs/Model/Errors.md: -------------------------------------------------------------------------------- 1 | # Errors 2 | 3 | ## Example Errors Object 4 | 5 | ``` 6 | { 7 | "fields": [ 8 | 9 | ], 10 | "messages": [ 11 | 12 | ] 13 | } 14 | ``` 15 | 16 | * `fields` (array(string)): A list of fields where errors occur 17 | * `messages` (array(string)): A list of error messages 18 | -------------------------------------------------------------------------------- /docs/Model/FileAction.md: -------------------------------------------------------------------------------- 1 | # FileAction 2 | 3 | ## Example FileAction Object 4 | 5 | ``` 6 | { 7 | "status": "pending", 8 | "file_migration_id": 1 9 | } 10 | ``` 11 | 12 | * `status` (string): Status of file operation. 13 | * `file_migration_id` (int64): If status is pending, this is the id of the File Migration to check for status updates. 14 | -------------------------------------------------------------------------------- /docs/Model/FileComment.md: -------------------------------------------------------------------------------- 1 | # FileComment 2 | 3 | ## Example FileComment Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "body": "What a great file!", 9 | "reactions": [ 10 | { 11 | "id": 1, 12 | "emoji": "👍" 13 | } 14 | ] 15 | } 16 | ``` 17 | 18 | * `id` (int64): File Comment ID 19 | * `body` (string): Comment body. 20 | * `reactions` (array(object)): Reactions to this comment. 21 | * `path` (string): File path. 22 | 23 | --- 24 | 25 | ## List File Comments by Path 26 | 27 | ``` 28 | $file_comment = new \Files\Model\FileComment(); 29 | $file_comment->listFor($path); 30 | ``` 31 | 32 | 33 | ### Parameters 34 | 35 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 36 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 37 | * `path` (string): Required - Path to operate on. 38 | 39 | --- 40 | 41 | ## Create File Comment 42 | 43 | ``` 44 | $file_comment = new \Files\Model\FileComment(); 45 | $file_comment->create(, [ 46 | 'body' => "body", 47 | 'path' => "path", 48 | ]); 49 | ``` 50 | 51 | 52 | ### Parameters 53 | 54 | * `body` (string): Required - Comment body. 55 | * `path` (string): Required - File path. 56 | 57 | --- 58 | 59 | ## Update File Comment 60 | 61 | ``` 62 | $file_comment = current(\Files\Model\FileComment::all()); 63 | 64 | $file_comment->update([ 65 | 'body' => "body", 66 | ]); 67 | ``` 68 | 69 | ### Parameters 70 | 71 | * `id` (int64): Required - File Comment ID. 72 | * `body` (string): Required - Comment body. 73 | 74 | ### Example Response 75 | 76 | ```json 77 | { 78 | "id": 1, 79 | "body": "What a great file!", 80 | "reactions": [ 81 | { 82 | "id": 1, 83 | "emoji": "👍" 84 | } 85 | ] 86 | } 87 | ``` 88 | 89 | --- 90 | 91 | ## Delete File Comment 92 | 93 | ``` 94 | $file_comment = current(\Files\Model\FileComment::all()); 95 | 96 | $file_comment->delete(); 97 | ``` 98 | 99 | ### Parameters 100 | 101 | * `id` (int64): Required - File Comment ID. 102 | 103 | -------------------------------------------------------------------------------- /docs/Model/FileCommentReaction.md: -------------------------------------------------------------------------------- 1 | # FileCommentReaction 2 | 3 | ## Example FileCommentReaction Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "emoji": "👍" 9 | } 10 | ``` 11 | 12 | * `id` (int64): Reaction ID 13 | * `emoji` (string): Emoji used in the reaction. 14 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 15 | * `file_comment_id` (int64): ID of file comment to attach reaction to. 16 | 17 | --- 18 | 19 | ## Create File Comment Reaction 20 | 21 | ``` 22 | $file_comment_reaction = new \Files\Model\FileCommentReaction(); 23 | $file_comment_reaction->create(, [ 24 | 'user_id' => 1, 25 | 'file_comment_id' => 1, 26 | 'emoji' => "emoji", 27 | ]); 28 | ``` 29 | 30 | 31 | ### Parameters 32 | 33 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 34 | * `file_comment_id` (int64): Required - ID of file comment to attach reaction to. 35 | * `emoji` (string): Required - Emoji to react with. 36 | 37 | --- 38 | 39 | ## Delete File Comment Reaction 40 | 41 | ``` 42 | $file_comment_reaction = new \Files\Model\FileCommentReaction(); 43 | $file_comment_reaction->path = $myFilePath; 44 | 45 | $file_comment_reaction->delete(); 46 | ``` 47 | 48 | ### Parameters 49 | 50 | * `id` (int64): Required - File Comment Reaction ID. 51 | 52 | -------------------------------------------------------------------------------- /docs/Model/FileMigration.md: -------------------------------------------------------------------------------- 1 | # FileMigration 2 | 3 | ## Example FileMigration Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "path": "MyFolder", 9 | "dest_path": "MyFolder", 10 | "files_moved": 1, 11 | "files_total": 1, 12 | "operation": "move", 13 | "region": "USA", 14 | "status": "complete", 15 | "log_url": "https://www.example.com/log_file" 16 | } 17 | ``` 18 | 19 | * `id` (int64): File migration ID 20 | * `path` (string): Source path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 21 | * `dest_path` (string): Destination path 22 | * `files_moved` (int64): Number of files processed 23 | * `files_total` (int64): 24 | * `operation` (string): The type of operation 25 | * `region` (string): Region 26 | * `status` (string): Status 27 | * `log_url` (string): Link to download the log file for this migration. 28 | 29 | --- 30 | 31 | ## Show File Migration 32 | 33 | ``` 34 | $file_migration = new \Files\Model\FileMigration(); 35 | $file_migration->find($id); 36 | ``` 37 | 38 | 39 | ### Parameters 40 | 41 | * `id` (int64): Required - File Migration ID. 42 | -------------------------------------------------------------------------------- /docs/Model/FileUploadPart.md: -------------------------------------------------------------------------------- 1 | # FileUploadPart 2 | 3 | ## Example FileUploadPart Object 4 | 5 | ``` 6 | { 7 | "send": { 8 | "key": "example value" 9 | }, 10 | "action": "multipart", 11 | "ask_about_overwrites": true, 12 | "available_parts": 1, 13 | "expires": "example", 14 | "headers": { 15 | "key": "example value" 16 | }, 17 | "http_method": "PUT", 18 | "next_partsize": 1, 19 | "parallel_parts": true, 20 | "retry_parts": true, 21 | "parameters": { 22 | "key": "example value" 23 | }, 24 | "part_number": 1, 25 | "partsize": 1, 26 | "path": "", 27 | "ref": "upload-1", 28 | "upload_uri": "example" 29 | } 30 | ``` 31 | 32 | * `send` (object): Content-Type and File to send 33 | * `action` (string): Type of upload 34 | * `ask_about_overwrites` (boolean): If `true`, this file exists and you may wish to ask the user for overwrite confirmation 35 | * `available_parts` (int64): Number of parts in the upload 36 | * `expires` (string): Date/time of when this Upload part expires and the URL cannot be used any more 37 | * `headers` (object): Additional upload headers to provide as part of the upload 38 | * `http_method` (string): HTTP Method to use for uploading the part, usually `PUT` 39 | * `next_partsize` (int64): Size in bytes for this part 40 | * `parallel_parts` (boolean): If `true`, multiple parts may be uploaded in parallel. If `false`, be sure to only upload one part at a time, in order. 41 | * `retry_parts` (boolean): If `true`, parts may be retried. If `false`, a part cannot be retried and the upload should be restarted. 42 | * `parameters` (object): Additional HTTP parameters to send with the upload 43 | * `part_number` (int64): Number of this upload part 44 | * `partsize` (int64): Size in bytes for the next upload part 45 | * `path` (string): New file path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 46 | * `ref` (string): Reference name for this upload part 47 | * `upload_uri` (string): URI to upload this part to 48 | -------------------------------------------------------------------------------- /docs/Model/FormField.md: -------------------------------------------------------------------------------- 1 | # FormField 2 | 3 | ## Example FormField Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "label": "Sample Label", 9 | "required": true, 10 | "help_text": "Help Text", 11 | "field_type": "text", 12 | "options_for_select": [ 13 | "red", 14 | "green", 15 | "blue" 16 | ], 17 | "default_option": "red", 18 | "form_field_set_id": 1 19 | } 20 | ``` 21 | 22 | * `id` (int64): Form field id 23 | * `label` (string): Label to be displayed 24 | * `required` (boolean): Is this a required field? 25 | * `help_text` (string): Help text to be displayed 26 | * `field_type` (string): Type of Field 27 | * `options_for_select` (array(string)): Options to display for radio and dropdown 28 | * `default_option` (string): Default option for radio and dropdown 29 | * `form_field_set_id` (int64): Form field set id 30 | -------------------------------------------------------------------------------- /docs/Model/GroupUser.md: -------------------------------------------------------------------------------- 1 | # GroupUser 2 | 3 | ## Example GroupUser Object 4 | 5 | ``` 6 | { 7 | "group_name": "My Group", 8 | "group_id": 1, 9 | "user_id": 1, 10 | "admin": true, 11 | "usernames": "user" 12 | } 13 | ``` 14 | 15 | * `group_name` (string): Group name 16 | * `group_id` (int64): Group ID 17 | * `user_id` (int64): User ID 18 | * `admin` (boolean): Is this user an administrator of this group? 19 | * `usernames` (string): Comma-delimited list of usernames who belong to this group (separated by commas). 20 | * `id` (int64): Group User ID. 21 | 22 | --- 23 | 24 | ## List Group Users 25 | 26 | ``` 27 | $group_user = new \Files\Model\GroupUser(); 28 | $group_user->list(, [ 29 | 'user_id' => 1, 30 | 'group_id' => 1, 31 | ]); 32 | ``` 33 | 34 | 35 | ### Parameters 36 | 37 | * `user_id` (int64): User ID. If provided, will return group_users of this user. 38 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 39 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 40 | * `group_id` (int64): Group ID. If provided, will return group_users of this group. 41 | 42 | --- 43 | 44 | ## Create Group User 45 | 46 | ``` 47 | $group_user = new \Files\Model\GroupUser(); 48 | $group_user->create(, [ 49 | 'group_id' => 1, 50 | 'user_id' => 1, 51 | 'admin' => false, 52 | ]); 53 | ``` 54 | 55 | 56 | ### Parameters 57 | 58 | * `group_id` (int64): Required - Group ID to add user to. 59 | * `user_id` (int64): Required - User ID to add to group. 60 | * `admin` (boolean): Is the user a group administrator? 61 | 62 | --- 63 | 64 | ## Update Group User 65 | 66 | ``` 67 | $group_user = current(\Files\Model\GroupUser::all()); 68 | 69 | $group_user->update([ 70 | 'group_id' => 1, 71 | 'user_id' => 1, 72 | 'admin' => false, 73 | ]); 74 | ``` 75 | 76 | ### Parameters 77 | 78 | * `id` (int64): Required - Group User ID. 79 | * `group_id` (int64): Required - Group ID to add user to. 80 | * `user_id` (int64): Required - User ID to add to group. 81 | * `admin` (boolean): Is the user a group administrator? 82 | 83 | ### Example Response 84 | 85 | ```json 86 | { 87 | "group_name": "My Group", 88 | "group_id": 1, 89 | "user_id": 1, 90 | "admin": true, 91 | "usernames": "user" 92 | } 93 | ``` 94 | 95 | --- 96 | 97 | ## Delete Group User 98 | 99 | ``` 100 | $group_user = current(\Files\Model\GroupUser::all()); 101 | 102 | $group_user->delete([ 103 | 'group_id' => 1, 104 | 'user_id' => 1, 105 | ]); 106 | ``` 107 | 108 | ### Parameters 109 | 110 | * `id` (int64): Required - Group User ID. 111 | * `group_id` (int64): Required - Group ID from which to remove user. 112 | * `user_id` (int64): Required - User ID to remove from group. 113 | 114 | -------------------------------------------------------------------------------- /docs/Model/Image.md: -------------------------------------------------------------------------------- 1 | # Image 2 | 3 | ## Example Image Object 4 | 5 | ``` 6 | { 7 | "name": "My logo", 8 | "uri": "https://mysite.files.com/.../my_image.png" 9 | } 10 | ``` 11 | 12 | * `name` (string): Image name 13 | * `uri` (string): Image URI 14 | -------------------------------------------------------------------------------- /docs/Model/InboxRecipient.md: -------------------------------------------------------------------------------- 1 | # InboxRecipient 2 | 3 | ## Example InboxRecipient Object 4 | 5 | ``` 6 | { 7 | "company": "Acme Inc.", 8 | "name": "John Doe", 9 | "note": "Some note.", 10 | "recipient": "john.doe@example.com", 11 | "sent_at": "2000-01-01T01:00:00Z" 12 | } 13 | ``` 14 | 15 | * `company` (string): The recipient's company. 16 | * `name` (string): The recipient's name. 17 | * `note` (string): A note sent to the recipient with the inbox. 18 | * `recipient` (string): The recipient's email address. 19 | * `sent_at` (date-time): When the Inbox was shared with this recipient. 20 | * `inbox_id` (int64): Inbox to share. 21 | * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation. 22 | 23 | --- 24 | 25 | ## List Inbox Recipients 26 | 27 | ``` 28 | $inbox_recipient = new \Files\Model\InboxRecipient(); 29 | $inbox_recipient->list(, [ 30 | 'inbox_id' => 1, 31 | ]); 32 | ``` 33 | 34 | 35 | ### Parameters 36 | 37 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 38 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 39 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are . 40 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `has_registrations`. 41 | * `inbox_id` (int64): Required - List recipients for the inbox with this ID. 42 | 43 | --- 44 | 45 | ## Create Inbox Recipient 46 | 47 | ``` 48 | $inbox_recipient = new \Files\Model\InboxRecipient(); 49 | $inbox_recipient->create(, [ 50 | 'inbox_id' => 1, 51 | 'recipient' => "johndoe@gmail.com", 52 | 'name' => "John Smith", 53 | 'company' => "Acme Ltd", 54 | 'note' => "Just a note.", 55 | 'share_after_create' => false, 56 | ]); 57 | ``` 58 | 59 | 60 | ### Parameters 61 | 62 | * `inbox_id` (int64): Required - Inbox to share. 63 | * `recipient` (string): Required - Email address to share this inbox with. 64 | * `name` (string): Name of recipient. 65 | * `company` (string): Company of recipient. 66 | * `note` (string): Note to include in email. 67 | * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation. 68 | -------------------------------------------------------------------------------- /docs/Model/InboxRegistration.md: -------------------------------------------------------------------------------- 1 | # InboxRegistration 2 | 3 | ## Example InboxRegistration Object 4 | 5 | ``` 6 | { 7 | "code": "abc123", 8 | "name": "account", 9 | "company": "Action Verb", 10 | "email": "john.doe@files.com", 11 | "ip": "10.1.1.1", 12 | "clickwrap_body": "example", 13 | "form_field_set_id": 1, 14 | "form_field_data": { 15 | "key": "example value" 16 | }, 17 | "inbox_id": 1, 18 | "inbox_recipient_id": 1, 19 | "inbox_title": "example", 20 | "created_at": "2000-01-01T01:00:00Z" 21 | } 22 | ``` 23 | 24 | * `code` (string): Registration cookie code 25 | * `name` (string): Registrant name 26 | * `company` (string): Registrant company name 27 | * `email` (string): Registrant email address 28 | * `ip` (string): Registrant IP Address 29 | * `clickwrap_body` (string): Clickwrap text that was shown to the registrant 30 | * `form_field_set_id` (int64): Id of associated form field set 31 | * `form_field_data` (object): Data for form field set with form field ids as keys and user data as values 32 | * `inbox_id` (int64): Id of associated inbox 33 | * `inbox_recipient_id` (int64): Id of associated inbox recipient 34 | * `inbox_title` (string): Title of associated inbox 35 | * `created_at` (date-time): Registration creation date/time 36 | 37 | --- 38 | 39 | ## List Inbox Registrations 40 | 41 | ``` 42 | $inbox_registration = new \Files\Model\InboxRegistration(); 43 | $inbox_registration->list(, [ 44 | 'folder_behavior_id' => 1, 45 | ]); 46 | ``` 47 | 48 | 49 | ### Parameters 50 | 51 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 52 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 53 | * `folder_behavior_id` (int64): ID of the associated Inbox. 54 | -------------------------------------------------------------------------------- /docs/Model/InboxUpload.md: -------------------------------------------------------------------------------- 1 | # InboxUpload 2 | 3 | ## Example InboxUpload Object 4 | 5 | ``` 6 | { 7 | "inbox_registration": { 8 | "code": "abc123", 9 | "name": "account", 10 | "company": "Action Verb", 11 | "email": "john.doe@files.com", 12 | "ip": "10.1.1.1", 13 | "clickwrap_body": "example", 14 | "form_field_set_id": 1, 15 | "form_field_data": { 16 | "key": "example value" 17 | }, 18 | "inbox_id": 1, 19 | "inbox_recipient_id": 1, 20 | "inbox_title": "example", 21 | "created_at": "2000-01-01T01:00:00Z" 22 | }, 23 | "path": "a/b/test.txt", 24 | "created_at": "2000-01-01T01:00:00Z" 25 | } 26 | ``` 27 | 28 | * `inbox_registration` (InboxRegistration): 29 | * `path` (string): Upload path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 30 | * `created_at` (date-time): Upload date/time 31 | 32 | --- 33 | 34 | ## List Inbox Uploads 35 | 36 | ``` 37 | $inbox_upload = new \Files\Model\InboxUpload(); 38 | $inbox_upload->list 39 | ``` 40 | 41 | 42 | ### Parameters 43 | 44 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 45 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 46 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`. 47 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `folder_behavior_id` or `inbox_registration_id`. Valid field combinations are `[ folder_behavior_id, created_at ]`, `[ inbox_registration_id, created_at ]`, `[ folder_behavior_id, inbox_registration_id ]` or `[ folder_behavior_id, inbox_registration_id, created_at ]`. 48 | * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. 49 | * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. 50 | * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. 51 | * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. 52 | -------------------------------------------------------------------------------- /docs/Model/Invoice.md: -------------------------------------------------------------------------------- 1 | # Invoice 2 | 3 | ## Example Invoice Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "amount": 1.0, 9 | "balance": 1.0, 10 | "created_at": "2000-01-01T01:00:00Z", 11 | "currency": "USD", 12 | "download_uri": "https://url...", 13 | "invoice_line_items": [ 14 | { 15 | "amount": 1.0, 16 | "created_at": "2000-01-01T01:00:00Z", 17 | "description": "Service from 2019-01-01 through 2019-12-31", 18 | "type": "invoice", 19 | "service_end_at": "2000-01-01T01:00:00Z", 20 | "service_start_at": "2000-01-01T01:00:00Z", 21 | "plan": "Premier", 22 | "site": "My site" 23 | } 24 | ], 25 | "method": "paypal", 26 | "payment_line_items": [ 27 | { 28 | "amount": 1.0, 29 | "created_at": "2000-01-01T01:00:00Z", 30 | "invoice_id": 1, 31 | "payment_id": 1 32 | } 33 | ], 34 | "payment_reversed_at": "2000-01-01T01:00:00Z", 35 | "payment_type": "example", 36 | "site_name": "My Site", 37 | "type": "invoice" 38 | } 39 | ``` 40 | 41 | * `id` (int64): Line item Id 42 | * `amount` (double): Line item amount 43 | * `balance` (double): Line item balance 44 | * `created_at` (date-time): Line item created at 45 | * `currency` (string): Line item currency 46 | * `download_uri` (string): Line item download uri 47 | * `invoice_line_items` (array(object)): Associated invoice line items 48 | * `method` (string): Line item payment method 49 | * `payment_line_items` (array(object)): Associated payment line items 50 | * `payment_reversed_at` (date-time): Date/time payment was reversed if applicable 51 | * `payment_type` (string): Type of payment if applicable 52 | * `site_name` (string): Site name this line item is for 53 | * `type` (string): Type of line item, either payment or invoice 54 | 55 | --- 56 | 57 | ## List Invoices 58 | 59 | ``` 60 | $invoice = new \Files\Model\Invoice(); 61 | $invoice->list 62 | ``` 63 | 64 | 65 | ### Parameters 66 | 67 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 68 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 69 | 70 | --- 71 | 72 | ## Show Invoice 73 | 74 | ``` 75 | $invoice = new \Files\Model\Invoice(); 76 | $invoice->find($id); 77 | ``` 78 | 79 | 80 | ### Parameters 81 | 82 | * `id` (int64): Required - Invoice ID. 83 | -------------------------------------------------------------------------------- /docs/Model/InvoiceLineItem.md: -------------------------------------------------------------------------------- 1 | # InvoiceLineItem 2 | 3 | ## Example InvoiceLineItem Object 4 | 5 | ``` 6 | { 7 | "amount": 1.0, 8 | "created_at": "2000-01-01T01:00:00Z", 9 | "description": "Service from 2019-01-01 through 2019-12-31", 10 | "type": "invoice", 11 | "service_end_at": "2000-01-01T01:00:00Z", 12 | "service_start_at": "2000-01-01T01:00:00Z", 13 | "plan": "Premier", 14 | "site": "My site" 15 | } 16 | ``` 17 | 18 | * `amount` (double): Invoice line item amount 19 | * `created_at` (date-time): Invoice line item created at date/time 20 | * `description` (string): Invoice line item description 21 | * `type` (string): Invoice line item type 22 | * `service_end_at` (date-time): Invoice line item service end date/time 23 | * `service_start_at` (date-time): Invoice line item service start date/time 24 | * `plan` (string): Plan name 25 | * `site` (string): Site name 26 | -------------------------------------------------------------------------------- /docs/Model/Lock.md: -------------------------------------------------------------------------------- 1 | # Lock 2 | 3 | ## Example Lock Object 4 | 5 | ``` 6 | { 7 | "path": "locked_file", 8 | "timeout": 1, 9 | "depth": "infinity", 10 | "recursive": true, 11 | "owner": "user", 12 | "scope": "shared", 13 | "exclusive": true, 14 | "token": "17c54824e9931a4688ca032d03f6663c", 15 | "type": "write", 16 | "allow_access_by_any_user": true, 17 | "user_id": 1, 18 | "username": "" 19 | } 20 | ``` 21 | 22 | * `path` (string): Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 23 | * `timeout` (int64): Lock timeout in seconds 24 | * `depth` (string): 25 | * `recursive` (boolean): Does lock apply to subfolders? 26 | * `owner` (string): Owner of the lock. This can be any arbitrary string. 27 | * `scope` (string): 28 | * `exclusive` (boolean): Is lock exclusive? 29 | * `token` (string): Lock token. Use to release lock. 30 | * `type` (string): 31 | * `allow_access_by_any_user` (boolean): Can lock be modified by users other than its creator? 32 | * `user_id` (int64): Lock creator user ID 33 | * `username` (string): Lock creator username 34 | 35 | --- 36 | 37 | ## List Locks by Path 38 | 39 | ``` 40 | $lock = new \Files\Model\Lock(); 41 | $lock->listFor($path, [ 42 | 'include_children' => false, 43 | ]); 44 | ``` 45 | 46 | 47 | ### Parameters 48 | 49 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 50 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 51 | * `path` (string): Required - Path to operate on. 52 | * `include_children` (boolean): Include locks from children objects? 53 | 54 | --- 55 | 56 | ## Create Lock 57 | 58 | ``` 59 | $lock = new \Files\Model\Lock(); 60 | $lock->create($path, [ 61 | 'allow_access_by_any_user' => false, 62 | 'exclusive' => false, 63 | 'recursive' => true, 64 | 'timeout' => 1, 65 | ]); 66 | ``` 67 | 68 | 69 | ### Parameters 70 | 71 | * `path` (string): Required - Path 72 | * `allow_access_by_any_user` (boolean): Can lock be modified by users other than its creator? 73 | * `exclusive` (boolean): Is lock exclusive? 74 | * `recursive` (boolean): Does lock apply to subfolders? 75 | * `timeout` (int64): Lock timeout in seconds 76 | 77 | --- 78 | 79 | ## Delete Lock 80 | 81 | ``` 82 | $lock = current(\Files\Model\Lock::all()); 83 | 84 | $lock->delete([ 85 | 'token' => "token", 86 | ]); 87 | ``` 88 | 89 | ### Parameters 90 | 91 | * `path` (string): Required - Path 92 | * `token` (string): Required - Lock token 93 | 94 | -------------------------------------------------------------------------------- /docs/Model/MessageComment.md: -------------------------------------------------------------------------------- 1 | # MessageComment 2 | 3 | ## Example MessageComment Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "body": "What a great idea, thank you!", 9 | "reactions": [ 10 | { 11 | "id": 1, 12 | "emoji": "👍" 13 | } 14 | ] 15 | } 16 | ``` 17 | 18 | * `id` (int64): Message Comment ID 19 | * `body` (string): Comment body. 20 | * `reactions` (array(object)): Reactions to this comment. 21 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 22 | 23 | --- 24 | 25 | ## List Message Comments 26 | 27 | ``` 28 | $message_comment = new \Files\Model\MessageComment(); 29 | $message_comment->list(, [ 30 | 'user_id' => 1, 31 | 'message_id' => 1, 32 | ]); 33 | ``` 34 | 35 | 36 | ### Parameters 37 | 38 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 39 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 40 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 41 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are . 42 | * `message_id` (int64): Required - Message comment to return comments for. 43 | 44 | --- 45 | 46 | ## Show Message Comment 47 | 48 | ``` 49 | $message_comment = new \Files\Model\MessageComment(); 50 | $message_comment->find($id); 51 | ``` 52 | 53 | 54 | ### Parameters 55 | 56 | * `id` (int64): Required - Message Comment ID. 57 | 58 | --- 59 | 60 | ## Create Message Comment 61 | 62 | ``` 63 | $message_comment = new \Files\Model\MessageComment(); 64 | $message_comment->create(, [ 65 | 'user_id' => 1, 66 | 'body' => "body", 67 | ]); 68 | ``` 69 | 70 | 71 | ### Parameters 72 | 73 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 74 | * `body` (string): Required - Comment body. 75 | 76 | --- 77 | 78 | ## Update Message Comment 79 | 80 | ``` 81 | $message_comment = \Files\Model\MessageComment::find($id); 82 | 83 | $message_comment->update([ 84 | 'body' => "body", 85 | ]); 86 | ``` 87 | 88 | ### Parameters 89 | 90 | * `id` (int64): Required - Message Comment ID. 91 | * `body` (string): Required - Comment body. 92 | 93 | ### Example Response 94 | 95 | ```json 96 | { 97 | "id": 1, 98 | "body": "What a great idea, thank you!", 99 | "reactions": [ 100 | { 101 | "id": 1, 102 | "emoji": "👍" 103 | } 104 | ] 105 | } 106 | ``` 107 | 108 | --- 109 | 110 | ## Delete Message Comment 111 | 112 | ``` 113 | $message_comment = \Files\Model\MessageComment::find($id); 114 | 115 | $message_comment->delete(); 116 | ``` 117 | 118 | ### Parameters 119 | 120 | * `id` (int64): Required - Message Comment ID. 121 | 122 | -------------------------------------------------------------------------------- /docs/Model/MessageCommentReaction.md: -------------------------------------------------------------------------------- 1 | # MessageCommentReaction 2 | 3 | ## Example MessageCommentReaction Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "emoji": "👍" 9 | } 10 | ``` 11 | 12 | * `id` (int64): Reaction ID 13 | * `emoji` (string): Emoji used in the reaction. 14 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 15 | 16 | --- 17 | 18 | ## List Message Comment Reactions 19 | 20 | ``` 21 | $message_comment_reaction = new \Files\Model\MessageCommentReaction(); 22 | $message_comment_reaction->list(, [ 23 | 'user_id' => 1, 24 | 'message_comment_id' => 1, 25 | ]); 26 | ``` 27 | 28 | 29 | ### Parameters 30 | 31 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 32 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 33 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 34 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are . 35 | * `message_comment_id` (int64): Required - Message comment to return reactions for. 36 | 37 | --- 38 | 39 | ## Show Message Comment Reaction 40 | 41 | ``` 42 | $message_comment_reaction = new \Files\Model\MessageCommentReaction(); 43 | $message_comment_reaction->find($id); 44 | ``` 45 | 46 | 47 | ### Parameters 48 | 49 | * `id` (int64): Required - Message Comment Reaction ID. 50 | 51 | --- 52 | 53 | ## Create Message Comment Reaction 54 | 55 | ``` 56 | $message_comment_reaction = new \Files\Model\MessageCommentReaction(); 57 | $message_comment_reaction->create(, [ 58 | 'user_id' => 1, 59 | 'emoji' => "emoji", 60 | ]); 61 | ``` 62 | 63 | 64 | ### Parameters 65 | 66 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 67 | * `emoji` (string): Required - Emoji to react with. 68 | 69 | --- 70 | 71 | ## Delete Message Comment Reaction 72 | 73 | ``` 74 | $message_comment_reaction = \Files\Model\MessageCommentReaction::find($id); 75 | 76 | $message_comment_reaction->delete(); 77 | ``` 78 | 79 | ### Parameters 80 | 81 | * `id` (int64): Required - Message Comment Reaction ID. 82 | 83 | -------------------------------------------------------------------------------- /docs/Model/MessageReaction.md: -------------------------------------------------------------------------------- 1 | # MessageReaction 2 | 3 | ## Example MessageReaction Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "emoji": "👍" 9 | } 10 | ``` 11 | 12 | * `id` (int64): Reaction ID 13 | * `emoji` (string): Emoji used in the reaction. 14 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 15 | 16 | --- 17 | 18 | ## List Message Reactions 19 | 20 | ``` 21 | $message_reaction = new \Files\Model\MessageReaction(); 22 | $message_reaction->list(, [ 23 | 'user_id' => 1, 24 | 'message_id' => 1, 25 | ]); 26 | ``` 27 | 28 | 29 | ### Parameters 30 | 31 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 32 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 33 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 34 | * `message_id` (int64): Required - Message to return reactions for. 35 | 36 | --- 37 | 38 | ## Show Message Reaction 39 | 40 | ``` 41 | $message_reaction = new \Files\Model\MessageReaction(); 42 | $message_reaction->find($id); 43 | ``` 44 | 45 | 46 | ### Parameters 47 | 48 | * `id` (int64): Required - Message Reaction ID. 49 | 50 | --- 51 | 52 | ## Create Message Reaction 53 | 54 | ``` 55 | $message_reaction = new \Files\Model\MessageReaction(); 56 | $message_reaction->create(, [ 57 | 'user_id' => 1, 58 | 'emoji' => "emoji", 59 | ]); 60 | ``` 61 | 62 | 63 | ### Parameters 64 | 65 | * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user. 66 | * `emoji` (string): Required - Emoji to react with. 67 | 68 | --- 69 | 70 | ## Delete Message Reaction 71 | 72 | ``` 73 | $message_reaction = \Files\Model\MessageReaction::find($id); 74 | 75 | $message_reaction->delete(); 76 | ``` 77 | 78 | ### Parameters 79 | 80 | * `id` (int64): Required - Message Reaction ID. 81 | 82 | -------------------------------------------------------------------------------- /docs/Model/Payment.md: -------------------------------------------------------------------------------- 1 | # Payment 2 | 3 | ## Example Payment Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "amount": 1.0, 9 | "balance": 1.0, 10 | "created_at": "2000-01-01T01:00:00Z", 11 | "currency": "USD", 12 | "download_uri": "https://url...", 13 | "invoice_line_items": [ 14 | { 15 | "amount": 1.0, 16 | "created_at": "2000-01-01T01:00:00Z", 17 | "description": "Service from 2019-01-01 through 2019-12-31", 18 | "type": "invoice", 19 | "service_end_at": "2000-01-01T01:00:00Z", 20 | "service_start_at": "2000-01-01T01:00:00Z", 21 | "plan": "Premier", 22 | "site": "My site" 23 | } 24 | ], 25 | "method": "paypal", 26 | "payment_line_items": [ 27 | { 28 | "amount": 1.0, 29 | "created_at": "2000-01-01T01:00:00Z", 30 | "invoice_id": 1, 31 | "payment_id": 1 32 | } 33 | ], 34 | "payment_reversed_at": "2000-01-01T01:00:00Z", 35 | "payment_type": "example", 36 | "site_name": "My Site", 37 | "type": "invoice" 38 | } 39 | ``` 40 | 41 | * `id` (int64): Line item Id 42 | * `amount` (double): Line item amount 43 | * `balance` (double): Line item balance 44 | * `created_at` (date-time): Line item created at 45 | * `currency` (string): Line item currency 46 | * `download_uri` (string): Line item download uri 47 | * `invoice_line_items` (array(object)): Associated invoice line items 48 | * `method` (string): Line item payment method 49 | * `payment_line_items` (array(object)): Associated payment line items 50 | * `payment_reversed_at` (date-time): Date/time payment was reversed if applicable 51 | * `payment_type` (string): Type of payment if applicable 52 | * `site_name` (string): Site name this line item is for 53 | * `type` (string): Type of line item, either payment or invoice 54 | 55 | --- 56 | 57 | ## List Payments 58 | 59 | ``` 60 | $payment = new \Files\Model\Payment(); 61 | $payment->list 62 | ``` 63 | 64 | 65 | ### Parameters 66 | 67 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 68 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 69 | 70 | --- 71 | 72 | ## Show Payment 73 | 74 | ``` 75 | $payment = new \Files\Model\Payment(); 76 | $payment->find($id); 77 | ``` 78 | 79 | 80 | ### Parameters 81 | 82 | * `id` (int64): Required - Payment ID. 83 | -------------------------------------------------------------------------------- /docs/Model/PaymentLineItem.md: -------------------------------------------------------------------------------- 1 | # PaymentLineItem 2 | 3 | ## Example PaymentLineItem Object 4 | 5 | ``` 6 | { 7 | "amount": 1.0, 8 | "created_at": "2000-01-01T01:00:00Z", 9 | "invoice_id": 1, 10 | "payment_id": 1 11 | } 12 | ``` 13 | 14 | * `amount` (double): Payment line item amount 15 | * `created_at` (date-time): Payment line item created at date/time 16 | * `invoice_id` (int64): Invoice ID 17 | * `payment_id` (int64): Payment ID 18 | -------------------------------------------------------------------------------- /docs/Model/Preview.md: -------------------------------------------------------------------------------- 1 | # Preview 2 | 3 | ## Example Preview Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "status": "complete", 9 | "download_uri": "https://mysite.files.com/...", 10 | "type": "image", 11 | "size": "large" 12 | } 13 | ``` 14 | 15 | * `id` (int64): Preview ID 16 | * `status` (string): Preview status. Can be invalid, not_generated, generating, complete, or file_too_large 17 | * `download_uri` (string): Link to download preview 18 | * `type` (string): Preview type. Can be image, pdf, pdf_native, video, or audio 19 | * `size` (string): Preview size 20 | -------------------------------------------------------------------------------- /docs/Model/Priority.md: -------------------------------------------------------------------------------- 1 | # Priority 2 | 3 | ## Example Priority Object 4 | 5 | ``` 6 | { 7 | "path": "foo/bar", 8 | "color": "pink" 9 | } 10 | ``` 11 | 12 | * `path` (string): The path corresponding to the priority color. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 13 | * `color` (string): The priority color 14 | 15 | --- 16 | 17 | ## List Priorities 18 | 19 | ``` 20 | $priority = new \Files\Model\Priority(); 21 | $priority->list($path); 22 | ``` 23 | 24 | 25 | ### Parameters 26 | 27 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 28 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 29 | * `path` (string): Required - The path to query for priorities 30 | -------------------------------------------------------------------------------- /docs/Model/Project.md: -------------------------------------------------------------------------------- 1 | # Project 2 | 3 | ## Example Project Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "global_access": "none" 9 | } 10 | ``` 11 | 12 | * `id` (int64): Project ID 13 | * `global_access` (string): Global access settings 14 | 15 | --- 16 | 17 | ## List Projects 18 | 19 | ``` 20 | $project = new \Files\Model\Project(); 21 | $project->list 22 | ``` 23 | 24 | 25 | ### Parameters 26 | 27 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 28 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 29 | 30 | --- 31 | 32 | ## Show Project 33 | 34 | ``` 35 | $project = new \Files\Model\Project(); 36 | $project->find($id); 37 | ``` 38 | 39 | 40 | ### Parameters 41 | 42 | * `id` (int64): Required - Project ID. 43 | 44 | --- 45 | 46 | ## Create Project 47 | 48 | ``` 49 | $project = new \Files\Model\Project(); 50 | $project->create(, [ 51 | 'global_access' => "global_access", 52 | ]); 53 | ``` 54 | 55 | 56 | ### Parameters 57 | 58 | * `global_access` (string): Required - Global permissions. Can be: `none`, `anyone_with_read`, `anyone_with_full`. 59 | 60 | --- 61 | 62 | ## Update Project 63 | 64 | ``` 65 | $project = \Files\Model\Project::find($id); 66 | 67 | $project->update([ 68 | 'global_access' => "global_access", 69 | ]); 70 | ``` 71 | 72 | ### Parameters 73 | 74 | * `id` (int64): Required - Project ID. 75 | * `global_access` (string): Required - Global permissions. Can be: `none`, `anyone_with_read`, `anyone_with_full`. 76 | 77 | ### Example Response 78 | 79 | ```json 80 | { 81 | "id": 1, 82 | "global_access": "none" 83 | } 84 | ``` 85 | 86 | --- 87 | 88 | ## Delete Project 89 | 90 | ``` 91 | $project = \Files\Model\Project::find($id); 92 | 93 | $project->delete(); 94 | ``` 95 | 96 | ### Parameters 97 | 98 | * `id` (int64): Required - Project ID. 99 | 100 | -------------------------------------------------------------------------------- /docs/Model/PublicIpAddress.md: -------------------------------------------------------------------------------- 1 | # PublicIpAddress 2 | 3 | ## Example PublicIpAddress Object 4 | 5 | ``` 6 | { 7 | "ip_address": "1.1.1.1", 8 | "server_name": "server-1", 9 | "ftp_enabled": true, 10 | "sftp_enabled": true 11 | } 12 | ``` 13 | 14 | * `ip_address` (string): The public IP address. 15 | * `server_name` (string): The name of the frontend server. 16 | * `ftp_enabled` (boolean): 17 | * `sftp_enabled` (boolean): 18 | -------------------------------------------------------------------------------- /docs/Model/RemoteBandwidthSnapshot.md: -------------------------------------------------------------------------------- 1 | # RemoteBandwidthSnapshot 2 | 3 | ## Example RemoteBandwidthSnapshot Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "sync_bytes_received": 1.0, 9 | "sync_bytes_sent": 1.0, 10 | "logged_at": "2000-01-01T01:00:00Z", 11 | "remote_server_id": 1 12 | } 13 | ``` 14 | 15 | * `id` (int64): Site bandwidth ID 16 | * `sync_bytes_received` (double): Site sync bandwidth report bytes received 17 | * `sync_bytes_sent` (double): Site sync bandwidth report bytes sent 18 | * `logged_at` (date-time): Time the site bandwidth report was logged 19 | * `remote_server_id` (int64): ID of related Remote Server 20 | 21 | --- 22 | 23 | ## List Remote Bandwidth Snapshots 24 | 25 | ``` 26 | $remote_bandwidth_snapshot = new \Files\Model\RemoteBandwidthSnapshot(); 27 | $remote_bandwidth_snapshot->list 28 | ``` 29 | 30 | 31 | ### Parameters 32 | 33 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 34 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 35 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `logged_at`. 36 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `logged_at`. 37 | * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `logged_at`. 38 | * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `logged_at`. 39 | * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `logged_at`. 40 | * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `logged_at`. 41 | -------------------------------------------------------------------------------- /docs/Model/RemoteServerConfigurationFile.md: -------------------------------------------------------------------------------- 1 | # RemoteServerConfigurationFile 2 | 3 | ## Example RemoteServerConfigurationFile Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "permission_set": "example", 9 | "private_key": "example", 10 | "subdomain": "example", 11 | "root": "C:\\Users\\", 12 | "follow_links": true, 13 | "prefer_protocol": "example", 14 | "dns": "example", 15 | "proxy_all_outbound": true, 16 | "endpoint_override": "example", 17 | "log_file": "example", 18 | "log_level": "example", 19 | "log_rotate_num": 1, 20 | "log_rotate_size": 1, 21 | "override_max_concurrent_jobs": 1, 22 | "graceful_shutdown_timeout": 1, 23 | "transfer_rate_limit": "example", 24 | "api_token": "example", 25 | "port": 1, 26 | "hostname": "example", 27 | "public_key": "example", 28 | "status": "example", 29 | "server_host_key": "example", 30 | "config_version": "example" 31 | } 32 | ``` 33 | 34 | * `id` (int64): The remote server ID of the agent 35 | * `permission_set` (string): The permission set for the agent ['read_write', 'read_only', 'write_only'] 36 | * `private_key` (string): The private key for the agent 37 | * `subdomain` (string): Files.com subdomain site name 38 | * `root` (string): The root directory for the agent 39 | * `follow_links` (boolean): Follow symlinks when traversing directories 40 | * `prefer_protocol` (string): Preferred network protocol ['udp', 'tcp'] (default udp) 41 | * `dns` (string): DNS lookup method ['auto','doh','system'] (default auto) 42 | * `proxy_all_outbound` (boolean): Proxy all outbound traffic through files.com proxy server 43 | * `endpoint_override` (string): Custom site endpoint URL 44 | * `log_file` (string): Log file name and location 45 | * `log_level` (string): Log level for the agent logs ['debug', 'info', 'warn', 'error', 'fatal'] (default info) 46 | * `log_rotate_num` (int64): Log route for agent logs. (default 5) 47 | * `log_rotate_size` (int64): Log route size in MB for agent logs. (default 20) 48 | * `override_max_concurrent_jobs` (int64): Maximum number of concurrent jobs (default 500) 49 | * `graceful_shutdown_timeout` (int64): Graceful shutdown timeout in seconds (default 15) 50 | * `transfer_rate_limit` (string): File transfer (upload/download) rate limit 51 | `-`, with the given periods: 52 | * 'S': second 53 | * 'M': minute 54 | * 'H': hour 55 | * 'D': day 56 | Examples: 57 | * 5 requests/second: '5-S' 58 | * 10 requests/minute: '10-M' 59 | * 1000 requests/hour: '1000-H' 60 | * 2000 requests/day: '2000-D' 61 | * `api_token` (string): Files Agent API Token 62 | * `port` (int64): Incoming port for files agent connections 63 | * `hostname` (string): 64 | * `public_key` (string): public key 65 | * `status` (string): either running or shutdown 66 | * `server_host_key` (string): 67 | * `config_version` (string): agent config version 68 | -------------------------------------------------------------------------------- /docs/Model/Session.md: -------------------------------------------------------------------------------- 1 | # Session 2 | 3 | ## Example Session Object 4 | 5 | ``` 6 | { 7 | "id": "60525f92e859c4c3d74cb02fd176b1525901b525", 8 | "language": "en", 9 | "read_only": true, 10 | "sftp_insecure_ciphers": true 11 | } 12 | ``` 13 | 14 | * `id` (string): Session ID 15 | * `language` (string): Session language 16 | * `read_only` (boolean): Is this session read only? 17 | * `sftp_insecure_ciphers` (boolean): Are insecure SFTP ciphers allowed for this user? (If this is set to true, the site administrator has signaled that it is ok to use less secure SSH ciphers for this user.) 18 | * `username` (string): Username to sign in as 19 | * `password` (string): Password for sign in 20 | * `otp` (string): If this user has a 2FA device, provide its OTP or code here. 21 | * `partial_session_id` (string): Identifier for a partially-completed login 22 | 23 | --- 24 | 25 | ## Create user session (log in) 26 | 27 | ``` 28 | $session = new \Files\Model\Session(); 29 | $session->create(, [ 30 | 'username' => "username", 31 | 'password' => "password", 32 | 'otp' => "123456", 33 | ]); 34 | ``` 35 | 36 | 37 | ### Parameters 38 | 39 | * `username` (string): Username to sign in as 40 | * `password` (string): Password for sign in 41 | * `otp` (string): If this user has a 2FA device, provide its OTP or code here. 42 | * `partial_session_id` (string): Identifier for a partially-completed login 43 | 44 | --- 45 | 46 | ## Delete user session (log out) 47 | 48 | ``` 49 | $session = new \Files\Model\Session(); 50 | $session->delete 51 | ``` 52 | 53 | -------------------------------------------------------------------------------- /docs/Model/SettingsChange.md: -------------------------------------------------------------------------------- 1 | # SettingsChange 2 | 3 | ## Example SettingsChange Object 4 | 5 | ``` 6 | { 7 | "api_key_id": 1, 8 | "changes": [ 9 | "example" 10 | ], 11 | "created_at": "2000-01-01T01:00:00Z", 12 | "user_id": 1, 13 | "user_is_files_support": true, 14 | "user_is_from_parent_site": true, 15 | "username": "some_user" 16 | } 17 | ``` 18 | 19 | * `api_key_id` (int64): The API key id responsible for this change. 20 | * `changes` (array(string)): Markdown-formatted change messages. 21 | * `created_at` (date-time): The time this change was made. 22 | * `user_id` (int64): The user id responsible for this change. 23 | * `user_is_files_support` (boolean): true if this change was performed by Files.com support. 24 | * `user_is_from_parent_site` (boolean): true if this change was performed by a user on a parent site. 25 | * `username` (string): The username of the user responsible for this change. 26 | 27 | --- 28 | 29 | ## List Settings Changes 30 | 31 | ``` 32 | $settings_change = new \Files\Model\SettingsChange(); 33 | $settings_change->list 34 | ``` 35 | 36 | 37 | ### Parameters 38 | 39 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 40 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 41 | * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`, `api_key_id` or `user_id`. 42 | * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `api_key_id` and `user_id`. 43 | -------------------------------------------------------------------------------- /docs/Model/SftpHostKey.md: -------------------------------------------------------------------------------- 1 | # SftpHostKey 2 | 3 | ## Example SftpHostKey Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "name": "My Key", 9 | "fingerprint_md5": "12:7e:f8:61:78:a4:b2:c2:ee:12:51:92:25:a7:42:cc", 10 | "fingerprint_sha256": "SHA256:5ANRkDpXWA+PgOquzZAG9RtQ1Bt8KXYAH2hecr7LQk8" 11 | } 12 | ``` 13 | 14 | * `id` (int64): SFTP Host Key ID 15 | * `name` (string): The friendly name of this SFTP Host Key. 16 | * `fingerprint_md5` (string): MD5 Fingerprint of the public key 17 | * `fingerprint_sha256` (string): SHA256 Fingerprint of the public key 18 | * `private_key` (string): The private key data. 19 | 20 | --- 21 | 22 | ## List SFTP Host Keys 23 | 24 | ``` 25 | $sftp_host_key = new \Files\Model\SftpHostKey(); 26 | $sftp_host_key->list 27 | ``` 28 | 29 | 30 | ### Parameters 31 | 32 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 33 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 34 | 35 | --- 36 | 37 | ## Show SFTP Host Key 38 | 39 | ``` 40 | $sftp_host_key = new \Files\Model\SftpHostKey(); 41 | $sftp_host_key->find($id); 42 | ``` 43 | 44 | 45 | ### Parameters 46 | 47 | * `id` (int64): Required - Sftp Host Key ID. 48 | 49 | --- 50 | 51 | ## Create SFTP Host Key 52 | 53 | ``` 54 | $sftp_host_key = new \Files\Model\SftpHostKey(); 55 | $sftp_host_key->create(, [ 56 | 'name' => "My Key", 57 | ]); 58 | ``` 59 | 60 | 61 | ### Parameters 62 | 63 | * `name` (string): The friendly name of this SFTP Host Key. 64 | * `private_key` (string): The private key data. 65 | 66 | --- 67 | 68 | ## Update SFTP Host Key 69 | 70 | ``` 71 | $sftp_host_key = \Files\Model\SftpHostKey::find($id); 72 | 73 | $sftp_host_key->update([ 74 | 'name' => "My Key", 75 | ]); 76 | ``` 77 | 78 | ### Parameters 79 | 80 | * `id` (int64): Required - Sftp Host Key ID. 81 | * `name` (string): The friendly name of this SFTP Host Key. 82 | * `private_key` (string): The private key data. 83 | 84 | ### Example Response 85 | 86 | ```json 87 | { 88 | "id": 1, 89 | "name": "My Key", 90 | "fingerprint_md5": "12:7e:f8:61:78:a4:b2:c2:ee:12:51:92:25:a7:42:cc", 91 | "fingerprint_sha256": "SHA256:5ANRkDpXWA+PgOquzZAG9RtQ1Bt8KXYAH2hecr7LQk8" 92 | } 93 | ``` 94 | 95 | --- 96 | 97 | ## Delete SFTP Host Key 98 | 99 | ``` 100 | $sftp_host_key = \Files\Model\SftpHostKey::find($id); 101 | 102 | $sftp_host_key->delete(); 103 | ``` 104 | 105 | ### Parameters 106 | 107 | * `id` (int64): Required - Sftp Host Key ID. 108 | 109 | -------------------------------------------------------------------------------- /docs/Model/ShareGroupMember.md: -------------------------------------------------------------------------------- 1 | # ShareGroupMember 2 | 3 | ## Example ShareGroupMember Object 4 | 5 | ``` 6 | { 7 | "name": "John Doe", 8 | "company": "Acme Ltd", 9 | "email": "johndoe@gmail.com" 10 | } 11 | ``` 12 | 13 | * `name` (string): Name of the share group member 14 | * `company` (string): Company of the share group member 15 | * `email` (string): Email of the share group member 16 | -------------------------------------------------------------------------------- /docs/Model/Status.md: -------------------------------------------------------------------------------- 1 | # Status 2 | 3 | ## Example Status Object 4 | 5 | ``` 6 | { 7 | "code": 200, 8 | "message": "example", 9 | "status": "", 10 | "data": "example", 11 | "errors": [ 12 | { 13 | "fields": [ 14 | 15 | ], 16 | "messages": [ 17 | 18 | ] 19 | } 20 | ], 21 | "clickwrap_id": 1, 22 | "clickwrap_body": "example" 23 | } 24 | ``` 25 | 26 | * `code` (int64): Status HTTP code 27 | * `message` (string): Error message 28 | * `status` (string): Status message 29 | * `data` (Auto): Additional data 30 | * `errors` (array(object)): A list of api errors 31 | * `clickwrap_id` (int64): Required Clickwrap id 32 | * `clickwrap_body` (string): Required Clickwrap body 33 | -------------------------------------------------------------------------------- /docs/Model/Style.md: -------------------------------------------------------------------------------- 1 | # Style 2 | 3 | ## Example Style Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "path": "example", 9 | "logo": "https://mysite.files.com/...", 10 | "thumbnail": { 11 | "name": "My logo", 12 | "uri": "https://mysite.files.com/.../my_image.png" 13 | } 14 | } 15 | ``` 16 | 17 | * `id` (int64): Style ID 18 | * `path` (string): Folder path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 19 | * `logo` (Image): Logo 20 | * `thumbnail` (Image): Logo thumbnail 21 | * `file` (file): Logo for custom branding. 22 | 23 | --- 24 | 25 | ## Show Style 26 | 27 | ``` 28 | $style = new \Files\Model\Style(); 29 | $style->find($path); 30 | ``` 31 | 32 | 33 | ### Parameters 34 | 35 | * `path` (string): Required - Style path. 36 | 37 | --- 38 | 39 | ## Update Style 40 | 41 | ``` 42 | $style = \Files\Model\Style::find($path); 43 | 44 | $style->update([ 45 | 'file' => "file", 46 | ]); 47 | ``` 48 | 49 | ### Parameters 50 | 51 | * `path` (string): Required - Style path. 52 | * `file` (file): Required - Logo for custom branding. 53 | 54 | ### Example Response 55 | 56 | ```json 57 | { 58 | "id": 1, 59 | "path": "example", 60 | "logo": "https://mysite.files.com/...", 61 | "thumbnail": { 62 | "name": "My logo", 63 | "uri": "https://mysite.files.com/.../my_image.png" 64 | } 65 | } 66 | ``` 67 | 68 | --- 69 | 70 | ## Delete Style 71 | 72 | ``` 73 | $style = \Files\Model\Style::find($path); 74 | 75 | $style->delete(); 76 | ``` 77 | 78 | ### Parameters 79 | 80 | * `path` (string): Required - Style path. 81 | 82 | -------------------------------------------------------------------------------- /docs/Model/UsageByTopLevelDir.md: -------------------------------------------------------------------------------- 1 | # UsageByTopLevelDir 2 | 3 | ## Example UsageByTopLevelDir Object 4 | 5 | ``` 6 | { 7 | "dir": "", 8 | "size": 1, 9 | "count": 1 10 | } 11 | ``` 12 | 13 | * `dir` (string): Directory name 14 | * `size` (int64): Usage 15 | * `count` (int64): File count 16 | -------------------------------------------------------------------------------- /docs/Model/UsageSnapshot.md: -------------------------------------------------------------------------------- 1 | # UsageSnapshot 2 | 3 | ## Example UsageSnapshot Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "start_at": "2000-01-01T01:00:00Z", 9 | "end_at": "2000-01-01T01:00:00Z", 10 | "high_water_user_count": 1, 11 | "current_storage": 1.0, 12 | "high_water_storage": 1.0, 13 | "root_storage": 1.0, 14 | "deleted_files_counted_in_minimum": 1.0, 15 | "deleted_files_storage": 1.0, 16 | "total_billable_usage": 1.0, 17 | "total_billable_transfer_usage": 1.0, 18 | "bytes_sent": 1.0, 19 | "sync_bytes_received": 1.0, 20 | "sync_bytes_sent": 1.0, 21 | "usage_by_top_level_dir": [ 22 | { 23 | "dir": "dir", 24 | "size": 100, 25 | "count": 10 26 | } 27 | ] 28 | } 29 | ``` 30 | 31 | * `id` (int64): Usage snapshot ID 32 | * `start_at` (date-time): Usage snapshot start date/time 33 | * `end_at` (date-time): Usage snapshot end date/time 34 | * `high_water_user_count` (int64): Highest user count number in time period 35 | * `current_storage` (double): Current total Storage Usage GB as of end date (not necessarily high water mark, which is used for billing) 36 | * `high_water_storage` (double): Highest Storage Usage GB recorded in time period (used for billing) 37 | * `root_storage` (double): Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing) 38 | * `deleted_files_counted_in_minimum` (double): Storage Usage for files that are deleted but uploaded within last 30 days as of end date (not necessarily high water mark, which is used for billing) 39 | * `deleted_files_storage` (double): Storage Usage for files that are deleted but retained as backups as of end date (not necessarily high water mark, which is used for billing) 40 | * `total_billable_usage` (double): Storage + Transfer Usage - Total Billable amount 41 | * `total_billable_transfer_usage` (double): Transfer usage for period - Total Billable amount 42 | * `bytes_sent` (double): Transfer Usage for period - Outbound GB from Files Native Storage 43 | * `sync_bytes_received` (double): Transfer Usage for period - Inbound GB to Remote Servers (Sync/Mount) 44 | * `sync_bytes_sent` (double): Transfer Usage for period - Outbound GB from Remote Servers (Sync/Mount) 45 | * `usage_by_top_level_dir` (array(object)): Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing) 46 | 47 | --- 48 | 49 | ## List Usage Snapshots 50 | 51 | ``` 52 | $usage_snapshot = new \Files\Model\UsageSnapshot(); 53 | $usage_snapshot->list 54 | ``` 55 | 56 | 57 | ### Parameters 58 | 59 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 60 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 61 | -------------------------------------------------------------------------------- /docs/Model/UserCipherUse.md: -------------------------------------------------------------------------------- 1 | # UserCipherUse 2 | 3 | ## Example UserCipherUse Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "protocol_cipher": "TLSv1.2; ECDHE-RSA-AES256-GCM-SHA384", 9 | "created_at": "2000-01-01T01:00:00Z", 10 | "insecure": true, 11 | "interface": "restapi", 12 | "updated_at": "2000-01-01T01:00:00Z", 13 | "user_id": 1 14 | } 15 | ``` 16 | 17 | * `id` (int64): UserCipherUse ID 18 | * `protocol_cipher` (string): The protocol and cipher employed 19 | * `created_at` (date-time): The earliest recorded use of this combination of interface and protocol and cipher (for this user) 20 | * `insecure` (boolean): Is this cipher considered insecure? 21 | * `interface` (string): The interface accessed 22 | * `updated_at` (date-time): The most recent use of this combination of interface and protocol and cipher (for this user) 23 | * `user_id` (int64): ID of the user who performed this access 24 | 25 | --- 26 | 27 | ## List User Cipher Uses 28 | 29 | ``` 30 | $user_cipher_use = new \Files\Model\UserCipherUse(); 31 | $user_cipher_use->list(, [ 32 | 'user_id' => 1, 33 | ]); 34 | ``` 35 | 36 | 37 | ### Parameters 38 | 39 | * `user_id` (int64): User ID. If provided, will return uses for this user. 40 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 41 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 42 | -------------------------------------------------------------------------------- /docs/Model/UserRequest.md: -------------------------------------------------------------------------------- 1 | # UserRequest 2 | 3 | ## Example UserRequest Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "name": "John Doe", 9 | "email": "john.doe@files.com", 10 | "details": "Changed Departments", 11 | "company": "Acme Inc." 12 | } 13 | ``` 14 | 15 | * `id` (int64): ID 16 | * `name` (string): User's full name 17 | * `email` (email): User email address 18 | * `details` (string): Details of the user's request 19 | * `company` (string): User's company name 20 | 21 | --- 22 | 23 | ## List User Requests 24 | 25 | ``` 26 | $user_request = new \Files\Model\UserRequest(); 27 | $user_request->list 28 | ``` 29 | 30 | 31 | ### Parameters 32 | 33 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 34 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 35 | 36 | --- 37 | 38 | ## Show User Request 39 | 40 | ``` 41 | $user_request = new \Files\Model\UserRequest(); 42 | $user_request->find($id); 43 | ``` 44 | 45 | 46 | ### Parameters 47 | 48 | * `id` (int64): Required - User Request ID. 49 | 50 | --- 51 | 52 | ## Create User Request 53 | 54 | ``` 55 | $user_request = new \Files\Model\UserRequest(); 56 | $user_request->create(, [ 57 | 'name' => "name", 58 | 'email' => "email", 59 | 'details' => "details", 60 | 'company' => "Acme Inc.", 61 | ]); 62 | ``` 63 | 64 | 65 | ### Parameters 66 | 67 | * `name` (string): Required - Name of user requested 68 | * `email` (string): Required - Email of user requested 69 | * `details` (string): Required - Details of the user request 70 | * `company` (string): Company of the user requested 71 | 72 | --- 73 | 74 | ## Delete User Request 75 | 76 | ``` 77 | $user_request = \Files\Model\UserRequest::find($id); 78 | 79 | $user_request->delete(); 80 | ``` 81 | 82 | ### Parameters 83 | 84 | * `id` (int64): Required - User Request ID. 85 | 86 | -------------------------------------------------------------------------------- /docs/Model/UserSftpClientUse.md: -------------------------------------------------------------------------------- 1 | # UserSftpClientUse 2 | 3 | ## Example UserSftpClientUse Object 4 | 5 | ``` 6 | { 7 | "id": 1, 8 | "sftp_client": "example", 9 | "created_at": "2000-01-01T01:00:00Z", 10 | "updated_at": "2000-01-01T01:00:00Z", 11 | "user_id": 1 12 | } 13 | ``` 14 | 15 | * `id` (int64): UserSftpClientUse ID 16 | * `sftp_client` (string): The SFTP client used 17 | * `created_at` (date-time): The earliest recorded use of this SFTP client (for this user) 18 | * `updated_at` (date-time): The most recent use of this SFTP client (for this user) 19 | * `user_id` (int64): ID of the user who performed this access 20 | 21 | --- 22 | 23 | ## List User SFTP Client Uses 24 | 25 | ``` 26 | $user_sftp_client_use = new \Files\Model\UserSftpClientUse(); 27 | $user_sftp_client_use->list(, [ 28 | 'user_id' => 1, 29 | ]); 30 | ``` 31 | 32 | 33 | ### Parameters 34 | 35 | * `user_id` (int64): User ID. If provided, will return uses for this user. 36 | * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. 37 | * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). 38 | -------------------------------------------------------------------------------- /docs/Model/WebhookTest.md: -------------------------------------------------------------------------------- 1 | # WebhookTest 2 | 3 | ## Example WebhookTest Object 4 | 5 | ``` 6 | { 7 | "code": 200, 8 | "message": "", 9 | "status": "", 10 | "data": "example", 11 | "success": true 12 | } 13 | ``` 14 | 15 | * `code` (int64): Status HTTP code 16 | * `message` (string): Error message 17 | * `status` (string): Status message 18 | * `data` (Auto): Additional data 19 | * `success` (boolean): The success status of the webhook test 20 | * `url` (string): URL for testing the webhook. 21 | * `method` (string): HTTP method(GET or POST). 22 | * `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data). 23 | * `headers` (object): Additional request headers. 24 | * `body` (object): Additional body parameters. 25 | * `raw_body` (string): raw body text 26 | * `file_as_body` (boolean): Send the file data as the request body? 27 | * `file_form_field` (string): Send the file data as a named parameter in the request POST body 28 | * `action` (string): action for test body 29 | * `use_dedicated_ips` (boolean): Use dedicated IPs for sending the webhook? 30 | 31 | --- 32 | 33 | ## Create Webhook Test 34 | 35 | ``` 36 | $webhook_test = new \Files\Model\WebhookTest(); 37 | $webhook_test->create(, [ 38 | 'url' => "https://www.site.com/...", 39 | 'method' => "GET", 40 | 'encoding' => "RAW", 41 | 'headers' => {"x-test-header":"testvalue"}, 42 | 'body' => {"test-param":"testvalue"}, 43 | 'raw_body' => "test body", 44 | 'file_as_body' => false, 45 | 'file_form_field' => "upload_file_data", 46 | 'use_dedicated_ips' => false, 47 | ]); 48 | ``` 49 | 50 | 51 | ### Parameters 52 | 53 | * `url` (string): Required - URL for testing the webhook. 54 | * `method` (string): HTTP method(GET or POST). 55 | * `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data). 56 | * `headers` (object): Additional request headers. 57 | * `body` (object): Additional body parameters. 58 | * `raw_body` (string): raw body text 59 | * `file_as_body` (boolean): Send the file data as the request body? 60 | * `file_form_field` (string): Send the file data as a named parameter in the request POST body 61 | * `action` (string): action for test body 62 | * `use_dedicated_ips` (boolean): Use dedicated IPs for sending the webhook? 63 | -------------------------------------------------------------------------------- /lib/Errors.php: -------------------------------------------------------------------------------- 1 | getResponse(); 41 | $errorData = json_decode($response->getBody()->getContents()); 42 | } else { 43 | $response = $error; 44 | } 45 | 46 | if ($response === null) { 47 | throw new Exception\FilesException($error->getMessage(), $error->getCode()); 48 | } 49 | 50 | if ($errorData === null) { 51 | throw new Exception\FilesException($error->getMessage(), $error->getCode()); 52 | } 53 | 54 | if (is_array($errorData)) { 55 | $errorData = $errorData[0]; 56 | } 57 | 58 | if ($errorData) { 59 | if (!@$errorData->type) { 60 | throw new Exception\FilesException($error->getMessage(), $error->getCode()); 61 | } 62 | 63 | $toPascalCase = function ($errorPart) { 64 | return implode('', array_map('\\ucfirst', explode('-', $errorPart))); 65 | }; 66 | 67 | $parts = explode('/', $errorData->type); 68 | 69 | if (count($parts) > 1) { 70 | list($errorFamily, $errorType) = array_map($toPascalCase, $parts); 71 | $className = $errorFamily . '\\' . $errorType . 'Exception'; 72 | } else { 73 | $errorType = $toPascalCase($parts[0]); 74 | $className = $errorType . 'Exception'; 75 | } 76 | } 77 | } 78 | 79 | if ($className) { 80 | $ExceptionClass = "\\Files\\Exception\\{$className}"; 81 | } else { 82 | $ExceptionClass = '\\Files\\Exception\\ApiException'; 83 | } 84 | 85 | throw new $ExceptionClass($error->getMessage(), $error->getCode(), $errorData); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /lib/Exception/ApiBadResponseException.php: -------------------------------------------------------------------------------- 1 | ' . $message . ' (code: ' . $code . ')'); 14 | 15 | parent::__construct($message, $code); 16 | $this->errorData = $errorData; 17 | } 18 | 19 | public function getDetail() 20 | { 21 | return $this->errorData->detail; 22 | } 23 | 24 | public function getError() 25 | { 26 | return $this->errorData->error; 27 | } 28 | 29 | public function getErrors() 30 | { 31 | return $this->errorData->errors; 32 | } 33 | 34 | public function getHttpCode() 35 | { 36 | return $this->errorData->{'http-code'}; 37 | } 38 | 39 | public function instance() 40 | { 41 | return $this->errorData->instance; 42 | } 43 | 44 | public function modelErrors() 45 | { 46 | return $this->errorData->{'model_errors'}; 47 | } 48 | 49 | public function getTitle() 50 | { 51 | return $this->errorData->title; 52 | } 53 | 54 | public function getType() 55 | { 56 | return $this->errorData->type; 57 | } 58 | 59 | public function getData() 60 | { 61 | return $this->errorData->data; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/Exception/ApiRequestException.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // object 59 | public function getDynamic() 60 | { 61 | return @$this->attributes['dynamic']; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/Model/BundlePath.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // boolean # Allow access to subfolders content? 59 | public function getRecursive() 60 | { 61 | return @$this->attributes['recursive']; 62 | } 63 | // string # The path to the resource relative to filesystem. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. 64 | public function getPath() 65 | { 66 | return @$this->attributes['path']; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/Model/Errors.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // array(string) # A list of fields where errors occur 59 | public function getFields() 60 | { 61 | return @$this->attributes['fields']; 62 | } 63 | // array(string) # A list of error messages 64 | public function getMessages() 65 | { 66 | return @$this->attributes['messages']; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/Model/FileAction.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['path']; 57 | } 58 | // string # Status of file operation. 59 | public function getStatus() 60 | { 61 | return @$this->attributes['status']; 62 | } 63 | // int64 # If status is pending, this is the id of the File Migration to check for status updates. 64 | public function getFileMigrationId() 65 | { 66 | return @$this->attributes['file_migration_id']; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/Model/FormField.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // int64 # Form field id 59 | public function getId() 60 | { 61 | return @$this->attributes['id']; 62 | } 63 | // string # Label to be displayed 64 | public function getLabel() 65 | { 66 | return @$this->attributes['label']; 67 | } 68 | // boolean # Is this a required field? 69 | public function getRequired() 70 | { 71 | return @$this->attributes['required']; 72 | } 73 | // string # Help text to be displayed 74 | public function getHelpText() 75 | { 76 | return @$this->attributes['help_text']; 77 | } 78 | // string # Type of Field 79 | public function getFieldType() 80 | { 81 | return @$this->attributes['field_type']; 82 | } 83 | // array(string) # Options to display for radio and dropdown 84 | public function getOptionsForSelect() 85 | { 86 | return @$this->attributes['options_for_select']; 87 | } 88 | // string # Default option for radio and dropdown 89 | public function getDefaultOption() 90 | { 91 | return @$this->attributes['default_option']; 92 | } 93 | // int64 # Form field set id 94 | public function getFormFieldSetId() 95 | { 96 | return @$this->attributes['form_field_set_id']; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/Model/Image.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // string # Image name 59 | public function getName() 60 | { 61 | return @$this->attributes['name']; 62 | } 63 | // string # Image URI 64 | public function getUri() 65 | { 66 | return @$this->attributes['uri']; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/Model/InvoiceLineItem.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // double # Invoice line item amount 59 | public function getAmount() 60 | { 61 | return @$this->attributes['amount']; 62 | } 63 | // date-time # Invoice line item created at date/time 64 | public function getCreatedAt() 65 | { 66 | return @$this->attributes['created_at']; 67 | } 68 | // string # Invoice line item description 69 | public function getDescription() 70 | { 71 | return @$this->attributes['description']; 72 | } 73 | // string # Invoice line item type 74 | public function getType() 75 | { 76 | return @$this->attributes['type']; 77 | } 78 | // date-time # Invoice line item service end date/time 79 | public function getServiceEndAt() 80 | { 81 | return @$this->attributes['service_end_at']; 82 | } 83 | // date-time # Invoice line item service start date/time 84 | public function getServiceStartAt() 85 | { 86 | return @$this->attributes['service_start_at']; 87 | } 88 | // string # Plan name 89 | public function getPlan() 90 | { 91 | return @$this->attributes['plan']; 92 | } 93 | // string # Site name 94 | public function getSite() 95 | { 96 | return @$this->attributes['site']; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/Model/PaymentLineItem.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // double # Payment line item amount 59 | public function getAmount() 60 | { 61 | return @$this->attributes['amount']; 62 | } 63 | // date-time # Payment line item created at date/time 64 | public function getCreatedAt() 65 | { 66 | return @$this->attributes['created_at']; 67 | } 68 | // int64 # Invoice ID 69 | public function getInvoiceId() 70 | { 71 | return @$this->attributes['invoice_id']; 72 | } 73 | // int64 # Payment ID 74 | public function getPaymentId() 75 | { 76 | return @$this->attributes['payment_id']; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/Model/Preview.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // int64 # Preview ID 59 | public function getId() 60 | { 61 | return @$this->attributes['id']; 62 | } 63 | // string # Preview status. Can be invalid, not_generated, generating, complete, or file_too_large 64 | public function getStatus() 65 | { 66 | return @$this->attributes['status']; 67 | } 68 | // string # Link to download preview 69 | public function getDownloadUri() 70 | { 71 | return @$this->attributes['download_uri']; 72 | } 73 | // string # Preview type. Can be image, pdf, pdf_native, video, or audio 74 | public function getType() 75 | { 76 | return @$this->attributes['type']; 77 | } 78 | // string # Preview size 79 | public function getSize() 80 | { 81 | return @$this->attributes['size']; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/Model/PublicIpAddress.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // string # The public IP address. 59 | public function getIpAddress() 60 | { 61 | return @$this->attributes['ip_address']; 62 | } 63 | // string # The name of the frontend server. 64 | public function getServerName() 65 | { 66 | return @$this->attributes['server_name']; 67 | } 68 | // boolean 69 | public function getFtpEnabled() 70 | { 71 | return @$this->attributes['ftp_enabled']; 72 | } 73 | // boolean 74 | public function getSftpEnabled() 75 | { 76 | return @$this->attributes['sftp_enabled']; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/Model/ShareGroupMember.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // string # Name of the share group member 59 | public function getName() 60 | { 61 | return @$this->attributes['name']; 62 | } 63 | // string # Company of the share group member 64 | public function getCompany() 65 | { 66 | return @$this->attributes['company']; 67 | } 68 | // string # Email of the share group member 69 | public function getEmail() 70 | { 71 | return @$this->attributes['email']; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/Model/Status.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // int64 # Status HTTP code 59 | public function getCode() 60 | { 61 | return @$this->attributes['code']; 62 | } 63 | // string # Error message 64 | public function getMessage() 65 | { 66 | return @$this->attributes['message']; 67 | } 68 | // string # Status message 69 | public function getStatus() 70 | { 71 | return @$this->attributes['status']; 72 | } 73 | // Auto # Additional data 74 | public function getData() 75 | { 76 | return @$this->attributes['data']; 77 | } 78 | // array(object) # A list of api errors 79 | public function getErrors() 80 | { 81 | return @$this->attributes['errors']; 82 | } 83 | // int64 # Required Clickwrap id 84 | public function getClickwrapId() 85 | { 86 | return @$this->attributes['clickwrap_id']; 87 | } 88 | // string # Required Clickwrap body 89 | public function getClickwrapBody() 90 | { 91 | return @$this->attributes['clickwrap_body']; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/Model/UsageByTopLevelDir.php: -------------------------------------------------------------------------------- 1 | 'all', 23 | ]; 24 | 25 | public function __construct($attributes = [], $options = []) 26 | { 27 | foreach ($attributes as $key => $value) { 28 | $this->attributes[str_replace('?', '', $key)] = $value; 29 | } 30 | 31 | $this->options = $options; 32 | } 33 | 34 | public function __set($name, $value) 35 | { 36 | $this->attributes[$name] = $value; 37 | } 38 | 39 | public function __get($name) 40 | { 41 | return @$this->attributes[$name]; 42 | } 43 | 44 | public static function __callStatic($name, $arguments) 45 | { 46 | if (in_array($name, array_keys(self::$static_mapped_functions))) { 47 | $method = self::$static_mapped_functions[$name]; 48 | if (method_exists(__CLASS__, $method)) { 49 | return @self::$method(...$arguments); 50 | } 51 | } 52 | } 53 | 54 | public function isLoaded() 55 | { 56 | return !!@$this->attributes['id']; 57 | } 58 | // string # Directory name 59 | public function getDir() 60 | { 61 | return @$this->attributes['dir']; 62 | } 63 | // int64 # Usage 64 | public function getSize() 65 | { 66 | return @$this->attributes['size']; 67 | } 68 | // int64 # File count 69 | public function getCount() 70 | { 71 | return @$this->attributes['count']; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /phpcs.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Files-com/files-sdk-php/8fc1f3b616027039083261ab69d5661de24dd212/phpcs.phar -------------------------------------------------------------------------------- /shared/header_test_data.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "headers": {}, 4 | "result": null 5 | }, 6 | { 7 | "headers": { 8 | "Retry-After": ["aaaaaa"] 9 | }, 10 | "result": null 11 | }, 12 | { 13 | "headers": { 14 | "Retry-After": ["5"] 15 | }, 16 | "result": 5 17 | }, 18 | { 19 | "headers": { 20 | "Retry-After": ["60"] 21 | }, 22 | "result": null 23 | }, 24 | { 25 | "headers": { 26 | "Retry-After": ["5", "10"] 27 | }, 28 | "result": 5 29 | }, 30 | { 31 | "headers": { 32 | "Retry-After": ["5", "aaaaaa"] 33 | }, 34 | "result": 5 35 | }, 36 | { 37 | "headers": { 38 | "Retry-After": ["%s"] 39 | }, 40 | "result": 8 41 | } 42 | ] -------------------------------------------------------------------------------- /shared/normalization_for_comparison_test_data.json: -------------------------------------------------------------------------------- 1 | [ 2 | [ "filename.txt", "filename.txt" ], 3 | [ "FiLeNaMe.TxT", "filename.txt" ], 4 | [ "FILENAME.TXT", "filename.txt" ], 5 | [ "FÎŁĘÑÂMÉ.TXT", "filename.txt" ], 6 | [ "Fïłèńämê.Txt", "filename.txt" ], 7 | [ "a/b/c.txt", "a/b/c.txt" ], 8 | [ "A\\B\\C.TXT", "a/b/c.txt" ], 9 | [ "A/B\\C.TXT", "a/b/c.txt" ], 10 | [ "//a/b//c.txt", "a/b/c.txt" ], 11 | [ "a/b/c.txt ", "a/b/c.txt" ], 12 | [ "a/b/c.txt\t", "a/b/c.txt" ], 13 | [ "a/b/c.txt\n", "a/b/c.txt" ], 14 | [ "a/b/c.txt\r", "a/b/c.txt" ], 15 | [ " space_at_beginning", " space_at_beginning"], 16 | [ "space_at_end ", "space_at_end"], 17 | [ "tab\tseparated", "tab\tseparated"], 18 | [ "hello</hello>", "<title>hello</hello>"], 19 | [ "안녕하세요", "안녕하세요" ], 20 | [ "こんにちは", "こんにちは" ], 21 | [ "今日は", "今日は" ], 22 | [ "longest_unicode_character_﷽", "longest_unicode_character_﷽"], 23 | [ "invalid_null_byte_before\u0000after", "invalid_null_byte_beforeafter" ], 24 | [ "a/b/c/../../hello", "a/b/c/hello" ], 25 | [ "a/b/c/././hello", "a/b/c/hello" ], 26 | [ "one_code_point_ą", "one_code_point_a" ], 27 | [ "two_code_points_ą", "two_code_points_a" ], 28 | [ "one_code_point_훯", "one_code_point_훯"], 29 | [ "three_code_points_훯", "three_code_points_훯" ], 30 | [ "ÞþŊŋŦŧ", "þþŋŋŧŧ" ], 31 | [ "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ", "aaaaaaaeceeeeiiiidnoooooouuuuyssaaaaaaaeceeeeiiiidnoooooouuuuyy" ], 32 | [ "ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİIJij", "aaaaaaccccccccddddeeeeeeeeeegggggggghhhhiiiiiiiiiijij" ], 33 | [ "ĴĵĶķĹĺĻļĽľŁłŃńŅņŇňʼnŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤť", "jjkkllllllllnnnnnnʼnoooooooeoerrrrrrsssssssstttt" ], 34 | [ "ŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽž", "uuuuuuuuuuuuwwyyyzzzzzz" ], 35 | [ "😂❤️😍🤣😊🙏💕😭😘👍😅👏😁♥️🔥💔💖💙😢🤔😆🙄💪😉☺️👌🤗", "😂❤️😍🤣😊🙏💕😭😘👍😅👏😁♥️🔥💔💖💙😢🤔😆🙄💪😉☺️👌🤗" ], 36 | [ "💜😔😎😇🌹🤦🎉💞✌️✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣️", "💜😔😎😇🌹🤦🎉💞✌️✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣️" ], 37 | [ "emoji_‼️", "emoji_!!️" ], 38 | [ "<title>hello<:hello>.txt", "<title>hello<:hello>.txt" ], 39 | [ "twodotfile..txt", "twodotfile..txt" ], 40 | [ "three/.../dots_path", "three/.../dots_path" ], 41 | [ ".", "" ], 42 | [ "..", ""], 43 | [ "./..", "" ], 44 | [ "../..", ""], 45 | [ "./.", "" ], 46 | [ "../.", ""], 47 | [ "./../.", "" ], 48 | [ ".././..", ""] 49 | ] -------------------------------------------------------------------------------- /shared/url_test_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "substitute_urls": [ 3 | "https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=%s&X-Goog-Expires=%s&X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-SignedHeaders=host", 4 | "https://s3.amazonaws.com/test.example.com/metadata/1234/00000000-0000-0000-0001-00000000?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=%s&X-Amz-Expires=%s", 5 | "https://filescomtests.blob.core.windows.net/testazureremote/ntie3buw/file-to-download.txt?sp=se=%s" 6 | ], 7 | "error_urls": [ 8 | "https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=20220101T120000Z", 9 | "https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=20220101T120000Z&X-Goog-Date=20220202T120000Z", 10 | "https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Expires=900&X-Goog-Expires=600", 11 | "https://filescomtests.blob.core.windows.net/testazureremote/ntie3buw/file-to-download.txt?sp=se=20220101T120000Z&sp=se=20220202T120000Z", 12 | "https://filescomtests.blob.core.windows.net/testazureremote/ntie3buw/file-to-download.txt?sp=20220101T120000Z", 13 | "https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=20220101&X-Goog-Expires=900", 14 | "https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=asdf&X-Goog-Expires=900", 15 | "https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Date=20220101T120000Z&&X-Goog-Expires=900", 16 | "https://s3.amazonaws.com/test.example.com/metadata/1234/00000000-0000-0000-0001-00000000?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=asdf&X-Amz-Expires=900" 17 | ] 18 | } -------------------------------------------------------------------------------- /test/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "repositories": [ 3 | { 4 | "type": "path", 5 | "url": "../", 6 | "options": { 7 | "versions": { 8 | "files.com/files-php-sdk": "dev-local" 9 | } 10 | }, 11 | "extra": { 12 | "branch-alias": { 13 | "dev-local": "0.0.1" 14 | } 15 | }, 16 | "symlink": false 17 | } 18 | ], 19 | "require": { 20 | "files.com/files-php-sdk": "dev-local", 21 | "php": ">=5.5.0", 22 | "ext-curl": "*", 23 | "ext-json": "*", 24 | "ext-mbstring": "*", 25 | "guzzlehttp/guzzle": "^6 || ^7" 26 | }, 27 | "require-dev": { 28 | "phpunit/phpunit": "^5.0 || ^8.0" 29 | } 30 | } -------------------------------------------------------------------------------- /test/phpunit.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <phpunit colors="true" 3 | processIsolation="false" 4 | stopOnError="false" 5 | stopOnFailure="false" 6 | stopOnIncomplete="false" 7 | stopOnSkipped="false" 8 | backupGlobals="false" 9 | bootstrap="./vendor/autoload.php"> 10 | <testsuite name="default"> 11 | <directory suffix='.php'>./tests</directory> 12 | </testsuite> 13 | </phpunit> -------------------------------------------------------------------------------- /test/tests/Util/ConfigTest.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | declare(strict_types=1); 4 | 5 | namespace Files; 6 | 7 | use Files\Files; 8 | use PHPUnit\Framework\TestCase; 9 | 10 | class ConfigTest extends TestCase 11 | { 12 | public function testConfig() 13 | { 14 | Files::setApiKey("test-key"); 15 | Files::setBaseUrl('https://app.files.com'); 16 | $this->assertEquals("test-key", Files::getApiKey()); 17 | $this->assertEquals('https://app.files.com', Files::getBaseUrl()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/tests/Util/PathUtilTest.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | declare(strict_types=1); 4 | 5 | namespace Files; 6 | 7 | use Files\Util; 8 | use PHPUnit\Framework\TestCase; 9 | 10 | class PathUtilTest extends TestCase 11 | { 12 | public function testEmpty() 13 | { 14 | $this->assertEquals(true, Util\PathUtil::same("", "")); 15 | } 16 | 17 | /** 18 | * @doesNotPerformAssertions 19 | */ 20 | public function testSameProvider() 21 | { 22 | // parse your data file however you want 23 | $json = file_get_contents(__DIR__ . '/../../../shared/normalization_for_comparison_test_data.json'); 24 | $json_items = json_decode($json, true); 25 | 26 | 27 | return $json_items; 28 | } 29 | 30 | /** 31 | * @dataProvider testSameProvider 32 | */ 33 | public function testSame($a, $b) 34 | { 35 | $this->assertEquals(true, Util\PathUtil::same($a, $b), "PathUtil::same failed for $a==$b"); 36 | } 37 | 38 | public function testSplatOnNormalizeForComparison() 39 | { 40 | $this->assertEquals('a/b/c', Util\PathUtil::normalizeForComparison("a", "b", "c")); 41 | } 42 | } 43 | --------------------------------------------------------------------------------