dropbox
Version:
The Dropbox JavaScript SDK is a lightweight, promise based interface to the Dropbox v2 API that works in both nodejs and browser environments.
911 lines • 763 kB
JavaScript
// Auto-generated by Stone, do not modify.
/**
* An Error object returned from a route.
* @typedef {Object} Error
* @property {string} error_summary - Text summary of the error.
* @property {T} error - The error object.
* @property {UserMessage} user_message - An optional field. If present, it includes a
message that can be shown directly to the end user of your app. You should show this message
if your app is unprepared to programmatically handle the error returned by an endpoint.
* @template T
*/ /**
* User-friendly error message.
* @typedef {Object} UserMessage
* @property {string} text - The message.
* @property {string} locale
*/ /**
* @typedef {string} Timestamp
*/ /**
* @typedef {Object} AccountPhotoSourceArg
* @property {string} [base64_data] - Available if .tag is base64_data. Image
* data in base64-encoded bytes.
* @property {('base64_data'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} AccountSetProfilePhotoArg
* @property {AccountPhotoSourceArg} photo - Image to set as the user's new
* profile photo.
*/ /**
* @typedef {Object} AccountSetProfilePhotoError
* @property {('file_type_error'|'file_size_error'|'dimension_error'|'thumbnail_error'|'transient_error'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} AccountSetProfilePhotoResult
* @property {string} profile_photo_url - URL for the photo representing the
* user, if one is set.
*/ /**
* Result returned by methods that may either launch an asynchronous job or
* complete synchronously. Upon synchronous completion of the job, no additional
* information is returned.
* @typedef {Object} AsyncLaunchEmptyResult
* @property {string} [async_job_id] - Available if .tag is async_job_id. This
* response indicates that the processing is asynchronous. The string is an id
* that can be used to obtain the status of the asynchronous job.
* @property {('async_job_id'|'complete')} .tag - Tag identifying the union variant.
*/ /**
* Result returned by methods that launch an asynchronous job. A method who may
* either launch an asynchronous job, or complete the request synchronously, can
* use this union by extending it, and adding a 'complete' field with the type
* of the synchronous response. See LaunchEmptyResult for an example.
* @typedef {Object} AsyncLaunchResultBase
* @property {string} [async_job_id] - Available if .tag is async_job_id. This
* response indicates that the processing is asynchronous. The string is an id
* that can be used to obtain the status of the asynchronous job.
* @property {'async_job_id'} .tag - Tag identifying the union variant.
*/ /**
* Arguments for methods that poll the status of an asynchronous job.
* @typedef {Object} AsyncPollArg
* @property {string} async_job_id - Id of the asynchronous job. This is the
* value of a response returned from the method that launched the job.
*/ /**
* Result returned by methods that poll for the status of an asynchronous job.
* Upon completion of the job, no additional information is returned.
* @typedef {Object} AsyncPollEmptyResult
* @property {('in_progress'|'complete')} .tag - Tag identifying the union variant.
*/ /**
* Error returned by methods for polling the status of asynchronous job.
* @typedef {Object} AsyncPollError
* @property {('invalid_async_job_id'|'internal_error'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Result returned by methods that poll for the status of an asynchronous job.
* Unions that extend this union should add a 'complete' field with a type of
* the information returned upon job completion. See PollEmptyResult for an
* example.
* @typedef {Object} AsyncPollResultBase
* @property {'in_progress'} .tag - Tag identifying the union variant.
*/ /**
* Error occurred because the account doesn't have permission to access the
* resource.
* @typedef {Object} AuthAccessError
* @property {AuthInvalidAccountTypeError} [invalid_account_type] - Available if
* .tag is invalid_account_type. Current account type cannot access the
* resource.
* @property {AuthPaperAccessError} [paper_access_denied] - Available if .tag is
* paper_access_denied. Current account cannot access Paper.
* @property {('invalid_account_type'|'paper_access_denied'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Errors occurred during authentication.
* @typedef {Object} AuthAuthError
* @property {AuthTokenScopeError} [missing_scope] - Available if .tag is
* missing_scope. The access token does not have the required scope to access
* the route.
* @property {('invalid_access_token'|'invalid_select_user'|'invalid_select_admin'|'user_suspended'|'expired_access_token'|'missing_scope'|'route_access_denied'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} AuthInvalidAccountTypeError
* @property {('endpoint'|'feature'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} AuthPaperAccessError
* @property {('paper_disabled'|'not_paper_user'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Error occurred because the app is being rate limited.
* @typedef {Object} AuthRateLimitError
* @property {AuthRateLimitReason} reason - The reason why the app is being rate
* limited.
* @property {number} retry_after - The number of seconds that the app should
* wait before making another request.
*/ /**
* @typedef {Object} AuthRateLimitReason
* @property {('too_many_requests'|'too_many_write_operations'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} AuthTokenFromOAuth1Arg
* @property {string} oauth1_token - The supplied OAuth 1.0 access token.
* @property {string} oauth1_token_secret - The token secret associated with the
* supplied access token.
*/ /**
* @typedef {Object} AuthTokenFromOAuth1Error
* @property {('invalid_oauth1_token_info'|'app_id_mismatch'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} AuthTokenFromOAuth1Result
* @property {string} oauth2_token - The OAuth 2.0 token generated from the
* supplied OAuth 1.0 token.
*/ /**
* @typedef {Object} AuthTokenScopeError
* @property {string} required_scope - The required scope to access the route.
*/ /**
* EchoArg contains the arguments to be sent to the Dropbox servers.
* @typedef {Object} CheckEchoArg
* @property {string} query - The string that you'd like to be echoed back to
* you.
*/ /**
* EchoResult contains the result returned from the Dropbox servers.
* @typedef {Object} CheckEchoResult
* @property {string} result - If everything worked correctly, this would be the
* same as query.
*/ /**
* @typedef {Object} CommonPathRoot
* @property {string} [root] - Available if .tag is root. Paths are relative to
* the authenticating user's root namespace (This results in
* :field:`PathRootError.invalid_root` if the user's root namespace has
* changed.).
* @property {string} [namespace_id] - Available if .tag is namespace_id. Paths
* are relative to given namespace id (This results in
* :field:`PathRootError.no_permission` if you don't have access to this
* namespace.).
* @property {('home'|'root'|'namespace_id'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} CommonPathRootError
* @property {(CommonTeamRootInfo|CommonUserRootInfo|CommonRootInfo)}
* [invalid_root] - Available if .tag is invalid_root. The root namespace id in
* Dropbox-API-Path-Root header is not valid. The value of this error is the
* user's latest root info.
* @property {('invalid_root'|'no_permission'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Information about current user's root.
* @typedef {Object} CommonRootInfo
@property {("team"|"user")} .tag - Tag identifying the subtype variant.
* @property {string} root_namespace_id - The namespace ID for user's root
* namespace. It will be the namespace ID of the shared team root if the user is
* member of a team with a separate team root. Otherwise it will be same as
* RootInfo.home_namespace_id.
* @property {string} home_namespace_id - The namespace ID for user's home
* namespace.
*/ /**
* Root info when user is member of a team with a separate root namespace ID.
* @typedef {Object} CommonTeamRootInfo
@property {'team'} [.tag] - Tag identifying this subtype variant. This field is
only present when needed to discriminate between multiple possible subtypes.
* @property {string} root_namespace_id - The namespace ID for user's root
* namespace. It will be the namespace ID of the shared team root if the user is
* member of a team with a separate team root. Otherwise it will be same as
* RootInfo.home_namespace_id.
* @property {string} home_namespace_id - The namespace ID for user's home
* namespace.
* @property {string} home_path - The path for user's home directory under the
* shared team root.
*/ /**
* Root info when user is not member of a team or the user is a member of a team
* and the team does not have a separate root namespace.
* @typedef {Object} CommonUserRootInfo
@property {'user'} [.tag] - Tag identifying this subtype variant. This field is
only present when needed to discriminate between multiple possible subtypes.
* @property {string} root_namespace_id - The namespace ID for user's root
* namespace. It will be the namespace ID of the shared team root if the user is
* member of a team with a separate team root. Otherwise it will be same as
* RootInfo.home_namespace_id.
* @property {string} home_namespace_id - The namespace ID for user's home
* namespace.
*/ /**
* @typedef {Object} ContactsDeleteManualContactsArg
* @property {Array.<Object>} email_addresses - List of manually added contacts
* to be deleted.
*/ /**
* @typedef {Object} ContactsDeleteManualContactsError
* @property {Array.<Object>} [contacts_not_found] - Available if .tag is
* contacts_not_found. Can't delete contacts from this list. Make sure the list
* only has manually added contacts. The deletion was cancelled.
* @property {('contacts_not_found'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesAddPropertiesArg
* @property {string} path - A unique identifier for the file or folder.
* @property {Array.<FilePropertiesPropertyGroup>} property_groups - The
* property groups which are to be added to a Dropbox file. No two groups in the
* input should refer to the same template.
*/ /**
* @typedef {Object} FilePropertiesAddPropertiesError
* @property {string} [template_not_found] - Available if .tag is
* template_not_found. Template does not exist for the given identifier.
* @property {FilePropertiesLookupError} [path] - Available if .tag is path.
* @property {('template_not_found'|'restricted_content'|'other'|'path'|'unsupported_folder'|'property_field_too_large'|'does_not_fit_template'|'duplicate_property_groups'|'property_group_already_exists')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesAddTemplateArg
* @property {string} name - Display name for the template. Template names can
* be up to 256 bytes.
* @property {string} description - Description for the template. Template
* descriptions can be up to 1024 bytes.
* @property {Array.<FilePropertiesPropertyFieldTemplate>} fields - Definitions
* of the property fields associated with this template. There can be up to 32
* properties in a single template.
*/ /**
* @typedef {Object} FilePropertiesAddTemplateResult
* @property {string} template_id - An identifier for template added by See
* templates/add_for_user or templates/add_for_team.
*/ /**
* @typedef {Object} FilePropertiesGetTemplateArg
* @property {string} template_id - An identifier for template added by route
* See templates/add_for_user or templates/add_for_team.
*/ /**
* @typedef {Object} FilePropertiesGetTemplateResult
* @property {string} name - Display name for the template. Template names can
* be up to 256 bytes.
* @property {string} description - Description for the template. Template
* descriptions can be up to 1024 bytes.
* @property {Array.<FilePropertiesPropertyFieldTemplate>} fields - Definitions
* of the property fields associated with this template. There can be up to 32
* properties in a single template.
*/ /**
* @typedef {Object} FilePropertiesInvalidPropertyGroupError
* @property {string} [template_not_found] - Available if .tag is
* template_not_found. Template does not exist for the given identifier.
* @property {FilePropertiesLookupError} [path] - Available if .tag is path.
* @property {('template_not_found'|'restricted_content'|'other'|'path'|'unsupported_folder'|'property_field_too_large'|'does_not_fit_template'|'duplicate_property_groups')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesListTemplateResult
* @property {Array.<Object>} template_ids - List of identifiers for templates
* added by See templates/add_for_user or templates/add_for_team.
*/ /**
* Logical operator to join search queries together.
* @typedef {Object} FilePropertiesLogicalOperator
* @property {('or_operator'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesLookUpPropertiesError
* @property {('property_group_not_found'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesLookupError
* @property {string} [malformed_path] - Available if .tag is malformed_path.
* @property {('malformed_path'|'not_found'|'not_file'|'not_folder'|'restricted_content'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesModifyTemplateError
* @property {string} [template_not_found] - Available if .tag is
* template_not_found. Template does not exist for the given identifier.
* @property {('template_not_found'|'restricted_content'|'other'|'conflicting_property_names'|'too_many_properties'|'too_many_templates'|'template_attribute_too_large')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesOverwritePropertyGroupArg
* @property {string} path - A unique identifier for the file or folder.
* @property {Array.<FilePropertiesPropertyGroup>} property_groups - The
* property groups "snapshot" updates to force apply. No two groups in the input
* should refer to the same template.
*/ /**
* @typedef {Object} FilePropertiesPropertiesError
* @property {string} [template_not_found] - Available if .tag is
* template_not_found. Template does not exist for the given identifier.
* @property {FilePropertiesLookupError} [path] - Available if .tag is path.
* @property {('template_not_found'|'restricted_content'|'other'|'path'|'unsupported_folder')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesPropertiesSearchArg
* @property {Array.<FilePropertiesPropertiesSearchQuery>} queries - Queries to
* search.
* @property {FilePropertiesTemplateFilter} template_filter - Filter results to
* contain only properties associated with these template IDs.
*/ /**
* @typedef {Object} FilePropertiesPropertiesSearchContinueArg
* @property {string} cursor - The cursor returned by your last call to
* properties/search or properties/search/continue.
*/ /**
* @typedef {Object} FilePropertiesPropertiesSearchContinueError
* @property {('reset'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesPropertiesSearchError
* @property {FilePropertiesLookUpPropertiesError} [property_group_lookup] -
* Available if .tag is property_group_lookup.
* @property {('property_group_lookup'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesPropertiesSearchMatch
* @property {string} id - The ID for the matched file or folder.
* @property {string} path - The path for the matched file or folder.
* @property {boolean} is_deleted - Whether the file or folder is deleted.
* @property {Array.<FilePropertiesPropertyGroup>} property_groups - List of
* custom property groups associated with the file.
*/ /**
* @typedef {Object} FilePropertiesPropertiesSearchMode
* @property {string} [field_name] - Available if .tag is field_name. Search for
* a value associated with this field name.
* @property {('field_name'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesPropertiesSearchQuery
* @property {string} query - The property field value for which to search
* across templates.
* @property {FilePropertiesPropertiesSearchMode} mode - The mode with which to
* perform the search.
* @property {FilePropertiesLogicalOperator} logical_operator - The logical
* operator with which to append the query.
*/ /**
* @typedef {Object} FilePropertiesPropertiesSearchResult
* @property {Array.<FilePropertiesPropertiesSearchMatch>} matches - A list
* (possibly empty) of matches for the query.
* @property {string} [cursor] - Pass the cursor into properties/search/continue
* to continue to receive search results. Cursor will be null when there are no
* more results.
*/ /**
* Raw key/value data to be associated with a Dropbox file. Property fields are
* added to Dropbox files as a PropertyGroup.
* @typedef {Object} FilePropertiesPropertyField
* @property {string} name - Key of the property field associated with a file
* and template. Keys can be up to 256 bytes.
* @property {string} value - Value of the property field associated with a file
* and template. Values can be up to 1024 bytes.
*/ /**
* Defines how a single property field may be structured. Used exclusively by
* PropertyGroupTemplate.
* @typedef {Object} FilePropertiesPropertyFieldTemplate
* @property {string} name - Key of the property field being described. Property
* field keys can be up to 256 bytes.
* @property {string} description - Description of the property field. Property
* field descriptions can be up to 1024 bytes.
* @property {FilePropertiesPropertyType} type - Data type of the value of this
* property field. This type will be enforced upon property creation and
* modifications.
*/ /**
* A subset of the property fields described by the corresponding
* PropertyGroupTemplate. Properties are always added to a Dropbox file as a
* PropertyGroup. The possible key names and value types in this group are
* defined by the corresponding PropertyGroupTemplate.
* @typedef {Object} FilePropertiesPropertyGroup
* @property {string} template_id - A unique identifier for the associated
* template.
* @property {Array.<FilePropertiesPropertyField>} fields - The actual
* properties associated with the template. There can be up to 32 property types
* per template.
*/ /**
* Defines how a property group may be structured.
* @typedef {Object} FilePropertiesPropertyGroupTemplate
* @property {string} name - Display name for the template. Template names can
* be up to 256 bytes.
* @property {string} description - Description for the template. Template
* descriptions can be up to 1024 bytes.
* @property {Array.<FilePropertiesPropertyFieldTemplate>} fields - Definitions
* of the property fields associated with this template. There can be up to 32
* properties in a single template.
*/ /**
* @typedef {Object} FilePropertiesPropertyGroupUpdate
* @property {string} template_id - A unique identifier for a property template.
* @property {Array.<FilePropertiesPropertyField>} [add_or_update_fields] -
* Property fields to update. If the property field already exists, it is
* updated. If the property field doesn't exist, the property group is added.
* @property {Array.<string>} [remove_fields] - Property fields to remove (by
* name), provided they exist.
*/ /**
* Data type of the given property field added.
* @typedef {Object} FilePropertiesPropertyType
* @property {('string'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesRemovePropertiesArg
* @property {string} path - A unique identifier for the file or folder.
* @property {Array.<Object>} property_template_ids - A list of identifiers for
* a template created by templates/add_for_user or templates/add_for_team.
*/ /**
* @typedef {Object} FilePropertiesRemovePropertiesError
* @property {string} [template_not_found] - Available if .tag is
* template_not_found. Template does not exist for the given identifier.
* @property {FilePropertiesLookupError} [path] - Available if .tag is path.
* @property {FilePropertiesLookUpPropertiesError} [property_group_lookup] -
* Available if .tag is property_group_lookup.
* @property {('template_not_found'|'restricted_content'|'other'|'path'|'unsupported_folder'|'property_group_lookup')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesRemoveTemplateArg
* @property {string} template_id - An identifier for a template created by
* templates/add_for_user or templates/add_for_team.
*/ /**
* @typedef {Object} FilePropertiesTemplateError
* @property {string} [template_not_found] - Available if .tag is
* template_not_found. Template does not exist for the given identifier.
* @property {('template_not_found'|'restricted_content'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesTemplateFilter
* @property {Array.<Object>} [filter_some] - Available if .tag is filter_some.
* Only templates with an ID in the supplied list will be returned (a subset of
* templates will be returned).
* @property {('filter_some'|'other'|'filter_none')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesTemplateFilterBase
* @property {Array.<Object>} [filter_some] - Available if .tag is filter_some.
* Only templates with an ID in the supplied list will be returned (a subset of
* templates will be returned).
* @property {('filter_some'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesTemplateOwnerType
* @property {('user'|'team'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesUpdatePropertiesArg
* @property {string} path - A unique identifier for the file or folder.
* @property {Array.<FilePropertiesPropertyGroupUpdate>} update_property_groups
* - The property groups "delta" updates to apply.
*/ /**
* @typedef {Object} FilePropertiesUpdatePropertiesError
* @property {string} [template_not_found] - Available if .tag is
* template_not_found. Template does not exist for the given identifier.
* @property {FilePropertiesLookupError} [path] - Available if .tag is path.
* @property {FilePropertiesLookUpPropertiesError} [property_group_lookup] -
* Available if .tag is property_group_lookup.
* @property {('template_not_found'|'restricted_content'|'other'|'path'|'unsupported_folder'|'property_field_too_large'|'does_not_fit_template'|'duplicate_property_groups'|'property_group_lookup')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilePropertiesUpdateTemplateArg
* @property {string} template_id - An identifier for template added by See
* templates/add_for_user or templates/add_for_team.
* @property {string} [name] - A display name for the template. template names
* can be up to 256 bytes.
* @property {string} [description] - Description for the new template. Template
* descriptions can be up to 1024 bytes.
* @property {Array.<FilePropertiesPropertyFieldTemplate>} [add_fields] -
* Property field templates to be added to the group template. There can be up
* to 32 properties in a single template.
*/ /**
* @typedef {Object} FilePropertiesUpdateTemplateResult
* @property {string} template_id - An identifier for template added by route
* See templates/add_for_user or templates/add_for_team.
*/ /**
* There was an error counting the file requests.
* @typedef {Object} FileRequestsCountFileRequestsError
* @property {('disabled_for_team'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Result for count.
* @typedef {Object} FileRequestsCountFileRequestsResult
* @property {number} file_request_count - The number file requests owner by
* this user.
*/ /**
* Arguments for create.
* @typedef {Object} FileRequestsCreateFileRequestArgs
* @property {string} title - The title of the file request. Must not be empty.
* @property {string} destination - The path of the folder in the Dropbox where
* uploaded files will be sent. For apps with the app folder permission, this
* will be relative to the app folder.
* @property {FileRequestsFileRequestDeadline} [deadline] - The deadline for the
* file request. Deadlines can only be set by Professional and Business
* accounts.
* @property {boolean} open - Whether or not the file request should be open. If
* the file request is closed, it will not accept any file submissions, but it
* can be opened later.
* @property {string} [description] - A description of the file request.
*/ /**
* There was an error creating the file request.
* @typedef {Object} FileRequestsCreateFileRequestError
* @property {('disabled_for_team'|'other'|'not_found'|'not_a_folder'|'app_lacks_access'|'no_permission'|'email_unverified'|'validation_error'|'invalid_location'|'rate_limit')} .tag - Tag identifying the union variant.
*/ /**
* There was an error deleting all closed file requests.
* @typedef {Object} FileRequestsDeleteAllClosedFileRequestsError
* @property {('disabled_for_team'|'other'|'not_found'|'not_a_folder'|'app_lacks_access'|'no_permission'|'email_unverified'|'validation_error')} .tag - Tag identifying the union variant.
*/ /**
* Result for delete_all_closed.
* @typedef {Object} FileRequestsDeleteAllClosedFileRequestsResult
* @property {Array.<FileRequestsFileRequest>} file_requests - The file requests
* deleted for this user.
*/ /**
* Arguments for delete.
* @typedef {Object} FileRequestsDeleteFileRequestArgs
* @property {Array.<Object>} ids - List IDs of the file requests to delete.
*/ /**
* There was an error deleting these file requests.
* @typedef {Object} FileRequestsDeleteFileRequestError
* @property {('disabled_for_team'|'other'|'not_found'|'not_a_folder'|'app_lacks_access'|'no_permission'|'email_unverified'|'validation_error'|'file_request_open')} .tag - Tag identifying the union variant.
*/ /**
* Result for delete.
* @typedef {Object} FileRequestsDeleteFileRequestsResult
* @property {Array.<FileRequestsFileRequest>} file_requests - The file requests
* deleted by the request.
*/ /**
* A file request https://www.dropbox.com/help/9090 for receiving files into the
* user's Dropbox account.
* @typedef {Object} FileRequestsFileRequest
* @property {string} id - The ID of the file request.
* @property {string} url - The URL of the file request.
* @property {string} title - The title of the file request.
* @property {Timestamp} created - When this file request was created.
* @property {boolean} is_open - Whether or not the file request is open. If the
* file request is closed, it will not accept any more file submissions.
* @property {number} file_count - The number of files this file request has
* received.
* @property {string} [destination] - The path of the folder in the Dropbox
* where uploaded files will be sent. This can be null if the destination was
* removed. For apps with the app folder permission, this will be relative to
* the app folder.
* @property {FileRequestsFileRequestDeadline} [deadline] - The deadline for
* this file request. Only set if the request has a deadline.
* @property {string} [description] - A description of the file request.
*/ /**
* @typedef {Object} FileRequestsFileRequestDeadline
* @property {Timestamp} deadline - The deadline for this file request.
* @property {FileRequestsGracePeriod} [allow_late_uploads] - If set, allow
* uploads after the deadline has passed. These uploads will be marked
* overdue.
*/ /**
* There is an error with the file request.
* @typedef {Object} FileRequestsFileRequestError
* @property {('disabled_for_team'|'other'|'not_found'|'not_a_folder'|'app_lacks_access'|'no_permission'|'email_unverified'|'validation_error')} .tag - Tag identifying the union variant.
*/ /**
* There is an error accessing the file requests functionality.
* @typedef {Object} FileRequestsGeneralFileRequestsError
* @property {('disabled_for_team'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Arguments for get.
* @typedef {Object} FileRequestsGetFileRequestArgs
* @property {string} id - The ID of the file request to retrieve.
*/ /**
* There was an error retrieving the specified file request.
* @typedef {Object} FileRequestsGetFileRequestError
* @property {('disabled_for_team'|'other'|'not_found'|'not_a_folder'|'app_lacks_access'|'no_permission'|'email_unverified'|'validation_error')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FileRequestsGracePeriod
* @property {('one_day'|'two_days'|'seven_days'|'thirty_days'|'always'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Arguments for list:2.
* @typedef {Object} FileRequestsListFileRequestsArg
* @property {number} limit - The maximum number of file requests that should be
* returned per request.
*/ /**
* @typedef {Object} FileRequestsListFileRequestsContinueArg
* @property {string} cursor - The cursor returned by the previous API call
* specified in the endpoint description.
*/ /**
* There was an error retrieving the file requests.
* @typedef {Object} FileRequestsListFileRequestsContinueError
* @property {('disabled_for_team'|'other'|'invalid_cursor')} .tag - Tag identifying the union variant.
*/ /**
* There was an error retrieving the file requests.
* @typedef {Object} FileRequestsListFileRequestsError
* @property {('disabled_for_team'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Result for list.
* @typedef {Object} FileRequestsListFileRequestsResult
* @property {Array.<FileRequestsFileRequest>} file_requests - The file requests
* owned by this user. Apps with the app folder permission will only see file
* requests in their app folder.
*/ /**
* Result for list:2 and list/continue.
* @typedef {Object} FileRequestsListFileRequestsV2Result
* @property {Array.<FileRequestsFileRequest>} file_requests - The file requests
* owned by this user. Apps with the app folder permission will only see file
* requests in their app folder.
* @property {string} cursor - Pass the cursor into list/continue to obtain
* additional file requests.
* @property {boolean} has_more - Is true if there are additional file requests
* that have not been returned yet. An additional call to :route:list/continue`
* can retrieve them.
*/ /**
* Arguments for update.
* @typedef {Object} FileRequestsUpdateFileRequestArgs
* @property {string} id - The ID of the file request to update.
* @property {string} [title] - The new title of the file request. Must not be
* empty.
* @property {string} [destination] - The new path of the folder in the Dropbox
* where uploaded files will be sent. For apps with the app folder permission,
* this will be relative to the app folder.
* @property {FileRequestsUpdateFileRequestDeadline} deadline - The new deadline
* for the file request. Deadlines can only be set by Professional and Business
* accounts.
* @property {boolean} [open] - Whether to set this file request as open or
* closed.
* @property {string} [description] - The description of the file request.
*/ /**
* @typedef {Object} FileRequestsUpdateFileRequestDeadline
* @property {FileRequestsFileRequestDeadline} [update] - Available if .tag is
* update. If :val:`null`, the file request's deadline is cleared.
* @property {('no_update'|'update'|'other')} .tag - Tag identifying the union variant.
*/ /**
* There is an error updating the file request.
* @typedef {Object} FileRequestsUpdateFileRequestError
* @property {('disabled_for_team'|'other'|'not_found'|'not_a_folder'|'app_lacks_access'|'no_permission'|'email_unverified'|'validation_error')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesAddTagArg
* @property {string} path - Path to the item to be tagged.
* @property {string} tag_text - The value of the tag to add. Will be
* automatically converted to lowercase letters.
*/ /**
* @typedef {Object} FilesAddTagError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {('path'|'other'|'too_many_tags')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesAlphaGetMetadataArg
* @property {string} path - The path of a file or folder on Dropbox.
* @property {boolean} include_media_info - If true, FileMetadata.media_info is
* set for photo and video.
* @property {boolean} include_deleted - If true, DeletedMetadata will be
* returned for deleted file or folder, otherwise LookupError.not_found will be
* returned.
* @property {boolean} include_has_explicit_shared_members - If true, the
* results will include a flag for each file indicating whether or not that
* file has any explicit members.
* @property {FilePropertiesTemplateFilterBase} [include_property_groups] - If
* set to a valid list of template IDs, FileMetadata.property_groups is set if
* there exists property data associated with the file and each of the listed
* templates.
* @property {Array.<Object>} [include_property_templates] - If set to a valid
* list of template IDs, FileMetadata.property_groups is set for files with
* custom properties.
*/ /**
* @typedef {Object} FilesAlphaGetMetadataError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {FilePropertiesLookUpPropertiesError} [properties_error] -
* Available if .tag is properties_error.
* @property {('path'|'properties_error')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesBaseTagError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {('path'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesCommitInfo
* @property {string} path - Path in the user's Dropbox to save the file.
* @property {FilesWriteMode} mode - Selects what to do if the file already
* exists.
* @property {boolean} autorename - If there's a conflict, as determined by
* mode, have the Dropbox server try to autorename the file to avoid conflict.
* @property {Timestamp} [client_modified] - The value to store as the
* client_modified timestamp. Dropbox automatically records the time at which
* the file was written to the Dropbox servers. It can also record an additional
* timestamp, provided by Dropbox desktop clients, mobile clients, and API apps
* of when the file was actually created or modified.
* @property {boolean} mute - Normally, users are made aware of any file
* modifications in their Dropbox account via notifications in the client
* software. If true, this tells the clients that this modification shouldn't
* result in a user notification.
* @property {Array.<FilePropertiesPropertyGroup>} [property_groups] - List of
* custom properties to add to file.
* @property {boolean} strict_conflict - Be more strict about how each WriteMode
* detects conflict. For example, always return a conflict error when mode =
* WriteMode.update and the given "rev" doesn't match the existing file's "rev",
* even if the existing file has been deleted. This also forces a conflict even
* when the target path refers to a file with identical contents.
*/ /**
* @typedef {Object} FilesContentSyncSetting
* @property {string} id - Id of the item this setting is applied to.
* @property {FilesSyncSetting} sync_setting - Setting for this item.
*/ /**
* @typedef {Object} FilesContentSyncSettingArg
* @property {string} id - Id of the item this setting is applied to.
* @property {FilesSyncSettingArg} sync_setting - Setting for this item.
*/ /**
* @typedef {Object} FilesCreateFolderArg
* @property {string} path - Path in the user's Dropbox to create.
* @property {boolean} autorename - If there's a conflict, have the Dropbox
* server try to autorename the folder to avoid the conflict.
*/ /**
* @typedef {Object} FilesCreateFolderBatchArg
* @property {Array.<Object>} paths - List of paths to be created in the user's
* Dropbox. Duplicate path arguments in the batch are considered only once.
* @property {boolean} autorename - If there's a conflict, have the Dropbox
* server try to autorename the folder to avoid the conflict.
* @property {boolean} force_async - Whether to force the create to happen
* asynchronously.
*/ /**
* @typedef {Object} FilesCreateFolderBatchError
* @property {('too_many_files'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesCreateFolderBatchJobStatus
* @property {FilesCreateFolderBatchResult} [complete] - Available if .tag is
* complete. The batch create folder has finished.
* @property {FilesCreateFolderBatchError} [failed] - Available if .tag is
* failed. The batch create folder has failed.
* @property {('in_progress'|'complete'|'failed'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Result returned by create_folder_batch that may either launch an asynchronous
* job or complete synchronously.
* @typedef {Object} FilesCreateFolderBatchLaunch
* @property {string} [async_job_id] - Available if .tag is async_job_id. This
* response indicates that the processing is asynchronous. The string is an id
* that can be used to obtain the status of the asynchronous job.
* @property {FilesCreateFolderBatchResult} [complete] - Available if .tag is
* complete.
* @property {('async_job_id'|'complete'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesCreateFolderBatchResult
* @property {Array.<FilesCreateFolderBatchResultEntry>} entries - Each entry in
* CreateFolderBatchArg.paths will appear at the same position inside
* CreateFolderBatchResult.entries.
*/ /**
* @typedef {Object} FilesCreateFolderBatchResultEntry
* @property {FilesCreateFolderEntryResult} [success] - Available if .tag is
* success.
* @property {FilesCreateFolderEntryError} [failure] - Available if .tag is
* failure.
* @property {('success'|'failure')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesCreateFolderEntryError
* @property {FilesWriteError} [path] - Available if .tag is path.
* @property {('path'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesCreateFolderEntryResult
* @property {FilesFolderMetadata} metadata - Metadata of the created folder.
*/ /**
* @typedef {Object} FilesCreateFolderError
* @property {FilesWriteError} [path] - Available if .tag is path.
* @property {'path'} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesCreateFolderResult
* @property {FilesFolderMetadata} metadata - Metadata of the created folder.
*/ /**
* @typedef {Object} FilesDeleteArg
* @property {string} path - Path in the user's Dropbox to delete.
* @property {string} [parent_rev] - Perform delete if given "rev" matches the
* existing file's latest "rev". This field does not support deleting a folder.
*/ /**
* @typedef {Object} FilesDeleteBatchArg
* @property {Array.<FilesDeleteArg>} entries
*/ /**
* @typedef {Object} FilesDeleteBatchError
* @property {('too_many_write_operations'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesDeleteBatchJobStatus
* @property {FilesDeleteBatchResult} [complete] - Available if .tag is
* complete. The batch delete has finished.
* @property {FilesDeleteBatchError} [failed] - Available if .tag is failed. The
* batch delete has failed.
* @property {('in_progress'|'complete'|'failed'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Result returned by delete_batch that may either launch an asynchronous job or
* complete synchronously.
* @typedef {Object} FilesDeleteBatchLaunch
* @property {string} [async_job_id] - Available if .tag is async_job_id. This
* response indicates that the processing is asynchronous. The string is an id
* that can be used to obtain the status of the asynchronous job.
* @property {FilesDeleteBatchResult} [complete] - Available if .tag is
* complete.
* @property {('async_job_id'|'complete'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesDeleteBatchResult
* @property {Array.<FilesDeleteBatchResultEntry>} entries - Each entry in
* DeleteBatchArg.entries will appear at the same position inside
* DeleteBatchResult.entries.
*/ /**
* @typedef {Object} FilesDeleteBatchResultData
* @property {(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata)}
* metadata - Metadata of the deleted object.
*/ /**
* @typedef {Object} FilesDeleteBatchResultEntry
* @property {FilesDeleteBatchResultData} [success] - Available if .tag is
* success.
* @property {FilesDeleteError} [failure] - Available if .tag is failure.
* @property {('success'|'failure')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesDeleteError
* @property {FilesLookupError} [path_lookup] - Available if .tag is
* path_lookup.
* @property {FilesWriteError} [path_write] - Available if .tag is path_write.
* @property {('path_lookup'|'path_write'|'too_many_write_operations'|'too_many_files'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesDeleteResult
* @property {(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata)}
* metadata - Metadata of the deleted object.
*/ /**
* Indicates that there used to be a file or folder at this path, but it no
* longer exists.
* @typedef {Object} FilesDeletedMetadata
@property {'deleted'} [.tag] - Tag identifying this subtype variant. This field
is only present when needed to discriminate between multiple possible subtypes.
* @property {string} name - The last component of the path (including
* extension). This never contains a slash.
* @property {string} [path_lower] - The lowercased full path in the user's
* Dropbox. This always starts with a slash. This field will be null if the file
* or folder is not mounted.
* @property {string} [path_display] - The cased path to be used for display
* purposes only. In rare instances the casing will not correctly match the
* user's filesystem, but this behavior will match the path provided in the Core
* API v1, and at least the last path component will have the correct casing.
* Changes to only the casing of paths won't be returned by
* list_folder/continue. This field will be null if the file or folder is not
* mounted.
* @property {string} [parent_shared_folder_id] - Please use
* FileSharingInfo.parent_shared_folder_id or
* FolderSharingInfo.parent_shared_folder_id instead.
* @property {string} [preview_url] - The preview URL of the file.
*/ /**
* Dimensions for a photo or video.
* @typedef {Object} FilesDimensions
* @property {number} height - Height of the photo/video.
* @property {number} width - Width of the photo/video.
*/ /**
* @typedef {Object} FilesDownloadArg
* @property {string} path - The path of the file to download.
* @property {string} [rev] - Please specify revision in path instead.
*/ /**
* @typedef {Object} FilesDownloadError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {('path'|'unsupported_file'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesDownloadZipArg
* @property {string} path - The path of the folder to download.
*/ /**
* @typedef {Object} FilesDownloadZipError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {('path'|'too_large'|'too_many_files'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesDownloadZipResult
* @property {FilesFolderMetadata} metadata
*/ /**
* @typedef {Object} FilesExportArg
* @property {string} path - The path of the file to be exported.
* @property {string} [export_format] - The file format to which the file should
* be exported. This must be one of the formats listed in the file's
* export_options returned by get_metadata. If none is specified, the default
* format (specified in export_as in file metadata) will be used.
*/ /**
* @typedef {Object} FilesExportError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {('path'|'non_exportable'|'invalid_export_format'|'retry_error'|'other')} .tag - Tag identifying the union variant.
*/ /**
* Export information for a file.
* @typedef {Object} FilesExportInfo
* @property {string} [export_as] - Format to which the file can be exported to.
* @property {Array.<string>} [export_options] - Additional formats to which the
* file can be exported. These values can be specified as the export_format in
* /files/export.
*/ /**
* @typedef {Object} FilesExportMetadata
* @property {string} name - The last component of the path (including
* extension). This never contains a slash.
* @property {number} size - The file size in bytes.
* @property {string} [export_hash] - A hash based on the exported file content.
* This field can be used to verify data integrity. Similar to content hash. For
* more information see our Content hash
* https://www.dropbox.com/developers/reference/content-hash page.
* @property {number} [paper_revision] - If the file is a Paper doc, this gives
* the latest doc revision which can be used in paper/update.
*/ /**
* @typedef {Object} FilesExportResult
* @property {FilesExportMetadata} export_metadata - Metadata for the exported
* version of the file.
* @property {FilesFileMetadata} file_metadata - Metadata for the original file.
*/ /**
* @typedef {Object} FilesFileCategory
* @property {('image'|'document'|'pdf'|'spreadsheet'|'presentation'|'audio'|'video'|'folder'|'paper'|'others'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesFileLock
* @property {FilesFileLockContent} content - The lock description.
*/ /**
* @typedef {Object} FilesFileLockContent
* @property {FilesSingleUserLock} [single_user] - Available if .tag is
* single_user. A lock held by a single user.
* @property {('unlocked'|'single_user'|'other')} .tag - Tag identifying the union variant.
*/ /**
* @typedef {Object} FilesFileLockMetadata
* @property {boolean} [is_lockholder] - True if caller holds the file lock.
* @property {string} [lockholder_name] - The display name of the lock holder.
* @property {string} [lockholder_account_id] - The account ID of the lock
* holder if known.
* @property {Timestamp} [created] - The timestamp of the lock was created.
*/ /**
* @typedef {Object} FilesFileMetadata
@property {'file'} [.tag] - Tag identifying this subtype variant. This field is
only present when needed to discriminate between multiple possible subtypes.
* @property {string} name - The last component of the path (including
* extension). This never contains a slash.
* @property {string} id - A unique identifier for the file.
* @property {Timestamp} client_modified - For files, this is the modification
* time set by the desktop client when the file was added to Dropbox. Since this
* time is not verified (the Dropbox server stores whatever the desktop client
* sends up), this should only be used for display purposes (such as sorting)
* and not, for example, to determine if a file has changed or not.
* @property {Timestamp} server_modified - The last time the file was modified
* on Dropbox.
* @property {string} rev - A unique identifier for the current revision of a
* file. This field is the same rev as elsewhere in the API and can be used to
* detect changes and avoid conflicts.
* @property {number} size - The file size in bytes.
* @property {string} [path_lower] - The lowercased full path in the user's
* Dropbox. This always starts with a slash. This field will be null if the file
* or folder is not mounted.
* @property {string} [path_display] - The cased path to be used for display
* purposes only. In rare instances the casing will not correctly match the
* user's filesystem, but this behavior will match the path provided in the Core
* API v1, and at least the last path component will have the correct casing.
* Changes to only the casing of paths won't be returned by
* list_folder/continue. This field will be null if the file or folder is not
* mounted.
* @property {string} [parent_shared_folder_id] - Please use
* FileSharingInfo.parent_shared_folder_id or
* FolderSharingInfo.parent_shared_folder_id instead.
* @property {string} [preview_url] - The preview URL of the file.
* @property {FilesMediaInfo} [media_info] - Additional information if the file
* is a photo or video. This field will not be set on entries returned by
* list_folder, list_folder/continue, or get_thumbnail_batch, starting December
* 2, 2019.
* @property {FilesSymlinkInfo} [symlink_info] - Set if this file is a symlink.
* @property {FilesFileSharingInfo} [sharing_info] - Set if this file is
* contained in a shared folder.
* @property {boolean} is_downloadable - If true, file can be downloaded
* directly; else the file must be exported.
* @property {FilesExportInfo} [export_info] - Information about format this
* file can be exported to. This filed must be set if is_downloadable is set to
* false.
* @property {Array.<FilePropertiesPropertyGroup>} [property_groups] -
* Additional information if the file has custom properties with the property
* template specified.
* @property {boolean} [has_explicit_shared_members] - This flag will only be
* present if include_has_explicit_shared_members is true in list_folder or
* get_metadata. If this flag is present, it will be true if this file has any
* explicit shared members. This is diffe