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.
910 lines • 516 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
*//**
* 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 {('invalid_access_token'|'invalid_select_user'|'invalid_select_admin'|'user_suspended'|'expired_access_token'|'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} 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 use'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.
*//**
* @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'|'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')} .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.
*//**
* @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'|'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.
*//**
* 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.
*//**
* 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.
*//**
* 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.
*//**
* @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.
*//**
* 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.
*//**
* 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.
*//**
* @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} 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} FilesCommitInfo
* @property {Object} contents - The file contents to be uploaded.
* @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.
*//**
* @typedef {Object} FilesCommitInfoWithProperties
* @property {Object} contents - The file contents to be uploaded.
* @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.
*//**
* @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.
*//**
* 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'|'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} 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 {FilesMediaInfo} [media_info] - Additional information if the file
* is a photo or video.
* @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 {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 different from sharing_info in that this
* could be true in the case where a file has explicit members but is not
* contained within a shared folder.
* @property {string} [content_hash] - A hash of the file content. This field
* can be used to verify data integrity. For more information see our Content
* hash https://www.dropbox.com/developers/reference/content-hash page.
*//**
* @typedef {Object} FilesFileOpsResult
*//**
* Sharing info for a file which is contained by a shared folder.
* @typedef {Object} FilesFileSharingInfo
* @property {boolean} read_only - True if the file or folder is inside a
* read-only shared folder.
* @property {string} parent_shared_folder_id - ID of shared folder that holds
* this file.
* @property {string} [modified_by] - The last user who modified the file. This
* field will be null if the user's account has been deleted.
*//**
* @typedef {Object} FilesFolderMetadata
@property {'folder'} [.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 folder.
* @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} [shared_folder_id] - Please use sharing_info instead.
* @property {FilesFolderSharingInfo} [sharing_info] - Set if the folder is
* contained in a shared folder or is a shared folder mount point.
* @property {Array.<FilePropertiesPropertyGroup>} [property_groups] -
* Additional information if the file has custom properties with the property
* template specified. Note that only properties associated with user-owned
* templates, not team-owned templates, can be attached to folders.
*//**
* Sharing info for a folder which is contained in a shared folder or is a
* shared folder mount point.
* @typedef {Object} FilesFolderSharingInfo
* @property {boolean} read_only - True if the file or folder is inside a
* read-only shared folder.
* @property {string} [parent_shared_folder_id] - Set if the folder is contained
* by a shared folder.
* @property {string} [shared_folder_id] - If this folder is a shared folder
* mount point, the ID of the shared folder mounted at this location.
* @property {boolean} traverse_only - Specifies that the folder can only be
* traversed and the user can only see a limited subset of the contents of this
* folder because they don't have read access to this folder. They do, however,
* have access to some sub folder.
* @property {boolean} no_access - Specifies that the folder cannot be accessed
* by the user.
*//**
* @typedef {Object} FilesGetCopyReferenceArg
* @property {string} path - The path to the file or folder you want to get a
* copy reference to.
*//**
* @typedef {Object} FilesGetCopyReferenceError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {('path'|'other')} .tag - Tag identifying the union variant.
*//**
* @typedef {Object} FilesGetCopyReferenceResult
* @property {(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata)}
* metadata - Metadata of the file or folder.
* @property {string} copy_reference - A copy reference to the file or folder.
* @property {Timestamp} expires - The expiration date of the copy reference.
* This value is currently set to be far enough in the future so that expiration
* is effectively not an issue.
*//**
* @typedef {Object} FilesGetMetadataArg
* @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.
*//**
* @typedef {Object} FilesGetMetadataError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {'path'} .tag - Tag identifying the union variant.
*//**
* @typedef {Object} FilesGetTemporaryLinkArg
* @property {string} path - The path to the file you want a temporary link to.
*//**
* @typedef {Object} FilesGetTemporaryLinkError
* @property {FilesLookupError} [path] - Available if .tag is path.
* @property {('path'|'other')} .tag - Tag identifying the union variant.
*//**
* @typedef {Object} FilesGetTemporaryLinkResult
* @property {FilesFileMetadata} metadata - Metadata of the file.
* @property {string} link - The temporary link which can be used to stream
* content the file.
*//**
* @typedef {Object} FilesGetTemporaryUploadLinkArg
* @property {FilesCommitInfo} commit_info - Contains the path and other
* optional modifiers for the future upload commit. Equivalent to the parameters
* provided to upload.
* @property {number} duration - How long before this link expires, in seconds.
* Attempting to start an upload with this link longer than this period of time
* after link creation will result in an error.
*//**
* @typedef {Object} FilesGetTemporaryUploadLinkResult
* @property {string} link - The temporary link which can be used to stream a
* file to a Dropbox location.
*//**
* Arguments for get_thumbnail_batch.
* @typedef {Object} FilesGetThumbnailBatchArg
* @property {Array.<FilesThumbnailArg>} entries - List of files to get
* thumbnails.
*//**
* @typedef {Object} FilesGetThumbnailBatchError
* @property {('too_many_files'|'other')} .tag - Tag identifying the union variant.
*//**
* @typedef {Object} FilesGetThumbnailBatchResult
* @property {Array.<FilesGetThumbnailBatchResultEntry>} entries - List of files
* and their thumbnails.
*//**
* @typedef {Object} FilesGetThumbnailBatchResultData
* @property {FilesFileMetadata} metadata
* @property {string} thumbnail - A string containing the base64-encoded
* thumbnail data for this file.
*//**
* @typedef {Object} FilesGetThumbnailBatchResultEntry
* @property {FilesGetThumbnailBatchResultData} [success] - Available if .tag is
* success.
* @property {FilesThumbnailError} [failure] - Available if .tag is failure. The
* result for this file if it was an error.
* @prope