diff --git a/account.stone b/account.stone deleted file mode 100644 index 609d100..0000000 --- a/account.stone +++ /dev/null @@ -1,49 +0,0 @@ -namespace account - -import common - -# -# Route set_profile_photo -# - -union PhotoSourceArg - base64_data String - "Image data in base64-encoded bytes." - - example default - base64_data = "SW1hZ2UgZGF0YSBpbiBiYXNlNjQtZW5jb2RlZCBieXRlcy4gTm90IGEgdmFsaWQgZXhhbXBsZS4=" - - -struct SetProfilePhotoArg - photo PhotoSourceArg - "Image to set as the user's new profile photo." - - example default - photo = default - - -struct SetProfilePhotoResult - profile_photo_url String - "URL for the photo representing the user, if one is set." - - example default - profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128" - - -union SetProfilePhotoError - file_type_error - "File cannot be set as profile photo." - file_size_error - "File cannot exceed 10 MB." - dimension_error - "Image must be larger than 128 x 128." - thumbnail_error - "Image could not be thumbnailed." - transient_error - "Temporary infrastructure failure, please retry." - -route set_profile_photo(SetProfilePhotoArg, SetProfilePhotoResult, SetProfilePhotoError) - "Sets a user's profile photo." - - attrs - scope = "account_info.write" diff --git a/account_account_photo.stone b/account_account_photo.stone new file mode 100644 index 0000000..6d86fb2 --- /dev/null +++ b/account_account_photo.stone @@ -0,0 +1,83 @@ +namespace account + +import account_id +import common + + +union PhotoSourceArg + base64_data String + "Image data in base64-encoded bytes." + + example default + base64_data = "SW1hZ2UgZGF0YSBpbiBiYXNlNjQtZW5jb2RlZCBieXRlcy4gTm90IGEgdmFsaWQgZXhhbXBsZS4=" + +union SetProfilePhotoError + file_type_error + "File cannot be set as profile photo." + file_size_error + "File cannot exceed 10 MB." + dimension_error + "Image must be larger than 128 x 128." + thumbnail_error + "Image could not be thumbnailed." + transient_error + "Temporary infrastructure failure, please retry." + +struct SetProfilePhotoArg + photo PhotoSourceArg + "Image to set as the user's new profile photo." + + example default + photo = default + +struct SetProfilePhotoResult + profile_photo_url String + "URL for the photo representing the user, if one is set." + + example default + profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128" + +struct AccountPhotoGetArg + dbx_account_id String + "Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'." + size String + "A string representing the size of the photo." + circle_crop Boolean + "True if the photo should be cropped and false otherwise." + expect_account_photo Boolean + "True if we expect account photo to exist." + + example default + dbx_account_id = "dbid:s0meEnc0ded1d" + size = "16x16" + circle_crop = false + expect_account_photo = true + +union ThumbnailError + permanent_failure + "Indicates permanent infrastructural failure." + temporary_failure + "Indicates temporary infrastructural failure." + +union AccountPhotoGetError + thumbnail_error ThumbnailError + "Indicates infrastructural failure." + account_photo_missing + "Account photo is missing (but we did not expect it to exist)." + expected_account_photo_missing + "Account photo was expected to exist, but it's missing." + +struct AccountPhotoGetResult + content_type String + "The data returned by get_photo." + + example default + content_type = "image/jpeg" + +route set_profile_photo (SetProfilePhotoArg, SetProfilePhotoResult, SetProfilePhotoError) + "Sets a user's profile photo." + + attrs + auth = "user" + scope = "account_info.write" + diff --git a/account_account_photo_block.stone b/account_account_photo_block.stone new file mode 100644 index 0000000..eb2432e --- /dev/null +++ b/account_account_photo_block.stone @@ -0,0 +1,13 @@ +namespace account + +route get_photo (AccountPhotoGetArg, AccountPhotoGetResult, AccountPhotoGetError) + "This lovely endpoint gets the account photo of a given user." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "account_info.read" + select_admin_mode = "whole_team" + style = "download" + diff --git a/account_id.stone b/account_id.stone new file mode 100644 index 0000000..aa76598 --- /dev/null +++ b/account_id.stone @@ -0,0 +1,6 @@ +namespace account_id + +annotation_type ContainsDbidAnnotation + "Annotation type should be applied to Response object fields which contain account id" + + authorize_caller Boolean = true \ No newline at end of file diff --git a/async.stone b/async_common_async.stone similarity index 81% rename from async.stone rename to async_common_async.stone index 2917acf..44b6a64 100644 --- a/async.stone +++ b/async_common_async.stone @@ -1,31 +1,15 @@ namespace async -# -# Types for writing asynchronous API methods. -# -# There are two calls for each asynchronous method: -# 1. A "Launch" method that (optionally) launches the asynchronous job -# 2. A "Polling" method that polls for the status of the job that was launched by the first call. -# -# The following definitions are prefixed by "Launch" or "Poll", according to their intended use. - +import common alias AsyncJobId = String(min_length=1) - -# -# Launch -# - union_closed LaunchResultBase "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 :type:`LaunchEmptyResult` for an example." - async_job_id AsyncJobId "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." @@ -36,23 +20,17 @@ union_closed LaunchResultBase union_closed LaunchEmptyResult extends LaunchResultBase "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." - complete "The job finished synchronously and successfully." example complete complete = null - + example async_job_id async_job_id = "34g93hh34h04y384084" -# -# Poll -# - struct PollArg "Arguments for methods that poll the status of an asynchronous job." - async_job_id AsyncJobId "Id of the asynchronous job. This is the value of a response returned from the method that launched the job." @@ -60,39 +38,32 @@ struct PollArg example default async_job_id = "34g93hh34h04y384084" -# TODO(kelkabany): Remove `error_msg` since others might want to return it -# differently. union_closed PollResultBase "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 :type:`PollEmptyResult` for an example." - + See :type:`PollEmptyResult` for an example" in_progress "The asynchronous job is still in progress." - union_closed PollEmptyResult extends PollResultBase "Result returned by methods that poll for the status of an asynchronous job. Upon completion of the job, no additional information is returned." - complete "The asynchronous job has completed successfully." example complete complete = null - + example in_progress in_progress = null - union PollError "Error returned by methods for polling the status of asynchronous job." - invalid_async_job_id "The job ID is invalid." internal_error "Something went wrong with the job on Dropbox's end. You'll need to verify that the action you were taking succeeded, and if not, try again. This should happen very rarely." + diff --git a/auth.stone b/auth_apiv2_auth.stone similarity index 82% rename from auth.stone rename to auth_apiv2_auth.stone index a30bcd3..a1e4e41 100644 --- a/auth.stone +++ b/auth_apiv2_auth.stone @@ -2,13 +2,8 @@ namespace auth import common -struct TokenScopeError - required_scope String - "The required scope to access the route." - union AuthError "Errors occurred during authentication." - invalid_access_token "The access token is invalid." invalid_select_user @@ -24,39 +19,60 @@ union AuthError route_access_denied "The route is not available to public." -route token/revoke(Void, Void, Void) - "Disables the access token used to authenticate the call. - If there is a corresponding refresh token for the access token, - this disables that refresh token, as well as any other access tokens for that refresh token." - - attrs - allow_app_folder_app = true - union RateLimitReason too_many_requests "You are making too many requests in the past few minutes." too_many_write_operations "There are currently too many write operations happening in the user's Dropbox." +union TokenFromOAuth1Error + invalid_oauth1_token_info + "Part or all of the OAuth 1.0 access token info is invalid." + app_id_mismatch + "The authorized app does not match the app associated with the supplied access token." + +union AccessError + "Error occurred because the account doesn't have permission to access the resource." + invalid_account_type InvalidAccountTypeError + "Current account type cannot access the resource." + paper_access_denied PaperAccessError + "Current account cannot access Paper." + team_access_denied + "Team doesn't have permission to access." + no_permission NoPermissionError + "Caller does not have permission to access the resource." + +union PaperAccessError + paper_disabled + "Paper is disabled." + not_paper_user + "The provided user has not used Paper yet." + +union InvalidAccountTypeError + endpoint + "Current account type doesn't have permission to access this route endpoint." + feature + "Current account type doesn't have permission to access this feature." + +union NoPermissionError + unauthorized_account_id_usage UnauthorizedAccountIdUsageError + "Current caller does not have permission to access the account information for one or more of the specified account IDs." + +struct TokenScopeError + required_scope String + "The required scope to access the route." + struct RateLimitError "Error occurred because the app is being rate limited." - reason RateLimitReason "The reason why the app is being rate limited." - retry_after UInt64 = 1 "The number of seconds that the app should wait before making another request." -# -# OAuth 1.0 token conversion -# - struct TokenFromOAuth1Arg - oauth1_token String(min_length=1) "The supplied OAuth 1.0 access token." - oauth1_token_secret String(min_length=1) "The token secret associated with the supplied access token." @@ -65,42 +81,29 @@ struct TokenFromOAuth1Arg oauth1_token_secret = "qomoftv0472git7" struct TokenFromOAuth1Result - oauth2_token String(min_length=1) "The OAuth 2.0 token generated from the supplied OAuth 1.0 token." example default oauth2_token = "9mCrkS7BIdAAAAAAAAAAHHS0TsSnpYvKQVtKdBnN5IuzhYOGblSgTcHgBFKFMmFn" -union TokenFromOAuth1Error - invalid_oauth1_token_info - "Part or all of the OAuth 1.0 access token info is invalid." - app_id_mismatch - "The authorized app does not match the app associated with the supplied access token." +struct UnauthorizedAccountIdUsageError + unauthorized_account_ids List(String) + "The account IDs that the caller does not have permission to use." + +route token/revoke (Void, Void, Void) + "Disables the access token used to authenticate the call. + If there is a corresponding refresh token for the access token, + this disables that refresh token, as well as any other access tokens for that refresh token." -route token/from_oauth1(TokenFromOAuth1Arg, TokenFromOAuth1Result, TokenFromOAuth1Error) deprecated - "Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token." attrs - auth = "app" allow_app_folder_app = true + auth = "user" -union AccessError - "Error occurred because the account doesn't have permission to access the resource." - - invalid_account_type InvalidAccountTypeError - "Current account type cannot access the resource." - - paper_access_denied PaperAccessError - "Current account cannot access Paper." +route token/from_oauth1 (TokenFromOAuth1Arg, TokenFromOAuth1Result, TokenFromOAuth1Error) deprecated + "Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token." -union PaperAccessError - paper_disabled - "Paper is disabled." - not_paper_user - "The provided user has not used Paper yet." + attrs + allow_app_folder_app = true + auth = "app" -union InvalidAccountTypeError - endpoint - "Current account type doesn't have permission to access this route endpoint." - feature - "Current account type doesn't have permission to access this feature." diff --git a/check_api_v2_service.stone b/check_api_v2_service.stone index d20f6d4..cf864a7 100644 --- a/check_api_v2_service.stone +++ b/check_api_v2_service.stone @@ -1,8 +1,6 @@ -# @generated by protoc-gen-stone. DO NOT EDIT. -# source: configs/proto/dropbox/proto/check/api_v2_service.proto namespace check -route user (EchoArg, EchoResult, Void) +route user (EchoArg, EchoResult, EchoError) "This endpoint performs User Authentication, validating the supplied access token, and returns the supplied string, to allow you to test your code and connection to the Dropbox API. It has no other effect. If you receive an HTTP 200 response with the supplied @@ -15,7 +13,7 @@ route user (EchoArg, EchoResult, Void) is_preview = true scope = "account_info.read" -route app (EchoArg, EchoResult, Void) +route app (EchoArg, EchoResult, EchoError) "This endpoint performs App Authentication, validating the supplied app key and secret, and returns the supplied string, to allow you to test your code and connection to the Dropbox API. It has no other effect. If you receive an HTTP 200 response with the supplied diff --git a/check_api_v2_types.stone b/check_api_v2_types.stone index 3911f84..a8f17ce 100644 --- a/check_api_v2_types.stone +++ b/check_api_v2_types.stone @@ -1,9 +1,13 @@ -# @generated by protoc-gen-stone. DO NOT EDIT. -# source: configs/proto/dropbox/proto/check/api_v2_types.proto namespace check import common +union EchoError + "EchoError contains the error returned from the Dropbox servers." + user_requested + "The request was successful." + + struct EchoArg "Contains the arguments to be sent to the Dropbox servers." query String(max_length=500) = "" diff --git a/common.stone b/common.stone index 3a55b98..705b0c7 100644 --- a/common.stone +++ b/common.stone @@ -9,89 +9,3 @@ namespace common alias DropboxTimestamp = Timestamp("%Y-%m-%dT%H:%M:%SZ") alias Date = Timestamp("%Y-%m-%d") - -# Note - "\\." is needed in order to translate to "\." - -# Note: If this pattern is changed, we also need to update _parse_json_arg_to_stone_data_type in dropbox/api/v2/substrate/wrapper.py -alias EmailAddress = String(pattern="^['#&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\\.[A-Za-z]{2,15}$", max_length=255) - -# First name or Last name. NOTE: max_length should be synced with USER_NAME_MAX_LEN -alias NamePart = String(pattern="[^\/:?*<>\"|]*", min_length=1, max_length=100) - -# First name or Last name. NOTE: max_length should be synced with USER_NAME_MAX_LEN -# Accepting zeo length values which are usually used to clear the first or last name. -alias OptionalNamePart = String(pattern="[^\/:?*<>\"|]*", max_length=100) - -# We don't limit the length because it's always generated from the first & last names. -alias DisplayName = String(pattern="[^\/:?*<>\"|]*") - -# There are some existing accounts with special characters in their names. Though we don't allow such special characters -# being used through UI, it's still possible to use them right now through some endpoints. This alias should be used in -# the places where those legacy account names are expected, one of the example being the team audit logging. In other -# places we should use `DisplayName` instead to prevent more usage of these special characters. -alias DisplayNameLegacy = String - -alias NamespaceId = String(pattern="[-_0-9a-zA-Z:]+") - -alias SharedFolderId = NamespaceId - -alias SessionId = String - -struct RootInfo - "Information about current user's root." - - union - team TeamRootInfo - user UserRootInfo - - root_namespace_id NamespaceId - "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 :field:`RootInfo.home_namespace_id`." - - home_namespace_id NamespaceId - "The namespace ID for user's home namespace." - - example default - user = default - -struct TeamRootInfo extends RootInfo - "Root info when user is member of a team with a separate root namespace ID." - - home_path String - "The path for user's home directory under the shared team root." - -struct UserRootInfo extends RootInfo - "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." - - example default - home_namespace_id = "3235641" - root_namespace_id = "3235641" - -union PathRoot - home - "Paths are relative to the authenticating user's home namespace, - whether or not that user belongs to a team." - - root NamespaceId - "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.)." - - namespace_id NamespaceId - "Paths are relative to given namespace id (This results in - :field:`PathRootError.no_permission` if you don't have access - to this namespace.)." - - -union PathRootError - invalid_root RootInfo - "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." - no_permission - "You don't have permission to access the namespace id in Dropbox-API-Path-Root - header." - -alias LanguageCode = String(min_length=2) - "A ISO639-1 code." diff --git a/common_common.stone b/common_common.stone new file mode 100644 index 0000000..c9d1a08 --- /dev/null +++ b/common_common.stone @@ -0,0 +1,76 @@ +namespace common + +alias EmailAddress = String(max_length=255, pattern="^['#&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\\.[A-Za-z]{2,15}$") + +alias NamePart = String(max_length=50, min_length=1, pattern="[^\/:?*<>\"|]*") + +alias OptionalNamePart = String(max_length=50, pattern="[^\/:?*<>\"|]*") + +alias DisplayName = String(pattern="[^\/:?*<>\"|]*") + +alias DisplayNameLegacy = String + +alias NamespaceId = String(pattern="[-_0-9a-zA-Z:]+") + +alias SharedFolderId = NamespaceId + +alias SessionId = String + +alias LanguageCode = String(min_length=2) + +union PathRoot + home + "Paths are relative to the authenticating user's home namespace, + whether or not that user belongs to a team." + root NamespaceId + "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.)." + namespace_id NamespaceId + "Paths are relative to given namespace id (This results in + :field:`PathRootError.no_permission` if you don't have access + to this namespace.)." + +struct RootInfo + "Information about current user's root." + union + team TeamRootInfo + user UserRootInfo + root_namespace_id NamespaceId + "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, + or the user root if user is member of a team with separate distinct roots for users. + Otherwise it will be the same as :field:`RootInfo.home_namespace_id`." + home_namespace_id NamespaceId + "The namespace ID for user's home namespace." + + example default + user = default + +struct DropboxDuration + seconds Int64 + nanos Int32 + +struct TeamRootInfo extends RootInfo + "Root info when user is member of a team with a separate root namespace ID." + home_path String + "The path for user's home directory under the shared team root." + +struct UserRootInfo extends RootInfo + "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." + home_path String? + "The path for user's home directory under the distinct user root." + + example default + home_namespace_id = "3235641" + root_namespace_id = "3235641" + +union PathRootError + invalid_root RootInfo + "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." + no_permission + "You don't have permission to access the namespace id in Dropbox-API-Path-Root + header." + diff --git a/contacts.stone b/contacts_apiv2_contacts.stone similarity index 81% rename from contacts.stone rename to contacts_apiv2_contacts.stone index 2c3c905..1bf165b 100644 --- a/contacts.stone +++ b/contacts_apiv2_contacts.stone @@ -2,13 +2,11 @@ namespace contacts import common -route delete_manual_contacts(Void, Void, Void) - "Removes all manually added contacts. - You'll still keep contacts who are on your team or who you imported. - New contacts will be added when you share." - - attrs - scope = "contacts.write" +union DeleteManualContactsError + contacts_not_found List(common.EmailAddress) + "Can't delete contacts from this list. + Make sure the list only has manually added contacts. + The deletion was cancelled." struct DeleteManualContactsArg email_addresses List(common.EmailAddress) @@ -17,14 +15,19 @@ struct DeleteManualContactsArg example default email_addresses = ["contactemailaddress1@domain.com", "contactemailaddress2@domain.com"] -union DeleteManualContactsError - contacts_not_found List(common.EmailAddress) - "Can't delete contacts from this list. - Make sure the list only has manually added contacts. - The deletion was cancelled." +route delete_manual_contacts (Void, Void, Void) + "Removes all manually added contacts. + You'll still keep contacts who are on your team or who you imported. + New contacts will be added when you share." -route delete_manual_contacts_batch(DeleteManualContactsArg, Void, DeleteManualContactsError) + attrs + auth = "user" + scope = "contacts.write" + +route delete_manual_contacts_batch (DeleteManualContactsArg, Void, DeleteManualContactsError) "Removes manually added contacts from the given list." attrs + auth = "user" scope = "contacts.write" + diff --git a/file_properties.stone b/file_properties_apiv2_file_properties_types.stone similarity index 84% rename from file_properties.stone rename to file_properties_apiv2_file_properties_types.stone index 7ffde9a..a4d22ea 100644 --- a/file_properties.stone +++ b/file_properties_apiv2_file_properties_types.stone @@ -1,141 +1,55 @@ namespace file_properties "This namespace contains helpers for property and template metadata endpoints. - These endpoints enable you to tag arbitrary key/value data to Dropbox files. + The most basic unit in this namespace is the :type:`PropertyField`. These fields encapsulate the actual key/value data. - The most basic unit in this namespace is the :type:`PropertyField`. These fields encapsulate the - actual key/value data. - - - Fields are added to a Dropbox file using a :type:`PropertyGroup`. Property groups contain a - reference to a Dropbox file and a :type:`PropertyGroupTemplate`. Property groups are uniquely - identified by the combination of their associated Dropbox file and template. - - - The :type:`PropertyGroupTemplate` is a way of restricting the possible key names and value types - of the data within a property group. The possible key names and value types are explicitly - enumerated using :type:`PropertyFieldTemplate` objects. - - - You can think of a property group template as a class definition for a particular key/value - metadata object, and the property groups themselves as the instantiations of these objects. - + Fields are added to a Dropbox file using a :type:`PropertyGroup`. Property groups contain a reference to a Dropbox file and a :type:`PropertyGroupTemplate`. Property groups are uniquely identified by the combination of their associated Dropbox file and template. - Templates are owned either by a user/app pair or team/app pair. Templates and their associated - properties can't be accessed by any app other than the app that created them, and even then, only - when the app is linked with the owner of the template (either a user or team). + The :type:`PropertyGroupTemplate` is a way of restricting the possible key names and value types of the data within a property group. The possible key names and value types are explicitly enumerated using :type:`PropertyFieldTemplate` objects. + You can think of a property group template as a class definition for a particular key/value metadata object, and the property groups themselves as the instantiations of these objects. - User-owned templates are accessed via the user-auth file_properties/templates/*_for_user endpoints, while - team-owned templates are accessed via the team-auth file_properties/templates/*_for_team endpoints. Properties - associated with either type of template can be accessed via the user-auth properties/* endpoints. + Templates are owned either by a user/app pair or team/app pair. Templates and their associated properties can't be accessed by any app other than the app that created them, and even then, only when the app is linked with the owner of the template (either a user or team). + User-owned templates are accessed via the user-auth file_properties/templates/*_for_user endpoints, while team-owned templates are accessed via the team-auth file_properties/templates/*_for_team endpoints. Properties associated with either type of template can be accessed via the user-auth properties/* endpoints. - Finally, properties can be accessed from a number of endpoints that return metadata, including - `files/get_metadata`, and `files/list_folder`. Properties can also be added during upload, using - `files/upload`. + Finally, properties can be accessed from a number of endpoints that return metadata, including `files/get_metadata`, and `files/list_folder`. Properties can also be added during upload, using `files/upload`." - " +import common -alias TemplateId = String(min_length=1,pattern="(/|ptid:).*") -alias PathOrId = String(pattern="/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)") alias Id = String(min_length=1) -alias PropertiesSearchCursor = String(min_length=1) - -# -# Core data types -# - -struct PropertyField - "Raw key/value data to be associated with a Dropbox file. Property fields are added to Dropbox - files as a :type:`PropertyGroup`." - - name String - "Key of the property field associated with a file and template. - Keys can be up to 256 bytes." - value String - "Value of the property field associated with a file and template. - Values can be up to 1024 bytes." - - example default - name = "Security Policy" - value = "Confidential" - -struct PropertyGroup - "A subset of the property fields described by the corresponding :type:`PropertyGroupTemplate`. - Properties are always added to a Dropbox file as a :type:`PropertyGroup`. - The possible key names and value types in this group are defined by the - corresponding :type:`PropertyGroupTemplate`." - template_id TemplateId - "A unique identifier for the associated template." - fields List(PropertyField) - "The actual properties associated with the template. There can be up to 32 - property types per template." - - example default - template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa" - fields = [default] - -struct PropertyFieldTemplate - "Defines how a single property field may be structured. Used exclusively by :type:`PropertyGroupTemplate`." - - name String - "Key of the property field being described. Property field keys can be up to 256 bytes." - description String - "Description of the property field. Property field descriptions can be up to 1024 bytes." - type PropertyType - "Data type of the value of this property field. This type - will be enforced upon property creation and modifications." - union - "Data type of the given property field added." +alias PathOrId = String(pattern="/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)") - string - "The associated property field will be of type string. Unicode is supported." +alias PropertiesSearchCursor = String(min_length=1) - example default - string = null +alias TemplateId = String(min_length=1, pattern="(/|ptid:).*") - example default - name = "Security Policy" - description = "This is the security policy of the file or folder described. - Policies can be Confidential, Public or Internal." - type = default +union AddPropertiesError extends InvalidPropertyGroupError + property_group_already_exists + "A property group associated with this template and file already exists." -struct PropertyGroupTemplate - "Defines how a property group may be structured." +union InvalidPropertyGroupError extends PropertiesError + property_field_too_large + "One or more of the supplied property field values is too large." + does_not_fit_template + "One or more of the supplied property fields does not conform to the template specifications." + duplicate_property_groups + "There are 2 or more property groups referring to the same templates in the input." - name String - "Display name for the template. Template names can - be up to 256 bytes." - description String - "Description for the template. Template descriptions - can be up to 1024 bytes." - fields List(PropertyFieldTemplate) - "Definitions of the property fields associated with this template. - There can be up to 32 properties in a single template." +union LogicalOperator + "Logical operator to join search queries together." + or_operator + "Append a query with an \"or\" operator." example default - name = "Security" - description = "These properties describe how confidential this file or folder is." - fields = [default] - -# -# Property routes -# - -struct AddPropertiesArg - path PathOrId - "A unique identifier for the file or folder." - property_groups List(PropertyGroup) - "The property groups which are to be added to a Dropbox file. No two groups in the input should - refer to the same template." + or_operator = null - example default - path = "/my_awesome/word.docx" - property_groups = [default] +union LookUpPropertiesError + property_group_not_found + "No property group was found." union LookupError malformed_path String @@ -148,128 +62,86 @@ union LookupError restricted_content "The file cannot be transferred because the content is restricted. For example, we might restrict a file due to legal requirements." -union LookUpPropertiesError - property_group_not_found - "No property group was found." - -union TemplateError - template_not_found TemplateId - "Template does not exist for the given identifier." - restricted_content - "You do not have permission to modify this template." +union ModifyTemplateError extends TemplateError + conflicting_property_names + "A property field key with that name already exists in the template." + too_many_properties + "There are too many properties in the changed template. + The maximum number of properties per template is 32." + too_many_templates + "There are too many templates for the team." + template_attribute_too_large + "The template name, description or one or more of the property field keys is too large." union PropertiesError extends TemplateError path LookupError unsupported_folder "This folder cannot be tagged. Tagging folders is not supported for team-owned templates." -union InvalidPropertyGroupError extends PropertiesError - property_field_too_large - "One or more of the supplied property field values is too large." - does_not_fit_template - "One or more of the supplied property fields does not conform to the template specifications." - duplicate_property_groups - "There are 2 or more property groups referring to the same templates in the input. " +union PropertiesSearchContinueError + reset + "Indicates that the cursor has been invalidated. Call + :route:`properties/search` to obtain a new cursor." -union AddPropertiesError extends InvalidPropertyGroupError - property_group_already_exists - "A property group associated with this template and file already exists." +union PropertiesSearchError + property_group_lookup LookUpPropertiesError -route properties/add(AddPropertiesArg, Void, AddPropertiesError) - "Add property groups to a Dropbox file. See :route:`templates/add_for_user` or - :route:`templates/add_for_team` to create new templates." +union PropertiesSearchMode + field_name String + "Search for a value associated with this field name." - attrs - scope = "files.metadata.write" + example default + field_name = "Security" -struct OverwritePropertyGroupArg - path PathOrId - "A unique identifier for the file or folder." - property_groups List(PropertyGroup, min_items=1) - "The property groups \"snapshot\" updates to force apply. No two groups in the input should - refer to the same template." +union RemovePropertiesError extends PropertiesError + property_group_lookup LookUpPropertiesError - example default - path = "/my_awesome/word.docx" - property_groups = [default] +union TemplateError + template_not_found TemplateId + "Template does not exist for the given identifier." + restricted_content + "You do not have permission to modify this template." -route properties/overwrite(OverwritePropertyGroupArg, Void, InvalidPropertyGroupError) - "Overwrite property groups associated with a file. This endpoint should be used - instead of :route:`properties/update` when property groups are being updated via a - \"snapshot\" instead of via a \"delta\". In other words, this endpoint will delete all - omitted fields from a property group, whereas :route:`properties/update` will only - delete fields that are explicitly marked for deletion." +union TemplateFilter extends TemplateFilterBase + filter_none + "No templates will be filtered from the result (all templates will be returned)." - attrs - scope = "files.metadata.write" + example default + filter_none = null -struct PropertyGroupUpdate - template_id TemplateId - "A unique identifier for a property template." - add_or_update_fields List(PropertyField)? - "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." - remove_fields List(String)? - "Property fields to remove (by name), provided they exist." +union TemplateFilterBase + filter_some List(TemplateId, min_items=1) + "Only templates with an ID in the supplied list will be returned (a subset of + templates will be returned)." example default - template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa" - add_or_update_fields = [default] - remove_fields = [] + filter_some = ["ptid:1a5n2i6d3OYEAAAAAAAAAYa"] -struct UpdatePropertiesArg - path PathOrId - "A unique identifier for the file or folder." - update_property_groups List(PropertyGroupUpdate) - "The property groups \"delta\" updates to apply." +union TemplateOwnerType + user + "Template will be associated with a user." + team + "Template will be associated with a team." example default - path = "/my_awesome/word.docx" - update_property_groups = [default] + user = null union UpdatePropertiesError extends InvalidPropertyGroupError property_group_lookup LookUpPropertiesError -route properties/update(UpdatePropertiesArg, Void, UpdatePropertiesError) - "Add, update or remove properties associated with the supplied file and templates. - This endpoint should be used instead of :route:`properties/overwrite` when property groups - are being updated via a \"delta\" instead of via a \"snapshot\" . In other words, this endpoint - will not delete any omitted fields from a property group, whereas :route:`properties/overwrite` - will delete any fields that are omitted from a property group." - - attrs - scope = "files.metadata.write" - -struct RemovePropertiesArg +struct AddPropertiesArg path PathOrId "A unique identifier for the file or folder." - property_template_ids List(TemplateId) - "A list of identifiers for a template created by :route:`templates/add_for_user` or - :route:`templates/add_for_team`." + property_groups List(PropertyGroup) + "The property groups which are to be added to a Dropbox file. No two groups in the input should + refer to the same template." example default path = "/my_awesome/word.docx" - property_template_ids = ["ptid:1a5n2i6d3OYEAAAAAAAAAYa"] - -union RemovePropertiesError extends PropertiesError - property_group_lookup LookUpPropertiesError - -route properties/remove(RemovePropertiesArg, Void, RemovePropertiesError) - "Permanently removes the specified property group from the file. To remove specific property field key - value pairs, see :route:`properties/update`. - To update a template, see - :route:`templates/update_for_user` or :route:`templates/update_for_team`. - To remove a template, see - :route:`templates/remove_for_user` or :route:`templates/remove_for_team`." - - attrs - scope = "files.metadata.write" - -# -# Property Group Template Routes -# + property_groups = [default] struct AddTemplateArg extends PropertyGroupTemplate + example default name = "Security" description = "These properties describe how confidential this file or folder is." @@ -283,33 +155,6 @@ struct AddTemplateResult example default template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa" -union ModifyTemplateError extends TemplateError - conflicting_property_names - "A property field key with that name already exists in the template." - too_many_properties - "There are too many properties in the changed template. - The maximum number of properties per template is 32." - too_many_templates - "There are too many templates for the team." - template_attribute_too_large - "The template name, description or one or more of the property field keys is too large." - -route templates/add_for_user(AddTemplateArg, AddTemplateResult, ModifyTemplateError) - "Add a template associated with a user. See :route:`properties/add` to add properties to a file. This - endpoint can't be called on a team member or admin's behalf." - - attrs - scope = "files.metadata.write" - -route templates/add_for_team(AddTemplateArg, AddTemplateResult, ModifyTemplateError) - "Add a template associated with a team. See :route:`properties/add` to add properties to a file or folder. - - Note: this endpoint will create team-owned templates." - - attrs - auth="team" - scope = "files.team_metadata.write" - struct GetTemplateArg template_id TemplateId "An identifier for template added by route See :route:`templates/add_for_user` or @@ -325,18 +170,188 @@ struct GetTemplateResult extends PropertyGroupTemplate description = "These properties describe how confidential this file or folder is." fields = [default] -route templates/get_for_user(GetTemplateArg, GetTemplateResult, TemplateError) - "Get the schema for a specified template. This endpoint can't be called on a team member or admin's behalf." - - attrs - scope = "files.metadata.read" +struct ListTemplateResult + template_ids List(TemplateId) + "List of identifiers for templates added by See :route:`templates/add_for_user` or + :route:`templates/add_for_team`." -route templates/get_for_team(GetTemplateArg, GetTemplateResult, TemplateError) - "Get the schema for a specified template." + example default + template_ids = ["ptid:1a5n2i6d3OYEAAAAAAAAAYa"] - attrs - auth="team" - scope = "files.team_metadata.write" +struct OverwritePropertyGroupArg + path PathOrId + "A unique identifier for the file or folder." + property_groups List(PropertyGroup, min_items=1) + "The property groups \"snapshot\" updates to force apply. No two groups in the input should + refer to the same template." + + example default + path = "/my_awesome/word.docx" + property_groups = [default] + +struct PropertiesSearchArg + queries List(PropertiesSearchQuery, min_items=1) + "Queries to search." + template_filter TemplateFilter = filter_none + "Filter results to contain only properties associated with these template IDs." + + example default + queries = [default] + template_filter = default + +struct PropertiesSearchContinueArg + cursor PropertiesSearchCursor + "The cursor returned by your last call to :route:`properties/search` or + :route:`properties/search/continue`." + + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + +struct PropertiesSearchMatch + id Id + "The ID for the matched file or folder." + path String + "The path for the matched file or folder." + is_deleted Boolean + "Whether the file or folder is deleted." + property_groups List(PropertyGroup) + "List of custom property groups associated with the file." + + example default + id = "id:a4ayc_80_OEAAAAAAAAAXz" + path = "/my_awesome/word.docx" + is_deleted = false + property_groups = [default] + +struct PropertiesSearchQuery + query String + "The property field value for which to search across templates." + mode PropertiesSearchMode + "The mode with which to perform the search." + logical_operator LogicalOperator = or_operator + "The logical operator with which to append the query." + + example default + query = "Confidential" + mode = default + logical_operator = default + +struct PropertiesSearchResult + matches List(PropertiesSearchMatch) + "A list (possibly empty) of matches for the query." + cursor PropertiesSearchCursor? + "Pass the cursor into :route:`properties/search/continue` to continue to receive + search results. Cursor will be null when there are no more results." + + example default + matches = [default] + +struct PropertyField + "Raw key/value data to be associated with a Dropbox file. Property fields are added to Dropbox + files as a :type:`PropertyGroup`." + name String + "Key of the property field associated with a file and template. + Keys can be up to 256 bytes." + value String + "Value of the property field associated with a file and template. + Values can be up to 1024 bytes." + + example default + name = "Security Policy" + value = "Confidential" + +struct PropertyFieldTemplate + "Defines how a single property field may be structured. Used exclusively by :type:`PropertyGroupTemplate`." + name String + "Key of the property field being described. Property field keys can be up to 256 bytes." + description String + "Description of the property field. Property field descriptions can be up to 1024 bytes." + type PropertyType + union + "Data type of the given property field added." + string + "The associated property field will be of type string. Unicode is supported." + + example default + name = "Security Policy" + description = "This is the security policy of the file or folder described. Policies can be Confidential, Public or Internal." + type = string + +struct PropertyGroup + "A subset of the property fields described by the corresponding :type:`PropertyGroupTemplate`. + Properties are always added to a Dropbox file as a :type:`PropertyGroup`. + The possible key names and value types in this group are defined by the + corresponding :type:`PropertyGroupTemplate`." + template_id TemplateId + "A unique identifier for the associated template." + fields List(PropertyField) + "The actual properties associated with the template. There can be up to 32 + property types per template." + + example default + template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa" + fields = [default] + +struct PropertyGroupTemplate + "Defines how a property group may be structured." + name String + "Display name for the template. Template names can + be up to 256 bytes." + description String + "Description for the template. Template descriptions + can be up to 1024 bytes." + fields List(PropertyFieldTemplate) + "Definitions of the property fields associated with this template. + There can be up to 32 properties in a single template." + + example default + name = "Security" + description = "These properties describe how confidential this file or folder is." + fields = [default] + +struct PropertyGroupUpdate + "Property routes" + template_id TemplateId + "A unique identifier for a property template." + add_or_update_fields List(PropertyField)? + "Property fields to update. If the property field already exists, it is updated. + If the property field doesn't exist, it will be created as long as the property group already exists." + remove_fields List(String)? + "Property fields to remove (by name), provided they exist." + + example default + template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa" + add_or_update_fields = [default] + remove_fields = [] + +struct RemovePropertiesArg + path PathOrId + "A unique identifier for the file or folder." + property_template_ids List(TemplateId) + "A list of identifiers for a template created by :route:`templates/add_for_user` or + :route:`templates/add_for_team`." + + example default + path = "/my_awesome/word.docx" + property_template_ids = ["ptid:1a5n2i6d3OYEAAAAAAAAAYa"] + +struct RemoveTemplateArg + template_id TemplateId + "An identifier for a template created by :route:`templates/add_for_user` or + :route:`templates/add_for_team`." + + example default + template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa" + +struct UpdatePropertiesArg + path PathOrId + "A unique identifier for the file or folder." + update_property_groups List(PropertyGroupUpdate) + "The property groups \"delta\" updates to apply." + + example default + path = "/my_awesome/word.docx" + update_property_groups = [default] struct UpdateTemplateArg template_id TemplateId @@ -366,185 +381,142 @@ struct UpdateTemplateResult example default template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa" -route templates/update_for_user(UpdateTemplateArg, UpdateTemplateResult, ModifyTemplateError) - "Update a template associated with a user. This route can update the template name, - the template description and add optional properties to templates. This endpoint can't - be called on a team member or admin's behalf." +route properties/add (AddPropertiesArg, Void, AddPropertiesError) + "Add property groups to a Dropbox file. See :route:`templates/add_for_user` or + :route:`templates/add_for_team` to create new templates." attrs + auth = "user" scope = "files.metadata.write" -route templates/update_for_team(UpdateTemplateArg, UpdateTemplateResult, ModifyTemplateError) - "Update a template associated with a team. This route can update the template name, - the template description and add optional properties to templates." +route properties/overwrite (OverwritePropertyGroupArg, Void, InvalidPropertyGroupError) + "Overwrite property groups associated with a file. This endpoint should be used + instead of :route:`properties/update` when property groups are being updated via a + \"snapshot\" instead of via a \"delta\". In other words, this endpoint will delete all + omitted fields from a property group, whereas :route:`properties/update` will only + delete fields that are explicitly marked for deletion." attrs - auth="team" - scope = "files.team_metadata.write" + auth = "user" + scope = "files.metadata.write" -struct ListTemplateResult - template_ids List(TemplateId) - "List of identifiers for templates added by See :route:`templates/add_for_user` or - :route:`templates/add_for_team`." +route properties/remove (RemovePropertiesArg, Void, RemovePropertiesError) + "Permanently removes the specified property group from the file. To remove specific property field key + value pairs, see :route:`properties/update`. + To update a template, see + :route:`templates/update_for_user` or :route:`templates/update_for_team`. + To remove a template, see + :route:`templates/remove_for_user` or :route:`templates/remove_for_team`." - example default - template_ids = ["ptid:1a5n2i6d3OYEAAAAAAAAAYa"] + attrs + auth = "user" + scope = "files.metadata.write" -route templates/list_for_user(Void, ListTemplateResult, TemplateError) - "Get the template identifiers for a team. To get the schema of - each template use :route:`templates/get_for_user`. This endpoint can't be - called on a team member or admin's behalf." +route properties/search (PropertiesSearchArg, PropertiesSearchResult, PropertiesSearchError) + "Search across property templates for particular property field values." attrs + auth = "user" scope = "files.metadata.read" -route templates/list_for_team(Void, ListTemplateResult, TemplateError) - "Get the template identifiers for a team. To get the schema of - each template use :route:`templates/get_for_team`." +route properties/search/continue (PropertiesSearchContinueArg, PropertiesSearchResult, PropertiesSearchContinueError) + "Once a cursor has been retrieved from :route:`properties/search`, use this to paginate through all + search results." attrs - auth="team" - scope = "files.team_metadata.write" - -struct RemoveTemplateArg - template_id TemplateId - "An identifier for a template created by :route:`templates/add_for_user` or - :route:`templates/add_for_team`." - - example default - template_id = "ptid:1a5n2i6d3OYEAAAAAAAAAYa" + auth = "user" + scope = "files.metadata.read" -route templates/remove_for_user(RemoveTemplateArg, Void, TemplateError) - "Permanently removes the specified template created from :route:`templates/add_for_user`. - All properties associated with the template will also be removed. This action - cannot be undone." +route properties/update (UpdatePropertiesArg, Void, UpdatePropertiesError) + "Add, update or remove properties associated with the supplied file and templates. + This endpoint should be used instead of :route:`properties/overwrite` when property groups + are being updated via a \"delta\" instead of via a \"snapshot\" . In other words, this endpoint + will not delete any omitted fields from a property group, whereas :route:`properties/overwrite` + will delete any fields that are omitted from a property group." attrs + auth = "user" scope = "files.metadata.write" -route templates/remove_for_team(RemoveTemplateArg, Void, TemplateError) - "Permanently removes the specified template created from :route:`templates/add_for_user`. - All properties associated with the template will also be removed. This action - cannot be undone." +route templates/add_for_team (AddTemplateArg, AddTemplateResult, ModifyTemplateError) + "Add a template associated with a team. See :route:`properties/add` to add properties to a file or folder. + Note: this endpoint will create team-owned templates." attrs - auth="team" + auth = "team" scope = "files.team_metadata.write" -union TemplateOwnerType - user - "Template will be associated with a user." - team - "Template will be associated with a team." - - example default - user = null - -union LogicalOperator - "Logical operator to join search queries together." - - or_operator - "Append a query with an \"or\" operator." - - example default - or_operator = null - -union PropertiesSearchMode - field_name String - "Search for a value associated with this field name." - - example default - field_name = "Security" - -struct PropertiesSearchQuery - query String - "The property field value for which to search across templates." - mode PropertiesSearchMode - "The mode with which to perform the search." - logical_operator LogicalOperator = or_operator - "The logical operator with which to append the query." - - example default - query = "Confidential" - mode = default - logical_operator = default +route templates/add_for_user (AddTemplateArg, AddTemplateResult, ModifyTemplateError) + "Add a template associated with a user. See :route:`properties/add` to add properties to a file. This + endpoint can't be called on a team member or admin's behalf." -union TemplateFilterBase - filter_some List(TemplateId, min_items=1) - "Only templates with an ID in the supplied list will be returned (a subset of - templates will be returned)." + attrs + auth = "user" + scope = "files.metadata.write" - example default - filter_some = ["ptid:1a5n2i6d3OYEAAAAAAAAAYa"] +route templates/get_for_team (GetTemplateArg, GetTemplateResult, TemplateError) + "Get the schema for a specified template." -union TemplateFilter extends TemplateFilterBase - filter_none - "No templates will be filtered from the result (all templates will be returned)." + attrs + auth = "team" + scope = "files.team_metadata.write" - example default - filter_none = null +route templates/get_for_user (GetTemplateArg, GetTemplateResult, TemplateError) + "Get the schema for a specified template. This endpoint can't be called on a team member or admin's behalf." -struct PropertiesSearchArg - queries List(PropertiesSearchQuery, min_items=1) - "Queries to search." - template_filter TemplateFilter = filter_none - "Filter results to contain only properties associated with these template IDs." + attrs + auth = "user" + scope = "files.metadata.read" - example default - queries = [default] - template_filter = default +route templates/list_for_team (Void, ListTemplateResult, TemplateError) + "Get the template identifiers for a team. To get the schema of + each template use :route:`templates/get_for_team`." -struct PropertiesSearchMatch - id Id - "The ID for the matched file or folder." - path String - "The path for the matched file or folder." - is_deleted Boolean - "Whether the file or folder is deleted." - property_groups List(PropertyGroup) - "List of custom property groups associated with the file." + attrs + auth = "team" + scope = "files.team_metadata.write" - example default - id = "id:a4ayc_80_OEAAAAAAAAAXz" - path = "/my_awesome/word.docx" - is_deleted = false - property_groups = [default] +route templates/list_for_user (Void, ListTemplateResult, TemplateError) + "Get the template identifiers for a team. To get the schema of + each template use :route:`templates/get_for_user`. This endpoint can't be + called on a team member or admin's behalf." -struct PropertiesSearchResult - matches List(PropertiesSearchMatch) - "A list (possibly empty) of matches for the query." - cursor PropertiesSearchCursor? - "Pass the cursor into :route:`properties/search/continue` to continue to receive - search results. Cursor will be null when there are no more results." + attrs + auth = "user" + scope = "files.metadata.read" - example default - matches = [default] +route templates/remove_for_team (RemoveTemplateArg, Void, TemplateError) + "Permanently removes the specified template created from :route:`templates/add_for_user`. + All properties associated with the template will also be removed. This action + cannot be undone." -union PropertiesSearchError - property_group_lookup LookUpPropertiesError + attrs + auth = "team" + scope = "files.team_metadata.write" -route properties/search(PropertiesSearchArg, PropertiesSearchResult, PropertiesSearchError) - "Search across property templates for particular property field values." +route templates/remove_for_user (RemoveTemplateArg, Void, TemplateError) + "Permanently removes the specified template created from :route:`templates/add_for_user`. + All properties associated with the template will also be removed. This action + cannot be undone." attrs - scope = "files.metadata.read" - -struct PropertiesSearchContinueArg - cursor PropertiesSearchCursor - "The cursor returned by your last call to :route:`properties/search` or - :route:`properties/search/continue`." + auth = "user" + scope = "files.metadata.write" - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" +route templates/update_for_team (UpdateTemplateArg, UpdateTemplateResult, ModifyTemplateError) + "Update a template associated with a team. This route can update the template name, + the template description and add optional properties to templates." -union PropertiesSearchContinueError - reset - "Indicates that the cursor has been invalidated. Call - :route:`properties/search` to obtain a new cursor." + attrs + auth = "team" + scope = "files.team_metadata.write" -route properties/search/continue (PropertiesSearchContinueArg, PropertiesSearchResult, PropertiesSearchContinueError) - "Once a cursor has been retrieved from :route:`properties/search`, use this to paginate through all - search results." +route templates/update_for_user (UpdateTemplateArg, UpdateTemplateResult, ModifyTemplateError) + "Update a template associated with a user. This route can update the template name, + the template description and add optional properties to templates. This endpoint can't + be called on a team member or admin's behalf." attrs - scope = "files.metadata.read" + auth = "user" + scope = "files.metadata.write" + diff --git a/file_requests.stone b/file_requests_apiv2_file_requests_public.stone similarity index 87% rename from file_requests.stone rename to file_requests_apiv2_file_requests_public.stone index 8dae211..84e3af2 100644 --- a/file_requests.stone +++ b/file_requests_apiv2_file_requests_public.stone @@ -1,15 +1,12 @@ namespace file_requests "This namespace contains endpoints and data types for file request operations." - -alias FileRequestId = String(pattern="[-_0-9a-zA-Z]+", min_length=1) - import common import files -# -# Common file requests objects -# +alias FileRequestId = String(min_length=1, pattern="[-_0-9a-zA-Z]+") + +alias FileRequestValidationError = String? union GracePeriod one_day @@ -21,17 +18,110 @@ union GracePeriod example default seven_days = null -struct FileRequestDeadline +union GeneralFileRequestsError + "There is an error accessing the file requests functionality." + disabled_for_team + "This user's Dropbox Business team doesn't allow file requests." + +union FileRequestError extends GeneralFileRequestsError + "There is an error with the file request." + not_found + "This file request ID was not found." + not_a_folder + "The specified path is not a folder." + app_lacks_access + "This file request is not accessible to this app. Apps with the app + folder permission can only access file requests in their app folder." + no_permission + "This user doesn't have permission to access or modify this file + request." + email_unverified + "This user's email address is not verified. File requests are only + available on accounts with a verified email address. Users can verify + their email address :link:`here https://www.dropbox.com/help/317`." + validation_error + "There was an error validating the request. For example, the title was + invalid, or there were disallowed characters in the destination path." + no_write_permission + "This user doesn't have permission to edit files in a destination folder" + +union ListFileRequestsContinueError extends GeneralFileRequestsError + "There was an error retrieving the file requests." + invalid_cursor + "The cursor is invalid." + +union ListFileRequestsError extends GeneralFileRequestsError + "There was an error retrieving the file requests." + +union GetFileRequestError extends FileRequestError + "There was an error retrieving the specified file request." + +union CreateFileRequestError extends FileRequestError + "There was an error creating the file request." + invalid_location + "File requests are not available on the specified folder." + rate_limit + "The user has reached the rate limit for creating file requests. The + limit is currently 4000 file requests total." + +union UpdateFileRequestError extends FileRequestError + "There is an error updating the file request." + +union CountFileRequestsError extends GeneralFileRequestsError + "There was an error counting the file requests." + +union DeleteFileRequestError extends FileRequestError + "There was an error deleting these file requests." + file_request_open + "One or more file requests currently open." + +union DeleteAllClosedFileRequestsError extends FileRequestError + "There was an error deleting all closed file requests." + +union UpdateFileRequestDeadline + no_update + "Do not change the file request's deadline." + update FileRequestDeadline? + "If :val:`null`, the file request's deadline is cleared." + + example set_deadline + update = deadline_with_grace_period + +struct UpdateFileRequestArgs + "Arguments for :route:`update`." + id FileRequestId + "The ID of the file request to update." + title String(min_length=1)? + "The new title of the file request. Must not be empty." + destination files.Path? + "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." + deadline UpdateFileRequestDeadline = no_update + "The new deadline for the file request. Deadlines can only be set by + Professional and Business accounts." + open Boolean? + "Whether to set this file request as open or closed." + description String? + "The description of the file request." + + example default + id = "oaCAVmEyrqYnkZX9955Y" + title = "Homework submission" + destination = "/File Requests/Homework" + deadline = set_deadline + open = true +struct FileRequestDeadline deadline common.DropboxTimestamp "The deadline for this file request." allow_late_uploads GracePeriod? "If set, allow uploads after the deadline has passed. These - uploads will be marked overdue." + uploads will be marked overdue." example deadline deadline = "2020-10-12T17:00:00Z" - + example deadline_with_grace_period deadline = "2020-10-12T17:00:00Z" allow_late_uploads = seven_days @@ -39,7 +129,6 @@ struct FileRequestDeadline struct FileRequest "A :link:`file request https://www.dropbox.com/help/9090` for receiving files into the user's Dropbox account." - id FileRequestId "The ID of the file request." url String(min_length=1) @@ -63,6 +152,8 @@ struct FileRequest "The number of files this file request has received." description String? "A description of the file request." + video_project_id String? + "If this request was created from video project, its id." example default id = "oaCAVmEyrqYnkZX9955Y" @@ -74,7 +165,7 @@ struct FileRequest is_open = true file_count = 3 description = "Please submit your homework here." - + example with_deadline id = "BAJ7IrRGicQKGToykQdB" url = "https://www.dropbox.com/request/BAJ7IrRGjcQKGToykQdB" @@ -84,7 +175,7 @@ struct FileRequest deadline = deadline is_open = true file_count = 105 - + example with_no_deadline id = "rxwMPvK3ATTa0VxOJu5T" url = "https://www.dropbox.com/request/rxwMPvK3ATTa0VxOJu5T" @@ -95,51 +186,8 @@ struct FileRequest is_open = true file_count = 37 -alias FileRequestValidationError = String? - -union GeneralFileRequestsError - "There is an error accessing the file requests functionality." - - disabled_for_team - "This user's Dropbox Business team doesn't allow file requests." - -union FileRequestError extends GeneralFileRequestsError - "There is an error with the file request." - - not_found - "This file request ID was not found." - not_a_folder - "The specified path is not a folder." - app_lacks_access - "This file request is not accessible to this app. Apps with the app - folder permission can only access file requests in their app folder." - no_permission - "This user doesn't have permission to access or modify this file - request." - email_unverified - "This user's email address is not verified. File requests are only - available on accounts with a verified email address. Users can verify - their email address :link:`here https://www.dropbox.com/help/317`." - validation_error - "There was an error validating the request. For example, the title was - invalid, or there were disallowed characters in the destination path." - -# -# Getting file requests -# - -route list:2(ListFileRequestsArg, ListFileRequestsV2Result, ListFileRequestsError) - "Returns a list of file requests owned by this user. For apps with the app - folder permission, this will only return file requests with destinations in - the app folder." - - attrs - allow_app_folder_app = true - scope = "file_requests.read" - struct ListFileRequestsArg "Arguments for :route:`list:2`." - limit UInt64 = 1000 "The maximum number of file requests that should be returned per request." @@ -148,14 +196,11 @@ struct ListFileRequestsArg struct ListFileRequestsV2Result "Result for :route:`list:2` and :route:`list/continue`." - file_requests List(FileRequest) "The file requests owned by this user. Apps with the app folder permission will only see file requests in their app folder." - cursor String "Pass the cursor into :route:`list/continue` to obtain additional file requests." - has_more Boolean "Is true if there are additional file requests that have not been returned yet. An additional call to :route:list/continue` can retrieve them." @@ -165,14 +210,6 @@ struct ListFileRequestsV2Result cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" has_more = true -route list/continue(ListFileRequestsContinueArg, ListFileRequestsV2Result, ListFileRequestsContinueError) - "Once a cursor has been retrieved from :route:`list:2`, use this to paginate through all - file requests. The cursor must come from a previous call to :route:`list:2` or - :route:`list/continue`." - attrs - allow_app_folder_app = true - scope = "file_requests.read" - struct ListFileRequestsContinueArg cursor String "The cursor returned by the previous API call specified in the endpoint description." @@ -180,25 +217,8 @@ struct ListFileRequestsContinueArg example default cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" -union ListFileRequestsContinueError extends GeneralFileRequestsError - "There was an error retrieving the file requests." - - invalid_cursor - "The cursor is invalid." - - -route list(Void, ListFileRequestsResult, ListFileRequestsError) - "Returns a list of file requests owned by this user. For apps with the app - folder permission, this will only return file requests with destinations in - the app folder." - - attrs - allow_app_folder_app = true - scope = "file_requests.read" - struct ListFileRequestsResult "Result for :route:`list`." - file_requests List(FileRequest) "The file requests owned by this user. Apps with the app folder permission will only see file requests in their app folder." @@ -206,48 +226,16 @@ struct ListFileRequestsResult example default file_requests = [default, with_deadline, with_no_deadline] -union ListFileRequestsError extends GeneralFileRequestsError - "There was an error retrieving the file requests." - - -# -# Getting individual file requests -# - -route get(GetFileRequestArgs, FileRequest, GetFileRequestError) - "Returns the specified file request." - - attrs - allow_app_folder_app = true - scope = "file_requests.read" - struct GetFileRequestArgs "Arguments for :route:`get`." - id FileRequestId "The ID of the file request to retrieve." example default id = "oaCAVmEyrqYnkZX9955Y" -union GetFileRequestError extends FileRequestError - "There was an error retrieving the specified file request." - - -# -# Creating new file requests -# - -route create(CreateFileRequestArgs, FileRequest, CreateFileRequestError) - "Creates a file request for this user." - - attrs - allow_app_folder_app = true - scope = "file_requests.write" - struct CreateFileRequestArgs "Arguments for :route:`create`." - title String(min_length=1) "The title of the file request. Must not be empty." destination files.Path @@ -263,147 +251,122 @@ struct CreateFileRequestArgs later." description String? "A description of the file request." + video_project_id String? + "If this request was created from video project, its id." example default title = "Homework submission" destination = "/File Requests/Homework" deadline = deadline_with_grace_period -union CreateFileRequestError extends FileRequestError - "There was an error creating the file request." +struct CountFileRequestsResult + "Result for :route:`count`." + file_request_count UInt64 + "The number file requests owner by this user." - invalid_location - "File requests are not available on the specified folder." - rate_limit - "The user has reached the rate limit for creating file requests. The - limit is currently 4000 file requests total." + example default + file_request_count = 15 -# -# Updating existing file requests -# +struct DeleteFileRequestArgs + "Arguments for :route:`delete`." + ids List(FileRequestId) + "List IDs of the file requests to delete." -route update(UpdateFileRequestArgs, FileRequest, UpdateFileRequestError) - "Update a file request." + example default + ids = ["oaCAVmEyrqYnkZX9955Y", "BaZmehYoXMPtaRmfTbSG"] - attrs - allow_app_folder_app = true - scope = "file_requests.write" +struct DeleteFileRequestsResult + "Result for :route:`delete`." + file_requests List(FileRequest) + "The file requests deleted by the request." -struct UpdateFileRequestArgs - "Arguments for :route:`update`." + example default + file_requests = [default, with_deadline, with_no_deadline] - id FileRequestId - "The ID of the file request to update." - title String(min_length=1)? - "The new title of the file request. Must not be empty." - destination files.Path? - "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." - deadline UpdateFileRequestDeadline = no_update - "The new deadline for the file request. Deadlines can only be set by - Professional and Business accounts." - union - no_update - "Do not change the file request's deadline." - update FileRequestDeadline? - "If :val:`null`, the file request's deadline is cleared." - - example set_deadline - update = deadline_with_grace_period - open Boolean? - "Whether to set this file request as open or closed." - description String? - "The description of the file request." +struct DeleteAllClosedFileRequestsResult + "Result for :route:`delete_all_closed`." + file_requests List(FileRequest) + "The file requests deleted for this user." example default - id = "oaCAVmEyrqYnkZX9955Y" - title = "Homework submission" - destination = "/File Requests/Homework" - deadline = set_deadline - open = true + file_requests = [default, with_deadline, with_no_deadline] -union UpdateFileRequestError extends FileRequestError - "There is an error updating the file request." +route list:2 (ListFileRequestsArg, ListFileRequestsV2Result, ListFileRequestsError) + "Returns a list of file requests owned by this user. For apps with the app + folder permission, this will only return file requests with destinations in + the app folder." -# -# Count file requests -# + attrs + allow_app_folder_app = true + auth = "user" + scope = "file_requests.read" -route count(Void, CountFileRequestsResult, CountFileRequestsError) - "Returns the total number of file requests owned by this user. Includes both open and - closed file requests." +route list/continue (ListFileRequestsContinueArg, ListFileRequestsV2Result, ListFileRequestsContinueError) + "Once a cursor has been retrieved from :route:`list:2`, use this to paginate through all + file requests. The cursor must come from a previous call to :route:`list:2` or + :route:`list/continue`." attrs allow_app_folder_app = true + auth = "user" scope = "file_requests.read" -struct CountFileRequestsResult - "Result for :route:`count`." - - file_request_count UInt64 - "The number file requests owner by this user." +route list (Void, ListFileRequestsResult, ListFileRequestsError) + "Returns a list of file requests owned by this user. For apps with the app + folder permission, this will only return file requests with destinations in + the app folder." - example default - file_request_count = 15 + attrs + allow_app_folder_app = true + auth = "user" + scope = "file_requests.read" -union CountFileRequestsError extends GeneralFileRequestsError - "There was an error counting the file requests." +route get (GetFileRequestArgs, FileRequest, GetFileRequestError) + "Returns the specified file request." -# -# Deleting existing file requests -# + attrs + allow_app_folder_app = true + auth = "user" + scope = "file_requests.read" -route delete(DeleteFileRequestArgs, DeleteFileRequestsResult, DeleteFileRequestError) - "Delete a batch of closed file requests." +route create (CreateFileRequestArgs, FileRequest, CreateFileRequestError) + "Creates a file request for this user." attrs allow_app_folder_app = true + auth = "user" scope = "file_requests.write" -struct DeleteFileRequestArgs - "Arguments for :route:`delete`." - - ids List(FileRequestId) - "List IDs of the file requests to delete." - - example default - ids = ["oaCAVmEyrqYnkZX9955Y", "BaZmehYoXMPtaRmfTbSG"] - -struct DeleteFileRequestsResult - "Result for :route:`delete`." +route update (UpdateFileRequestArgs, FileRequest, UpdateFileRequestError) + "Update a file request." - file_requests List(FileRequest) - "The file requests deleted by the request." + attrs + allow_app_folder_app = true + auth = "user" + scope = "file_requests.write" - example default - file_requests = [default, with_deadline, with_no_deadline] +route count (Void, CountFileRequestsResult, CountFileRequestsError) + "Returns the total number of file requests owned by this user. Includes both open and + closed file requests." -union DeleteFileRequestError extends FileRequestError - "There was an error deleting these file requests." + attrs + allow_app_folder_app = true + auth = "user" + scope = "file_requests.read" - file_request_open - "One or more file requests currently open." +route delete (DeleteFileRequestArgs, DeleteFileRequestsResult, DeleteFileRequestError) + "Delete a batch of closed file requests." -# -# Deleting all closed file requests -# + attrs + allow_app_folder_app = true + auth = "user" + scope = "file_requests.write" -route delete_all_closed(Void, DeleteAllClosedFileRequestsResult, DeleteAllClosedFileRequestsError) +route delete_all_closed (Void, DeleteAllClosedFileRequestsResult, DeleteAllClosedFileRequestsError) "Delete all closed file requests owned by this user." attrs allow_app_folder_app = true + auth = "user" scope = "file_requests.write" -struct DeleteAllClosedFileRequestsResult - "Result for :route:`delete_all_closed`." - - file_requests List(FileRequest) - "The file requests deleted for this user." - - example default - file_requests = [default, with_deadline, with_no_deadline] - -union DeleteAllClosedFileRequestsError extends FileRequestError - "There was an error deleting all closed file requests." diff --git a/file_tagging_file_tag_text.stone b/file_tagging_file_tag_text.stone new file mode 100644 index 0000000..9fd9d8f --- /dev/null +++ b/file_tagging_file_tag_text.stone @@ -0,0 +1,6 @@ +namespace files + +import common + +alias TagText = String(max_length=32, min_length=1, pattern="[\\w]+") + diff --git a/file_tagging.stone b/file_tagging_file_tagging.stone similarity index 78% rename from file_tagging.stone rename to file_tagging_file_tagging.stone index 4d3842e..e1f5136 100644 --- a/file_tagging.stone +++ b/file_tagging_file_tagging.stone @@ -1,19 +1,25 @@ namespace files import common -import async - -alias TagText = String(min_length=1, max_length=32, pattern="[\\w]+") union Tag "Tag that can be added in multiple ways." - user_generated_tag UserGeneratedTag "Tag generated by the user." example default user_generated_tag = default +union BaseTagError + path LookupError + +union AddTagError extends BaseTagError + too_many_tags + "The item already has the maximum supported number of tags." + +union RemoveTagError extends BaseTagError + tag_not_present + "That tag doesn't exist at this path." struct UserGeneratedTag tag_text TagText @@ -21,18 +27,9 @@ struct UserGeneratedTag example default tag_text = "my_tag" - -union BaseTagError - path LookupError - - -##################################### -# Add Tag to an item -##################################### struct AddTagArg path Path "Path to the item to be tagged." - tag_text TagText "The value of the tag to add. Will be automatically converted to lowercase letters." @@ -40,27 +37,9 @@ struct AddTagArg path = "/Prime_Numbers.txt" tag_text = "my_tag" -union AddTagError extends BaseTagError - too_many_tags - "The item already has the maximum supported number of tags." - -route tags/add(AddTagArg, Void, AddTagError) - "Add a tag to an item. A tag is a string. The strings are automatically converted to lowercase letters. No more than 20 tags can be added to a given item." - - attrs - auth = "user" - is_preview = true - scope = "files.metadata.write" - - -##################################### -# Remove Tag from a item -##################################### - struct RemoveTagArg path Path "Path to the item to tag." - tag_text TagText "The tag to remove. Will be automatically converted to lowercase letters." @@ -68,21 +47,6 @@ struct RemoveTagArg path = "/Prime_Numbers.txt" tag_text = "my_tag" -union RemoveTagError extends BaseTagError - tag_not_present - "That tag doesn't exist at this path." - -route tags/remove(RemoveTagArg, Void, RemoveTagError) - "Remove a tag from an item." - - attrs - auth = "user" - is_preview = true - scope = "files.metadata.write" - -############################################### -# Get tags by item -############################################### struct GetTagsArg paths List(Path) "Path to the items." @@ -95,6 +59,7 @@ struct PathToTags "Path of the item." tags List(Tag) "Tags assigned to this item." + example default path = "/Prime_Numbers.txt" tags = [default] @@ -106,10 +71,27 @@ struct GetTagsResult example default paths_to_tags = [default] -route tags/get(GetTagsArg, GetTagsResult, BaseTagError) +route tags/add (AddTagArg, Void, AddTagError) + "Add a tag to an item. A tag is a string. The strings are automatically converted to lowercase letters. No more than 20 tags can be added to a given item." + + attrs + auth = "user" + is_preview = true + scope = "files.metadata.write" + +route tags/remove (RemoveTagArg, Void, RemoveTagError) + "Remove a tag from an item." + + attrs + auth = "user" + is_preview = true + scope = "files.metadata.write" + +route tags/get (GetTagsArg, GetTagsResult, BaseTagError) "Get list of tags assigned to items." attrs auth = "user" is_preview = true scope = "files.metadata.read" + diff --git a/files.stone b/files.stone deleted file mode 100644 index b8348d2..0000000 --- a/files.stone +++ /dev/null @@ -1,3343 +0,0 @@ -namespace files - "This namespace contains endpoints and data types for basic file operations." - -import async -import auth -import common -import file_properties -import users_common - -alias Id = String(min_length=1) - -alias FileId = String(pattern="id:.+", min_length=4) - -alias ListFolderCursor = String(min_length=1) - -alias Path = String(pattern="/(.|[\\r\\n])*") - -alias PathOrId = String(pattern="/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)") - -alias PathROrId = String(pattern="(/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/.*)?)") - -alias PathR = String(pattern="(/(.|[\\r\\n])*)?|(ns:[0-9]+(/.*)?)") # A path that can be the root path (""). - -alias ReadPath = String(pattern="(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)") - -alias Rev = String(min_length=9, pattern="[0-9a-f]+") # TODO: Change pattern to "rev:[0-9a-f]{9,}" - -alias Sha256HexHash = String(min_length=64, max_length=64) - -alias SharedLinkUrl = String - -alias WritePath = String(pattern="(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)") - -alias WritePathOrId = String(pattern="(/(.|[\\r\\n])*)|(ns:[0-9]+(/.*)?)|(id:.*)") - -# -# Metadata definitions and route -# - -struct Metadata - "Metadata for a file or folder." - - union_closed - file FileMetadata - folder FolderMetadata - deleted DeletedMetadata # Used by list_folder* and search - - name String - "The last component of the path (including extension). - This never contains a slash." - - path_lower String? - "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." - - path_display String? - "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 :route:`list_folder/continue`. This field - will be null if the file or folder is not mounted." - - parent_shared_folder_id common.SharedFolderId? - "Please use :field:`FileSharingInfo.parent_shared_folder_id` - or :field:`FolderSharingInfo.parent_shared_folder_id` instead." - - preview_url String? - "The preview URL of the file." - - example default - file = default - - example folder_metadata - folder = default - - example search_metadata - file = search_file_metadata - -union MetadataV2 - "Metadata for a file, folder or other resource types." - - metadata Metadata - # new types can be added here in the future - - example default - metadata = search_metadata - -struct HighlightSpan - - highlight_str String - "String to be determined whether it should be highlighted or not." - is_highlighted Boolean - "The string should be highlighted or not." - - example default - highlight_str = "test" - is_highlighted = false - -struct SharingInfo - "Sharing info for a file or folder." - - read_only Boolean - "True if the file or folder is inside a read-only shared folder." - - example default - read_only = false - -struct FileSharingInfo extends SharingInfo - "Sharing info for a file which is contained by a shared folder." - - parent_shared_folder_id common.SharedFolderId - "ID of shared folder that holds this file." - - modified_by users_common.AccountId? - "The last user who modified the file. This field will be null if - the user's account has been deleted." - - example default - read_only = true - parent_shared_folder_id = "84528192421" - modified_by = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" - -struct ExportInfo - "Export information for a file." - - export_as String? - "Format to which the file can be exported to." - - export_options List(String)? - "Additional formats to which the file can be exported. These values can be - specified as the export_format in /files/export." - - example default - export_as = "xlsx" - -struct FolderSharingInfo extends SharingInfo - "Sharing info for a folder which is contained in a shared folder or is a - shared folder mount point." - - parent_shared_folder_id common.SharedFolderId? - "Set if the folder is contained by a shared folder." - - shared_folder_id common.SharedFolderId? - "If this folder is a shared folder mount point, the ID of the shared - folder mounted at this location." - - traverse_only Boolean = false - "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." - - no_access Boolean = false - "Specifies that the folder cannot be accessed by the user." - - example default - "Folder inside a shared folder." - read_only = false - parent_shared_folder_id = "84528192421" - - example shared_folder - "Read-only shared folder mount point." - read_only = true - shared_folder_id = "84528192421" - -struct Dimensions - "Dimensions for a photo or video." - - height UInt64 - "Height of the photo/video." - width UInt64 - "Width of the photo/video." - - example default - height = 768 - width = 1024 - -struct GpsCoordinates - "GPS coordinates for a photo or video." - - latitude Float64 - "Latitude of the GPS coordinates." - longitude Float64 - "Longitude of the GPS coordinates." - - example default - latitude = 37.7833 - longitude = 122.4167 - -struct MediaMetadata - "Metadata for a photo or video." - - union_closed - photo PhotoMetadata - video VideoMetadata - - dimensions Dimensions? - "Dimension of the photo/video." - location GpsCoordinates? - "The GPS coordinate of the photo/video." - time_taken common.DropboxTimestamp? - "The timestamp when the photo/video is taken." - -struct PhotoMetadata extends MediaMetadata - "Metadata for a photo." - - example default - dimensions = default - location = default - time_taken = "2015-05-12T15:50:38Z" - -struct VideoMetadata extends MediaMetadata - "Metadata for a video." - - duration UInt64? - "The duration of the video in milliseconds." - - example default - dimensions = default - location = default - time_taken = "2015-05-12T15:50:38Z" - duration = 1000 - -union_closed MediaInfo - pending - "Indicate the photo/video is still under processing and metadata is - not available yet." - metadata MediaMetadata - "The metadata for the photo/video." - -struct SymlinkInfo - target String - "The target this symlink points to." - -struct FileLockMetadata - - is_lockholder Boolean? - "True if caller holds the file lock." - - lockholder_name String? - "The display name of the lock holder." - - lockholder_account_id users_common.AccountId? - "The account ID of the lock holder if known." - - created common.DropboxTimestamp? - "The timestamp of the lock was created." - - example default - is_lockholder = true - lockholder_name = "Imaginary User" - created = "2015-05-12T15:50:38Z" - -struct FileMetadata extends Metadata - - id Id - "A unique identifier for the file." - - client_modified common.DropboxTimestamp - "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." - - server_modified common.DropboxTimestamp - "The last time the file was modified on Dropbox." - - rev 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." - - size UInt64 - "The file size in bytes." - - media_info MediaInfo? - "Additional information if the file is a photo or video. This field will not be set on entries returned by :route:`list_folder`, :route:`list_folder/continue`, or :route:`get_thumbnail_batch`, starting December 2, 2019." - - symlink_info SymlinkInfo? - "Set if this file is a symlink." - - sharing_info FileSharingInfo? - "Set if this file is contained in a shared folder." - - is_downloadable Boolean = true - "If true, file can be downloaded directly; else the file must be exported." - - export_info ExportInfo? - "Information about format this file can be exported to. This filed must be set if :field:`is_downloadable` - is set to false." - - property_groups List(file_properties.PropertyGroup)? - "Additional information if the file has custom properties with the - property template specified." - - has_explicit_shared_members Boolean? - "This flag will only be present if include_has_explicit_shared_members - is true in :route:`list_folder` or :route:`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." - - content_hash Sha256HexHash? - "A hash of the file content. This field can be used to verify data integrity. For more - information see our :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." - - file_lock_info FileLockMetadata? - "If present, the metadata associated with the file's current lock." - - example default - id = "id:a4ayc_80_OEAAAAAAAAAXw" - name = "Prime_Numbers.txt" - path_lower = "/homework/math/prime_numbers.txt" - path_display = "/Homework/math/Prime_Numbers.txt" - sharing_info = default - client_modified = "2015-05-12T15:50:38Z" - server_modified = "2015-05-12T15:50:38Z" - rev = "a1c10ce0dd78" - size = 7212 - is_downloadable = true - property_groups = [default] - has_explicit_shared_members = false - content_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - file_lock_info = default - - example search_file_metadata - id = "id:a4ayc_80_OEAAAAAAAAAXw" - name = "Prime_Numbers.txt" - path_lower = "/homework/math/prime_numbers.txt" - path_display = "/Homework/math/Prime_Numbers.txt" - sharing_info = default - client_modified = "2015-05-12T15:50:38Z" - server_modified = "2015-05-12T15:50:38Z" - rev = "a1c10ce0dd78" - size = 7212 - is_downloadable = true - has_explicit_shared_members = false - content_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - -struct FolderMetadata extends Metadata - id Id - "A unique identifier for the folder." - - shared_folder_id common.SharedFolderId? - "Please use :field:`sharing_info` instead." - - sharing_info FolderSharingInfo? - "Set if the folder is contained in a shared folder or is a shared folder mount point." - - property_groups List(file_properties.PropertyGroup)? - "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." - - example default - id = "id:a4ayc_80_OEAAAAAAAAAXz" - path_lower = "/homework/math" - path_display = "/Homework/math" - name = "math" - sharing_info = default - property_groups = [default] - -struct DeletedMetadata extends Metadata - "Indicates that there used to be a file or folder at this path, but it no longer exists." - # TODO: Do we care about whether it's a deleted file or folder? - # TODO: Add the mtime when it's been deleted? And the rev??? - - example default - path_lower = "/homework/math/pi.txt" - path_display = "/Homework/math/pi.txt" - name = "pi.txt" - -union_closed GetMetadataError - path LookupError - -struct GetMetadataArg - path ReadPath - "The path of a file or folder on Dropbox." - include_media_info Boolean = false - "If true, :field:`FileMetadata.media_info` is set for photo and video." - include_deleted Boolean = false - "If true, :type:`DeletedMetadata` will be returned for deleted file or - folder, otherwise :field:`LookupError.not_found` will be returned." - include_has_explicit_shared_members Boolean = false - "If true, the results will include a flag for each file indicating whether or not - that file has any explicit members." - include_property_groups file_properties.TemplateFilterBase? - "If set to a valid list of template IDs, :field:`FileMetadata.property_groups` - is set if there exists property data associated with the file and each of the - listed templates." - - example default - path = "/Homework/math" - - example id - path = "id:a4ayc_80_OEAAAAAAAAAYa" - - example rev - path = "rev:a1c10ce0dd78" - -route get_metadata (GetMetadataArg, Metadata, GetMetadataError) - "Returns the metadata for a file or folder. - - Note: Metadata for the root folder is unsupported." - - attrs - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.metadata.read" -# -# General fileops -# - -struct FileOpsResult - example default - -# -# List folder routes -# - -struct ListFolderLongpollArg - cursor ListFolderCursor - "A cursor as returned by :route:`list_folder` or :route:`list_folder/continue`. Cursors - retrieved by setting :field:`ListFolderArg.include_media_info` to :val:`true` are - not supported." - - timeout UInt64(min_value=30, max_value=480) = 30 - "A timeout in seconds. The request will block for at most this length - of time, plus up to 90 seconds of random jitter added to avoid the - thundering herd problem. Care should be taken when using this - parameter, as some network infrastructure does not support long - timeouts." - - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - -struct ListFolderLongpollResult - changes Boolean - "Indicates whether new changes are available. If true, call - :route:`list_folder/continue` to retrieve the changes." - backoff UInt64? - "If present, backoff for at least this many seconds before calling - :route:`list_folder/longpoll` again." - - example default - changes = true - -union ListFolderLongpollError - reset - "Indicates that the cursor has been invalidated. Call - :route:`list_folder` to obtain a new cursor." - -route list_folder/longpoll (ListFolderLongpollArg, ListFolderLongpollResult, ListFolderLongpollError) - "A longpoll endpoint to wait for changes on an account. In conjunction with - :route:`list_folder/continue`, this call gives you a low-latency way to - monitor an account for file changes. The connection will block until there - are changes available or a timeout occurs. This endpoint is useful mostly - for client-side apps. If you're looking for server-side notifications, - check out our - :link:`webhooks documentation https://www.dropbox.com/developers/reference/webhooks`." - - attrs - host = "notify" - auth = "noauth" - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.metadata.read" - -struct SharedLink - url SharedLinkUrl - "Shared link url." - password String? - "Password for the shared link." - - example default - url = "https://www.dropbox.com/s/2sn712vy1ovegw8?dl=0" - password = "password" - -struct ListFolderArg - path PathROrId - "A unique identifier for the file." - recursive Boolean = false - "If true, the list folder operation will be applied recursively to all subfolders - and the response will contain contents of all subfolders." - include_media_info Boolean = false - "If true, :field:`FileMetadata.media_info` is set for photo and video. This parameter will no longer have an effect starting December 2, 2019." - include_deleted Boolean = false - "If true, the results will include entries for files and folders that used to exist but were deleted." - include_has_explicit_shared_members Boolean = false - "If true, the results will include a flag for each file indicating whether or not - that file has any explicit members." - include_mounted_folders Boolean = true - "If true, the results will include entries under mounted folders which includes app folder, - shared folder and team folder." - limit UInt32(min_value=1, max_value=2000)? - "The maximum number of results to return per request. Note: This is an approximate number - and there can be slightly more entries returned in some cases." - shared_link SharedLink? - "A shared link to list the contents of. If the link is password-protected, the password - must be provided. If this field is present, :field:`ListFolderArg.path` will be relative - to root of the shared link. Only non-recursive mode is supported for shared link." - include_property_groups file_properties.TemplateFilterBase? - "If set to a valid list of template IDs, :field:`FileMetadata.property_groups` - is set if there exists property data associated with the file and each of the - listed templates." - include_non_downloadable_files Boolean = true - "If true, include files that are not downloadable, i.e. Google Docs." - - example default - path = "/Homework/math" - recursive = false - -struct ListFolderResult - entries List(Metadata) - "The files and (direct) subfolders in the folder." - cursor ListFolderCursor - "Pass the cursor into :route:`list_folder/continue` to see what's - changed in the folder since your previous query." - has_more Boolean - "If true, then there are more entries available. Pass the - cursor to :route:`list_folder/continue` to retrieve the rest." - - example default - entries = [default, folder_metadata] - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - has_more = false - -union ListFolderError - path LookupError - template_error file_properties.TemplateError - -route list_folder (ListFolderArg, ListFolderResult, ListFolderError) - "Starts returning the contents of a folder. If the result's :field:`ListFolderResult.has_more` - field is :val:`true`, call :route:`list_folder/continue` with the returned - :field:`ListFolderResult.cursor` to retrieve more entries. - - If you're using :field:`ListFolderArg.recursive` set to :val:`true` to keep a local cache of - the contents of a Dropbox account, iterate through each entry in order and process them as - follows to keep your local state in sync: - - For each :type:`FileMetadata`, store the new entry at the given path in your local state. If the - required parent folders don't exist yet, create them. If there's already something else at the - given path, replace it and remove all its children. - - For each :type:`FolderMetadata`, store the new entry at the given path in your local state. If - the required parent folders don't exist yet, create them. If there's already something else at - the given path, replace it but leave the children as they are. Check the new entry's - :field:`FolderSharingInfo.read_only` and set all its children's read-only statuses to match. - - For each :type:`DeletedMetadata`, if your local state has something at the given path, remove it - and all its children. If there's nothing at the given path, ignore this entry. - - Note: :type:`auth.RateLimitError` may be returned if multiple :route:`list_folder` or - :route:`list_folder/continue` calls with same parameters are made simultaneously by same - API app for same user. If your app implements retry logic, please hold off the retry until - the previous request finishes." - - attrs - allow_app_folder_app = true - auth = "app, user" - select_admin_mode = "whole_team" - scope = "files.metadata.read" - - -struct ListFolderContinueArg - cursor ListFolderCursor - "The cursor returned by your last call to :route:`list_folder` or - :route:`list_folder/continue`." - - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - -union ListFolderContinueError - path LookupError - reset - "Indicates that the cursor has been invalidated. Call - :route:`list_folder` to obtain a new cursor." - -route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderContinueError) - "Once a cursor has been retrieved from :route:`list_folder`, use this to paginate through all - files and retrieve updates to the folder, following the same rules as documented for - :route:`list_folder`." - - attrs - allow_app_folder_app = true - auth = "app, user" - select_admin_mode = "whole_team" - scope = "files.metadata.read" - -struct ListFolderGetLatestCursorResult - cursor ListFolderCursor - "Pass the cursor into :route:`list_folder/continue` to see what's - changed in the folder since your previous query." - - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - -route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorResult, ListFolderError) - "A way to quickly get a cursor for the folder's state. Unlike :route:`list_folder`, - :route:`list_folder/get_latest_cursor` doesn't return any entries. This endpoint is for app - which only needs to know about new files and modifications and doesn't need to know about - files that already exist in Dropbox." - - attrs - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.metadata.read" -# -# Download -# - -union DownloadError - path LookupError - # For example, attempting to download a Cloud Doc - unsupported_file - "This file type cannot be downloaded directly; use :route:`export` instead." - -struct DownloadArg - - path ReadPath - "The path of the file to download." - - rev Rev? - "Please specify revision in :field:`path` instead." - - example default - path = "/Homework/math/Prime_Numbers.txt" - - example id - path = "id:a4ayc_80_OEAAAAAAAAAYa" - - example rev - path = "rev:a1c10ce0dd78" - -route download (DownloadArg, FileMetadata, DownloadError) - "Download a file from a user's Dropbox." - - attrs - host = "content" - style = "download" - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.content.read" - -# -# Download zip -# - -union DownloadZipError - path LookupError - too_large - "The folder or a file is too large to download." - too_many_files - "The folder has too many files to download." - -struct DownloadZipArg - path ReadPath - "The path of the folder to download." - - example default - path = "/Homework/math" - - example id - path = "id:a4ayc_80_OEAAAAAAAAAYa" - - example rev - path = "rev:a1c10ce0dd78" - -struct DownloadZipResult - metadata FolderMetadata - - example default - metadata = default - -route download_zip (DownloadZipArg, DownloadZipResult, DownloadZipError) - "Download a folder from the user's Dropbox, as a zip file. The folder must be less than 20 GB - in size and any single file within must be less than 4 GB in size. The resulting zip must have - fewer than 10,000 total file and folder entries, including the top level folder. The input - cannot be a single file. - - Note: this endpoint does not support HTTP range requests." - - attrs - host = "content" - style = "download" - allow_app_folder_app = true - scope = "files.content.read" - -# -# Export -# - -union ExportError - path LookupError - non_exportable - "This file type cannot be exported. Use :route:`download` instead." - invalid_export_format - "The specified export format is not a valid option for this file type." - retry_error - "The exportable content is not yet available. Please retry later." - - -struct ExportArg - - path ReadPath - "The path of the file to be exported." - - export_format String? - "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 :route:`get_metadata`. - If none is specified, the default format (specified - in export_as in file metadata) will be used." - - example default - path = "/Homework/math/Prime_Numbers.gsheet" - - example id - path = "id:a4ayc_80_OEAAAAAAAAAYa" - - -struct ExportMetadata - name String - "The last component of the path (including extension). - This never contains a slash." - - size UInt64 - "The file size in bytes." - - export_hash Sha256HexHash? - "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 :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." - - paper_revision Int64? - "If the file is a Paper doc, this gives the latest doc revision which can be used in :route:`paper/update`." - - example default - name = "Prime_Numbers.xlsx" - size = 7189 - export_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - - -struct ExportResult - export_metadata ExportMetadata - "Metadata for the exported version of the file." - file_metadata FileMetadata - "Metadata for the original file." - - example default - export_metadata = default - file_metadata = default - - -route export (ExportArg, ExportResult, ExportError) - "Export a file from a user's Dropbox. This route only supports exporting files that cannot be downloaded directly - and whose :field:`ExportResult.file_metadata` has :field:`ExportInfo.export_as` populated." - - attrs - is_preview = true - host = "content" - style = "download" - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.content.read" - - -# -# Upload Routes -# - -# Errors - -struct UploadWriteFailed - reason WriteError - "The reason why the file couldn't be saved." - upload_session_id String - "The upload session ID; data has already been uploaded to the corresponding upload - session and this ID may be used to retry the commit with :route:`upload_session/finish`." - -union UploadError - path UploadWriteFailed - "Unable to save the uploaded contents to a file." - properties_error file_properties.InvalidPropertyGroupError - "The supplied property group is invalid. The file has uploaded without property groups." - payload_too_large - "The request payload must be at most 150 MB." - content_hash_mismatch - "The content received by the Dropbox server in this call does not match the provided content hash." - -struct UploadSessionOffsetError - correct_offset UInt64 - "The offset up to which data has been collected." - -union UploadSessionStartError - concurrent_session_data_not_allowed - "Uploading data not allowed when starting concurrent upload session." - concurrent_session_close_not_allowed - "Can not start a closed concurrent upload session." - payload_too_large - "The request payload must be at most 150 MB." - content_hash_mismatch - "The content received by the Dropbox server in this call does not match the provided content hash." - -union UploadSessionLookupError - not_found - "The upload session ID was not found or has expired. Upload sessions are - valid for 7 days." - incorrect_offset UploadSessionOffsetError - "The specified offset was incorrect. See the value for the - correct offset. This error may occur when a previous request - was received and processed successfully but the client did not - receive the response, e.g. due to a network error." - closed - "You are attempting to append data to an upload session that - has already been closed (i.e. committed)." - not_closed - "The session must be closed before calling upload_session/finish_batch." - too_large - "You can not append to the upload session because the size of a file should not reach the - max file size limit (i.e. 350GB)." - concurrent_session_invalid_offset - "For concurrent upload sessions, offset needs to be multiple of 4194304 bytes." - concurrent_session_invalid_data_size - "For concurrent upload sessions, only chunks with size multiple of 4194304 bytes can be uploaded." - payload_too_large - "The request payload must be at most 150 MB." - -union UploadSessionAppendError extends UploadSessionLookupError - content_hash_mismatch - "The content received by the Dropbox server in this call does not match the provided content hash." - -union UploadSessionFinishError - lookup_failed UploadSessionLookupError - "The session arguments are incorrect; the value explains the reason." - path WriteError - "Unable to save the uploaded contents to a file. Data has already been appended to the - upload - session. Please retry with empty data body and updated offset." - properties_error file_properties.InvalidPropertyGroupError - "The supplied property group is invalid. The file has uploaded without property groups." - too_many_shared_folder_targets - "The batch request commits files into too many different shared folders. - Please limit your batch request to files contained in a single shared folder." - too_many_write_operations - "There are too many write operations happening in the user's Dropbox. You should - retry uploading this file." - concurrent_session_data_not_allowed - "Uploading data not allowed when finishing concurrent upload session." - concurrent_session_not_closed - "Concurrent upload sessions need to be closed before finishing." - concurrent_session_missing_data - "Not all pieces of data were uploaded before trying to finish the session." - payload_too_large - "The request payload must be at most 150 MB." - content_hash_mismatch - "The content received by the Dropbox server in this call does not match the provided content hash." - -# Req/Resp - -union UploadSessionType - sequential - "Pieces of data are uploaded sequentially one after another. This is the default - behavior." - concurrent - "Pieces of data can be uploaded in concurrent RPCs in any order." - -struct UploadSessionStartArg - close Boolean = false - "If true, the current session will be closed, at which point you won't - be able to call :route:`upload_session/append:2` anymore with the - current session." - - session_type UploadSessionType? - "Type of upload session you want to start. If not specified, default is - :field:`UploadSessionType.sequential`." - - content_hash Sha256HexHash? - "A hash of the file content uploaded in this call. If provided and the uploaded content - does not match this hash, an error will be returned. For more information see our - :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." - - example with_close - close = false - -struct UploadSessionStartResult - session_id String - "A unique identifier for the upload session. Pass this to - :route:`upload_session/append:2` and - :route:`upload_session/finish`." - - example default - session_id = "1234faaf0678bcde" - -route upload_session/start_batch (UploadSessionStartBatchArg, UploadSessionStartBatchResult, Void) - "This route starts batch of upload_sessions. Please refer to `upload_session/start` usage. - - Calls to this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls allowed - per month. For more information, see the :link:`Data transport limit page - https://www.dropbox.com/developers/reference/data-transport-limit`." - - attrs - style = "rpc" - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -struct UploadSessionStartBatchArg - session_type UploadSessionType? - "Type of upload session you want to start. If not specified, default is - :field:`UploadSessionType.sequential`." - - num_sessions UInt64(min_value=1, max_value=1000) - "The number of upload sessions to start." - - example default - num_sessions = 1 - -struct UploadSessionStartBatchResult - session_ids List(String) - "A List of unique identifiers for the upload session. Pass each session_id to - :route:`upload_session/append:2` and - :route:`upload_session/finish`." - - example default - session_ids = ["1234faaf0678bcde"] - -route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, UploadSessionStartError) - "Upload sessions allow you to upload a single file in one or more - requests, for example where the size of the file is greater than 150 - MB. This call starts a new upload session with the given data. You - can then use :route:`upload_session/append:2` to add more data and - :route:`upload_session/finish` to save all the data to a file in - Dropbox. - - A single request should not upload more than 150 MB. The maximum size of - a file one can upload to an upload session is 350 GB. - - An upload session can be used for a maximum of 7 days. Attempting - to use an :field:`UploadSessionStartResult.session_id` with - :route:`upload_session/append:2` or :route:`upload_session/finish` more - than 7 days after its creation will return a - :field:`UploadSessionLookupError.not_found`. - - Calls to this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls allowed - per month. For more information, see the :link:`Data transport limit page - https://www.dropbox.com/developers/reference/data-transport-limit`. - - By default, upload sessions require you to send content of the file in sequential order via - consecutive :route:`upload_session/start`, :route:`upload_session/append:2`, - :route:`upload_session/finish` calls. For better performance, you can instead optionally use - a :field:`UploadSessionType.concurrent` upload session. To start a new concurrent session, - set :field:`UploadSessionStartArg.session_type` to :field:`UploadSessionType.concurrent`. - After that, you can send file data in concurrent :route:`upload_session/append:2` requests. - Finally finish the session with :route:`upload_session/finish`. - - There are couple of constraints with concurrent sessions to make them work. You can not send - data with :route:`upload_session/start` or :route:`upload_session/finish` call, only with - :route:`upload_session/append:2` call. Also data uploaded in :route:`upload_session/append:2` - call must be multiple of 4194304 bytes (except for last :route:`upload_session/append:2` with - :field:`UploadSessionStartArg.close` to :val:`true`, that may contain any remaining data)." - - attrs - host = "content" - style = "upload" - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -struct UploadSessionAppendArg - cursor UploadSessionCursor - "Contains the upload session ID and the offset." - close Boolean = false - "If true, the current session will be closed, at which point - you won't be able to call :route:`upload_session/append:2` - anymore with the current session." - content_hash Sha256HexHash? - "A hash of the file content uploaded in this call. If provided and the uploaded content - does not match this hash, an error will be returned. For more information see our - :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." - - example default - cursor = default - -route upload_session/append:2 (UploadSessionAppendArg, Void, UploadSessionAppendError) - "Append more data to an upload session. - - When the parameter close is set, this call will close the session. - - A single request should not upload more than 150 MB. The maximum size of - a file one can upload to an upload session is 350 GB. - - Calls to this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls allowed - per month. For more information, see the :link:`Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit`." - - attrs - host = "content" - style = "upload" - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -struct UploadSessionCursor - session_id String - "The upload session ID (returned by :route:`upload_session/start`)." - offset UInt64 - "Offset in bytes at which data should be appended. We use this to make - sure upload data isn't lost or duplicated in the event of a network error." - - example default - session_id = "1234faaf0678bcde" - offset = 0 - - example another - session_id = "8dd9d57374911153" - offset = 1073741824 - -route upload_session/append (UploadSessionCursor, Void, UploadSessionAppendError) deprecated by upload_session/append:2 - "Append more data to an upload session. - - A single request should not upload more than 150 MB. The maximum size of - a file one can upload to an upload session is 350 GB. - - Calls to this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls allowed - per month. For more information, see the :link:`Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit`." - - attrs - host = "content" - style = "upload" - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -union_closed WriteMode - "Your intent when writing a file to some path. This is used to determine - what constitutes a conflict and what the autorename strategy is. - - In some situations, the conflict behavior is identical: - (a) If the target path doesn't refer to anything, the file is always written; - no conflict. - (b) If the target path refers to a folder, it's always a conflict. - (c) If the target path refers to a file with identical contents, nothing gets - written; no conflict. - - The conflict checking differs in the case where there's a file at the target - path with contents different from the contents you're trying to write." - - add - "Do not overwrite an existing file if there is a conflict. The - autorename strategy is to append a number to the file name. For example, - \"document.txt\" might become \"document (2).txt\"." - overwrite - "Always overwrite the existing file. The autorename - strategy is the same as it is for :field:`add`." - update Rev - "Overwrite if the given \"rev\" matches the existing file's \"rev\". - The supplied value should be the latest known \"rev\" of the file, for example, - from :type:`FileMetadata`, from when the file was last downloaded by the app. - This will cause the file on the Dropbox servers to be overwritten if the given \"rev\" - matches the existing file's current \"rev\" on the Dropbox servers. - The autorename strategy is to append the string \"conflicted copy\" - to the file name. For example, \"document.txt\" might become - \"document (conflicted copy).txt\" or \"document (Panda's conflicted copy).txt\"." - - example default - add = null - - example overwriting - overwrite = null - - example with_revision - update = "a1c10ce0dd78" - -# NOTE: If you update this, also update dropbox.api.upload_session_utils.COMMIT_INFO_FIELDS -# or else tests will fail -struct CommitInfo - path WritePathOrId - "Path in the user's Dropbox to save the file." - mode WriteMode = add - "Selects what to do if the file already exists." - autorename Boolean = false - "If there's a conflict, as determined by :field:`mode`, have the Dropbox - server try to autorename the file to avoid conflict." - client_modified common.DropboxTimestamp? - "The value to store as the :field:`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." - mute Boolean = false - "Normally, users are made aware of any file modifications in their - Dropbox account via notifications in the client software. If - :val:`true`, this tells the clients that this modification shouldn't - result in a user notification." - property_groups List(file_properties.PropertyGroup)? - "List of custom properties to add to file." - strict_conflict Boolean = false - "Be more strict about how each :type:`WriteMode` detects conflict. - For example, always return a conflict error when :field:`mode` - = :field:`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." - - example default - path = "/Homework/math/Matrices.txt" - autorename = true - - example another - path = "/Homework/math/Vectors.txt" - autorename = true - - example update - path = "/Homework/math/Matrices.txt" - mode = with_revision - autorename = false - property_groups = [default] - -struct UploadSessionFinishArg - cursor UploadSessionCursor - "Contains the upload session ID and the offset." - commit CommitInfo - "Contains the path and other optional modifiers for the commit." - content_hash Sha256HexHash? - "A hash of the file content uploaded in this call. If provided and the uploaded content - does not match this hash, an error will be returned. For more information see our - :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." - - example default - cursor = default - commit = default - - example another - cursor = another - commit = another - - example update - cursor = default - commit = update - -route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSessionFinishError) - "Finish an upload session and save the uploaded data to the given file - path. - - A single request should not upload more than 150 MB. The maximum size of - a file one can upload to an upload session is 350 GB. - - Calls to this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls allowed - per month. For more information, see the :link:`Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit`." - - attrs - host = "content" - style = "upload" - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope= "files.content.write" - -struct UploadArg extends CommitInfo - content_hash Sha256HexHash? - "A hash of the file content uploaded in this call. If provided and the uploaded content - does not match this hash, an error will be returned. For more information see our - :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." - - example default - path = "/Homework/math/Matrices.txt" - content_hash = null - -route upload (UploadArg, FileMetadata, UploadError) - "Create a new file with the contents provided in the request. - - Do not use this to upload a file larger than 150 MB. Instead, create an - upload session with :route:`upload_session/start`. - - Calls to this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls allowed - per month. For more information, see the :link:`Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit`." - - attrs - host = "content" - style = "upload" - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -# -# Batch Upload -# - -struct UploadSessionFinishBatchArg - entries List(UploadSessionFinishArg, max_items=1000) - "Commit information for each file in the batch." - - example default - entries = [default] - - example multiple - entries = [default, another] - -struct UploadSessionFinishBatchResult - entries List(UploadSessionFinishBatchResultEntry) - "Each entry in :field:`UploadSessionFinishBatchArg.entries` will appear at the same position - inside :field:`UploadSessionFinishBatchResult.entries`." - - example default - entries = [default] - -union_closed UploadSessionFinishBatchResultEntry - success FileMetadata - failure UploadSessionFinishError - - example default - success = default - -union_closed UploadSessionFinishBatchJobStatus extends async.PollResultBase - complete UploadSessionFinishBatchResult - "The :route:`upload_session/finish_batch` has finished." - - example default - complete = default - -union UploadSessionFinishBatchLaunch extends async.LaunchResultBase - "Result returned by :route:`upload_session/finish_batch` that may either launch an - asynchronous job or complete synchronously." - - complete UploadSessionFinishBatchResult - - example complete - complete = default - - example async_job_id - async_job_id = "34g93hh34h04y384084" - -route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFinishBatchLaunch, Void) deprecated by upload_session/finish_batch:2 - "This route helps you commit many files at once into a user's Dropbox. Use - :route:`upload_session/start` and :route:`upload_session/append:2` to - upload file contents. We recommend uploading many files in parallel to increase - throughput. Once the file contents have been uploaded, rather than calling - :route:`upload_session/finish`, use this route to finish all your upload sessions - in a single request. - - :field:`UploadSessionStartArg.close` or :field:`UploadSessionAppendArg.close` - needs to be true for the last - :route:`upload_session/start` or :route:`upload_session/append:2` call. The maximum - size of a file one can upload to an upload session is 350 GB. - - This route will return a job_id immediately and do the async commit job in background. - Use :route:`upload_session/finish_batch/check` to check the job status. - - For the same account, this route should be executed serially. That means you should not start - the next job before current job finishes. We allow up to 1000 entries in a single request. - - Calls to this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls allowed - per month. For more information, see the :link:`Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit`." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route upload_session/finish_batch:2 (UploadSessionFinishBatchArg, UploadSessionFinishBatchResult, Void) - "This route helps you commit many files at once into a user's Dropbox. Use - :route:`upload_session/start` and :route:`upload_session/append:2` to - upload file contents. We recommend uploading many files in parallel to increase - throughput. Once the file contents have been uploaded, rather than calling - :route:`upload_session/finish`, use this route to finish all your upload sessions - in a single request. - - :field:`UploadSessionStartArg.close` or :field:`UploadSessionAppendArg.close` - needs to be true for the last - :route:`upload_session/start` or :route:`upload_session/append:2` call of each upload session. The maximum - size of a file one can upload to an upload session is 350 GB. - - We allow up to 1000 entries in a single request. - - Calls to this endpoint will count as data transport calls for any Dropbox - Business teams with a limit on the number of data transport calls allowed - per month. For more information, see the :link:`Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit`." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - - -route upload_session/finish_batch/check(async.PollArg, UploadSessionFinishBatchJobStatus, async.PollError) - "Returns the status of an asynchronous job for :route:`upload_session/finish_batch`. If - success, it returns list of result for each entry." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -# -# Search -# - -union_closed SearchMode - filename - "Search file and folder names." - filename_and_content - "Search file and folder names as well as file contents." - deleted_filename - "Search for deleted file and folder names." - - example default - filename_and_content = null - - example name_only - filename = null - - example deleted_names - deleted_filename = null - -struct SearchArg - path PathROrId - "The path in the user's Dropbox to search. Should probably be - a folder." - - query String(max_length=1000) - "The string to search for. Query string may be rewritten to improve relevance of results. - The string is split on spaces into multiple tokens. For file name searching, - the last token is used for prefix matching (i.e. \"bat c\" matches \"bat cave\" - but not \"batman car\")." - - start UInt64(max_value=9999) = 0 - "The starting index within the search results (used for paging)." - - max_results UInt64(min_value=1, max_value=1000) = 100 - "The maximum number of search results to return." - - mode SearchMode = filename - "The search mode (filename, filename_and_content, or deleted_filename). - Note that searching file content is only available for Dropbox Business - accounts." - - example default - path = "" - query = "prime numbers" - -union_closed SearchMatchType - "Indicates what type of match was found for a given item." - - filename - "This item was matched on its file or folder name." - content - "This item was matched based on its file contents." - both - "This item was matched based on both its contents and its file name." - - example default - content = null - -struct SearchMatch - match_type SearchMatchType - "The type of the match." - metadata Metadata - "The metadata for the matched file or folder." - - example default - match_type = default - metadata = default - -struct SearchResult - matches List(SearchMatch) - "A list (possibly empty) of matches for the query." - more Boolean - "Used for paging. If true, indicates there is another page of results - available that can be fetched by calling :route:`search` again." - start UInt64 - "Used for paging. Value to set the start argument to when calling - :route:`search` to fetch the next page of results." - - example default - matches = [default] - more = false - start = 1 - -union SearchError - path LookupError - invalid_argument String? - internal_error - "Something went wrong, please try again." - -route search (SearchArg, SearchResult, SearchError) deprecated by search:2 - "Searches for files and folders. - - Note: Recent changes will be reflected in search results within a few seconds - and older revisions of existing files may still match your query for up to a few days." - - attrs - allow_app_folder_app = true - scope = "files.metadata.read" -# -# Search:2 -# -route search:2 (SearchV2Arg, SearchV2Result, SearchError) - "Searches for files and folders. - - Note: :route:`search:2` along with :route:`search/continue:2` can only be used to - retrieve a maximum of 10,000 matches. - - Recent changes may not immediately be reflected in search results due to a short delay in indexing. - Duplicate results may be returned across pages. Some results may not be returned." - - attrs - allow_app_folder_app = true - scope = "files.metadata.read" - -struct SearchV2Arg - - query String(max_length=1000) - "The string to search for. May match across multiple fields based on the request arguments." - - options SearchOptions? - "Options for more targeted search results." - - match_field_options SearchMatchFieldOptions? - "Options for search results match fields." - - include_highlights Boolean? - "Deprecated and moved this option to SearchMatchFieldOptions." - - example default - query = "cat" - options = default - match_field_options = default - -struct SearchOptions - - path PathROrId? - "Scopes the search to a path in the user's Dropbox. Searches the entire Dropbox if not specified." - - max_results UInt64(min_value=1, max_value=1000) = 100 - "The maximum number of search results to return." - - order_by SearchOrderBy? - "Specified property of the order of search results. By default, results are sorted by relevance." - - file_status FileStatus = active - "Restricts search to the given file status." - - filename_only Boolean = false - "Restricts search to only match on filenames." - - file_extensions List(String)? - "Restricts search to only the extensions specified. Only supported for active file search." - - file_categories List(FileCategory)? - "Restricts search to only the file categories specified. Only supported for active file search." - - account_id users_common.AccountId? - "Restricts results to the given account id." - - example default - path = "/Folder" - max_results = 20 - -struct SearchMatchFieldOptions - - include_highlights Boolean = false - "Whether to include highlight span from file title." - example default - include_highlights = false - -union SearchOrderBy - relevance - last_modified_time - - example default - relevance = null - -# both -- maybe supported in the future -union FileStatus - active - deleted - - example default - active = null - -union FileCategory - - image - "jpg, png, gif, and more." - - document - "doc, docx, txt, and more." - - pdf - "pdf." - - spreadsheet - "xlsx, xls, csv, and more." - - presentation - "ppt, pptx, key, and more." - - audio - "mp3, wav, mid, and more." - - video - "mov, wmv, mp4, and more." - - folder - "dropbox folder." - - paper - "dropbox paper doc." - - others - "any file not in one of the categories above." - -route search/continue:2 (SearchV2ContinueArg, SearchV2Result, SearchError) - "Fetches the next page of search results returned from :route:`search:2`. - - Note: :route:`search:2` along with :route:`search/continue:2` can only be used to - retrieve a maximum of 10,000 matches. - - Recent changes may not immediately be reflected in search results due to a short delay in indexing. - Duplicate results may be returned across pages. Some results may not be returned." - - attrs - allow_app_folder_app = true - scope = "files.metadata.read" - -alias SearchV2Cursor = String(min_length=1) - -struct SearchV2ContinueArg - cursor SearchV2Cursor - "The cursor returned by your last call to :route:`search:2`. Used to fetch the next page of results." - - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - - -struct SearchV2Result - - matches List(SearchMatchV2) - "A list (possibly empty) of matches for the query." - - has_more Boolean - "Used for paging. If true, indicates there is another page of results - available that can be fetched by calling :route:`search/continue:2` with the cursor." - - cursor SearchV2Cursor? - "Pass the cursor into :route:`search/continue:2` to fetch the next page of results." - - example default - matches = [default] - has_more = false - cursor = null - -struct SearchMatchV2 - - metadata MetadataV2 - "The metadata for the matched file or folder." - - match_type SearchMatchTypeV2? - "The type of the match." - - highlight_spans List(HighlightSpan)? - "The list of HighlightSpan determines which parts of the file title should be highlighted." - - example default - metadata = default - highlight_spans = null - -union SearchMatchTypeV2 - "Indicates what type of match was found for a given item." - - filename - "This item was matched on its file or folder name." - file_content - "This item was matched based on its file contents." - filename_and_content - "This item was matched based on both its contents and its file name." - image_content - "This item was matched on image content." - -# -# Errors shared by various operations -# - -alias MalformedPathError = String? # TODO: Maybe a user_message-like thing? - -union LookupError - malformed_path MalformedPathError - "The given path does not satisfy the required path format. Please refer to the :link:`Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats` for more information." - not_found - "There is nothing at the given path." - not_file - "We were expecting a file, but the given path refers to something that isn't a file." - not_folder - "We were expecting a folder, but the given path refers to something that isn't a folder." - restricted_content - "The file cannot be transferred because the content is restricted. For example, we might restrict a file due to legal requirements." - unsupported_content_type - "This operation is not supported for this content type." - locked - "The given path is locked." - -union WriteError - malformed_path MalformedPathError - "The given path does not satisfy the required path format. Please refer to the :link:`Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats` for more information." - conflict WriteConflictError - "Couldn't write to the target path because there was something in the way." - no_write_permission - "The user doesn't have permissions to write to the target location." - insufficient_space - "The user doesn't have enough available space (bytes) to write more data." - disallowed_name - "Dropbox will not save the file or folder because of its name." - team_folder - "This endpoint cannot move or delete team folders." - operation_suppressed - "This file operation is not allowed at this path." - too_many_write_operations - "There are too many write operations in user's Dropbox. Please retry - this request." - -union WriteConflictError - file - "There's a file in the way." - folder - "There's a folder in the way." - file_ancestor - "There's a file at an ancestor path, so we couldn't create the required parent folders." - -# -# Create folder -# - -struct CreateFolderArg - path WritePath - "Path in the user's Dropbox to create." - autorename Boolean = false - "If there's a conflict, have the Dropbox server try to autorename - the folder to avoid the conflict." - - example default - path = "/Homework/math" - -struct CreateFolderResult extends FileOpsResult - metadata FolderMetadata - "Metadata of the created folder." - - example default - metadata = default - -union_closed CreateFolderError - path WriteError - -route create_folder:2 (CreateFolderArg, CreateFolderResult, CreateFolderError) - "Create a folder at a given path." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route create_folder (CreateFolderArg, FolderMetadata, CreateFolderError) deprecated by create_folder:2 - "Create a folder at a given path." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -struct CreateFolderBatchArg - paths List(WritePath, max_items=10000) - "List of paths to be created in the user's Dropbox. Duplicate path - arguments in the batch are considered only once." - autorename Boolean = false - "If there's a conflict, have the Dropbox server try to autorename - the folder to avoid the conflict." - force_async Boolean = false - "Whether to force the create to happen asynchronously." - - example default - paths = ["/Homework/math"] - autorename = false - -struct CreateFolderEntryResult - metadata FolderMetadata - "Metadata of the created folder." - - example default - metadata = default - -union CreateFolderEntryError - path WriteError - -union_closed CreateFolderBatchResultEntry - success CreateFolderEntryResult - failure CreateFolderEntryError - - example default - success = default - -union CreateFolderBatchError - too_many_files - "The operation would involve too many files or folders." - -struct CreateFolderBatchResult extends FileOpsResult - entries List(CreateFolderBatchResultEntry) - "Each entry in :field:`CreateFolderBatchArg.paths` will appear at the same position - inside :field:`CreateFolderBatchResult.entries`." - - example default - entries = [default] - -union CreateFolderBatchJobStatus extends async.PollResultBase - complete CreateFolderBatchResult - "The batch create folder has finished." - failed CreateFolderBatchError - "The batch create folder has failed." - - example default - complete = default - -union CreateFolderBatchLaunch extends async.LaunchResultBase - "Result returned by :route:`create_folder_batch` that may either launch an - asynchronous job or complete synchronously." - - complete CreateFolderBatchResult - - example complete - complete = default - - example async_job_id - async_job_id = "34g93hh34h04y384084" - -route create_folder_batch (CreateFolderBatchArg, CreateFolderBatchLaunch, Void) - "Create multiple folders at once. - - This route is asynchronous for large batches, which returns a job ID immediately and runs - the create folder batch asynchronously. Otherwise, creates the folders and returns the result - synchronously for smaller inputs. You can force asynchronous behaviour by using the - :field:`CreateFolderBatchArg.force_async` flag. Use :route:`create_folder_batch/check` to check - the job status." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route create_folder_batch/check (async.PollArg, CreateFolderBatchJobStatus, async.PollError) - "Returns the status of an asynchronous job for :route:`create_folder_batch`. If - success, it returns list of result for each entry." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -# -# Delete -# - -struct DeleteArg - path WritePathOrId - "Path in the user's Dropbox to delete." - parent_rev Rev? - "Perform delete if given \"rev\" matches the existing file's latest \"rev\". This field - does not support deleting a folder." - - example delete - path = "/Homework/math/Prime_Numbers.txt" - -union DeleteError - path_lookup LookupError - path_write WriteError - too_many_write_operations - "There are too many write operations in user's Dropbox. Please retry - this request." - too_many_files - "There are too many files in one request. Please retry with fewer files." - -struct DeleteBatchArg - entries List(DeleteArg, max_items=1000) - - example default - entries = [delete] - -struct DeleteBatchResultData - metadata Metadata - "Metadata of the deleted object." - - example default - metadata = default - -union_closed DeleteBatchResultEntry - success DeleteBatchResultData - failure DeleteError - - example default - success = default - -struct DeleteResult extends FileOpsResult - metadata Metadata - "Metadata of the deleted object." - - example default - metadata = default - -struct DeleteBatchResult extends FileOpsResult - entries List(DeleteBatchResultEntry) - "Each entry in :field:`DeleteBatchArg.entries` will appear at the same position inside - :field:`DeleteBatchResult.entries`." - - example default - entries = [default] - -union DeleteBatchError - - too_many_write_operations - "Use :field:`DeleteError.too_many_write_operations`. :route:`delete_batch` now - provides smaller granularity about which entry has failed because of this." - -union DeleteBatchJobStatus extends async.PollResultBase - complete DeleteBatchResult - "The batch delete has finished." - failed DeleteBatchError - "The batch delete has failed." - - example default - complete = default - -union DeleteBatchLaunch extends async.LaunchResultBase - "Result returned by :route:`delete_batch` that may either launch an asynchronous job or complete - synchronously." - - complete DeleteBatchResult - - example complete - complete = default - - example async_job_id - async_job_id = "34g93hh34h04y384084" - -route delete:2 (DeleteArg, DeleteResult, DeleteError) - "Delete the file or folder at a given path. - - If the path is a folder, all its contents will be deleted too. - - A successful response indicates that the file or folder was deleted. The returned metadata will - be the corresponding :type:`FileMetadata` or :type:`FolderMetadata` for the item at time of - deletion, and not a :type:`DeletedMetadata` object." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route delete (DeleteArg, Metadata, DeleteError) deprecated by delete:2 - "Delete the file or folder at a given path. - - If the path is a folder, all its contents will be deleted too. - - A successful response indicates that the file or folder was deleted. The returned metadata will - be the corresponding :type:`FileMetadata` or :type:`FolderMetadata` for the item at time of - deletion, and not a :type:`DeletedMetadata` object." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route delete_batch (DeleteBatchArg, DeleteBatchLaunch, Void) - "Delete multiple files/folders at once. - - This route is asynchronous, which returns a job ID immediately and runs - the delete batch asynchronously. Use :route:`delete_batch/check` to check - the job status." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route delete_batch/check (async.PollArg, DeleteBatchJobStatus, async.PollError) - "Returns the status of an asynchronous job for :route:`delete_batch`. If - success, it returns list of result for each entry." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route permanently_delete (DeleteArg, Void, DeleteError) - "Permanently delete the file or folder at a given path - (see https://www.dropbox.com/en/help/40). - - If the given file or folder is not yet deleted, this route will first delete it. - It is possible for this route to successfully delete, then fail to permanently - delete. - - Note: This endpoint is only available for Dropbox Business apps." - - attrs - select_admin_mode = "team_admin" - allow_app_folder_app = true - scope = "files.permanent_delete" - -# -# Args and error shared by copy and move -# - -# Arg, result and error for relocation and relocation batch. - -struct RelocationPath - from_path WritePathOrId - "Path in the user's Dropbox to be copied or moved." - to_path WritePathOrId - "Path in the user's Dropbox that is the destination." - - example default - from_path = "/Homework/math" - to_path = "/Homework/algebra" - -struct RelocationArg extends RelocationPath - allow_shared_folder Boolean = false - "This flag has no effect." - autorename Boolean = false - "If there's a conflict, have the Dropbox server try to autorename - the file to avoid the conflict." - allow_ownership_transfer Boolean = false - "Allow moves by owner even if it would result in an ownership transfer - for the content being moved. This does not apply to copies." - - example default - from_path = "/Homework/math" - to_path = "/Homework/algebra" - -union RelocationError - from_lookup LookupError - from_write WriteError - to WriteError - - cant_copy_shared_folder - "Shared folders can't be copied." - cant_nest_shared_folder - "Your move operation would result in nested shared folders. This is not allowed." - cant_move_folder_into_itself - "You cannot move a folder into itself." - too_many_files - "The operation would involve more than 10,000 files and folders." - duplicated_or_nested_paths - "There are duplicated/nested paths among :field:`RelocationArg.from_path` - and :field:`RelocationArg.to_path`." - cant_transfer_ownership - "Your move operation would result in an ownership transfer. - You may reissue the request with - the field :field:`RelocationArg.allow_ownership_transfer` to true." - insufficient_quota - "The current user does not have enough space to move or copy the files." - internal_error - "Something went wrong with the job on Dropbox's end. You'll need to - verify that the action you were taking succeeded, and if not, try - again. This should happen very rarely." - cant_move_shared_folder - "Can't move the shared folder to the given destination." - cant_move_into_vault MoveIntoVaultError - "Some content cannot be moved into Vault under certain circumstances, see detailed error." - cant_move_into_family MoveIntoFamilyError - "Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error." - -union MoveIntoVaultError - is_shared_folder - "Moving shared folder into Vault is not allowed." - -union MoveIntoFamilyError - is_shared_folder - "Moving shared folder into Family Room folder is not allowed." - -struct RelocationResult extends FileOpsResult - metadata Metadata - "Metadata of the relocated object." - - example default - metadata = default - -struct RelocationBatchArgBase - entries List(RelocationPath, min_items=1, max_items=1000) - "List of entries to be moved or copied. Each entry is :type:`RelocationPath`." - autorename Boolean = false - "If there's a conflict with any file, have the Dropbox server try to - autorename that file to avoid the conflict." - - example default - entries = [default] - -union_closed RelocationBatchV2Launch extends async.LaunchResultBase - "Result returned by :route:`copy_batch:2` or :route:`move_batch:2` that may either launch an - asynchronous job or complete synchronously." - - complete RelocationBatchV2Result - - example complete - complete = default - - example async_job_id - async_job_id = "34g93hh34h04y384084" - -union_closed RelocationBatchV2JobStatus extends async.PollResultBase - "Result returned by :route:`copy_batch/check:2` or :route:`move_batch/check:2` that may either - be in progress or completed with result for each entry." - - complete RelocationBatchV2Result - "The copy or move batch job has finished." - - example default - complete = default - -struct RelocationBatchV2Result extends FileOpsResult - entries List(RelocationBatchResultEntry) - "Each entry in CopyBatchArg.entries or :field:`MoveBatchArg.entries` will - appear at the same position inside :field:`RelocationBatchV2Result.entries`." - - example default - entries = [success] - -union RelocationBatchErrorEntry - relocation_error RelocationError - "User errors that retry won't help." - internal_error - "Something went wrong with the job on Dropbox's end. You'll need to - verify that the action you were taking succeeded, and if not, try - again. This should happen very rarely." - too_many_write_operations - "There are too many write operations in user's Dropbox. Please retry - this request." - -union RelocationBatchResultEntry - success Metadata - failure RelocationBatchErrorEntry - - example success - success = default - -# Deprecated Arg, Result and error. - -struct RelocationBatchArg extends RelocationBatchArgBase - allow_shared_folder Boolean = false - "This flag has no effect." - allow_ownership_transfer Boolean = false - "Allow moves by owner even if it would result in an ownership transfer - for the content being moved. This does not apply to copies." - - example default - entries = [default] - -struct RelocationBatchResultData - metadata Metadata - "Metadata of the relocated object." - - example default - metadata = default - -struct RelocationBatchResult extends FileOpsResult - entries List(RelocationBatchResultData) - - example default - entries = [default] - -union_closed RelocationBatchJobStatus extends async.PollResultBase - complete RelocationBatchResult - "The copy or move batch job has finished." - failed RelocationBatchError - "The copy or move batch job has failed with exception." - - example default - complete = default - -union RelocationBatchLaunch extends async.LaunchResultBase - - "Result returned by :route:`copy_batch` or :route:`move_batch` that may either launch an - asynchronous job or complete synchronously." - - complete RelocationBatchResult - - example complete - complete = default - - example async_job_id - async_job_id = "34g93hh34h04y384084" - -union RelocationBatchError extends RelocationError - too_many_write_operations - "There are too many write operations in user's Dropbox. Please retry - this request." - -# -# Copy -# - -alias CopyBatchArg = RelocationBatchArgBase - -route copy:2 (RelocationArg, RelocationResult, RelocationError) - "Copy a file or folder to a different location in the user's Dropbox. - - If the source path is a folder all its contents will be copied." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route copy (RelocationArg, Metadata, RelocationError) deprecated by copy:2 - "Copy a file or folder to a different location in the user's Dropbox. - - If the source path is a folder all its contents will be copied." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route copy_batch:2 (CopyBatchArg, RelocationBatchV2Launch, Void) - "Copy multiple files or folders to different locations at once in the - user's Dropbox. - - This route will replace :route:`copy_batch:1`. The main difference is this - route will return status for each entry, while :route:`copy_batch:1` raises - failure if any entry fails. - - This route will either finish synchronously, or return a job ID and do the - async copy job in background. Please use :route:`copy_batch/check:2` to - check the job status." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route copy_batch/check:2 (async.PollArg, RelocationBatchV2JobStatus, async.PollError) - "Returns the status of an asynchronous job for :route:`copy_batch:2`. It returns - list of results for each entry." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -# deprecated copy routes - -route copy_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated by copy_batch:2 - "Copy multiple files or folders to different locations at once in the - user's Dropbox. - - This route will return job ID immediately and do the async copy job in - background. Please use :route:`copy_batch/check:1` to check the job status." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route copy_batch/check (async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated by copy_batch/check:2 - "Returns the status of an asynchronous job for :route:`copy_batch:1`. If - success, it returns list of results for each entry." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -# -# Move -# - -struct MoveBatchArg extends RelocationBatchArgBase - allow_ownership_transfer Boolean = false - "Allow moves by owner even if it would result in an ownership transfer - for the content being moved. This does not apply to copies." - - example default - entries = [default] - -route move:2 (RelocationArg, RelocationResult, RelocationError) - "Move a file or folder to a different location in the user's Dropbox. - - If the source path is a folder all its contents will be moved. - - Note that we do not currently support case-only renaming." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route move (RelocationArg, Metadata, RelocationError) deprecated by move:2 - "Move a file or folder to a different location in the user's Dropbox. - - If the source path is a folder all its contents will be moved." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route move_batch:2(MoveBatchArg, RelocationBatchV2Launch, Void) - "Move multiple files or folders to different locations at once in the - user's Dropbox. Note that we do not currently support case-only renaming. - - This route will replace :route:`move_batch:1`. The main difference is this - route will return status for each entry, while :route:`move_batch:1` raises - failure if any entry fails. - - This route will either finish synchronously, or return a job ID and do the - async move job in background. Please use :route:`move_batch/check:2` to - check the job status." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route move_batch/check:2(async.PollArg, RelocationBatchV2JobStatus, async.PollError) - "Returns the status of an asynchronous job for :route:`move_batch:2`. It - returns list of results for each entry." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -# deprecated move routes - -route move_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated by move_batch:2 - "Move multiple files or folders to different locations at once in the - user's Dropbox. - - This route will return job ID immediately and do the async moving job in - background. Please use :route:`move_batch/check:1` to check the job status." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -route move_batch/check(async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated by move_batch/check:2 - "Returns the status of an asynchronous job for :route:`move_batch:1`. If - success, it returns list of results for each entry." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -# -# Thumbnail -# - -union_closed ThumbnailSize - w32h32 - "32 by 32 px." - w64h64 - "64 by 64 px." - w128h128 - "128 by 128 px." - w256h256 - "256 by 256 px." - w480h320 - "480 by 320 px." - w640h480 - "640 by 480 px." - w960h640 - "960 by 640 px." - w1024h768 - "1024 by 768 px." - w2048h1536 - "2048 by 1536 px." - -union_closed ThumbnailFormat - jpeg - png - -union_closed ThumbnailMode - strict - "Scale down the image to fit within the given size." - bestfit - "Scale down the image to fit within the given size or its transpose." - fitone_bestfit - "Scale down the image to completely cover the given size or its transpose." - -struct ThumbnailArg - path ReadPath - "The path to the image file you want to thumbnail." - format ThumbnailFormat = jpeg - "The format for the thumbnail image, jpeg (default) or png. For - images that are photos, jpeg should be preferred, while png is - better for screenshots and digital arts." - size ThumbnailSize = w64h64 - "The size for the thumbnail image." - mode ThumbnailMode = strict - "How to resize and crop the image to achieve the desired size." - - example default - path = "/image.jpg" - format = jpeg - - example id - path = "id:a4ayc_80_OEAAAAAAAAAYa" - format = jpeg - - example rev - path = "rev:a1c10ce0dd78" - format = jpeg - -struct GetThumbnailBatchArg - "Arguments for :route:`get_thumbnail_batch`." - - entries List(ThumbnailArg) - "List of files to get thumbnails." - - example default - entries = [default] - -struct GetThumbnailBatchResult - entries List(GetThumbnailBatchResultEntry) - "List of files and their thumbnails." - - example default - entries = [default] - -union GetThumbnailBatchResultEntry - success GetThumbnailBatchResultData - failure ThumbnailError - "The result for this file if it was an error." - - example default - success = default - -struct GetThumbnailBatchResultData - metadata FileMetadata - thumbnail String - "A string containing the base64-encoded thumbnail data for this file." - - example default - metadata = default - thumbnail = "iVBORw0KGgoAAAANSUhEUgAAAdcAAABrCAMAAAI=" - -union GetThumbnailBatchError - too_many_files - "The operation involves more than 25 files." - -union_closed ThumbnailError - path LookupError - "An error occurs when downloading metadata for the image." - unsupported_extension - "The file extension doesn't allow conversion to a thumbnail." - unsupported_image - "The image cannot be converted to a thumbnail." - conversion_error - "An error occurs during thumbnail conversion." - -route get_thumbnail(ThumbnailArg, FileMetadata, ThumbnailError) - "Get a thumbnail for an image. - - This method currently supports files with the following file extensions: - jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB - in size won't be converted to a thumbnail." - - attrs - host = "content" - style = "download" - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.content.read" - -route get_thumbnail_batch(GetThumbnailBatchArg, GetThumbnailBatchResult, GetThumbnailBatchError) - "Get thumbnails for a list of images. We allow up to 25 thumbnails in a single batch. - - This method currently supports files with the following file extensions: - jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB - in size won't be converted to a thumbnail." - - attrs - host = "content" - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.content.read" - -union ThumbnailV2Error - path LookupError - "An error occurred when downloading metadata for the image." - unsupported_extension - "The file extension doesn't allow conversion to a thumbnail." - unsupported_image - "The image cannot be converted to a thumbnail." - conversion_error - "An error occurred during thumbnail conversion." - access_denied - "Access to this shared link is forbidden." - not_found - "The shared link does not exist." - - -struct MinimalFileLinkMetadata - url String - "URL of the shared link." - - id Id? - "Unique identifier for the linked file." - - path String? - "Full path in the user's Dropbox. This always starts with a slash. - This field will only be present only if the linked file is in the authenticated user's Dropbox." - - rev 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." - - -struct PreviewResult - file_metadata FileMetadata? - "Metadata corresponding to the file received as an argument. Will be populated if the endpoint is called with - a path (ReadPath)." - link_metadata MinimalFileLinkMetadata? - "Minimal metadata corresponding to the file received as an argument. Will be populated if the endpoint is called - using a shared link (SharedLinkFileInfo)." - example default - file_metadata = default - - -struct SharedLinkFileInfo - url String - "The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, - we use the path param to determine for which file in the folder the view is for." - path String? - "The path corresponding to a file in a shared link to a folder. Required for shared links to folders." - password String? - "Password for the shared link. Required for password-protected shared links to files - unless it can be read from a cookie." - - example default - url = "https://dropbox.com/s/hash/filename.png" - - -union PathOrLink - path ReadPath - link SharedLinkFileInfo - - example default - path = "/a.docx" - - -struct ThumbnailV2Arg - resource PathOrLink - "Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, - or a shared link pointing to a folder, with a relative path." - format ThumbnailFormat = jpeg - "The format for the thumbnail image, jpeg (default) or png. For - images that are photos, jpeg should be preferred, while png is - better for screenshots and digital arts." - size ThumbnailSize = w64h64 - "The size for the thumbnail image." - mode ThumbnailMode = strict - "How to resize and crop the image to achieve the desired size." - - example default - resource = default - format = jpeg - - -route get_thumbnail:2(ThumbnailV2Arg, PreviewResult, ThumbnailV2Error) - "Get a thumbnail for an image. - - This method currently supports files with the following file extensions: - jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB - in size won't be converted to a thumbnail." - - attrs - host = "content" - style = "download" - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.content.read" - auth = "app, user" -# -# Preview -# - -struct PreviewArg - path ReadPath - "The path of the file to preview." - - rev Rev? - "Please specify revision in :field:`path` instead." - - example default - path = "/word.docx" - - example id - path = "id:a4ayc_80_OEAAAAAAAAAYa" - - example rev - path = "rev:a1c10ce0dd78" - -union_closed PreviewError - path LookupError - "An error occurs when downloading metadata for the file." - in_progress - "This preview generation is still in progress and the file is not ready - for preview yet." - unsupported_extension - "The file extension is not supported preview generation." - unsupported_content - "The file content is not supported for preview generation." - -route get_preview(PreviewArg, FileMetadata, PreviewError) - "Get a preview for a file. - - Currently, PDF previews are generated for files with the following extensions: - .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. - - HTML previews are generated for files with the following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. - - Other formats will return an unsupported extension error." - - attrs - host = "content" - style = "download" - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.content.read" - -# -# List revisions -# - -union ListRevisionsMode - path - "Returns revisions with the same file path as identified by the latest file entry at the - given file path or id." - - id - "Returns revisions with the same file id as identified by the latest file entry at the given - file path or id." - -struct ListRevisionsArg - path PathOrId - "The path to the file you want to see the revisions of." - - mode ListRevisionsMode = path - "Determines the behavior of the API in listing the revisions for a given file path or id." - - limit UInt64(min_value=1, max_value=100) = 10 - "The maximum number of revision entries returned." - - # TODO: Add last_rev when we get pagination support from FJ Service. - - example default - path = "/root/word.docx" - mode = path - limit = 10 - -union ListRevisionsError - path LookupError - -struct ListRevisionsResult - is_deleted Boolean - "If the file identified by the latest revision in the response is either deleted or moved." - server_deleted common.DropboxTimestamp? - "The time of deletion if the file was deleted." - entries List(FileMetadata) - "The revisions for the file. Only revisions that are not deleted will show up here." - - example default - is_deleted = false - entries = [default] - -route list_revisions(ListRevisionsArg, ListRevisionsResult, ListRevisionsError) - "Returns revisions for files based on a file path or a file id. The file path or file id is - identified from the latest file entry at the given file path or id. This end point allows your - app to query either by file path or file id by setting the mode parameter appropriately. - - In the :field:`ListRevisionsMode.path` (default) mode, all revisions at the same - file path as the latest file entry are - returned. If revisions with the same file id are desired, then mode must be set to - :field:`ListRevisionsMode.id`. The :field:`ListRevisionsMode.id` mode is useful to retrieve - revisions for a given file across moves or renames." - - attrs - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "files.metadata.read" - -# -# Restore -# - -struct RestoreArg - path WritePath - "The path to save the restored file." - rev Rev - "The revision to restore." - - example default - path = "/root/word.docx" - rev = "a1c10ce0dd78" - -union RestoreError - path_lookup LookupError - "An error occurs when downloading metadata for the file." - path_write WriteError - "An error occurs when trying to restore the file to that path." - invalid_revision - "The revision is invalid. It may not exist or may point to a deleted file." - in_progress - "The restore is currently executing, but has not yet completed." - -route restore(RestoreArg, FileMetadata, RestoreError) - "Restore a specific revision of a file to the given path." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "files.content.write" - -# -# Temporary link -# - -struct GetTemporaryLinkArg - path ReadPath - "The path to the file you want a temporary link to." - - example default - path = "/video.mp4" - -struct GetTemporaryLinkResult - metadata FileMetadata - "Metadata of the file." - link String - "The temporary link which can be used to stream content the file." - - example default - metadata = default - link = "https://ucabc123456.dl.dropboxusercontent.com/cd/0/get/abcdefghijklmonpqrstuvwxyz1234567890/file" - -union GetTemporaryLinkError - path LookupError - email_not_verified - "This user's email address is not verified. This functionality is only - available on accounts with a verified email address. Users can verify - their email address :link:`here https://www.dropbox.com/help/317`." - unsupported_file - "Cannot get temporary link to this file type; use :route:`export` instead." - not_allowed - "The user is not allowed to request a temporary link to the specified file. - For example, this can occur if the file is restricted or if the user's links - are :link:`banned https://help.dropbox.com/files-folders/share/banned-links`." - -route get_temporary_link(GetTemporaryLinkArg, GetTemporaryLinkResult, GetTemporaryLinkError) - "Get a temporary link to stream content of a file. This link will expire in four hours and - afterwards you will get 410 Gone. This URL should not be used to display content directly - in the browser. The Content-Type of the link is determined automatically by the file's mime type." - - attrs - allow_app_folder_app = true - scope = "files.content.read" - -# -# Temporary upload link -# - -struct GetTemporaryUploadLinkArg - commit_info CommitInfo - "Contains the path and other optional modifiers for the future upload commit. - Equivalent to the parameters provided to :route:`upload`." - duration Float64(min_value=60, max_value=14400) = 14400 - "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." - - example default - commit_info = default - duration = 3600 - -struct GetTemporaryUploadLinkResult - link String - "The temporary link which can be used to stream a file to a Dropbox location." - - example default - link = "https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND" - -route get_temporary_upload_link(GetTemporaryUploadLinkArg, GetTemporaryUploadLinkResult, Void) - "Get a one-time use temporary upload link to upload a file to a Dropbox location. - - - This endpoint acts as a delayed :route:`upload`. The returned temporary upload link may be used - to make a POST request with the data to be uploaded. The upload will then be perfomed with the - :type:`CommitInfo` previously provided to :route:`get_temporary_upload_link` but evaluated only - upon consumption. Hence, errors stemming from invalid :type:`CommitInfo` with respect to the - state of the user's Dropbox will only be communicated at consumption time. Additionally, these - errors are surfaced as generic HTTP 409 Conflict responses, potentially hiding issue details. - The maximum temporary upload link duration is 4 hours. Upon consumption or expiration, - a new link will have to be generated. Multiple links may exist for a specific upload path - at any given time. - - - The POST request on the temporary upload link must have its Content-Type - set to \"application/octet-stream\". - - - Example temporary upload link consumption request: - - - curl -X POST https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND - - --header \"Content-Type: application/octet-stream\" - - --data-binary @local_file.txt - - - A successful temporary upload link consumption request returns the content hash - of the uploaded data in JSON format. - - - Example successful temporary upload link consumption response: - - {\"content-hash\": \"599d71033d700ac892a0e48fa61b125d2f5994\"} - - - An unsuccessful temporary upload link consumption request returns any of the following status - codes: - - - HTTP 400 Bad Request: Content-Type is not one of - application/octet-stream and text/plain or request is invalid. - - HTTP 409 Conflict: The temporary upload link does not exist or is currently unavailable, - the upload failed, or another error happened. - - HTTP 410 Gone: The temporary upload link is expired or consumed. - - - Example unsuccessful temporary upload link consumption response: - - Temporary upload link has been recently consumed. - " - - attrs - allow_app_folder_app = true - scope = "files.content.write" - -# -# Copy reference -# - -struct GetCopyReferenceArg - path ReadPath - "The path to the file or folder you want to get a copy reference to." - - example default - path = "/video.mp4" - -struct GetCopyReferenceResult - metadata Metadata - "Metadata of the file or folder." - copy_reference String - "A copy reference to the file or folder." - expires common.DropboxTimestamp - "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." - - example default - metadata = default - copy_reference = "z1X6ATl6aWtzOGq0c3g5Ng" - expires = "2045-05-12T15:50:38Z" - -union GetCopyReferenceError - path LookupError - -route copy_reference/get(GetCopyReferenceArg, GetCopyReferenceResult, GetCopyReferenceError) - "Get a copy reference to a file or folder. This reference string can be used to - save that file or folder to another user's Dropbox by passing it to - :route:`copy_reference/save`." - - attrs - allow_app_folder_app = true - scope = "files.content.write" - -struct SaveCopyReferenceArg - copy_reference String - "A copy reference returned by :route:`copy_reference/get`." - - path Path - "Path in the user's Dropbox that is the destination." - - example default - copy_reference = "z1X6ATl6aWtzOGq0c3g5Ng" - path = "/video.mp4" - -struct SaveCopyReferenceResult - metadata Metadata - "The metadata of the saved file or folder in the user's Dropbox." - - example default - metadata = default - -union SaveCopyReferenceError - path WriteError - invalid_copy_reference - "The copy reference is invalid." - no_permission - "You don't have permission to save the given copy reference. Please make sure this app - is same app which created the copy reference and the source user is still linked to - the app." - not_found - "The file referenced by the copy reference cannot be found." - too_many_files - "The operation would involve more than 10,000 files and folders." - -route copy_reference/save(SaveCopyReferenceArg, SaveCopyReferenceResult, SaveCopyReferenceError) - "Save a copy reference returned by :route:`copy_reference/get` to the user's Dropbox." - - attrs - allow_app_folder_app = true - scope = "files.content.write" - -# -# Save URL -# - -struct SaveUrlArg - path Path - "The path in Dropbox where the URL will be saved to." - - url String - "The URL to be saved." - - example default - path = "/a.txt" - url = "http://example.com/a.txt" - -union_closed SaveUrlResult extends async.LaunchResultBase - complete FileMetadata - "Metadata of the file where the URL is saved to." - - example default - complete = default - -union SaveUrlError - path WriteError - download_failed - "Failed downloading the given URL. The URL may be - password-protected and the password provided was incorrect, - or the link may be disabled." - invalid_url - "The given URL is invalid." - not_found - "The file where the URL is saved to no longer exists." - -route save_url(SaveUrlArg, SaveUrlResult, SaveUrlError) - "Save the data from a specified URL into a file in user's Dropbox. - - Note that the transfer from the URL must complete within 15 minutes, or the - operation will time out and the job will fail. - - If the given path already exists, the file will be renamed to avoid the - conflict (e.g. myfile (1).txt)." - - attrs - allow_app_folder_app = true - scope = "files.content.write" - -# -# Save URL Job -# - -union_closed SaveUrlJobStatus extends async.PollResultBase - complete FileMetadata - "Metadata of the file where the URL is saved to." - failed SaveUrlError - -route save_url/check_job_status(async.PollArg, SaveUrlJobStatus, async.PollError) - "Check the status of a :route:`save_url` job." - - attrs - allow_app_folder_app = true - scope = "files.content.write" - -# -# Patched File Properties endpoints -# - - -# -# Patched /get_metadata that can return properties -# - -route alpha/get_metadata (AlphaGetMetadataArg, Metadata, AlphaGetMetadataError) deprecated by get_metadata - "Returns the metadata for a file or folder. This is an alpha endpoint - compatible with the properties API. - - Note: Metadata for the root folder is unsupported." - - attrs - is_preview=true - allow_app_folder_app = true - scope = "files.metadata.read" - -struct AlphaGetMetadataArg extends GetMetadataArg - - include_property_templates List(file_properties.TemplateId)? - "If set to a valid list of template IDs, - :field:`FileMetadata.property_groups` is set for files with custom - properties." - - example default - path = "/Homework/math" - - example id - path = "id:a4ayc_80_OEAAAAAAAAAYa" - - example rev - path = "rev:a1c10ce0dd78" - -union_closed AlphaGetMetadataError extends GetMetadataError - properties_error file_properties.LookUpPropertiesError - -# -# Alpha /upload, originally for properties API. Can be used to pilot new functionality. -# - -route alpha/upload (UploadArg, FileMetadata, UploadError) deprecated by upload - "Create a new file with the contents provided in the request. Note that the - behavior of this alpha endpoint is unstable and subject to change. - - Do not use this to upload a file larger than 150 MB. Instead, create an - upload session with :route:`upload_session/start`." - - attrs - host="content" - style="upload" - is_preview=true - allow_app_folder_app = true - scope = "files.content.write" - -# -# Deprecated File Properties routes -# - -route properties/add(file_properties.AddPropertiesArg, Void, file_properties.AddPropertiesError) deprecated - attrs - scope = "files.metadata.write" - -route properties/overwrite(file_properties.OverwritePropertyGroupArg, Void, file_properties.InvalidPropertyGroupError) deprecated - attrs - scope = "files.metadata.write" - -route properties/update(file_properties.UpdatePropertiesArg, Void, file_properties.UpdatePropertiesError) deprecated - attrs - scope = "files.metadata.write" - -route properties/remove(file_properties.RemovePropertiesArg, Void, file_properties.RemovePropertiesError) deprecated - attrs - scope = "files.metadata.write" - -route properties/template/get(file_properties.GetTemplateArg, file_properties.GetTemplateResult, file_properties.TemplateError) deprecated - attrs - scope = "files.metadata.read" - -route properties/template/list(Void, file_properties.ListTemplateResult, file_properties.TemplateError) deprecated - attrs - scope = "files.metadata.read" - -# -# Team selective sync additions -# -union SyncSettingArg - default - "On first sync to members' computers, the specified folder will follow its - parent folder's setting or otherwise follow default sync behavior." - not_synced - "On first sync to members' computers, the specified folder will be set - to not sync with selective sync." - - example default - not_synced = null - -union SyncSetting - default - "On first sync to members' computers, the specified folder will follow - its parent folder's setting or otherwise follow default sync behavior." - not_synced - "On first sync to members' computers, the specified folder will be set - to not sync with selective sync." - not_synced_inactive - "The specified folder's not_synced setting is inactive due to its - location or other configuration changes. It will follow its parent - folder's setting." - -struct ContentSyncSettingArg - id FileId - "Id of the item this setting is applied to." - - sync_setting SyncSettingArg - "Setting for this item." - - example default - id = "id:a4ayc_80_OEAAAAAAAAAXw" - sync_setting = default - -struct ContentSyncSetting - id FileId - "Id of the item this setting is applied to." - - sync_setting SyncSetting - "Setting for this item." - - example default - id = "id:a4ayc_80_OEAAAAAAAAAXw" - sync_setting = default - -union SyncSettingsError - path LookupError - - unsupported_combination - "Setting this combination of sync settings simultaneously is not supported." - - unsupported_configuration - "The specified configuration is not supported." - -# -# FILE LOCKING -# - -# -# File Lock Definition -# - -struct SingleUserLock - created common.DropboxTimestamp - "The time the lock was created." - lock_holder_account_id users_common.AccountId - "The account ID of the lock holder if known." - lock_holder_team_id String? - "The id of the team of the account holder if it exists." - - example default - created = "2015-05-12T15:50:38Z" - lock_holder_account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" - lock_holder_team_id = "dbtid:1234abcd" - -union FileLockContent - unlocked - "Empty type to indicate no lock." - single_user SingleUserLock - "A lock held by a single user." - - example default - single_user = default - -struct FileLock - content FileLockContent - "The lock description." - - example default - content = default - -struct UnlockFileArg - path WritePathOrId - "Path in the user's Dropbox to a file." - - example lock - path = "/John Doe/sample/test.pdf" - -struct LockFileResult - metadata Metadata - "Metadata of the file." - lock FileLock - "The file lock state after the operation." - - example default - metadata = default - lock = default - -struct LockConflictError - lock FileLock - "The lock that caused the conflict." - -union LockFileError - path_lookup LookupError - "Could not find the specified resource." - too_many_write_operations - "There are too many write operations in user's Dropbox. Please retry this request." - too_many_files - "There are too many files in one request. Please retry with fewer files." - no_write_permission - "The user does not have permissions to change the lock state or access the file." - cannot_be_locked - "Item is a type that cannot be locked." - file_not_shared - "Requested file is not currently shared." - lock_conflict LockConflictError - "The user action conflicts with an existing lock on the file." - internal_error - "Something went wrong with the job on Dropbox's end. You'll need to - verify that the action you were taking succeeded, and if not, try - again. This should happen very rarely." -# unlock_token -# "An invalid unlock_token was passed. For example, a garbage token, or a token which as already been used." - -union_closed LockFileResultEntry - success LockFileResult - failure LockFileError - - example default - success = default - -struct LockFileBatchResult extends FileOpsResult - entries List(LockFileResultEntry) - "Each Entry in the 'entries' will have '.tag' with the operation status (e.g. success), - the metadata for the file and the lock state after the operation." - - example default - entries = [default] - -struct LockFileArg - path WritePathOrId - "Path in the user's Dropbox to a file." - - example lock - path = "/John Doe/sample/test.pdf" - -struct LockFileBatchArg - entries List(LockFileArg) - "List of 'entries'. Each 'entry' contains a path of the file which will be - locked or queried. - Duplicate path arguments in the batch are considered only once." - - example default - entries = [lock] - -struct UnlockFileBatchArg - entries List(UnlockFileArg) - "List of 'entries'. Each 'entry' contains a path of the file which will be unlocked. - Duplicate path arguments in the batch are considered only once." - - example default - entries = [lock] - -# -# Lock File -# - -route lock_file_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) - " - Lock the files at the given paths. A locked file will be writable only by the lock holder. - A successful response indicates that the file has been locked. Returns a list of the - locked file paths and their metadata after this operation. - " - - attrs - scope = "files.content.write" - -# -# Unlock File -# - -route unlock_file_batch (UnlockFileBatchArg, LockFileBatchResult, LockFileError) - " - Unlock the files at the given paths. A locked file can only be unlocked by the lock holder - or, if a business account, a team admin. A successful response indicates that the file has - been unlocked. Returns a list of the unlocked file paths and their metadata after - this operation. - " - - attrs - select_admin_mode = "whole_team" - scope = "files.content.write" - -# -# Get Lock -# - -route get_file_lock_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) - " - Return the lock metadata for the given list of paths. - " - - attrs - scope = "files.content.read" - -# -# END OF FILE LOCKING -# - - -# -# Paper routes -# - -union ImportFormat - "The import format of the incoming Paper doc content." - - html - "The provided data is interpreted as standard HTML." - markdown - "The provided data is interpreted as markdown." - plain_text - "The provided data is interpreted as plain text." - - -union PaperContentError - insufficient_permissions - "Your account does not have permissions to edit Paper docs." - content_malformed - "The provided content was malformed and cannot be imported to Paper." - doc_length_exceeded - "The Paper doc would be too large, split the content into multiple docs." - image_size_exceeded - "The imported document contains an image that is too large. The current limit is 1MB. - This only applies to HTML with data URI." - - -struct PaperCreateArg - - path Path - "The fully qualified path to the location in the user's Dropbox where the Paper Doc should be created. - This should include the document's title and end with .paper." - import_format ImportFormat - "The format of the provided data." - - example default - path = "/Paper Docs/New Doc.paper" - import_format = html - - -struct PaperCreateResult - - url String - "URL to open the Paper Doc." - result_path String - "The fully qualified path the Paper Doc was actually created at." - file_id FileId - "The id to use in Dropbox APIs when referencing the Paper Doc." - paper_revision Int64 - "The current doc revision." - - example default - url = "https://www.dropbox.com/scl/xxx.paper?dl=0" - result_path = "/Paper Docs/New Doc.paper" - file_id = "id:a4ayc_80_OEAAAAAAAAAXw" - paper_revision = 1 - - -union PaperCreateError extends PaperContentError - invalid_path - "The file could not be saved to the specified location." - email_unverified - "The user's email must be verified to create Paper docs." - invalid_file_extension - "The file path must end in .paper." - paper_disabled - "Paper is disabled for your team." - -union PaperDocUpdatePolicy - update - "Sets the doc content to the provided content if the provided paper_revision matches the latest doc revision. - Otherwise, returns an error." - overwrite - "Sets the doc content to the provided content without checking paper_revision." - prepend - "Adds the provided content to the beginning of the doc without checking paper_revision." - append - "Adds the provided content to the end of the doc without checking paper_revision." - - -struct PaperUpdateArg - - path WritePathOrId - "Path in the user's Dropbox to update. The path must correspond to a Paper doc or an error will be returned." - import_format ImportFormat - "The format of the provided data." - doc_update_policy PaperDocUpdatePolicy - "How the provided content should be applied to the doc." - paper_revision Int64? - "The latest doc revision. Required when doc_update_policy is update. - This value must match the current revision of the doc or error revision_mismatch will be returned." - - example default - path = "/Paper Docs/My Doc.paper" - import_format = html - doc_update_policy = update - paper_revision = 123 - - -struct PaperUpdateResult - - paper_revision Int64 - "The current doc revision." - - example default - paper_revision = 124 - - -union PaperUpdateError extends PaperContentError - path LookupError - revision_mismatch - "The provided revision does not match the document head." - doc_archived - "This operation is not allowed on archived Paper docs." - doc_deleted - "This operation is not allowed on deleted Paper docs." - - -route paper/create (PaperCreateArg, PaperCreateResult, PaperCreateError) - " - Creates a new Paper doc with the provided content. - " - - attrs - is_preview = true - style = "upload" - scope = "files.content.write" - - -route paper/update (PaperUpdateArg, PaperUpdateResult, PaperUpdateError) - " - Updates an existing Paper doc with the provided content. - " - - attrs - is_preview = true - style = "upload" - scope = "files.content.write" - - -# -# End of Paper routes -# diff --git a/files_apiv2_fileops_apiv2.stone b/files_apiv2_fileops_apiv2.stone new file mode 100644 index 0000000..fea8e61 --- /dev/null +++ b/files_apiv2_fileops_apiv2.stone @@ -0,0 +1,169 @@ +namespace files + +import async + +route create_folder_batch (CreateFolderBatchArg, CreateFolderBatchLaunch, Void) + "Create multiple folders at once. This route is asynchronous for large batches, which returns + a job ID immediately and runs the create folder batch asynchronously. Otherwise, creates + the folders and returns the result synchronously for smaller inputs. You can force asynchronous + behaviour by using the CreateFolderBatchArg.force_async flag. Use + :route:`create_folder_batch/check` to check the job status." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route create_folder_batch/check (async.PollArg, CreateFolderBatchJobStatus, async.PollError) + "Returns the status of an asynchronous job for :route:`create_folder_batch`. If success, it + returns list of result for each entry." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route delete_batch (DeleteBatchArg, DeleteBatchLaunch, Void) + "Delete multiple files/folders at once. This route is asynchronous, which returns a job ID + immediately and runs the delete batch asynchronously. Use :route:`delete_batch/check` to + check the job status." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route delete_batch/check (async.PollArg, DeleteBatchJobStatus, async.PollError) + "Returns the status of an asynchronous job for :route:`delete_batch`. If success, it returns + list of result for each entry." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route permanently_delete (DeleteArg, Void, DeleteError) + "Permanently delete the file or folder at a given path (see + https://www.dropbox.com/en/help/40). If the given file or folder is not yet deleted, this + route will first delete it. It is possible for this route to successfully delete, then fail + to permanently delete. Note: This endpoint is only available for Dropbox Business apps." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.permanent_delete" + select_admin_mode = "team_admin" + +route copy (RelocationArg, Metadata, RelocationError) deprecated + "Copy a file or folder to a different location in the user's Dropbox. + If the source path is a folder all its contents will be copied." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route copy:2 (RelocationArg, RelocationResult, RelocationError) + "Copy a file or folder to a different location in the user's Dropbox. + If the source path is a folder all its contents will be copied." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route copy_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated + "Copy multiple files or folders to different locations at once in the user's Dropbox. + This route will return job ID immediately and do the async copy job in background. + Please use :route:`copy_batch/check` to check the job status." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route copy_batch:2 (CopyBatchArg, RelocationBatchV2Launch, Void) + "Copy multiple files or folders to different locations at once in the user's Dropbox. + This route will replace :route:`copy_batch`. The main difference is this route will return + status for each entry, while :route:`copy_batch` raises failure if any entry fails. This + route will either finish synchronously, or return a job ID and do the async copy job in + background. Please use :route:`copy_batch/check:2` to check the job status." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route copy_batch/check (async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated + "Returns the status of an asynchronous job for :route:`copy_batch:1`. If success, it returns + list of results for each entry." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route copy_batch/check:2 (async.PollArg, RelocationBatchV2JobStatus, async.PollError) + "Returns the status of an asynchronous job for :route:`copy_batch:2`. It returns list of + results for each entry." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route move_batch (RelocationBatchArg, RelocationBatchLaunch, Void) deprecated + "Move multiple files or folders to different locations at once in the user's Dropbox. + This route will return job ID immediately and do the async moving job in background. + Please use :route:`move_batch/check` to check the job status." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route move_batch:2 (MoveBatchArg, RelocationBatchV2Launch, Void) + "Move multiple files or folders to different locations at once in the user's Dropbox. + Note that we do not currently support case-only renaming. This route will replace + :route:`move_batch`. The main difference is this route will return status for each entry, + while :route:`move_batch` raises failure if any entry fails. This route will either finish + synchronously, or return a job ID and do the async move job in background. Please use + :route:`move_batch/check:2` to check the job status." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route move_batch/check (async.PollArg, RelocationBatchJobStatus, async.PollError) deprecated + "Returns the status of an asynchronous job for :route:`move_batch:1`. If success, it returns + list of results for each entry." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route move_batch/check:2 (async.PollArg, RelocationBatchV2JobStatus, async.PollError) + "Returns the status of an asynchronous job for :route:`move_batch:2`. It returns list of + results for each entry." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + diff --git a/files_apiv2_fileops_cdm_apiv2.stone b/files_apiv2_fileops_cdm_apiv2.stone new file mode 100644 index 0000000..bd67745 --- /dev/null +++ b/files_apiv2_fileops_cdm_apiv2.stone @@ -0,0 +1,65 @@ +namespace files + +route create_folder (CreateFolderArg, FolderMetadata, CreateFolderError) deprecated + "Create a folder at a given path." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route create_folder:2 (CreateFolderArg, CreateFolderResult, CreateFolderError) + "Create a folder at a given path." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route delete (DeleteArg, Metadata, DeleteError) deprecated + "Delete the file or folder at a given path. If the path is a folder, all its contents will be + deleted too. A successful response indicates that the file or folder was deleted. The returned + metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of + deletion, and not a DeletedMetadata object." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route delete:2 (DeleteArg, DeleteResult, DeleteError) + "Delete the file or folder at a given path. If the path is a folder, all its contents will be + deleted too. A successful response indicates that the file or folder was deleted. The returned + metadata will be the corresponding FileMetadata or FolderMetadata for the item at time of + deletion, and not a DeletedMetadata object." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route move (RelocationArg, Metadata, RelocationError) deprecated + "Move a file or folder to a different location in the user's Dropbox. If the source path is + a folder all its contents will be moved." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route move:2 (RelocationArg, RelocationResult, RelocationError) + "Move a file or folder to a different location in the user's Dropbox. If the source path is + a folder all its contents will be moved. Note that we do not currently support case-only + renaming." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + diff --git a/files_apiv2_files_content_apiv2.stone b/files_apiv2_files_content_apiv2.stone new file mode 100644 index 0000000..36de0de --- /dev/null +++ b/files_apiv2_files_content_apiv2.stone @@ -0,0 +1,12 @@ +namespace files + +route get_temporary_link (GetTemporaryLinkArg, GetTemporaryLinkResult, GetTemporaryLinkError) + "Get a temporary link to stream content of a file. This link will expire in four hours and + afterwards you will get 410 Gone. This URL should not be used to display content directly + in the browser. The Content-Type of the link is determined automatically by the file's mime type." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.read" + diff --git a/files_apiv2_files_copyref_apiv2.stone b/files_apiv2_files_copyref_apiv2.stone new file mode 100644 index 0000000..e908c24 --- /dev/null +++ b/files_apiv2_files_copyref_apiv2.stone @@ -0,0 +1,19 @@ +namespace files + +route copy_reference/get (GetCopyReferenceArg, GetCopyReferenceResult, GetCopyReferenceError) + "Get a copy reference to a file or folder. This reference string can be used to save that + file or folder to another user's Dropbox by passing it to :route:`copy_reference/save`." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + +route copy_reference/save (SaveCopyReferenceArg, SaveCopyReferenceResult, SaveCopyReferenceError) + "Save a copy reference returned by :route:`copy_reference/get` to the user's Dropbox." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + diff --git a/files_apiv2_files_download_apiv2.stone b/files_apiv2_files_download_apiv2.stone new file mode 100644 index 0000000..7e271f3 --- /dev/null +++ b/files_apiv2_files_download_apiv2.stone @@ -0,0 +1,13 @@ +namespace files + +route download (DownloadArg, FileMetadata, DownloadError) + "Download a file from a user's Dropbox." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.read" + select_admin_mode = "whole_team" + style = "download" + diff --git a/files_apiv2_files_download_zip_apiv2.stone b/files_apiv2_files_download_zip_apiv2.stone new file mode 100644 index 0000000..55d11ab --- /dev/null +++ b/files_apiv2_files_download_zip_apiv2.stone @@ -0,0 +1,15 @@ +namespace files + +route download_zip (DownloadZipArg, DownloadZipResult, DownloadZipError) + "Download a folder from the user's Dropbox, as a zip file. The folder must be less than 20 GB + in size and any single file within must be less than 4 GB in size. The resulting zip must have + fewer than 10,000 total file and folder entries, including the top level folder. The input + cannot be a single file. Note: this endpoint does not support HTTP range requests." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.read" + style = "download" + diff --git a/files_apiv2_files_export_apiv2.stone b/files_apiv2_files_export_apiv2.stone new file mode 100644 index 0000000..81ade12 --- /dev/null +++ b/files_apiv2_files_export_apiv2.stone @@ -0,0 +1,15 @@ +namespace files + +route export (ExportArg, ExportResult, ExportError) + "Export a file from a user's Dropbox. This route only supports exporting files that cannot be + downloaded directly and whose ExportResult.file_metadata has ExportInfo.export_as populated." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + is_preview = true + scope = "files.content.read" + select_admin_mode = "whole_team" + style = "download" + diff --git a/files_apiv2_files_extensions_apiv2.stone b/files_apiv2_files_extensions_apiv2.stone new file mode 100644 index 0000000..662e982 --- /dev/null +++ b/files_apiv2_files_extensions_apiv2.stone @@ -0,0 +1,31 @@ +namespace files + +route get_temporary_upload_link (GetTemporaryUploadLinkArg, GetTemporaryUploadLinkResult, Void) + "Get a one-time use temporary upload link to upload a file to a Dropbox location. This + endpoint acts as a delayed upload(). The returned temporary upload link may be used to make + a POST request with the data to be uploaded. The upload will then be perfomed with the + CommitInfo previously provided to getTemporaryUploadLink() but evaluated only upon consumption. + Hence, errors stemming from invalid CommitInfo with respect to the state of the user's Dropbox + will only be communicated at consumption time. Additionally, these errors are surfaced as + generic HTTP 409 Conflict responses, potentially hiding issue details. The maximum temporary + upload link duration is 4 hours. Upon consumption or expiration, a new link will have to be + generated. Multiple links may exist for a specific upload path at any given time. The POST + request on the temporary upload link must have its Content-Type set to + \"application/octet-stream\". Example temporary upload link consumption request: curl -X POST + https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND --header + \"Content-Type: application/octet-stream\" --data-binary @local_file.txt A successful temporary + upload link consumption request returns the content hash of the uploaded data in JSON format. + Example successful temporary upload link consumption response: {\"content-hash\": + \"599d71033d700ac892a0e48fa61b125d2f5994\"} An unsuccessful temporary upload link consumption + request returns any of the following status codes: HTTP 400 Bad Request: Content-Type is not + one of application/octet-stream and text/plain or request is invalid. HTTP 409 Conflict: The + temporary upload link does not exist or is currently unavailable, the upload failed, or + another error happened. HTTP 410 Gone: The temporary upload link is expired or consumed. + Example unsuccessful temporary upload link consumption response: Temporary upload link has + been recently consumed." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + diff --git a/files_apiv2_files_locking_apiv2.stone b/files_apiv2_files_locking_apiv2.stone new file mode 100644 index 0000000..93b692e --- /dev/null +++ b/files_apiv2_files_locking_apiv2.stone @@ -0,0 +1,29 @@ +namespace files + +route lock_file_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) + "Lock the files at the given paths. A locked file will be writable only by the lock holder. + A successful response indicates that the file has been locked. Returns a list of the locked + file paths and their metadata after this operation." + + attrs + auth = "user" + scope = "files.content.write" + +route unlock_file_batch (UnlockFileBatchArg, LockFileBatchResult, LockFileError) + "Unlock the files at the given paths. A locked file can only be unlocked by the lock holder + or, if a business account, a team admin. A successful response indicates that the file has + been unlocked. Returns a list of the unlocked file paths and their metadata after this + operation." + + attrs + auth = "user" + scope = "files.content.write" + select_admin_mode = "whole_team" + +route get_file_lock_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) + "Return the lock metadata for the given list of paths." + + attrs + auth = "user" + scope = "files.content.read" + diff --git a/files_apiv2_files_metadata_apiv2.stone b/files_apiv2_files_metadata_apiv2.stone new file mode 100644 index 0000000..2f9fc70 --- /dev/null +++ b/files_apiv2_files_metadata_apiv2.stone @@ -0,0 +1,82 @@ +namespace files + +route get_metadata (GetMetadataArg, Metadata, GetMetadataError) + "Returns the metadata for a file or folder. + Note: Metadata for the root folder is unsupported." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.metadata.read" + select_admin_mode = "whole_team" + +route list_folder (ListFolderArg, ListFolderResult, ListFolderError) + "Starts returning the contents of a folder. If the result's :field:`ListFolderResult.has_more` + field is true, call :route:`list_folder/continue` with the returned ListFolderResult.cursor to + retrieve more entries. If you're using ListFolderArg.recursive set to true to keep a local + cache of the contents of a Dropbox account, iterate through each entry in order and process + them as follows to keep your local state in sync: For each FileMetadata, store the new entry + at the given path in your local state. If the required parent folders don't exist yet, create + them. If there's already something else at the given path, replace it and remove all its + children. For each FolderMetadata, store the new entry at the given path in your local state. + If the required parent folders don't exist yet, create them. If there's already something else + at the given path, replace it but leave the children as they are. Check the new entry's + FolderSharingInfo.read_only and set all its children's read-only statuses to match. For each + DeletedMetadata, if your local state has something at the given path, remove it and all its + children. If there's nothing at the given path, ignore this entry. Note: auth.RateLimitError + may be returned if multiple :route:`list_folder` or :route:`list_folder/continue` calls with same parameters + are made simultaneously by same API app for same user. If your app implements retry logic, + please hold off the retry until the previous request finishes." + + attrs + allow_app_folder_app = true + auth = "app, user" + scope = "files.metadata.read" + select_admin_mode = "whole_team" + +route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderContinueError) + "Once a cursor has been retrieved from :route:`list_folder`, use this to paginate through all + files and retrieve updates to the folder, following the same rules as documented for + :route:`list_folder`." + + attrs + allow_app_folder_app = true + auth = "app, user" + scope = "files.metadata.read" + select_admin_mode = "whole_team" + +route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorResult, ListFolderError) + "A way to quickly get a cursor for the folder's state. Unlike :route:`list_folder`, + :route:`list_folder/get_latest_cursor` doesn't return any entries. This endpoint is for app which + only needs to know about new files and modifications and doesn't need to know about files + that already exist in Dropbox." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.metadata.read" + select_admin_mode = "whole_team" + +route list_folder/longpoll (ListFolderLongpollArg, ListFolderLongpollResult, ListFolderLongpollError) + "A longpoll endpoint to wait for changes on an account. In conjunction with :route:`list_folder/continue`, + this call gives you a low-latency way to monitor an account for file changes. The connection + will block until there are changes available or a timeout occurs. This endpoint is useful + mostly for client-side apps." + + attrs + allow_app_folder_app = true + auth = "noauth" + host = "notify" + scope = "files.metadata.read" + select_admin_mode = "whole_team" + +route alpha/get_metadata (AlphaGetMetadataArg, Metadata, AlphaGetMetadataError) deprecated + "Returns the metadata for a file or folder. This is an alpha endpoint compatible + with the properties API. Note: Metadata for the root folder is unsupported." + + attrs + allow_app_folder_app = true + auth = "user" + is_preview = true + scope = "files.metadata.read" + diff --git a/files_apiv2_files_paper_apiv2.stone b/files_apiv2_files_paper_apiv2.stone new file mode 100644 index 0000000..b35cd95 --- /dev/null +++ b/files_apiv2_files_paper_apiv2.stone @@ -0,0 +1,20 @@ +namespace files + +route paper/create (PaperCreateArg, PaperCreateResult, PaperCreateError) + "Creates a new Paper doc with the provided content." + + attrs + auth = "user" + is_preview = true + scope = "files.content.write" + style = "upload" + +route paper/update (PaperUpdateArg, PaperUpdateResult, PaperUpdateError) + "Updates an existing Paper doc with the provided content." + + attrs + auth = "user" + is_preview = true + scope = "files.content.write" + style = "upload" + diff --git a/files_apiv2_files_previews_apiv2.stone b/files_apiv2_files_previews_apiv2.stone new file mode 100644 index 0000000..e4b112b --- /dev/null +++ b/files_apiv2_files_previews_apiv2.stone @@ -0,0 +1,55 @@ +namespace files + +route get_preview (PreviewArg, FileMetadata, PreviewError) + "Get a preview for a file. Currently, PDF previews are generated for files with the following + extensions: .ai, .doc, .docm, .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, + .ppt, .pptm, .pptx, .rtf. HTML previews are generated for .csv, .ods, .xls, .xlsm, .gsheet, + .xlsx. Other formats will return an unsupported extension error." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.read" + select_admin_mode = "whole_team" + style = "download" + +route get_thumbnail (ThumbnailArg, FileMetadata, ThumbnailError) + "Get a thumbnail for an image. This method currently supports files with the following file + extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than + 20MB in size won't be converted to a thumbnail." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.read" + select_admin_mode = "whole_team" + style = "download" + +route get_thumbnail_batch (GetThumbnailBatchArg, GetThumbnailBatchResult, GetThumbnailBatchError) + "Get thumbnails for a list of images. We allow up to 25 thumbnails in a single batch. This + method currently supports files with the following file extensions: jpg, jpeg, png, tiff, tif, + gif, webp, ppm and bmp. Photos that are larger than 20MB in size won't be converted to a + thumbnail." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.read" + select_admin_mode = "whole_team" + +route get_thumbnail:2 (ThumbnailV2Arg, PreviewResult, ThumbnailV2Error) + "Get a thumbnail for an image. This method currently supports files with the following file + extensions: jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than + 20MB in size won't be converted to a thumbnail." + + attrs + allow_app_folder_app = true + auth = "app, user" + host = "content" + scope = "files.content.read" + select_admin_mode = "whole_team" + style = "download" + diff --git a/files_apiv2_files_properties_deprecated_apiv2.stone b/files_apiv2_files_properties_deprecated_apiv2.stone new file mode 100644 index 0000000..0933bab --- /dev/null +++ b/files_apiv2_files_properties_deprecated_apiv2.stone @@ -0,0 +1,30 @@ +namespace files + +import file_properties + +route properties/add (file_properties.AddPropertiesArg, Void, file_properties.AddPropertiesError) deprecated + "Add property groups to a Dropbox file. See templates/add_for_user or + templates/add_for_team to create new templates." + + attrs + auth = "user" + scope = "files.metadata.write" + +route properties/update (file_properties.UpdatePropertiesArg, Void, file_properties.UpdatePropertiesError) deprecated + "Add, update or remove properties associated with the supplied file and templates. + This endpoint should be used instead of properties/overwrite when property groups + are being updated via a \"delta\" instead of overwriting all properties of a file." + + attrs + auth = "user" + scope = "files.metadata.write" + +route properties/overwrite (file_properties.OverwritePropertyGroupArg, Void, file_properties.InvalidPropertyGroupError) deprecated + "Overwrite property groups associated with a file. This endpoint should be used + instead of properties/update when property groups are being overwritten rather + than updated via a \"delta\"." + + attrs + auth = "user" + scope = "files.metadata.write" + diff --git a/files_apiv2_files_saveurl_apiv2.stone b/files_apiv2_files_saveurl_apiv2.stone new file mode 100644 index 0000000..e655cb9 --- /dev/null +++ b/files_apiv2_files_saveurl_apiv2.stone @@ -0,0 +1,22 @@ +namespace files + +import async + +route save_url (SaveUrlArg, SaveUrlResult, SaveUrlError) + "Save the data from a specified URL into a file in user's Dropbox. + Note that the transfer from the URL must complete within 15 minutes, or the + operation will time out and the job will fail." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + +route save_url/check_job_status (async.PollArg, SaveUrlJobStatus, async.PollError) + "Check the status of a :route:`save_url` job." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + diff --git a/files_apiv2_files_upload_apiv2.stone b/files_apiv2_files_upload_apiv2.stone new file mode 100644 index 0000000..bee5faa --- /dev/null +++ b/files_apiv2_files_upload_apiv2.stone @@ -0,0 +1,130 @@ +namespace files + +route upload (UploadArg, FileMetadata, UploadError) + "Create a new file with the contents provided in the request. Do not use this to upload a + file larger than 150 MiB. Instead, create an upload session with :route:`upload_session/start`. + Calls to this endpoint will count as data transport calls for any Dropbox Business teams + with a limit on the number of data transport calls allowed per month. For more information, + see the Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.write" + select_admin_mode = "team_admin" + style = "upload" + +route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, UploadSessionStartError) + "Upload sessions allow you to upload a single file in one or more requests, for example where + the size of the file is greater than 150 MiB. This call starts a new upload session with the + given data. You can then use :route:`upload_session/append:2` or :route:`upload_session/append_batch` to add + more data, then :route:`upload_session/finish` or :route:`upload_session/finish_batch:2` to save all the data to + a file in Dropbox. A single request should not upload more than 150 MiB. The maximum size of + a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. + An upload session can be used for a maximum of 7 days. Attempting to use a + :field:`UploadSessionStartResult.session_id` with :route:`upload_session/append:2` or other upload session + routes more than 7 days after its creation will return :field:`UploadSessionLookupError.not_found`. + Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a + limit on the number of data transport calls allowed per month. For more information, see the + Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit. + By default, upload sessions require you to send content of the file in sequential order via + consecutive :route:`upload_session/start`, :route:`upload_session/append:2`, and :route:`upload_session/finish` calls + (or their batch variants). For better performance, you can optionally set + :field:`UploadSessionStartArg.session_type` to :field:`UploadSessionType.concurrent` to start a concurrent + upload session. Concurrent upload sessions may upload file data in concurrent + :route:`upload_session/append:2` requests, with a few caveats. After all of the requests are complete, + finish the session with :route:`upload_session/finish` as normal. You can not send data in a + :route:`upload_session/start` or :route:`upload_session/finish` call, only with :route:`upload_session/append:2` or + :route:`upload_session/append_batch`. Also, the length of the uploaded data in a call to + :route:`upload_session/append:2` or :route:`upload_session/append_batch` must be a multiple of 2^22 (4,194,304) + bytes, except for the final append request with :field:`UploadSessionAppendArg.close` or + :field:`UploadSessionAppendBatchArgEntry.close` set to true that may contain any remaining data." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.write" + select_admin_mode = "team_admin" + style = "upload" + +route upload_session/append (UploadSessionCursor, Void, UploadSessionAppendError) deprecated + "Append more data to an upload session. A single request should not upload more than 150 MiB. + The maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. + Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a + limit on the number of data transport calls allowed per month. For more information, see the + Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.write" + select_admin_mode = "team_admin" + style = "upload" + +route upload_session/append:2 (UploadSessionAppendArg, Void, UploadSessionAppendError) + "Append more data to an upload session. When the parameter close is set, this call will close + the session. A single request should not upload more than 150 MiB. The maximum size of a file + one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. Calls to this + endpoint will count as data transport calls for any Dropbox Business teams with a limit on the + number of data transport calls allowed per month. For more information, see the Data transport + limit page https://www.dropbox.com/developers/reference/data-transport-limit." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.write" + select_admin_mode = "team_admin" + style = "upload" + +route upload_session/append_batch (UploadSessionAppendBatchArg, UploadSessionAppendBatchResult, UploadSessionAppendBatchError) + "Append more data to multiple upload sessions. Each piece of file content to append to each + upload session should be concatenated in the request body, in the order delineated by + :field:`UploadSessionAppendBatchArg.entries` and their individual lengths indicated by + :field:`UploadSessionAppendBatchArgEntry.length`. A single request should not upload more than 150 MiB. + The maximum size of a file one can upload to an upload session is + 2^41 - 2^22 (2,199,019,061,248) bytes. Calls to this endpoint will count as data transport + calls for any Dropbox Business teams with a limit on the number of data transport calls allowed + per month. For more information, see the Data transport limit page + https://www.dropbox.com/developers/reference/data-transport-limit." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.write" + select_admin_mode = "team_admin" + style = "upload" + +route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSessionFinishError) + "Finish an upload session and save the uploaded data to the given file path. A single request + should not upload more than 150 MiB. The maximum size of a file one can upload to an upload + session is 2^41 - 2^22 (2,199,019,061,248) bytes. Calls to this endpoint will count as data + transport calls for any Dropbox Business teams with a limit on the number of data transport + calls allowed per month. For more information, see the Data transport limit page + https://www.dropbox.com/developers/reference/data-transport-limit." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + scope = "files.content.write" + select_admin_mode = "team_admin" + style = "upload" + +route alpha/upload (UploadArg, FileMetadata, UploadError) deprecated + "Create a new file with the contents provided in the request. Note that the behavior of this + alpha endpoint is unstable and subject to change. Do not use this to upload a file larger + than 150 MiB. Instead, create an upload session with :route:`upload_session/start`." + + attrs + allow_app_folder_app = true + auth = "user" + host = "content" + is_preview = true + scope = "files.content.write" + style = "upload" + diff --git a/files_apiv2_files_upload_async_apiv2.stone b/files_apiv2_files_upload_async_apiv2.stone new file mode 100644 index 0000000..81f367c --- /dev/null +++ b/files_apiv2_files_upload_async_apiv2.stone @@ -0,0 +1,14 @@ +namespace files + +route upload_session/start_batch (UploadSessionStartBatchArg, UploadSessionStartBatchResult, Void) + "Start a batch of upload sessions. See :route:`upload_session/start`. Calls to this endpoint will count + as data transport calls for any Dropbox Business teams with a limit on the number of data + transport calls allowed per month. For more information, see the Data transport limit page + https://www.dropbox.com/developers/reference/data-transport-limit." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + diff --git a/files_apiv2_files_upload_batch_apiv2.stone b/files_apiv2_files_upload_batch_apiv2.stone new file mode 100644 index 0000000..0fe1bb0 --- /dev/null +++ b/files_apiv2_files_upload_batch_apiv2.stone @@ -0,0 +1,55 @@ +namespace files + +import async + +route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFinishBatchLaunch, Void) deprecated + "This route helps you commit many files at once into a user's Dropbox. Use :route:`upload_session/start` + and :route:`upload_session/append:2` to upload file contents. We recommend uploading many files in + parallel to increase throughput. Once the file contents have been uploaded, rather than + calling :route:`upload_session/finish`, use this route to finish all your upload sessions in a single + request. :field:`UploadSessionStartArg.close` or :field:`UploadSessionAppendArg.close` needs to be true for + the last :route:`upload_session/start` or :route:`upload_session/append:2` call. The maximum size of a file + one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes. This route will + return a job_id immediately and do the async commit job in background. Use + :route:`upload_session/finish_batch/check` to check the job status. For the same account, this route + should be executed serially. That means you should not start the next job before current job + finishes. We allow up to 1000 entries in a single request. Calls to this endpoint will count + as data transport calls for any Dropbox Business teams with a limit on the number of data + transport calls allowed per month. For more information, see the Data transport limit page + https://www.dropbox.com/developers/reference/data-transport-limit." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route upload_session/finish_batch:2 (UploadSessionFinishBatchArg, UploadSessionFinishBatchResult, Void) + "This route helps you commit many files at once into a user's Dropbox. Use :route:`upload_session/start` + and :route:`upload_session/append:2` to upload file contents. We recommend uploading many files in + parallel to increase throughput. Once the file contents have been uploaded, rather than + calling :route:`upload_session/finish`, use this route to finish all your upload sessions in a single + request. :field:`UploadSessionStartArg.close` or :field:`UploadSessionAppendArg.close` needs to be true for + the last :route:`upload_session/start` or :route:`upload_session/append:2` call of each upload session. The + maximum size of a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) + bytes. We allow up to 1000 entries in a single request. Calls to this endpoint will count + as data transport calls for any Dropbox Business teams with a limit on the number of data + transport calls allowed per month. For more information, see the Data transport limit page + https://www.dropbox.com/developers/reference/data-transport-limit." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + +route upload_session/finish_batch/check (async.PollArg, UploadSessionFinishBatchJobStatus, async.PollError) + "Returns the status of an asynchronous job for :route:`upload_session/finish_batch`. If success, it + returns list of result for each entry." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + diff --git a/files_apiv2_revisions_apiv2.stone b/files_apiv2_revisions_apiv2.stone new file mode 100644 index 0000000..7770717 --- /dev/null +++ b/files_apiv2_revisions_apiv2.stone @@ -0,0 +1,26 @@ +namespace files + +route list_revisions (ListRevisionsArg, ListRevisionsResult, ListRevisionsError) + "Returns revisions for files based on a file path or a file id. The file path or file id is + identified from the latest file entry at the given file path or id. This end point allows + your app to query either by file path or file id by setting the mode parameter appropriately. + In the ListRevisionsMode.path (default) mode, all revisions at the same file path as the + latest file entry are returned. If revisions with the same file id are desired, then mode + must be set to ListRevisionsMode.id. The ListRevisionsMode.id mode is useful to retrieve + revisions for a given file across moves or renames." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.metadata.read" + select_admin_mode = "whole_team" + +route restore (RestoreArg, FileMetadata, RestoreError) + "Restore a specific revision of a file to the given path." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "files.content.write" + select_admin_mode = "team_admin" + diff --git a/files_files_public_base.stone b/files_files_public_base.stone new file mode 100644 index 0000000..c56cb0b --- /dev/null +++ b/files_files_public_base.stone @@ -0,0 +1,781 @@ +namespace files + +import common +import file_properties +import users_common + +alias CopyBatchArg = RelocationBatchArgBase + +alias FileId = String(min_length=4, pattern="id:.+") + +alias Id = String(min_length=1) + +alias ListFolderCursor = String(min_length=1) + +alias MalformedPathError = String? + +alias PathOrId = String(pattern="/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/(.|[\\r\\n])*)?)") + +alias PathR = String(pattern="(/(.|[\\r\\n])*)?|(ns:[0-9]+(/(.|[\\r\\n])*)?)") + +alias PathROrId = String(pattern="(/(.|[\\r\\n])*)?|id:.*|(ns:[0-9]+(/(.|[\\r\\n])*)?)") + +alias ReadPath = String(pattern="(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/(.|[\\r\\n])*)?)") + +alias Rev = String(min_length=9, pattern="[0-9a-f]+") + +alias SearchV2Cursor = String(min_length=1) + +alias Sha256HexHash = String(max_length=64, min_length=64) + +alias SharedLinkUrl = String + +alias WritePath = String(pattern="(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)") + +alias WritePathOrId = String(pattern="(/(.|[\\r\\n])*)|(ns:[0-9]+(/(.|[\\r\\n])*)?)|(id:.*)") + +union LookupError + malformed_path MalformedPathError + "The given path does not satisfy the required path format. Please refer to the :link:`Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats` for more information." + not_found + "There is nothing at the given path." + not_file + "We were expecting a file, but the given path refers to something that isn't a file." + not_folder + "We were expecting a folder, but the given path refers to something that isn't a folder." + restricted_content + "The file cannot be transferred because the content is restricted. For example, we might restrict a file due to legal requirements." + unsupported_content_type + "This operation is not supported for this content type." + locked + "The given path is locked." + +union WriteConflictError + file + "There's a file in the way." + folder + "There's a folder in the way." + file_ancestor + "There's a file at an ancestor path, so we couldn't create the required parent folders." + +union WriteError + malformed_path MalformedPathError + "The given path does not satisfy the required path format. Please refer to the :link:`Path formats documentation https://www.dropbox.com/developers/documentation/http/documentation#path-formats` for more information." + conflict WriteConflictError + "Couldn't write to the target path because there was something in the way." + no_write_permission + "The user doesn't have permissions to write to the target location." + insufficient_space + "The user doesn't have enough available space (bytes) to write more data." + disallowed_name + "Dropbox will not save the file or folder because of its name." + team_folder + "This endpoint cannot move or delete team folders." + operation_suppressed + "This file operation is not allowed at this path." + too_many_write_operations + "There are too many write operations in user's Dropbox. Please retry + this request." + access_restricted + "The user doesn't have permission to perform the action due to restrictions set by a team administrator" + +union DeleteError + path_lookup LookupError + path_write WriteError + too_many_write_operations + "There are too many write operations in user's Dropbox. Please retry + this request." + too_many_files + "There are too many files in one request. Please retry with fewer files." + +union_closed ThumbnailError + path LookupError + "An error occurs when downloading metadata for the image." + unsupported_extension + "The file extension doesn't allow conversion to a thumbnail." + unsupported_image + "The image cannot be converted to a thumbnail." + encrypted_content + "Encrypted content cannot be converted to a thumbnail." + conversion_error + "An error occurs during thumbnail conversion." + +union ThumbnailV2Error + path LookupError + "An error occurred when downloading metadata for the image." + unsupported_extension + "The file extension doesn't allow conversion to a thumbnail." + unsupported_image + "The image cannot be converted to a thumbnail." + encrypted_content + "Encrypted content cannot be converted to a thumbnail." + conversion_error + "An error occurred during thumbnail conversion." + access_denied + "Access to this shared link is forbidden." + not_found + "The shared link does not exist." + +struct UploadSessionOffsetError + correct_offset UInt64 + "The offset up to which data has been collected." + +union UploadSessionLookupError + not_found + "The upload session ID was not found or has expired. Upload sessions are + valid for 7 days." + incorrect_offset UploadSessionOffsetError + "The specified offset was incorrect. See the value for the + correct offset. This error may occur when a previous request + was received and processed successfully but the client did not + receive the response, e.g. due to a network error." + closed + "You are attempting to append data to an upload session that + has already been closed (i.e. committed)." + not_closed + "The session must be closed before calling upload_session/finish_batch." + too_large + "You can not append to the upload session because the size of a file should not exceed the + max file size limit (i.e. 2^41 - 2^22 or 2,199,019,061,248 bytes)." + concurrent_session_invalid_offset + "For concurrent upload sessions, offset needs to be multiple of 2^22 (4,194,304) bytes." + concurrent_session_invalid_data_size + "For concurrent upload sessions, only chunks with size multiple of 2^22 (4,194,304) bytes can be uploaded." + payload_too_large + "The request payload must be at most 150 MiB." + +union UploadSessionFinishError + lookup_failed UploadSessionLookupError + "The session arguments are incorrect; the value explains the reason." + path WriteError + "Unable to save the uploaded contents to a file. Data has already been appended to the + upload + session. Please retry with empty data body and updated offset." + properties_error file_properties.InvalidPropertyGroupError + "The supplied property group is invalid. The file has uploaded without property groups." + too_many_shared_folder_targets + "The batch request commits files into too many different shared folders. + Please limit your batch request to files contained in a single shared folder." + too_many_write_operations + "There are too many write operations happening in the user's Dropbox. You should + retry uploading this file." + concurrent_session_data_not_allowed + "Uploading data not allowed when finishing concurrent upload session." + concurrent_session_not_closed + "Concurrent upload sessions need to be closed before finishing." + concurrent_session_missing_data + "Not all pieces of data were uploaded before trying to finish the session." + payload_too_large + "The request payload must be at most 150 MiB." + content_hash_mismatch + "The content received by the Dropbox server in this call does not match the provided content hash." + encryption_not_supported + "The file is required to be encrypted, which is not supported in our public API." + +union_closed ThumbnailFormat + jpeg + png + webp + +union_closed ThumbnailMode + strict + "Scale down the image to fit within the given size." + bestfit + "Scale down the image to fit within the given size or its transpose." + fitone_bestfit + "Scale down the image to completely cover the given size or its transpose." + original + "Don't resize the image at all." + +union_closed ThumbnailQuality + quality_80 + "default thumbnail quality." + quality_90 + "high thumbnail quality." + +union_closed ThumbnailSize + w32h32 + "32 by 32 px." + w64h64 + "64 by 64 px." + w128h128 + "128 by 128 px." + w256h256 + "256 by 256 px." + w480h320 + "480 by 320 px." + w640h480 + "640 by 480 px." + w960h640 + "960 by 640 px." + w1024h768 + "1024 by 768 px." + w2048h1536 + "2048 by 1536 px." + w3200h2400 + "3200 by 2400 px." + +union_closed SearchMatchType + "Indicates what type of match was found for a given item." + filename + "This item was matched on its file or folder name." + content + "This item was matched based on its file contents." + both + "This item was matched based on both its contents and its file name." + + example default + content = null + +union SyncSetting + default + "On first sync to members' computers, the specified folder will follow + its parent folder's setting or otherwise follow default sync behavior." + not_synced + "On first sync to members' computers, the specified folder will be set + to not sync with selective sync." + not_synced_inactive + "The specified folder's not_synced setting is inactive due to its + location or other configuration changes. It will follow its parent + folder's setting." + +union SyncSettingArg + default + "On first sync to members' computers, the specified folder will follow its + parent folder's setting or otherwise follow default sync behavior." + not_synced + "On first sync to members' computers, the specified folder will be set + to not sync with selective sync." + + example default + not_synced = null + +struct SharedLinkFileInfo + url String + "The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, + we use the path param to determine for which file in the folder the view is for." + path String? + "The path corresponding to a file in a shared link to a folder. Required for shared links to folders." + password String? + "Password for the shared link. Required for password-protected shared links to files + unless it can be read from a cookie." + + example default + url = "https://dropbox.com/s/hash/filename.png" + +struct SharedLink + url SharedLinkUrl + "Shared link url." + password String? + "Password for the shared link." + + example default + url = "https://www.dropbox.com/s/2sn712vy1ovegw8?dl=0" + password = "password" + +union PathOrLink + path ReadPath + link SharedLinkFileInfo + + example default + path = "/a.docx" + +struct DeleteBatchResultData + metadata Metadata + "Metadata of the deleted object." + + example default + metadata = default + +union_closed DeleteBatchResultEntry + success DeleteBatchResultData + failure DeleteError + + example default + success = default + +union_closed WriteMode + "Your intent when writing a file to some path. This is used to determine + what constitutes a conflict and what the autorename strategy is. + In some situations, the conflict behavior is identical: + (a) If the target path doesn't refer to anything, the file is always written; + no conflict. + (b) If the target path refers to a folder, it's always a conflict. + (c) If the target path refers to a file with identical contents, nothing gets + written; no conflict. + The conflict checking differs in the case where there's a file at the target + path with contents different from the contents you're trying to write." + add + "Do not overwrite an existing file if there is a conflict. The + autorename strategy is to append a number to the file name. For example, + \"document.txt\" might become \"document (2).txt\"." + overwrite + "Always overwrite the existing file. The autorename + strategy is the same as it is for :field:`add`." + update Rev + "Overwrite if the given \"rev\" matches the existing file's \"rev\". + The supplied value should be the latest known \"rev\" of the file, for example, + from :type:`FileMetadata`, from when the file was last downloaded by the app. + This will cause the file on the Dropbox servers to be overwritten if the given \"rev\" + matches the existing file's current \"rev\" on the Dropbox servers. + The autorename strategy is to append the string \"conflicted copy\" + to the file name. For example, \"document.txt\" might become + \"document (conflicted copy).txt\" or \"document (Panda's conflicted copy).txt\"." + + example default + add = null + + example overwriting + overwrite = null + + example with_revision + update = "a1c10ce0dd78" + +struct CommitInfo + path WritePathOrId + "Path in the user's Dropbox to save the file." + mode WriteMode = add + "Selects what to do if the file already exists." + autorename Boolean = false + "If there's a conflict, as determined by :field:`mode`, have the Dropbox + server try to autorename the file to avoid conflict." + client_modified common.DropboxTimestamp? + "The value to store as the :field:`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." + mute Boolean = false + "Normally, users are made aware of any file modifications in their + Dropbox account via notifications in the client software. If + :val:`true`, this tells the clients that this modification shouldn't + result in a user notification." + property_groups List(file_properties.PropertyGroup)? + "List of custom properties to add to file." + strict_conflict Boolean = false + "Be more strict about how each :type:`WriteMode` detects conflict. + For example, always return a conflict error when :field:`mode` + = :field:`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." + + example default + path = "/Homework/math/Matrices.txt" + autorename = true + + example another + path = "/Homework/math/Vectors.txt" + autorename = true + + example update + path = "/Homework/math/Matrices.txt" + mode = with_revision + autorename = false + property_groups = [default] + +struct UploadSessionCursor + session_id String + "The upload session ID (returned by :route:`upload_session/start`)." + offset UInt64 + "Offset in bytes at which data should be appended. We use this to make + sure upload data isn't lost or duplicated in the event of a network error." + + example default + session_id = "pid_upload_session:h-NtwvAdw3XDqqHmb0J2t0XfIaSnQw2Eor59pfZI9D_ZGNJ4Ew" + offset = 0 + + example another + session_id = "pid_upload_session:6MvrpirpGzvgtxdyRkiYzL4bpnd_xOuqWBBCdYBUiM7uQe2fPw" + offset = 1073741824 + +struct UploadSessionFinishArg + cursor UploadSessionCursor + "Contains the upload session ID and the offset." + commit CommitInfo + "Contains the path and other optional modifiers for the commit." + content_hash Sha256HexHash? + "A hash of the file content uploaded in this call. If provided and the uploaded content + does not match this hash, an error will be returned. For more information see our + :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." + + example default + cursor = default + commit = default + + example another + cursor = another + commit = another + + example update + cursor = default + commit = update + +struct RelocationPath + from_path WritePathOrId + "Path in the user's Dropbox to be copied or moved." + to_path WritePathOrId + "Path in the user's Dropbox that is the destination." + + example default + from_path = "/Homework/math" + to_path = "/Homework/algebra" + +struct RelocationBatchArgBase + entries List(RelocationPath, max_items=1000, min_items=1) + "List of entries to be moved or copied. Each entry is :type:`RelocationPath`." + autorename Boolean = false + "If there's a conflict with any file, have the Dropbox server try to + autorename that file to avoid the conflict." + + example default + entries = [default] + +union FileLockContent + unlocked + "Empty type to indicate no lock." + single_user SingleUserLock + "A lock held by a single user." + + example default + single_user = default + +struct SingleUserLock + created common.DropboxTimestamp + "The time the lock was created." + lock_holder_account_id users_common.AccountId + "The account ID of the lock holder if known." + lock_holder_team_id String? + "The id of the team of the account holder if it exists." + + example default + created = "2015-05-12T15:50:38Z" + lock_holder_account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" + lock_holder_team_id = "dbtid:1234abcd" + +struct FileLock + content FileLockContent + "The lock description." + + example default + content = default + +struct FileLockMetadata + is_lockholder Boolean? + "True if caller holds the file lock." + lockholder_name String? + "The display name of the lock holder." + lockholder_account_id users_common.AccountId? + "The account ID of the lock holder if known." + created common.DropboxTimestamp? + "The timestamp of the lock was created." + + example default + is_lockholder = true + lockholder_name = "Imaginary User" + created = "2015-05-12T15:50:38Z" + +struct LockConflictError + lock FileLock + "The lock that caused the conflict." + +union LockFileError + path_lookup LookupError + "Could not find the specified resource." + too_many_write_operations + "There are too many write operations in user's Dropbox. Please retry this request." + too_many_files + "There are too many files in one request. Please retry with fewer files." + no_write_permission + "The user does not have permissions to change the lock state or access the file." + cannot_be_locked + "Item is a type that cannot be locked." + file_not_shared + "Requested file is not currently shared." + lock_conflict LockConflictError + "The user action conflicts with an existing lock on the file." + internal_error + "Something went wrong with the job on Dropbox's end. You'll need to + verify that the action you were taking succeeded, and if not, try + again. This should happen very rarely." + +struct LockFileResult + metadata Metadata + "Metadata of the file." + lock FileLock + "The file lock state after the operation." + + example default + metadata = default + lock = default + +struct SharingInfo + "Sharing info for a file or folder." + read_only Boolean + "True if the file or folder is inside a read-only shared folder." + + example default + read_only = false + +struct FileSharingInfo extends SharingInfo + "Sharing info for a file which is contained by a shared folder." + parent_shared_folder_id common.SharedFolderId + "ID of shared folder that holds this file." + modified_by users_common.AccountId? + "The last user who modified the file. This field will be null if + the user's account has been deleted." + + example default + read_only = true + parent_shared_folder_id = "84528192421" + modified_by = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" + +struct FolderSharingInfo extends SharingInfo + "Sharing info for a folder which is contained in a shared folder or is a + shared folder mount point." + parent_shared_folder_id common.SharedFolderId? + "Set if the folder is contained by a shared folder." + shared_folder_id common.SharedFolderId? + "If this folder is a shared folder mount point, the ID of the shared + folder mounted at this location." + traverse_only Boolean = false + "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." + no_access Boolean = false + "Specifies that the folder cannot be accessed by the user." + + example default + read_only = false + parent_shared_folder_id = "84528192421" + + example shared_folder + read_only = true + shared_folder_id = "84528192421" + +struct SymlinkInfo + target String + "The target this symlink points to." + +struct ExportInfo + "Export information for a file." + export_as String? + "Format to which the file can be exported to." + export_options List(String)? + "Additional formats to which the file can be exported. These values can be + specified as the export_format in /files/export." + + example default + export_as = "xlsx" + +struct Dimensions + "Dimensions for a photo or video." + height UInt64 + "Height of the photo/video." + width UInt64 + "Width of the photo/video." + + example default + height = 768 + width = 1024 + +struct GpsCoordinates + "GPS coordinates for a photo or video." + latitude Float64 + "Latitude of the GPS coordinates." + longitude Float64 + "Longitude of the GPS coordinates." + + example default + latitude = 37.7833 + longitude = 122.4167 + +struct MediaMetadata + "Metadata for a photo or video." + union_closed + photo PhotoMetadata + video VideoMetadata + dimensions Dimensions? + "Dimension of the photo/video." + location GpsCoordinates? + "The GPS coordinate of the photo/video." + time_taken common.DropboxTimestamp? + "The timestamp when the photo/video is taken." + +struct PhotoMetadata extends MediaMetadata + "Metadata for a photo." + + example default + dimensions = default + location = default + time_taken = "2015-05-12T15:50:38Z" + +struct VideoMetadata extends MediaMetadata + "Metadata for a video." + duration UInt64? + "The duration of the video in milliseconds." + + example default + dimensions = default + location = default + time_taken = "2015-05-12T15:50:38Z" + duration = 1000 + +union_closed MediaInfo + pending + "Indicate the photo/video is still under processing and metadata is + not available yet." + metadata MediaMetadata + "The metadata for the photo/video. Uses MediaMetadataAbstract to + preserve photo/video subtypes (e.g. VideoMetadata.duration)." + +struct Metadata + "Metadata for a file or folder." + union_closed + file FileMetadata + folder FolderMetadata + deleted DeletedMetadata + name String + "The last component of the path (including extension). + This never contains a slash." + path_lower String? + "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." + path_display String? + "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 :route:`list_folder/continue`. This field + will be null if the file or folder is not mounted." + parent_shared_folder_id common.SharedFolderId? + "Please use :field:`FileSharingInfo.parent_shared_folder_id` + or :field:`FolderSharingInfo.parent_shared_folder_id` instead." + preview_url String? + "The preview URL of the file." + + example default + file = default + + example folder_metadata + folder = default + + example search_metadata + file = search_file_metadata + +struct FileMetadata extends Metadata + id Id + "A unique identifier for the file." + client_modified common.DropboxTimestamp + "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." + server_modified common.DropboxTimestamp + "The last time the file was modified on Dropbox." + rev 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." + size UInt64 + "The file size in bytes." + media_info MediaInfo? + "Additional information if the file is a photo or video. This field will not be set on entries returned by :route:`list_folder`, :route:`list_folder/continue`, or :route:`get_thumbnail_batch`, starting December 2, 2019." + symlink_info SymlinkInfo? + "Set if this file is a symlink." + sharing_info FileSharingInfo? + "Set if this file is contained in a shared folder." + is_downloadable Boolean = true + "If true, file can be downloaded directly; else the file must be exported." + export_info ExportInfo? + "Information about format this file can be exported to. This filed must be set if :field:`is_downloadable` + is set to false." + property_groups List(file_properties.PropertyGroup)? + "Additional information if the file has custom properties with the + property template specified." + has_explicit_shared_members Boolean? + "This flag will only be present if include_has_explicit_shared_members + is true in :route:`list_folder` or :route:`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." + content_hash Sha256HexHash? + "A hash of the file content. This field can be used to verify data integrity. For more + information see our :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." + file_lock_info FileLockMetadata? + "If present, the metadata associated with the file's current lock." + + example default + id = "id:a4ayc_80_OEAAAAAAAAAXw" + name = "Prime_Numbers.txt" + path_lower = "/homework/math/prime_numbers.txt" + path_display = "/Homework/math/Prime_Numbers.txt" + sharing_info = default + client_modified = "2015-05-12T15:50:38Z" + server_modified = "2015-05-12T15:50:38Z" + rev = "a1c10ce0dd78" + size = 7212 + is_downloadable = true + property_groups = [default] + has_explicit_shared_members = false + content_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + file_lock_info = default + + example search_file_metadata + id = "id:a4ayc_80_OEAAAAAAAAAXw" + name = "Prime_Numbers.txt" + path_lower = "/homework/math/prime_numbers.txt" + path_display = "/Homework/math/Prime_Numbers.txt" + sharing_info = default + client_modified = "2015-05-12T15:50:38Z" + server_modified = "2015-05-12T15:50:38Z" + rev = "a1c10ce0dd78" + size = 7212 + is_downloadable = true + has_explicit_shared_members = false + content_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + +struct FolderMetadata extends Metadata + id Id + "A unique identifier for the folder." + shared_folder_id common.SharedFolderId? + "Please use :field:`sharing_info` instead." + sharing_info FolderSharingInfo? + "Set if the folder is contained in a shared folder or is a shared folder mount point." + property_groups List(file_properties.PropertyGroup)? + "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." + + example default + id = "id:a4ayc_80_OEAAAAAAAAAXz" + path_lower = "/homework/math" + path_display = "/Homework/math" + name = "math" + sharing_info = default + property_groups = [default] + +struct DeletedMetadata extends Metadata + "Indicates that there used to be a file or folder at this path, but it no longer exists." + + example default + path_lower = "/homework/math/pi.txt" + path_display = "/Homework/math/pi.txt" + name = "pi.txt" + +struct PreviewArg + path ReadPath + "The path of the file to preview." + rev Rev? + "Please specify revision in :field:`path` instead." + + example default + path = "/word.docx" + + example id + path = "id:a4ayc_80_OEAAAAAAAAAYa" + + example rev + path = "rev:a1c10ce0dd78" + diff --git a/files_files_public_primitives.stone b/files_files_public_primitives.stone new file mode 100644 index 0000000..6a9b70c --- /dev/null +++ b/files_files_public_primitives.stone @@ -0,0 +1,17 @@ +namespace files + "This namespace contains endpoints and data types for basic file operations." + +import common + +alias Path = String(pattern="/(.|[\\r\\n])*") + +struct HighlightSpan + highlight_str String + "String to be determined whether it should be highlighted or not." + is_highlighted Boolean + "The string should be highlighted or not." + + example default + highlight_str = "test" + is_highlighted = false + diff --git a/files_files_public_types.stone b/files_files_public_types.stone new file mode 100644 index 0000000..c63fad9 --- /dev/null +++ b/files_files_public_types.stone @@ -0,0 +1,1520 @@ +namespace files + +import async +import common +import file_properties +import users_common + +union_closed AlphaGetMetadataError extends GetMetadataError + properties_error file_properties.LookUpPropertiesError + +union CreateFolderBatchError + too_many_files + "The operation would involve too many files or folders." + +union CreateFolderBatchJobStatus extends async.PollResultBase + complete CreateFolderBatchResult + "The batch create folder has finished." + failed CreateFolderBatchError + "The batch create folder has failed." + + example default + complete = default + +union CreateFolderBatchLaunch extends async.LaunchResultBase + "Result returned by :route:`create_folder_batch` that may either launch an + asynchronous job or complete synchronously." + complete CreateFolderBatchResult + + example complete + complete = default + + example async_job_id + async_job_id = "34g93hh34h04y384084" + +union_closed CreateFolderBatchResultEntry + success CreateFolderEntryResult + failure CreateFolderEntryError + + example default + success = default + +union CreateFolderEntryError + path WriteError + +union_closed CreateFolderError + path WriteError + +union DeleteBatchError + too_many_write_operations + "Use :field:`DeleteError.too_many_write_operations`. :route:`delete_batch` now + provides smaller granularity about which entry has failed because of this." + +union DeleteBatchJobStatus extends async.PollResultBase + complete DeleteBatchResult + "The batch delete has finished." + failed DeleteBatchError + "The batch delete has failed." + + example default + complete = default + +union DeleteBatchLaunch extends async.LaunchResultBase + "Result returned by :route:`delete_batch` that may either launch an asynchronous job or complete + synchronously." + complete DeleteBatchResult + + example complete + complete = default + + example async_job_id + async_job_id = "34g93hh34h04y384084" + +union DownloadError + path LookupError + unsupported_file + "This file type cannot be downloaded directly; use :route:`export` instead." + +union DownloadZipError + path LookupError + too_large + "The folder or a file is too large to download." + too_many_files + "The folder has too many files to download." + +union ExportError + path LookupError + non_exportable + "This file type cannot be exported. Use :route:`download` instead." + invalid_export_format + "The specified export format is not a valid option for this file type." + retry_error + "The exportable content is not yet available. Please retry later." + +union FileCategory + image + "jpg, png, gif, and more." + document + "doc, docx, txt, and more." + pdf + "pdf." + spreadsheet + "xlsx, xls, csv, and more." + presentation + "ppt, pptx, key, and more." + audio + "mp3, wav, mid, and more." + video + "mov, wmv, mp4, and more." + folder + "dropbox folder." + paper + "dropbox paper doc." + others + "any file not in one of the categories above." + +union FileStatus + active + deleted + + example default + active = null + +union GetCopyReferenceError + path LookupError + +union_closed GetMetadataError + path LookupError + +union GetTemporaryLinkError + path LookupError + email_not_verified + "This user's email address is not verified. This functionality is only + available on accounts with a verified email address. Users can verify + their email address :link:`here https://www.dropbox.com/help/317`." + unsupported_file + "Cannot get temporary link to this file type; use :route:`export` instead." + not_allowed + "The user is not allowed to request a temporary link to the specified file. + For example, this can occur if the file is restricted or if the user's links + are :link:`banned https://help.dropbox.com/files-folders/share/banned-links`." + +union GetThumbnailBatchError + too_many_files + "The operation involves more than 25 files." + +union GetThumbnailBatchResultEntry + success GetThumbnailBatchResultData + failure ThumbnailError + "The result for this file if it was an error." + + example default + success = default + +union ImportFormat + "The import format of the incoming Paper doc content." + html + "The provided data is interpreted as standard HTML." + markdown + "The provided data is interpreted as markdown." + plain_text + "The provided data is interpreted as plain text." + +union ListFolderContinueError + path LookupError + reset + "Indicates that the cursor has been invalidated. Call + :route:`list_folder` to obtain a new cursor." + +union ListFolderError + path LookupError + template_error file_properties.TemplateError + +union ListFolderLongpollError + reset + "Indicates that the cursor has been invalidated. Call + :route:`list_folder` to obtain a new cursor." + +union ListRevisionsError + path LookupError + invalid_before_rev + "The revision in before_rev is invalid." + before_rev_not_supported + "The before_rev argument is only supported in path mode." + +union ListRevisionsMode + path + "Returns revisions with the same file path as identified by the latest file entry at the + given file path or id." + id + "Returns revisions with the same file id as identified by the latest file entry at the given + file path or id." + +union_closed LockFileResultEntry + success LockFileResult + failure LockFileError + + example default + success = default + +union MetadataV2 + "Metadata for a file, folder or other resource types." + metadata Metadata + + example default + metadata = search_metadata + +union MoveIntoFamilyError + is_shared_folder + "Moving shared folder into Family Room folder is not allowed." + +union MoveIntoVaultError + is_shared_folder + "Moving shared folder into Vault is not allowed." + +union PaperContentError + insufficient_permissions + "Your account does not have permissions to edit Paper docs." + content_malformed + "The provided content was malformed and cannot be imported to Paper." + doc_length_exceeded + "The Paper doc would be too large, split the content into multiple docs." + image_size_exceeded + "The imported document contains an image that is too large. The current limit is 1MB. + This only applies to HTML with data URI." + +union PaperCreateError extends PaperContentError + invalid_path + "The file could not be saved to the specified location." + email_unverified + "The user's email must be verified to create Paper docs." + invalid_file_extension + "The file path must end in .paper." + paper_disabled + "Paper is disabled for your team." + +union PaperDocUpdatePolicy + update + "Sets the doc content to the provided content if the provided paper_revision matches the latest doc revision. + Otherwise, returns an error." + overwrite + "Sets the doc content to the provided content without checking paper_revision." + prepend + "Adds the provided content to the beginning of the doc without checking paper_revision." + append + "Adds the provided content to the end of the doc without checking paper_revision." + +union PaperUpdateError extends PaperContentError + path LookupError + revision_mismatch + "The provided revision does not match the document head." + doc_archived + "This operation is not allowed on archived Paper docs." + doc_deleted + "This operation is not allowed on deleted Paper docs." + +union_closed PreviewError + path LookupError + "An error occurs when downloading metadata for the file." + in_progress + "This preview generation is still in progress and the file is not ready + for preview yet." + unsupported_extension + "The file extension is not supported preview generation." + unsupported_content + "The file content is not supported for preview generation." + +union RelocationBatchError extends RelocationError + too_many_write_operations + "There are too many write operations in user's Dropbox. Please retry + this request." + +union RelocationBatchErrorEntry + relocation_error RelocationError + "User errors that retry won't help." + internal_error + "Something went wrong with the job on Dropbox's end. You'll need to + verify that the action you were taking succeeded, and if not, try + again. This should happen very rarely." + too_many_write_operations + "There are too many write operations in user's Dropbox. Please retry + this request." + +union_closed RelocationBatchJobStatus extends async.PollResultBase + complete RelocationBatchResult + "The copy or move batch job has finished." + failed RelocationBatchError + "The copy or move batch job has failed with exception." + + example default + complete = default + +union RelocationBatchLaunch extends async.LaunchResultBase + "Result returned by :route:`copy_batch` or :route:`move_batch` that may either launch an + asynchronous job or complete synchronously." + complete RelocationBatchResult + + example complete + complete = default + + example async_job_id + async_job_id = "34g93hh34h04y384084" + +union RelocationBatchResultEntry + success Metadata + failure RelocationBatchErrorEntry + + example success + success = default + +union_closed RelocationBatchV2JobStatus extends async.PollResultBase + "Result returned by :route:`copy_batch/check:2` or :route:`move_batch/check:2` that may either + be in progress or completed with result for each entry." + complete RelocationBatchV2Result + "The copy or move batch job has finished." + + example default + complete = default + +union_closed RelocationBatchV2Launch extends async.LaunchResultBase + "Result returned by :route:`copy_batch:2` or :route:`move_batch:2` that may either launch an + asynchronous job or complete synchronously." + complete RelocationBatchV2Result + + example complete + complete = default + + example async_job_id + async_job_id = "34g93hh34h04y384084" + +union RelocationError + from_lookup LookupError + from_write WriteError + to WriteError + cant_copy_shared_folder + "Shared folders can't be copied." + cant_nest_shared_folder + "Your move operation would result in nested shared folders. This is not allowed." + cant_move_folder_into_itself + "You cannot move a folder into itself." + too_many_files + "The operation would involve more than 10,000 files and folders." + duplicated_or_nested_paths + "There are duplicated/nested paths among :field:`RelocationArg.from_path` + and :field:`RelocationArg.to_path`." + cant_transfer_ownership + "Your move operation would result in an ownership transfer. + You may reissue the request with + the field :field:`RelocationArg.allow_ownership_transfer` to true." + insufficient_quota + "The current user does not have enough space to move or copy the files." + internal_error + "Something went wrong with the job on Dropbox's end. You'll need to + verify that the action you were taking succeeded, and if not, try + again. This should happen very rarely." + cant_move_shared_folder + "Can't move the shared folder to the given destination." + cant_move_into_vault MoveIntoVaultError + "Some content cannot be moved into Vault under certain circumstances, see detailed error." + cant_move_into_family MoveIntoFamilyError + "Some content cannot be moved into the Family Room folder under certain circumstances, see detailed error." + +union RestoreError + path_lookup LookupError + "An error occurs when downloading metadata for the file." + path_write WriteError + "An error occurs when trying to restore the file to that path." + invalid_revision + "The revision is invalid. It may not exist or may point to a deleted file." + in_progress + "The restore is currently executing, but has not yet completed." + +union SaveCopyReferenceError + path WriteError + invalid_copy_reference + "The copy reference is invalid." + no_permission + "You don't have permission to save the given copy reference. Please make sure this app + is same app which created the copy reference and the source user is still linked to + the app." + not_found + "The file referenced by the copy reference cannot be found." + too_many_files + "The operation would involve more than 10,000 files and folders." + +union SaveUrlError + path WriteError + download_failed + "Failed downloading the given URL. The URL may be + password-protected and the password provided was incorrect, + or the link may be disabled." + invalid_url + "The given URL is invalid." + not_found + "The file where the URL is saved to no longer exists." + +union_closed SaveUrlJobStatus extends async.PollResultBase + complete FileMetadata + "Metadata of the file where the URL is saved to." + failed SaveUrlError + +union_closed SaveUrlResult extends async.LaunchResultBase + complete FileMetadata + "Metadata of the file where the URL is saved to." + + example default + complete = default + +union SearchError + path LookupError + invalid_argument String? + internal_error + "Something went wrong, please try again." + +union SearchMatchTypeV2 + "Indicates what type of match was found for a given item." + filename + "This item was matched on its file or folder name." + file_content + "This item was matched based on its file contents." + filename_and_content + "This item was matched based on both its contents and its file name." + image_content + "This item was matched on image content." + metadata + "This item was matched based on its metadata." + +union_closed SearchMode + filename + "Search file and folder names." + filename_and_content + "Search file and folder names as well as file contents." + deleted_filename + "Search for deleted file and folder names." + + example default + filename_and_content = null + + example name_only + filename = null + + example deleted_names + deleted_filename = null + +union SearchOrderBy + relevance + last_modified_time + + example default + relevance = null + +union SyncSettingsError + path LookupError + unsupported_combination + "Setting this combination of sync settings simultaneously is not supported." + unsupported_configuration + "The specified configuration is not supported." + +union UploadError + path UploadWriteFailed + "Unable to save the uploaded contents to a file." + properties_error file_properties.InvalidPropertyGroupError + "The supplied property group is invalid. The file has uploaded without property groups." + payload_too_large + "The request payload must be at most 150 MiB." + content_hash_mismatch + "The content received by the Dropbox server in this call does not match the provided content hash." + encryption_not_supported + "The file is required to be encrypted, which is not supported in our public API." + +union UploadSessionAppendBatchEntryError + not_found + "The upload session ID was not found or has expired. Upload sessions are + valid for 7 days." + incorrect_offset UploadSessionOffsetError + "The specified offset was incorrect. See the value for the + correct offset. This error may occur when a previous request + was received and processed successfully but the client did not + receive the response, e.g. due to a network error." + closed + "You are attempting to append data to an upload session that + has already been closed (i.e. committed)." + too_large + "You can not append to the upload session because the size of a file should not exceed the + max file size limit (i.e. 2^41 - 2^22 or 2,199,019,061,248 bytes)." + concurrent_session_invalid_offset + "For concurrent upload sessions, offset needs to be multiple of 2^22 (4,194,304) bytes." + concurrent_session_invalid_data_size + "For concurrent upload sessions, only chunks with size multiple of 2^22 (4,194,304) bytes can be uploaded." + +union UploadSessionAppendBatchError + payload_too_large + "The request payload must be at most 150 MiB." + content_hash_mismatch + "The content received by the Dropbox server in this call does not match the provided content hash." + length_mismatch + "The total length of the content received by the Dropbox server in this + call does not match the total of the provided lengths in the batch arguments." + +union_closed UploadSessionAppendBatchResultEntry + success + failure UploadSessionAppendBatchEntryError + + example default + success = null + +union UploadSessionAppendError + not_found + "The upload session ID was not found or has expired. Upload sessions are + valid for 7 days." + incorrect_offset UploadSessionOffsetError + "The specified offset was incorrect. See the value for the + correct offset. This error may occur when a previous request + was received and processed successfully but the client did not + receive the response, e.g. due to a network error." + closed + "You are attempting to append data to an upload session that + has already been closed (i.e. committed)." + too_large + "You can not append to the upload session because the size of a file should not exceed the + max file size limit (i.e. 2^41 - 2^22 or 2,199,019,061,248 bytes)." + concurrent_session_invalid_offset + "For concurrent upload sessions, offset needs to be multiple of 2^22 (4,194,304) bytes." + concurrent_session_invalid_data_size + "For concurrent upload sessions, only chunks with size multiple of 2^22 (4,194,304) bytes can be uploaded." + payload_too_large + "The request payload must be at most 150 MiB." + content_hash_mismatch + "The content received by the Dropbox server in this call does not match the provided content hash." + +union_closed UploadSessionFinishBatchJobStatus extends async.PollResultBase + complete UploadSessionFinishBatchResult + "The :route:`upload_session/finish_batch` has finished." + + example default + complete = default + +union UploadSessionFinishBatchLaunch extends async.LaunchResultBase + "Result returned by :route:`upload_session/finish_batch` that may either launch an + asynchronous job or complete synchronously." + complete UploadSessionFinishBatchResult + + example complete + complete = default + + example async_job_id + async_job_id = "34g93hh34h04y384084" + +union_closed UploadSessionFinishBatchResultEntry + success FileMetadata + failure UploadSessionFinishError + + example default + success = default + +union UploadSessionStartError + concurrent_session_data_not_allowed + "Uploading data not allowed when starting concurrent upload session." + concurrent_session_close_not_allowed + "Can not start a closed concurrent upload session." + payload_too_large + "The request payload must be at most 150 MiB." + content_hash_mismatch + "The content received by the Dropbox server in this call does not match the provided content hash." + +union UploadSessionType + sequential + "Pieces of data are uploaded sequentially one after another. This is the default + behavior." + concurrent + "Pieces of data can be uploaded in concurrent RPCs in any order." + +struct AlphaGetMetadataArg extends GetMetadataArg + include_property_templates List(file_properties.TemplateId)? + "If set to a valid list of template IDs, + :field:`FileMetadata.property_groups` is set for files with custom + properties." + + example default + path = "/Homework/math" + + example id + path = "id:a4ayc_80_OEAAAAAAAAAYa" + + example rev + path = "rev:a1c10ce0dd78" + +struct ContentSyncSetting + id FileId + "Id of the item this setting is applied to." + sync_setting SyncSetting + "Setting for this item." + + example default + id = "id:a4ayc_80_OEAAAAAAAAAXw" + sync_setting = default + +struct ContentSyncSettingArg + id FileId + "Id of the item this setting is applied to." + sync_setting SyncSettingArg + "Setting for this item." + + example default + id = "id:a4ayc_80_OEAAAAAAAAAXw" + sync_setting = default + +struct CreateFolderArg + path WritePath + "Path in the user's Dropbox to create." + autorename Boolean = false + "If there's a conflict, have the Dropbox server try to autorename + the folder to avoid the conflict." + + example default + path = "/Homework/math" + +struct CreateFolderBatchArg + paths List(WritePath, max_items=10000) + "List of paths to be created in the user's Dropbox. Duplicate path + arguments in the batch are considered only once." + autorename Boolean = false + "If there's a conflict, have the Dropbox server try to autorename + the folder to avoid the conflict." + force_async Boolean = false + "Whether to force the create to happen asynchronously." + + example default + paths = ["/Homework/math"] + autorename = false + +struct CreateFolderBatchResult extends FileOpsResult + entries List(CreateFolderBatchResultEntry) + "Each entry in :field:`CreateFolderBatchArg.paths` will appear at the same position + inside :field:`CreateFolderBatchResult.entries`." + + example default + entries = [default] + +struct CreateFolderEntryResult + metadata FolderMetadata + "Metadata of the created folder." + + example default + metadata = default + +struct CreateFolderResult extends FileOpsResult + metadata FolderMetadata + "Metadata of the created folder." + + example default + metadata = default + +struct DeleteArg + path WritePathOrId + "Path in the user's Dropbox to delete." + parent_rev Rev? + "Perform delete if given \"rev\" matches the existing file's latest \"rev\". This field + does not support deleting a folder." + + example delete + path = "/Homework/math/Prime_Numbers.txt" + +struct DeleteBatchArg + entries List(DeleteArg, max_items=1000) + + example default + entries = [delete] + +struct DeleteBatchResult extends FileOpsResult + entries List(DeleteBatchResultEntry) + "Each entry in :field:`DeleteBatchArg.entries` will appear at the same position inside + :field:`DeleteBatchResult.entries`." + + example default + entries = [default] + +struct DeleteResult extends FileOpsResult + metadata Metadata + "Metadata of the deleted object." + + example default + metadata = default + +struct DownloadArg + path ReadPath + "The path of the file to download." + rev Rev? + "Please specify revision in :field:`path` instead." + + example default + path = "/Homework/math/Prime_Numbers.txt" + + example id + path = "id:a4ayc_80_OEAAAAAAAAAYa" + + example rev + path = "rev:a1c10ce0dd78" + +struct DownloadZipArg + path ReadPath + "The path of the folder to download." + + example default + path = "/Homework/math" + + example id + path = "id:a4ayc_80_OEAAAAAAAAAYa" + + example rev + path = "rev:a1c10ce0dd78" + +struct DownloadZipResult + metadata FolderMetadata + + example default + metadata = default + +struct ExportArg + path ReadPath + "The path of the file to be exported." + export_format String? + "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 :route:`get_metadata`. + If none is specified, the default format (specified + in export_as in file metadata) will be used." + + example default + path = "/Homework/math/Prime_Numbers.gsheet" + + example id + path = "id:a4ayc_80_OEAAAAAAAAAYa" + +struct ExportMetadata + name String + "The last component of the path (including extension). + This never contains a slash." + size UInt64 + "The file size in bytes." + export_hash Sha256HexHash? + "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 :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." + paper_revision Int64? + "If the file is a Paper doc, this gives the latest doc revision which can be used in :route:`paper/update`." + + example default + name = "Prime_Numbers.xlsx" + size = 7189 + export_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + +struct ExportResult + export_metadata ExportMetadata + "Metadata for the exported version of the file." + file_metadata FileMetadata + "Metadata for the original file." + + example default + export_metadata = default + file_metadata = default + +struct FileOpsResult + "Result for File Operations" + +struct GetCopyReferenceArg + path ReadPath + "The path to the file or folder you want to get a copy reference to." + + example default + path = "/video.mp4" + +struct GetCopyReferenceResult + metadata Metadata + "Metadata of the file or folder." + copy_reference String + "A copy reference to the file or folder." + expires common.DropboxTimestamp + "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." + + example default + metadata = default + copy_reference = "z1X6ATl6aWtzOGq0c3g5Ng" + expires = "2045-05-12T15:50:38Z" + +struct GetMetadataArg + path ReadPath + "The path of a file or folder on Dropbox." + include_media_info Boolean = false + "If true, :field:`FileMetadata.media_info` is set for photo and video." + include_deleted Boolean = false + "If true, :type:`DeletedMetadata` will be returned for deleted file or + folder, otherwise :field:`LookupError.not_found` will be returned." + include_has_explicit_shared_members Boolean = false + "If true, the results will include a flag for each file indicating whether or not + that file has any explicit members." + include_property_groups file_properties.TemplateFilterBase? + "If set to a valid list of template IDs, :field:`FileMetadata.property_groups` + is set if there exists property data associated with the file and each of the + listed templates." + + example default + path = "/Homework/math" + + example id + path = "id:a4ayc_80_OEAAAAAAAAAYa" + + example rev + path = "rev:a1c10ce0dd78" + +struct GetTemporaryLinkArg + path ReadPath + "The path to the file you want a temporary link to." + + example default + path = "/video.mp4" + +struct GetTemporaryLinkResult + metadata FileMetadata + "Metadata of the file." + link String + "The temporary link which can be used to stream content the file." + + example default + metadata = default + link = "https://ucabc123456.dl.dropboxusercontent.com/cd/0/get/abcdefghijklmonpqrstuvwxyz1234567890/file" + +struct GetTemporaryUploadLinkArg + commit_info CommitInfo + "Contains the path and other optional modifiers for the future upload commit. + Equivalent to the parameters provided to :route:`upload`." + duration Float64(max_value=14400, min_value=60) = 14400 + "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." + + example default + commit_info = default + duration = 3600 + +struct GetTemporaryUploadLinkResult + link String + "The temporary link which can be used to stream a file to a Dropbox location." + + example default + link = "https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND" + +struct GetThumbnailBatchArg + "Arguments for :route:`get_thumbnail_batch`." + entries List(ThumbnailArg) + "List of files to get thumbnails." + + example default + entries = [default] + +struct GetThumbnailBatchResult + entries List(GetThumbnailBatchResultEntry) + "List of files and their thumbnails." + + example default + entries = [default] + +struct GetThumbnailBatchResultData + metadata FileMetadata + thumbnail String + "A string containing the base64-encoded thumbnail data for this file." + + example default + metadata = default + thumbnail = "iVBORw0KGgoAAAANSUhEUgAAAdcAAABrCAMAAAI=" + +struct ListFolderArg + path PathROrId + "A unique identifier for the file." + recursive Boolean = false + "If true, the list folder operation will be applied recursively to all subfolders and the response will contain + contents of all subfolders. In some cases, setting :field:`ListFolderArg.recursive` to :val:`true` may lead to + performance issues or errors, especially when traversing folder structures with a large number of items. + A workaround for such cases is to set :field:`ListFolderArg.recursive` to :val:`false` and traverse subfolders one at a time." + include_media_info Boolean = false + "If true, :field:`FileMetadata.media_info` is set for photo and video. This parameter will no longer have an effect starting December 2, 2019." + include_deleted Boolean = false + "If true, the results will include entries for files and folders that used to exist but were deleted." + include_has_explicit_shared_members Boolean = false + "If true, the results will include a flag for each file indicating whether or not + that file has any explicit members." + include_mounted_folders Boolean = true + "If true, the results will include entries under mounted folders which includes app folder, + shared folder and team folder." + limit UInt32(max_value=2000, min_value=1)? + "The maximum number of results to return per request. Note: This is an approximate number + and there can be slightly more entries returned in some cases." + shared_link SharedLink? + "A shared link to list the contents of. If the link is password-protected, the password + must be provided. If this field is present, :field:`ListFolderArg.path` will be relative + to root of the shared link. Only non-recursive mode is supported for shared link." + include_property_groups file_properties.TemplateFilterBase? + "If set to a valid list of template IDs, :field:`FileMetadata.property_groups` + is set if there exists property data associated with the file and each of the + listed templates." + include_non_downloadable_files Boolean = true + "If true, include files that are not downloadable, i.e. Google Docs." + + example default + path = "/Homework/math" + recursive = false + +struct ListFolderContinueArg + cursor ListFolderCursor + "The cursor returned by your last call to :route:`list_folder` or + :route:`list_folder/continue`." + + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + +struct ListFolderGetLatestCursorResult + cursor ListFolderCursor + "Pass the cursor into :route:`list_folder/continue` to see what's + changed in the folder since your previous query." + + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + +struct ListFolderLongpollArg + cursor ListFolderCursor + "A cursor as returned by :route:`list_folder` or :route:`list_folder/continue`. Cursors + retrieved by setting :field:`ListFolderArg.include_media_info` to :val:`true` are + not supported." + timeout UInt64(max_value=480, min_value=30) = 30 + "A timeout in seconds. The request will block for at most this length + of time, plus up to 90 seconds of random jitter added to avoid the + thundering herd problem. Care should be taken when using this + parameter, as some network infrastructure does not support long + timeouts." + + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + +struct ListFolderLongpollResult + changes Boolean + "Indicates whether new changes are available. If true, call + :route:`list_folder/continue` to retrieve the changes." + backoff UInt64? + "If present, backoff for at least this many seconds before calling + :route:`list_folder/longpoll` again." + + example default + changes = true + +struct ListFolderResult + entries List(Metadata) + "The files and (direct) subfolders in the folder." + cursor ListFolderCursor + "Pass the cursor into :route:`list_folder/continue` to see what's + changed in the folder since your previous query." + has_more Boolean + "If true, then there are more entries available. Pass the + cursor to :route:`list_folder/continue` to retrieve the rest." + + example default + entries = [default, folder_metadata] + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + has_more = false + +struct ListRevisionsArg + path PathOrId + "The path to the file you want to see the revisions of." + mode ListRevisionsMode = path + "Determines the behavior of the API in listing the revisions for a given file path or id." + limit UInt64(max_value=100, min_value=1) = 10 + "The maximum number of revision entries returned." + before_rev Rev? + "If set, ListRevisions will only return revisions prior to before_rev. Can be set using the last revision + from a previous call to list_revisions to fetch the next page of revisions. Only supported in path mode." + + example default + path = "/root/word.docx" + mode = path + limit = 10 + +struct ListRevisionsResult + is_deleted Boolean + "If the file identified by the latest revision in the response is either deleted or moved. If before_rev is set, + this refers to the latest revision of the file older than before_rev." + server_deleted common.DropboxTimestamp? + "The time of deletion if the file was deleted." + entries List(FileMetadata) + "The revisions for the file. Only revisions that are not deleted will show up here." + has_more Boolean + "If true, then there are more entries available. Call list_revisions again with before_rev equal to the revision + of the last returned entry to retrieve the rest." + + example default + is_deleted = false + entries = [default] + has_more = false + +struct LockFileArg + path WritePathOrId + "Path in the user's Dropbox to a file." + + example lock + path = "/John Doe/sample/test.pdf" + +struct LockFileBatchArg + entries List(LockFileArg) + "List of 'entries'. Each 'entry' contains a path of the file which will be + locked or queried. + Duplicate path arguments in the batch are considered only once." + + example default + entries = [lock] + +struct LockFileBatchResult extends FileOpsResult + entries List(LockFileResultEntry) + "Each Entry in the 'entries' will have '.tag' with the operation status (e.g. success), + the metadata for the file and the lock state after the operation." + + example default + entries = [default] + +struct MinimalFileLinkMetadata + url String + "URL of the shared link." + id Id? + "Unique identifier for the linked file." + path String? + "Full path in the user's Dropbox. This always starts with a slash. + This field will only be present only if the linked file is in the authenticated user's Dropbox." + rev 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." + +struct MoveBatchArg extends RelocationBatchArgBase + allow_ownership_transfer Boolean = false + "Allow moves by owner even if it would result in an ownership transfer + for the content being moved. This does not apply to copies." + + example default + entries = [default] + +struct PaperCreateArg + path Path + "The fully qualified path to the location in the user's Dropbox where the Paper Doc should be created. + This should include the document's title and end with .paper." + import_format ImportFormat + "The format of the provided data." + + example default + path = "/Paper Docs/New Doc.paper" + import_format = html + +struct PaperCreateResult + url String + "URL to open the Paper Doc." + result_path String + "The fully qualified path the Paper Doc was actually created at." + file_id FileId + "The id to use in Dropbox APIs when referencing the Paper Doc." + paper_revision Int64 + "The current doc revision." + + example default + url = "https://www.dropbox.com/scl/xxx.paper?dl=0" + result_path = "/Paper Docs/New Doc.paper" + file_id = "id:a4ayc_80_OEAAAAAAAAAXw" + paper_revision = 1 + +struct PaperUpdateArg + path WritePathOrId + "Path in the user's Dropbox to update. The path must correspond to a Paper doc or an error will be returned." + import_format ImportFormat + "The format of the provided data." + doc_update_policy PaperDocUpdatePolicy + "How the provided content should be applied to the doc." + paper_revision Int64? + "The latest doc revision. Required when doc_update_policy is update. + This value must match the current revision of the doc or error revision_mismatch will be returned." + + example default + path = "/Paper Docs/My Doc.paper" + import_format = html + doc_update_policy = update + paper_revision = 123 + +struct PaperUpdateResult + paper_revision Int64 + "The current doc revision." + + example default + paper_revision = 124 + +struct PreviewResult + file_metadata FileMetadata? + "Metadata corresponding to the file received as an argument. Will be populated if the endpoint is called with + a path (ReadPath)." + link_metadata MinimalFileLinkMetadata? + "Minimal metadata corresponding to the file received as an argument. Will be populated if the endpoint is called + using a shared link (SharedLinkFileInfo)." + + example default + file_metadata = default + +struct RelocationArg extends RelocationPath + allow_shared_folder Boolean = false + "This flag has no effect." + autorename Boolean = false + "If there's a conflict, have the Dropbox server try to autorename + the file to avoid the conflict." + allow_ownership_transfer Boolean = false + "Allow moves by owner even if it would result in an ownership transfer + for the content being moved. This does not apply to copies." + + example default + from_path = "/Homework/math" + to_path = "/Homework/algebra" + +struct RelocationBatchArg extends RelocationBatchArgBase + allow_shared_folder Boolean = false + "This flag has no effect." + allow_ownership_transfer Boolean = false + "Allow moves by owner even if it would result in an ownership transfer + for the content being moved. This does not apply to copies." + + example default + entries = [default] + +struct RelocationBatchResult extends FileOpsResult + entries List(RelocationBatchResultData) + + example default + entries = [default] + +struct RelocationBatchResultData + metadata Metadata + "Metadata of the relocated object." + + example default + metadata = default + +struct RelocationBatchV2Result extends FileOpsResult + entries List(RelocationBatchResultEntry) + "Each entry in CopyBatchArg.entries or :field:`MoveBatchArg.entries` will + appear at the same position inside :field:`RelocationBatchV2Result.entries`." + + example default + entries = [success] + +struct RelocationResult extends FileOpsResult + metadata Metadata + "Metadata of the relocated object." + + example default + metadata = default + +struct RestoreArg + path WritePath + "The path to save the restored file." + rev Rev + "The revision to restore." + + example default + path = "/root/word.docx" + rev = "a1c10ce0dd78" + +struct SaveCopyReferenceArg + copy_reference String + "A copy reference returned by :route:`copy_reference/get`." + path Path + "Path in the user's Dropbox that is the destination." + + example default + copy_reference = "z1X6ATl6aWtzOGq0c3g5Ng" + path = "/video.mp4" + +struct SaveCopyReferenceResult + metadata Metadata + "The metadata of the saved file or folder in the user's Dropbox." + + example default + metadata = default + +struct SaveUrlArg + path Path + "The path in Dropbox where the URL will be saved to." + url String + "The URL to be saved." + + example default + path = "/a.txt" + url = "http://example.com/a.txt" + +struct SearchArg + path PathROrId + "The path in the user's Dropbox to search. Should probably be + a folder." + query String(max_length=1000) + "The string to search for. Query string may be rewritten to improve relevance of results. + The string is split on spaces into multiple tokens. For file name searching, + the last token is used for prefix matching (i.e. \"bat c\" matches \"bat cave\" + but not \"batman car\")." + start UInt64(max_value=9999) = 0 + "The starting index within the search results (used for paging)." + max_results UInt64(max_value=1000, min_value=1) = 100 + "The maximum number of search results to return." + mode SearchMode = filename + "The search mode (filename, filename_and_content, or deleted_filename). + Note that searching file content is only available for Dropbox Business + accounts." + + example default + path = "" + query = "prime numbers" + +struct SearchMatch + match_type SearchMatchType + "The type of the match." + metadata Metadata + "The metadata for the matched file or folder." + + example default + match_type = default + metadata = default + +struct SearchMatchFieldOptions + include_highlights Boolean = false + "Whether to include highlight span from file title." + + example default + include_highlights = false + +struct SearchMatchV2 + metadata MetadataV2 + "The metadata for the matched file or folder." + match_type SearchMatchTypeV2? + "The type of the match." + highlight_spans List(HighlightSpan)? + "The list of HighlightSpan determines which parts of the file title should be highlighted." + + example default + metadata = default + highlight_spans = null + +struct SearchOptions + path PathROrId? + "Scopes the search to a path in the user's Dropbox. Searches the entire Dropbox if not specified." + max_results UInt64(max_value=1000, min_value=1) = 100 + "The maximum number of search results to return." + order_by SearchOrderBy? + "Specified property of the order of search results. By default, results are sorted by relevance." + file_status FileStatus = active + "Restricts search to the given file status." + filename_only Boolean = false + "Restricts search to only match on filenames." + file_extensions List(String)? + "Restricts search to only the extensions specified. Only supported for active file search." + file_categories List(FileCategory)? + "Restricts search to only the file categories specified. Only supported for active file search." + account_id users_common.AccountId? + "Restricts results to the given account id." + + example default + path = "/Folder" + max_results = 20 + +struct SearchResult + matches List(SearchMatch) + "A list (possibly empty) of matches for the query." + more Boolean + "Used for paging. If true, indicates there is another page of results + available that can be fetched by calling :route:`search` again." + start UInt64 + "Used for paging. Value to set the start argument to when calling + :route:`search` to fetch the next page of results." + + example default + matches = [default] + more = false + start = 1 + +struct SearchV2Arg + query String(max_length=1000) + "The string to search for. May match across multiple fields based on the request arguments." + options SearchOptions? + "Options for more targeted search results." + match_field_options SearchMatchFieldOptions? + "Options for search results match fields." + include_highlights Boolean? + "Deprecated and moved this option to SearchMatchFieldOptions." + + example default + query = "cat" + options = default + match_field_options = default + +struct SearchV2ContinueArg + cursor SearchV2Cursor + "The cursor returned by your last call to :route:`search:2`. Used to fetch the next page of results." + + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + +struct SearchV2Result + matches List(SearchMatchV2) + "A list (possibly empty) of matches for the query." + has_more Boolean + "Used for paging. If true, indicates there is another page of results + available that can be fetched by calling :route:`search/continue:2` with the cursor." + cursor SearchV2Cursor? + "Pass the cursor into :route:`search/continue:2` to fetch the next page of results." + + example default + matches = [default] + has_more = false + cursor = null + +struct ThumbnailArg + path ReadPath + "The path to the image file you want to thumbnail." + format ThumbnailFormat = jpeg + "The format for the thumbnail image, jpeg (default), png, or webp. For + images that are photos, jpeg should be preferred, while png is + better for screenshots and digital arts, and web for compression." + size ThumbnailSize = w64h64 + "The size for the thumbnail image." + mode ThumbnailMode = strict + "How to resize and crop the image to achieve the desired size." + quality ThumbnailQuality = quality_80 + "Quality of the thumbnail image." + exclude_media_info Boolean? + "Normally, :field:`FileMetadata.media_info` is set for photo and video. + When this flag is true, :field:`FileMetadata.media_info` is not populated. + This improves latency for use cases where `media_info` is not needed." + + example default + path = "/image.jpg" + format = jpeg + + example id + path = "id:a4ayc_80_OEAAAAAAAAAYa" + format = jpeg + + example rev + path = "rev:a1c10ce0dd78" + format = jpeg + +struct ThumbnailV2Arg + resource PathOrLink + "Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, + or a shared link pointing to a folder, with a relative path." + format ThumbnailFormat = jpeg + "The format for the thumbnail image, jpeg (default), png, or webp. For + images that are photos, jpeg should be preferred, while png is + better for screenshots and digital arts, and web for compression." + size ThumbnailSize = w64h64 + "The size for the thumbnail image." + mode ThumbnailMode = strict + "How to resize and crop the image to achieve the desired size." + quality ThumbnailQuality = quality_80 + "Quality of the thumbnail image." + exclude_media_info Boolean? + "Normally, :field:`FileMetadata.media_info` is set for photo and video. + When this flag is true, :field:`FileMetadata.media_info` is not populated. + This improves latency for use cases where `media_info` is not needed." + + example default + resource = default + format = jpeg + +struct UnlockFileArg + path WritePathOrId + "Path in the user's Dropbox to a file." + + example lock + path = "/John Doe/sample/test.pdf" + +struct UnlockFileBatchArg + entries List(UnlockFileArg) + "List of 'entries'. Each 'entry' contains a path of the file which will be unlocked. + Duplicate path arguments in the batch are considered only once." + + example default + entries = [lock] + +struct UploadArg extends CommitInfo + content_hash Sha256HexHash? + "A hash of the file content uploaded in this call. If provided and the uploaded content + does not match this hash, an error will be returned. For more information see our + :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." + + example default + path = "/Homework/math/Matrices.txt" + content_hash = null + +struct UploadSessionAppendArg + cursor UploadSessionCursor + "Contains the upload session ID and the offset." + close Boolean = false + "If true, the current session will be closed, at which point + you won't be able to call :route:`upload_session/append:2` + anymore with the current session." + content_hash Sha256HexHash? + "A hash of the file content uploaded in this call. If provided and the uploaded content + does not match this hash, an error will be returned. For more information see our + :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." + + example default + cursor = default + +struct UploadSessionAppendBatchArg + entries List(UploadSessionAppendBatchArgEntry, max_items=1000) + "Append information for each file in the batch." + content_hash Sha256HexHash? + "A hash of the entire request body which is all the concatenated pieces + of file content that were uploaded in this call. If provided and the + uploaded content does not match this hash, an error will be returned. + For more information see our :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." + + example default + entries = [default] + + example multiple + entries = [default, another] + +struct UploadSessionAppendBatchArgEntry + cursor UploadSessionCursor + "Contains the upload session ID and the offset." + length UInt64 + "Length in bytes of the data that should be appended for this session. + Used to split the batched upload data for multiple upload sessions." + close Boolean = false + "If true, the current session will be closed, at which point + you won't be able to call :route:`upload_session/append_batch` + anymore with the current session." + + example default + cursor = default + length = 12345 + + example another + cursor = another + length = 67890 + +struct UploadSessionAppendBatchResult + entries List(UploadSessionAppendBatchResultEntry) + "Each entry in :field:`UploadSessionAppendBatchArg.entries` will appear at the same position + inside :field:`UploadSessionAppendBatchResult.entries`." + + example default + entries = [default] + +struct UploadSessionFinishBatchArg + entries List(UploadSessionFinishArg, max_items=1000) + "Commit information for each file in the batch." + + example default + entries = [default] + + example multiple + entries = [default, another] + +struct UploadSessionFinishBatchResult + entries List(UploadSessionFinishBatchResultEntry) + "Each entry in :field:`UploadSessionFinishBatchArg.entries` will appear at the same position + inside :field:`UploadSessionFinishBatchResult.entries`." + + example default + entries = [default] + +struct UploadSessionStartArg + close Boolean = false + "If true, the current session will be closed, at which point you won't + be able to call :route:`upload_session/append:2` anymore with the + current session." + session_type UploadSessionType? + "Type of upload session you want to start. If not specified, default is + :field:`UploadSessionType.sequential`." + content_hash Sha256HexHash? + "A hash of the file content uploaded in this call. If provided and the uploaded content + does not match this hash, an error will be returned. For more information see our + :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." + + example with_close + close = false + +struct UploadSessionStartBatchArg + session_type UploadSessionType? + "Type of upload session you want to start. If not specified, default is + :field:`UploadSessionType.sequential`." + num_sessions UInt64(max_value=1000, min_value=1) + "The number of upload sessions to start." + + example default + num_sessions = 1 + +struct UploadSessionStartBatchResult + session_ids List(String) + "A List of unique identifiers for the upload session. Pass each session_id to + :route:`upload_session/append:2` and + :route:`upload_session/finish`." + + example default + session_ids = ["pid_upload_session:h-NtwvAdw3XDqqHmb0J2t0XfIaSnQw2Eor59pfZI9D_ZGNJ4Ew"] + +struct UploadSessionStartResult + session_id String + "A unique identifier for the upload session. Pass this to + :route:`upload_session/append:2` and + :route:`upload_session/finish`." + + example default + session_id = "pid_upload_session:h-NtwvAdw3XDqqHmb0J2t0XfIaSnQw2Eor59pfZI9D_ZGNJ4Ew" + +struct UploadWriteFailed + reason WriteError + "The reason why the file couldn't be saved." + upload_session_id String + "The upload session ID; data has already been uploaded to the corresponding upload + session and this ID may be used to retry the commit with :route:`upload_session/finish`." + diff --git a/files_search.stone b/files_search.stone new file mode 100644 index 0000000..803b3a5 --- /dev/null +++ b/files_search.stone @@ -0,0 +1,37 @@ +namespace files + +route search (SearchArg, SearchResult, SearchError) deprecated by search:2 + "Searches for files and folders. + + Note: Recent changes will be reflected in search results within a few seconds + and older revisions of existing files may still match your query for up to a few days." + + attrs + allow_app_folder_app = true + scope = "files.metadata.read" + +route search:2 (SearchV2Arg, SearchV2Result, SearchError) + "Searches for files and folders. + + Note: :route:`search:2` along with :route:`search/continue:2` can only be used to + retrieve a maximum of 10,000 matches. + + Recent changes may not immediately be reflected in search results due to a short delay in indexing. + Duplicate results may be returned across pages. Some results may not be returned." + + attrs + allow_app_folder_app = true + scope = "files.metadata.read" + +route search/continue:2 (SearchV2ContinueArg, SearchV2Result, SearchError) + "Fetches the next page of search results returned from :route:`search:2`. + + Note: :route:`search:2` along with :route:`search/continue:2` can only be used to + retrieve a maximum of 10,000 matches. + + Recent changes may not immediately be reflected in search results due to a short delay in indexing. + Duplicate results may be returned across pages. Some results may not be returned." + + attrs + allow_app_folder_app = true + scope = "files.metadata.read" diff --git a/openid_openid.stone b/openid_openid.stone index 497d607..8ee3661 100644 --- a/openid_openid.stone +++ b/openid_openid.stone @@ -1,5 +1,3 @@ -# @generated by protoc-gen-stone. DO NOT EDIT. -# source: configs/proto/dropbox/proto/openid/openid.proto namespace openid route userinfo (UserInfoArgs, UserInfoResult, UserInfoError) diff --git a/openid_openid_types.stone b/openid_openid_types.stone index d54a4a6..8491a7c 100644 --- a/openid_openid_types.stone +++ b/openid_openid_types.stone @@ -1,9 +1,9 @@ -# @generated by protoc-gen-stone. DO NOT EDIT. -# source: configs/proto/dropbox/proto/openid/openid_types.proto namespace openid +import account_id import common + union OpenIdError incorrect_openid_scopes "Missing openid claims for the associated access token." diff --git a/paper.stone b/paper.stone deleted file mode 100644 index a693579..0000000 --- a/paper.stone +++ /dev/null @@ -1,777 +0,0 @@ -namespace paper - "This namespace contains endpoints and data types for managing docs and folders in Dropbox Paper. - - New Paper users will see docs they create in their filesystem as '.paper' files alongside their other Dropbox content. The /paper endpoints are being deprecated and you'll need to use /files and /sharing endpoints to interact with their Paper content. Read more in the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide`." - -import common -import sharing - -alias PaperDocId = String - "Paper doc ID." - -struct RefPaperDoc - doc_id PaperDocId - "The Paper doc ID." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - -union ListPaperDocsFilterBy - docs_accessed - "Fetches all Paper doc IDs that the user has ever accessed." - docs_created - "Fetches only the Paper doc IDs that the user has created." - -union ListPaperDocsSortBy - accessed - "Sorts the Paper docs by the time they were last accessed." - modified - "Sorts the Paper docs by the time they were last modified." - created - "Sorts the Paper docs by the creation time." - -union ListPaperDocsSortOrder - ascending - "Sorts the search result in ascending order." - descending - "Sorts the search result in descending order." - -struct ListPaperDocsArgs - filter_by ListPaperDocsFilterBy = docs_accessed - "Allows user to specify how the Paper docs should be filtered." - sort_by ListPaperDocsSortBy = accessed - "Allows user to specify how the Paper docs should be sorted." - sort_order ListPaperDocsSortOrder = ascending - "Allows user to specify the sort order of the result." - limit Int32(min_value=1, max_value=1000) = 1000 - "Size limit per batch. The maximum number of docs that - can be retrieved per batch is 1000. Higher value results in invalid arguments error." - example default - filter_by = docs_created - sort_by = modified - sort_order = descending - limit = 100 - -struct ListPaperDocsContinueArgs - cursor String - "The cursor obtained from :route:`docs/list` or :route:`docs/list/continue`. - Allows for pagination." - example default - cursor = "U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd" - -struct Cursor - value String - "The actual cursor value." - expiration common.DropboxTimestamp? - "Expiration time of :field:`value`. - - Some cursors might have expiration time assigned. This is a UTC value after which - the cursor is no longer valid and the API starts returning an error. - If cursor expires a new one needs to be obtained and pagination needs to be restarted. - Some cursors might be short-lived some cursors might be long-lived. - - This really depends on the sorting type and order, e.g.: - - 1. on one hand, listing docs created by the user, sorted by the created time - ascending will have undefinite expiration because the results cannot change while - the iteration is happening. This cursor would be suitable for long term polling. - - 2. on the other hand, listing docs sorted by the last modified time will have - a very short expiration as docs do get modified very often and the modified time - can be changed while the iteration is happening thus altering the results." - example default - value = "zHZvTPBnXilGgm1AmDgVyZ10zf7qb0qznd5sAVQbbIvoteSnWLjUdLU7aR25hb" - expiration = "2016-08-07T14:56:15Z" - -struct ListPaperDocsResponse - doc_ids List(PaperDocId) - "The list of Paper doc IDs that can be used to access the given Paper docs or - supplied to other API methods. - The list is sorted in the order specified by the initial call to :route:`docs/list`." - cursor Cursor - "Pass the cursor into :route:`docs/list/continue` to paginate through all files. - The cursor preserves all properties as specified in the original call - to :route:`docs/list`." - has_more Boolean - "Will be set to True if a subsequent call with the provided cursor - to :route:`docs/list/continue` returns immediately with some results. If set to False - please allow some delay before making another call to :route:`docs/list/continue`." - - example default - doc_ids = ["zO1E7coc54sE8IuMdUoxz", "mm1AmDgVyZ10zf7qb0qzn", "dByYHZvTPBnXilGgyc5mm"] - cursor = default - has_more = true - -union ExportFormat - "The desired export format of the Paper doc." - - html - "The HTML export format." - markdown - "The markdown export format." - -struct PaperDocExport extends RefPaperDoc - export_format ExportFormat - - example default - export_format = markdown - doc_id = "uaSvRuxvnkFa12PTkBv5q" - -struct PaperDocExportResult - - owner String - "The Paper doc owner's email address." - - - title String - "The Paper doc title." - - revision Int64 - "The Paper doc revision. Simply an ever increasing number." - - mime_type String - "MIME type of the export. This corresponds to :type:`ExportFormat` specified - in the request." - - example default - owner = "james@example.com" - title = "Week one retention" - revision = 456736745 - mime_type = "text/x-markdown" - -union_closed DocSubscriptionLevel - "The subscription level of a Paper doc." - - default - "No change email messages unless you're the creator." - ignore - "Ignored: Not shown in pad lists or activity and no email message is sent." - every - "Subscribed: Shown in pad lists and activity and change email messages are sent." - no_email - "Unsubscribed: Shown in pad lists, but not in activity and no change email messages are sent." - -union_closed FolderSubscriptionLevel - "The subscription level of a Paper folder." - - none - "Not shown in activity, no email messages." - activity_only - "Shown in activity, no email messages." - daily_emails - "Shown in activity, daily email messages." - weekly_emails - "Shown in activity, weekly email messages." - -union_closed FolderSharingPolicyType - "The sharing policy of a Paper folder. - - The sharing policy of subfolders is inherited from the root folder." - team - "Everyone in your team and anyone directly invited can access this folder." - invite_only - "Only people directly invited can access this folder." - -union_closed SharingTeamPolicyType - "The sharing policy type of the Paper doc." - - people_with_link_can_edit - "Users who have a link to this doc can edit it." - people_with_link_can_view_and_comment - "Users who have a link to this doc can view and comment on it." - invite_only - "Users must be explicitly invited to this doc." - -union_closed SharingPublicPolicyType extends SharingTeamPolicyType - disabled - "Value used to indicate that doc sharing is enabled only within team." - -struct SharingPolicy - "Sharing policy of Paper doc." - - public_sharing_policy SharingPublicPolicyType? - "This value applies to the non-team members." - team_sharing_policy SharingTeamPolicyType? - "This value applies to the team members only. The value is null for all personal accounts." - - example default - public_sharing_policy = people_with_link_can_edit - team_sharing_policy = people_with_link_can_edit - -struct Folder - "Data structure representing a Paper folder." - - id String - "Paper folder ID. This ID uniquely identifies the folder." - - name String - "Paper folder name." - - example default - name = "Design docs" - id = "e.gGYT6HSafpMej9bUv306oGm60vrHiCHgEFnzziioPGCvHf" - -struct FoldersContainingPaperDoc - "Metadata about Paper folders containing the specififed Paper doc." - - folder_sharing_policy_type FolderSharingPolicyType? - "The sharing policy of the folder containing the Paper doc." - - folders List(Folder)? - "The folder path. If present the first folder is the root folder." - - example default - folder_sharing_policy_type = team - folders = [default] - -struct PaperDocSharingPolicy extends RefPaperDoc - sharing_policy SharingPolicy - "The default sharing policy to be set for the Paper doc." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - sharing_policy = default - -struct RemovePaperDocUser extends RefPaperDoc - member sharing.MemberSelector - "User which should be removed from the Paper doc. Specify only email address or - Dropbox account ID." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - member = default - -union PaperDocPermissionLevel - edit - "User will be granted edit permissions." - view_and_comment - "User will be granted view and comment permissions." - -struct AddMember - permission_level PaperDocPermissionLevel = edit - "Permission for the user." - member sharing.MemberSelector - "User which should be added to the Paper doc. Specify only email address or - Dropbox account ID." - - example default - member = default - permission_level = view_and_comment - -union UserOnPaperDocFilter - visited - "all users who have visited the Paper doc." - shared - "All uses who are shared on the Paper doc. This includes all users who have visited - the Paper doc as well as those who have not." - -struct ListUsersOnPaperDocArgs extends RefPaperDoc - limit Int32(min_value=1, max_value=1000) = 1000 - "Size limit per batch. The maximum number of users that can be retrieved per batch - is 1000. Higher value results in invalid arguments error." - - filter_by UserOnPaperDocFilter = shared - "Specify this attribute if you want to obtain users that have already accessed - the Paper doc." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - limit = 100 - filter_by = shared - -struct ListUsersOnPaperDocContinueArgs extends RefPaperDoc - cursor String - "The cursor obtained from :route:`docs/users/list` or - :route:`docs/users/list/continue`. Allows for pagination." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - cursor = "U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd" - -struct InviteeInfoWithPermissionLevel - invitee sharing.InviteeInfo - "Email address invited to the Paper doc." - - permission_level PaperDocPermissionLevel - "Permission level for the invitee." - - example default - invitee = default - permission_level = edit - - -struct UserInfoWithPermissionLevel - user sharing.UserInfo - "User shared on the Paper doc." - - permission_level PaperDocPermissionLevel - "Permission level for the user." - - example default - user = default - permission_level = view_and_comment - -struct ListUsersOnPaperDocResponse - invitees List(InviteeInfoWithPermissionLevel) - "List of email addresses with their respective permission levels - that are invited on the Paper doc." - users List(UserInfoWithPermissionLevel) - "List of users with their respective permission levels - that are invited on the Paper folder." - doc_owner sharing.UserInfo - "The Paper doc owner. This field is populated on every single response." - cursor Cursor - "Pass the cursor into :route:`docs/users/list/continue` to paginate - through all users. - The cursor preserves all properties as specified in the original call - to :route:`docs/users/list`." - has_more Boolean - "Will be set to True if a subsequent call with the provided cursor - to :route:`docs/users/list/continue` returns immediately with some results. - If set to False please allow some delay before making another call to - :route:`docs/users/list/continue`." - - example default - users = [default] - invitees = [default] - doc_owner = default - cursor = default - has_more = false - -struct AddPaperDocUser extends RefPaperDoc - members List(AddMember, max_items = 20) - "User which should be added to the Paper doc. Specify only email address or - Dropbox account ID." - - custom_message String? - "A personal message that will be emailed to each successfully added member." - - quiet Boolean = false - "Clients should set this to true if no email message shall be sent to added users." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - members = [default] - custom_message = "Welcome to Paper." - -union AddPaperDocUserResult - success - "User was successfully added to the Paper doc." - unknown_error - "Something unexpected happened when trying to add the user to the Paper doc." - sharing_outside_team_disabled - "The Paper doc can be shared only with team members." - daily_limit_reached - "The daily limit of how many users can be added to the Paper doc was reached." - user_is_owner - "Owner's permissions cannot be changed." - failed_user_data_retrieval - "User data could not be retrieved. Clients should retry." - permission_already_granted - "This user already has the correct permission to the Paper doc." - -struct AddPaperDocUserMemberResult - "Per-member result for :route:`docs/users/add`." - member sharing.MemberSelector - "One of specified input members." - result AddPaperDocUserResult - "The outcome of the action on this member." - -union PaperApiBaseError - insufficient_permissions - "Your account does not have permissions to perform this action. This may be due to it only having access to Paper as files in the Dropbox filesystem. For more information, refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide`." - -union PaperApiCursorError - expired_cursor - "The provided cursor is expired." - invalid_cursor - "The provided cursor is invalid." - wrong_user_in_cursor - "The provided cursor contains invalid user." - reset - "Indicates that the cursor has been invalidated. Call - the corresponding non-continue endpoint to obtain a new cursor." - -union DocLookupError extends PaperApiBaseError - doc_not_found - "The required doc was not found." - -union ListDocsCursorError - cursor_error PaperApiCursorError - -union ListUsersCursorError extends PaperApiBaseError - doc_not_found - "The required doc was not found." - cursor_error PaperApiCursorError - -struct ListUsersOnFolderResponse - invitees List(sharing.InviteeInfo) - "List of email addresses that are invited on the Paper folder." - users List(sharing.UserInfo) - "List of users that are invited on the Paper folder." - cursor Cursor - "Pass the cursor into :route:`docs/folder_users/list/continue` to paginate - through all users. - The cursor preserves all properties as specified in the original call - to :route:`docs/folder_users/list`." - has_more Boolean - "Will be set to True if a subsequent call with the provided cursor - to :route:`docs/folder_users/list/continue` returns immediately with some results. - If set to False please allow some delay before making another call to - :route:`docs/folder_users/list/continue`." - - example default - users = [default] - invitees = [default] - cursor = default - has_more = false - -struct ListUsersOnFolderArgs extends RefPaperDoc - limit Int32(min_value=1, max_value=1000) = 1000 - "Size limit per batch. The maximum number of users that can be retrieved per batch - is 1000. Higher value results in invalid arguments error." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - limit = 100 - -struct ListUsersOnFolderContinueArgs extends RefPaperDoc - cursor String - "The cursor obtained from :route:`docs/folder_users/list` or - :route:`docs/folder_users/list/continue`. Allows for pagination." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - cursor = "U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd" - -union ImportFormat - "The import format of the incoming data." - - html - "The provided data is interpreted as standard HTML." - markdown - "The provided data is interpreted as markdown. - - The first line of the provided document will be used as the doc title." - plain_text - "The provided data is interpreted as plain text. - - The first line of the provided document will be used as the doc title." - -struct PaperDocCreateArgs - parent_folder_id String? - "The Paper folder ID where the Paper document should be created. The API user has to have - write access to this folder or error is thrown." - import_format ImportFormat - "The format of provided data." - - example default - "Create new Paper doc (unfiled)." - import_format = markdown - - example createDocInFolder - "Create new Paper doc inside Paper folder." - import_format = html - parent_folder_id = "e.gGYT6HSafpMej9bUv306GarglI7GGeAM3yvfZvXHO9u4mV" - -struct PaperDocCreateUpdateResult - doc_id String - "Doc ID of the newly created doc." - - revision Int64 - "The Paper doc revision. Simply an ever increasing number." - - title String - "The Paper doc title." - - example default - doc_id = "uaSvRuxvnkFa12PTkBv5q" - revision = 456736745 - title = "Week one retention" - -union PaperDocCreateError extends PaperApiBaseError - content_malformed - "The provided content was malformed and cannot be imported to Paper." - folder_not_found - "The specified Paper folder is cannot be found." - doc_length_exceeded - "The newly created Paper doc would be too large. - Please split the content into multiple docs." - image_size_exceeded - "The imported document contains an image that is too large. The current limit is 1MB. - This only applies to HTML with data URI." - -union PaperDocUpdatePolicy - append - "The content will be appended to the doc." - prepend - "The content will be prepended to the doc. - - The doc title will not be affected." - overwrite_all - "The document will be overwitten at the head with the provided content." - -struct PaperDocUpdateArgs extends RefPaperDoc - doc_update_policy PaperDocUpdatePolicy - "The policy used for the current update call." - revision Int64 - "The latest doc revision. This value must match the head revision or - an error code will be returned. This is to prevent colliding writes." - import_format ImportFormat - "The format of provided data." - - example default - "Overwrite the doc content with provided content." - doc_update_policy = overwrite_all - import_format = html - doc_id = "uaSvRuxvnkFa12PTkBv5q" - revision = 12345 - - example prepend_example - "Prepend the content into the doc (the doc title will remain unchanged)." - doc_update_policy = prepend - import_format = plain_text - doc_id = "uaSvRuxvnkFa12PTkBv5q" - revision = 56556 - -union PaperDocUpdateError extends DocLookupError - content_malformed - "The provided content was malformed and cannot be imported to Paper." - revision_mismatch - "The provided revision does not match the document head." - doc_length_exceeded - "The newly created Paper doc would be too large, split the content into multiple docs." - image_size_exceeded - "The imported document contains an image that is too large. The current limit is 1MB. - This only applies to HTML with data URI." - doc_archived - "This operation is not allowed on archived Paper docs." - doc_deleted - "This operation is not allowed on deleted Paper docs." - -struct PaperFolderCreateArg - name String - "The name of the new Paper folder." - parent_folder_id String? - "The encrypted Paper folder Id where the new Paper folder should be created. The API user has to have - write access to this folder or error is thrown. If not supplied, the new folder will be created at top level." - is_team_folder Boolean? - "Whether the folder to be created should be a team folder. This value will be ignored if parent_folder_id is supplied, - as the new folder will inherit the type (private or team folder) from its parent. We will by default create a top-level - private folder if both parent_folder_id and is_team_folder are not supplied." - example default - "Create a top-level private folder." - name = "my new folder" - - example createTopLevelTeamFolder - "Create a top-level team folder." - name = "my new folder" - is_team_folder = true - - example createSubFolder - "Create a new Paper folder inside an existing folder. The new folder will be a private or - team folder depending on its parent." - name = "my new folder" - parent_folder_id = "e.gGYT6HSafpMej9bUv306GarglI7GGeAM3yvfZvXHO9u4mV" - -struct PaperFolderCreateResult - folder_id String - "Folder ID of the newly created folder." - example default - folder_id = "abcd" - -union PaperFolderCreateError extends PaperApiBaseError - folder_not_found - "The specified parent Paper folder cannot be found." - invalid_folder_id - "The folder id cannot be decrypted to valid folder id." - -route docs/folder_users/list (ListUsersOnFolderArgs, ListUsersOnFolderResponse, DocLookupError) deprecated - "Lists the users who are explicitly invited to the Paper folder in which the Paper doc - is contained. For private folders all users (including owner) shared on the folder - are listed and for team folders all non-team users shared on the folder are returned. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.read" - -route docs/folder_users/list/continue (ListUsersOnFolderContinueArgs, ListUsersOnFolderResponse, ListUsersCursorError) deprecated - "Once a cursor has been retrieved from :route:`docs/folder_users/list`, use this to - paginate through all users on the Paper folder. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.read" - -route docs/sharing_policy/get (RefPaperDoc, SharingPolicy, DocLookupError) deprecated - "Gets the default sharing policy for the given Paper doc. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.read" - -route docs/sharing_policy/set (PaperDocSharingPolicy, Void, DocLookupError) deprecated - "Sets the default sharing policy for the given Paper doc. The default 'team_sharing_policy' - can be changed only by teams, omit this field for personal accounts. - - The 'public_sharing_policy' policy can't be set to the value 'disabled' because this setting - can be changed only via the team admin console. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.write" - -route docs/archive (RefPaperDoc, Void, DocLookupError) deprecated - "Marks the given Paper doc as archived. - - This action can be performed or undone by anyone with edit permissions to the doc. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - This endpoint will be retired in September 2020. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for more information." - attrs - scope = "files.content.write" - -route docs/permanently_delete (RefPaperDoc, Void, DocLookupError) deprecated - "Permanently deletes the given Paper doc. This operation is final as the doc - cannot be recovered. - - This action can be performed only by the doc owner. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "files.permanent_delete" - -route docs/download (PaperDocExport, PaperDocExportResult, DocLookupError) deprecated - "Exports and downloads Paper doc either as HTML or markdown. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - style="download" - scope = "files.content.read" - -route docs/get_folder_info (RefPaperDoc, FoldersContainingPaperDoc, DocLookupError) deprecated - "Retrieves folder information for the given Paper doc. This includes: - - - folder sharing policy; permissions for subfolders are set by the top-level folder. - - - full 'filepath', i.e. the list of folders (both folderId and folderName) from - the root folder to the folder directly containing the Paper doc. - - - If the Paper doc is not in any folder (aka unfiled) the response will be empty. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.read" - -route docs/users/add (AddPaperDocUser, List(AddPaperDocUserMemberResult), DocLookupError) deprecated - "Allows an owner or editor to add users to a Paper doc or change their permissions - using their email address or Dropbox account ID. - - The doc owner's permissions cannot be changed. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.write" - -route docs/users/remove (RemovePaperDocUser, Void, DocLookupError) deprecated - "Allows an owner or editor to remove users from a Paper doc using their email address or - Dropbox account ID. - - The doc owner cannot be removed. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.write" - -route docs/users/list (ListUsersOnPaperDocArgs, ListUsersOnPaperDocResponse, DocLookupError) deprecated - "Lists all users who visited the Paper doc or users with explicit access. This call - excludes users who have been removed. The list is sorted by the date of the visit or - the share date. - - The list will include both users, the explicitly shared ones as well as those - who came in using the Paper url link. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.read" - -route docs/users/list/continue (ListUsersOnPaperDocContinueArgs, ListUsersOnPaperDocResponse, ListUsersCursorError) deprecated - "Once a cursor has been retrieved from :route:`docs/users/list`, use this to - paginate through all users on the Paper doc. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "sharing.read" - -route docs/list (ListPaperDocsArgs, ListPaperDocsResponse, Void) deprecated - "Return the list of all Paper docs according to the argument specifications. To iterate - over through the full pagination, pass the cursor to :route:`docs/list/continue`. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "files.metadata.read" - -route docs/list/continue (ListPaperDocsContinueArgs, ListPaperDocsResponse, ListDocsCursorError) deprecated - "Once a cursor has been retrieved from :route:`docs/list`, use this to - paginate through all Paper doc. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "files.metadata.read" - -route docs/create (PaperDocCreateArgs, PaperDocCreateUpdateResult, PaperDocCreateError) deprecated - "Creates a new Paper doc with the provided content. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - This endpoint will be retired in September 2020. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for more information." - attrs - style="upload" - scope = "files.content.write" - -route docs/update (PaperDocUpdateArgs, PaperDocCreateUpdateResult, PaperDocUpdateError) deprecated - "Updates an existing Paper doc with the provided content. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - This endpoint will be retired in September 2020. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for more information." - attrs - style="upload" - scope = "files.content.write" - -route folders/create (PaperFolderCreateArg, PaperFolderCreateResult, PaperFolderCreateError) deprecated - "Create a new Paper folder with the provided info. - - Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. - - Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." - attrs - scope = "files.content.write" diff --git a/paper_apiv2_paper.stone b/paper_apiv2_paper.stone new file mode 100644 index 0000000..c1ea563 --- /dev/null +++ b/paper_apiv2_paper.stone @@ -0,0 +1,131 @@ +namespace paper + +route docs/folder_users/list (ListUsersOnFolderArgs, ListUsersOnFolderResponse, DocLookupError) deprecated + "Lists the users who are explicitly invited to the Paper folder in which the Paper doc is contained. For private folders all users (including owner) shared on the folder are listed and for team folders all non-team users shared on the folder are returned. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.read" + +route docs/folder_users/list/continue (ListUsersOnFolderContinueArgs, ListUsersOnFolderResponse, ListUsersCursorError) deprecated + "Once a cursor has been retrieved from :route:`docs/folder_users/list`, use this to paginate through all users on the Paper folder. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.read" + +route docs/sharing_policy/get (RefPaperDoc, SharingPolicy, DocLookupError) deprecated + "Gets the default sharing policy for the given Paper doc. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.read" + +route docs/sharing_policy/set (PaperDocSharingPolicy, Void, DocLookupError) deprecated + "Sets the default sharing policy for the given Paper doc. The default 'team_sharing_policy' can be changed only by teams, omit this field for personal accounts. The 'public_sharing_policy' policy can't be set to the value 'disabled' because this setting can be changed only via the team admin console. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.write" + +route docs/archive (RefPaperDoc, Void, DocLookupError) deprecated + "Marks the given Paper doc as archived. This action can be performed or undone by anyone with edit permissions to the doc. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. This endpoint will be retired in September 2020. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for more information." + + attrs + auth = "user" + scope = "files.content.write" + +route docs/permanently_delete (RefPaperDoc, Void, DocLookupError) deprecated + "Permanently deletes the given Paper doc. This operation is final as the doc cannot be recovered. This action can be performed only by the doc owner. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "files.permanent_delete" + +route docs/download (PaperDocExport, PaperDocExportResult, DocLookupError) deprecated + "Exports and downloads Paper doc either as HTML or markdown. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "files.content.read" + style = "download" + +route docs/get_folder_info (RefPaperDoc, FoldersContainingPaperDoc, DocLookupError) deprecated + "Retrieves folder information for the given Paper doc. This includes: - folder sharing policy; permissions for subfolders are set by the top-level folder. - full 'filepath', i.e. the list of folders (both folderId and folderName) from the root folder to the folder directly containing the Paper doc. If the Paper doc is not in any folder (aka unfiled) the response will be empty. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.read" + +route docs/users/add (AddPaperDocUser, List(AddPaperDocUserMemberResult), DocLookupError) deprecated + "Allows an owner or editor to add users to a Paper doc or change their permissions using their email address or Dropbox account ID. The doc owner's permissions cannot be changed. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.write" + +route docs/users/remove (RemovePaperDocUser, Void, DocLookupError) deprecated + "Allows an owner or editor to remove users from a Paper doc using their email address or Dropbox account ID. The doc owner cannot be removed. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.write" + +route docs/users/list (ListUsersOnPaperDocArgs, ListUsersOnPaperDocResponse, DocLookupError) deprecated + "Lists all users who visited the Paper doc or users with explicit access. This call excludes users who have been removed. The list is sorted by the date of the visit or the share date. The list will include both users, the explicitly shared ones as well as those who came in using the Paper url link. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.read" + +route docs/users/list/continue (ListUsersOnPaperDocContinueArgs, ListUsersOnPaperDocResponse, ListUsersCursorError) deprecated + "Once a cursor has been retrieved from :route:`docs/users/list`, use this to paginate through all users on the Paper doc. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "sharing.read" + +route docs/list (ListPaperDocsArgs, ListPaperDocsResponse, Void) deprecated + "Return the list of all Paper docs according to the argument specifications. To iterate over through the full pagination, pass the cursor to :route:`docs/list/continue`. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "files.metadata.read" + +route docs/list/continue (ListPaperDocsContinueArgs, ListPaperDocsResponse, ListDocsCursorError) deprecated + "Once a cursor has been retrieved from :route:`docs/list`, use this to paginate through all Paper doc. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "files.metadata.read" + +route docs/create (PaperDocCreateArgs, PaperDocCreateUpdateResult, PaperDocCreateError) deprecated + "Creates a new Paper doc with the provided content. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. This endpoint will be retired in September 2020. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for more information." + + attrs + auth = "user" + scope = "files.content.write" + style = "upload" + +route docs/update (PaperDocUpdateArgs, PaperDocCreateUpdateResult, PaperDocUpdateError) deprecated + "Updates an existing Paper doc with the provided content. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. This endpoint will be retired in September 2020. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for more information." + + attrs + auth = "user" + scope = "files.content.write" + style = "upload" + +route folders/create (PaperFolderCreateArg, PaperFolderCreateResult, PaperFolderCreateError) deprecated + "Create a new Paper folder with the provided info. Note that this endpoint will continue to work for content created by users on the older version of Paper. To check which version of Paper a user is on, use /users/features/get_values. If the paper_as_files feature is enabled, then the user is running the new version of Paper. Refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide` for migration information." + + attrs + auth = "user" + scope = "files.content.write" + +route docs/get_metadata (GetDocMetadataArg, PaperDocGetMetadataResult, DocLookupError) + "Returns metadata for a Paper doc or Cloud Doc." + + attrs + auth = "user" + scope = "files.metadata.read" + diff --git a/paper_apiv2_paper_types.stone b/paper_apiv2_paper_types.stone new file mode 100644 index 0000000..b21785f --- /dev/null +++ b/paper_apiv2_paper_types.stone @@ -0,0 +1,550 @@ +namespace paper + "This namespace contains endpoints and data types for managing docs and folders in Dropbox Paper. + + New Paper users will see docs they create in their filesystem as '.paper' files alongside their other Dropbox content. The /paper endpoints are being deprecated and you'll need to use /files and /sharing endpoints to interact with their Paper content. Read more in the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide`." + +import common +import files +import sharing + +alias PaperDocId = String + +struct RefPaperDoc + doc_id PaperDocId + "The Paper doc ID." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + +union ListPaperDocsFilterBy + docs_accessed + "Fetches all Paper doc IDs that the user has ever accessed." + docs_created + "Fetches only the Paper doc IDs that the user has created." + +union ListPaperDocsSortBy + accessed + "Sorts the Paper docs by the time they were last accessed." + modified + "Sorts the Paper docs by the time they were last modified." + created + "Sorts the Paper docs by the creation time." + +union ListPaperDocsSortOrder + ascending + "Sorts the search result in ascending order." + descending + "Sorts the search result in descending order." + +struct ListPaperDocsArgs + filter_by ListPaperDocsFilterBy = docs_accessed + "Allows user to specify how the Paper docs should be filtered." + sort_by ListPaperDocsSortBy = accessed + "Allows user to specify how the Paper docs should be sorted." + sort_order ListPaperDocsSortOrder = ascending + "Allows user to specify the sort order of the result." + limit Int32(max_value=1000, min_value=1) = 1000 + "Size limit per batch. The maximum number of docs that can be retrieved per batch is 1000. Higher value results in invalid arguments error." + stop_at_date common.DropboxTimestamp? + "Do not return results beyond this date. Behavior depends on sort order." + + example default + filter_by = docs_created + sort_by = modified + sort_order = descending + limit = 100 + stop_at_date = "2024-10-11T12:34:55Z" + +struct ListPaperDocsContinueArgs + cursor String + "The cursor obtained from :route:`docs/list` or :route:`docs/list/continue`. Allows for pagination." + + example default + cursor = "U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd" + +struct Cursor + value String + "The actual cursor value." + expiration common.DropboxTimestamp? + "Expiration time of :field:`value`. Some cursors might have expiration time assigned. This is a UTC value after which the cursor is no longer valid and the API starts returning an error. If cursor expires a new one needs to be obtained and pagination needs to be restarted. Some cursors might be short-lived some cursors might be long-lived. This really depends on the sorting type and order, e.g.: 1. on one hand, listing docs created by the user, sorted by the created time ascending will have undefinite expiration because the results cannot change while the iteration is happening. This cursor would be suitable for long term polling. 2. on the other hand, listing docs sorted by the last modified time will have a very short expiration as docs do get modified very often and the modified time can be changed while the iteration is happening thus altering the results." + + example default + value = "zHZvTPBnXilGgm1AmDgVyZ10zf7qb0qznd5sAVQbbIvoteSnWLjUdLU7aR25hb" + expiration = "2016-08-07T14:56:15Z" + +struct ListPaperDocsResponse + doc_ids List(PaperDocId) + "The list of Paper doc IDs that can be used to access the given Paper docs or supplied to other API methods. The list is sorted in the order specified by the initial call to :route:`docs/list`." + cursor Cursor + "Pass the cursor into :route:`docs/list/continue` to paginate through all files. The cursor preserves all properties as specified in the original call to :route:`docs/list`." + has_more Boolean + "Will be set to True if a subsequent call with the provided cursor to :route:`docs/list/continue` returns immediately with some results. If set to False please allow some delay before making another call to :route:`docs/list/continue`." + + example default + doc_ids = ["zO1E7coc54sE8IuMdUoxz", "mm1AmDgVyZ10zf7qb0qzn", "dByYHZvTPBnXilGgyc5mm"] + cursor = default + has_more = true + +union ExportFormat + "The desired export format of the Paper doc." + html + "The HTML export format." + markdown + "The markdown export format." + json + "Doc metadata JSON export format." + +struct PaperDocExport extends RefPaperDoc + export_format ExportFormat + include_comments Boolean = false + "When true, export includes comment threads (e.g. markdown footnotes). When false or omitted, body only. + Other formats may adopt this later; currently only markdown uses it. + Plain bool (not optional): protoc-gen-godbx does not support proto3 optional yet." + + example default + export_format = markdown + doc_id = "uaSvRuxvnkFa12PTkBv5q" + +struct PaperDocExportResult + owner String + "The Paper doc owner's email address." + title String + "The Paper doc title." + revision Int64 + "The Paper doc revision. Simply an ever increasing number." + mime_type String + "MIME type of the export. This corresponds to :type:`ExportFormat` specified in the request." + + example default + owner = "james@example.com" + title = "Week one retention" + revision = 456736745 + mime_type = "text/x-markdown" + +union_closed DocSubscriptionLevel + "The subscription level of a Paper doc." + default + "No change email messages unless you're the creator." + ignore + "Ignored: Not shown in pad lists or activity and no email message is sent." + every + "Subscribed: Shown in pad lists and activity and change email messages are sent." + no_email + "Unsubscribed: Shown in pad lists, but not in activity and no change email messages are sent." + +union_closed FolderSubscriptionLevel + "The subscription level of a Paper folder." + none + "Not shown in activity, no email messages." + activity_only + "Shown in activity, no email messages." + daily_emails + "Shown in activity, daily email messages." + weekly_emails + "Shown in activity, weekly email messages." + +union_closed FolderSharingPolicyType + "The sharing policy of a Paper folder. The sharing policy of subfolders is inherited from the root folder." + team + "Everyone in your team and anyone directly invited can access this folder." + invite_only + "Only people directly invited can access this folder." + +union_closed SharingTeamPolicyType + "The sharing policy type of the Paper doc." + people_with_link_can_edit + "Users who have a link to this doc can edit it." + people_with_link_can_view_and_comment + "Users who have a link to this doc can view and comment on it." + invite_only + "Users must be explicitly invited to this doc." + +union_closed SharingPublicPolicyType extends SharingTeamPolicyType + disabled + "Value used to indicate that doc sharing is enabled only within team." + +struct SharingPolicy + "Sharing policy of Paper doc." + public_sharing_policy SharingPublicPolicyType? + "This value applies to the non-team members." + team_sharing_policy SharingTeamPolicyType? + "This value applies to the team members only. The value is null for all personal accounts." + + example default + public_sharing_policy = people_with_link_can_edit + team_sharing_policy = people_with_link_can_edit + +struct Folder + "Data structure representing a Paper folder." + id String + "Paper folder ID. This ID uniquely identifies the folder." + name String + "Paper folder name." + + example default + name = "Design docs" + id = "e.gGYT6HSafpMej9bUv306oGm60vrHiCHgEFnzziioPGCvHf" + +struct FoldersContainingPaperDoc + "Metadata about Paper folders containing the specififed Paper doc." + folder_sharing_policy_type FolderSharingPolicyType? + "The sharing policy of the folder containing the Paper doc." + folders List(Folder)? + "The folder path. If present the first folder is the root folder." + + example default + folder_sharing_policy_type = team + folders = [default] + +struct PaperDocSharingPolicy extends RefPaperDoc + sharing_policy SharingPolicy + "The default sharing policy to be set for the Paper doc." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + sharing_policy = default + +struct RemovePaperDocUser extends RefPaperDoc + member sharing.MemberSelector + "User which should be removed from the Paper doc. Specify only email address or Dropbox account ID." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + member = default + +union PaperDocPermissionLevel + edit + "User will be granted edit permissions." + view_and_comment + "User will be granted view and comment permissions." + +struct AddMember + permission_level PaperDocPermissionLevel = edit + "Permission for the user." + member sharing.MemberSelector + "User which should be added to the Paper doc. Specify only email address or Dropbox account ID." + + example default + member = default + permission_level = view_and_comment + +union UserOnPaperDocFilter + visited + "all users who have visited the Paper doc." + shared + "All uses who are shared on the Paper doc. This includes all users who have visited the Paper doc as well as those who have not." + +struct ListUsersOnPaperDocArgs extends RefPaperDoc + limit Int32(max_value=1000, min_value=1) = 1000 + "Size limit per batch. The maximum number of users that can be retrieved per batch is 1000. Higher value results in invalid arguments error." + filter_by UserOnPaperDocFilter = shared + "Specify this attribute if you want to obtain users that have already accessed the Paper doc." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + limit = 100 + filter_by = shared + +struct ListUsersOnPaperDocContinueArgs extends RefPaperDoc + cursor String + "The cursor obtained from :route:`docs/users/list` or :route:`docs/users/list/continue`. Allows for pagination." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + cursor = "U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd" + +struct InviteeInfoWithPermissionLevel + invitee sharing.InviteeInfo + "Email address invited to the Paper doc." + permission_level PaperDocPermissionLevel + "Permission level for the invitee." + + example default + invitee = default + permission_level = edit + +struct UserInfoWithPermissionLevel + user sharing.UserInfo + "User shared on the Paper doc." + permission_level PaperDocPermissionLevel + "Permission level for the user." + + example default + user = default + permission_level = view_and_comment + +struct ListUsersOnPaperDocResponse + invitees List(InviteeInfoWithPermissionLevel) + "List of email addresses with their respective permission levels that are invited on the Paper doc." + users List(UserInfoWithPermissionLevel) + "List of users with their respective permission levels that are invited on the Paper folder." + doc_owner sharing.UserInfo + "The Paper doc owner. This field is populated on every single response." + cursor Cursor + "Pass the cursor into :route:`docs/users/list/continue` to paginate through all users. The cursor preserves all properties as specified in the original call to :route:`docs/users/list`." + has_more Boolean + "Will be set to True if a subsequent call with the provided cursor to :route:`docs/users/list/continue` returns immediately with some results. If set to False please allow some delay before making another call to :route:`docs/users/list/continue`." + + example default + users = [default] + invitees = [default] + doc_owner = default + cursor = default + has_more = false + +struct AddPaperDocUser extends RefPaperDoc + members List(AddMember, max_items=20) + "User which should be added to the Paper doc. Specify only email address or Dropbox account ID." + custom_message String? + "A personal message that will be emailed to each successfully added member." + quiet Boolean = false + "Clients should set this to true if no email message shall be sent to added users." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + members = [default] + custom_message = "Welcome to Paper." + +union AddPaperDocUserResult + success + "User was successfully added to the Paper doc." + unknown_error + "Something unexpected happened when trying to add the user to the Paper doc." + sharing_outside_team_disabled + "The Paper doc can be shared only with team members." + daily_limit_reached + "The daily limit of how many users can be added to the Paper doc was reached." + user_is_owner + "Owner's permissions cannot be changed." + failed_user_data_retrieval + "User data could not be retrieved. Clients should retry." + permission_already_granted + "This user already has the correct permission to the Paper doc." + +struct AddPaperDocUserMemberResult + "Per-member result for :route:`docs/users/add`." + member sharing.MemberSelector + "One of specified input members." + result AddPaperDocUserResult + "The outcome of the action on this member." + +union PaperApiBaseError + insufficient_permissions + "Your account does not have permissions to perform this action. This may be due to it only having access to Paper as files in the Dropbox filesystem. For more information, refer to the :link:`Paper Migration Guide https://www.dropbox.com/lp/developers/reference/paper-migration-guide`." + +union PaperApiCursorError + expired_cursor + "The provided cursor is expired." + invalid_cursor + "The provided cursor is invalid." + wrong_user_in_cursor + "The provided cursor contains invalid user." + reset + "Indicates that the cursor has been invalidated. Call the corresponding non-continue endpoint to obtain a new cursor." + +union DocLookupError extends PaperApiBaseError + doc_not_found + "The required doc was not found." + +union ListDocsCursorError + cursor_error PaperApiCursorError + +union ListUsersCursorError extends PaperApiBaseError + doc_not_found + "The required doc was not found." + cursor_error PaperApiCursorError + +struct ListUsersOnFolderResponse + invitees List(sharing.InviteeInfo) + "List of email addresses that are invited on the Paper folder." + users List(sharing.UserInfo) + "List of users that are invited on the Paper folder." + cursor Cursor + "Pass the cursor into :route:`docs/folder_users/list/continue` to paginate through all users. The cursor preserves all properties as specified in the original call to :route:`docs/folder_users/list`." + has_more Boolean + "Will be set to True if a subsequent call with the provided cursor to :route:`docs/folder_users/list/continue` returns immediately with some results. If set to False please allow some delay before making another call to :route:`docs/folder_users/list/continue`." + + example default + users = [default] + invitees = [default] + cursor = default + has_more = false + +struct ListUsersOnFolderArgs extends RefPaperDoc + limit Int32(max_value=1000, min_value=1) = 1000 + "Size limit per batch. The maximum number of users that can be retrieved per batch is 1000. Higher value results in invalid arguments error." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + limit = 100 + +struct ListUsersOnFolderContinueArgs extends RefPaperDoc + cursor String + "The cursor obtained from :route:`docs/folder_users/list` or :route:`docs/folder_users/list/continue`. Allows for pagination." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + cursor = "U60b6BxT43ySd5sAVQbbIvoteSnWLjUdLU7aR25hbt3ySd5sAVQbbIvoteSnWLjUd" + +union ImportFormat + "The import format of the incoming data." + html + "The provided data is interpreted as standard HTML." + markdown + "The provided data is interpreted as markdown. The first line of the provided document will be used as the doc title." + plain_text + "The provided data is interpreted as plain text. The first line of the provided document will be used as the doc title." + +struct PaperDocCreateArgs + parent_folder_id String? + "The Paper folder ID where the Paper document should be created. The API user has to have write access to this folder or error is thrown." + import_format ImportFormat + "The format of provided data." + + example default + import_format = markdown + + example createDocInFolder + import_format = html + parent_folder_id = "e.gGYT6HSafpMej9bUv306GarglI7GGeAM3yvfZvXHO9u4mV" + +struct PaperDocCreateUpdateResult + doc_id String + "Doc ID of the newly created doc." + revision Int64 + "The Paper doc revision. Simply an ever increasing number." + title String + "The Paper doc title." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + revision = 456736745 + title = "Week one retention" + +union PaperDocCreateError extends PaperApiBaseError + content_malformed + "The provided content was malformed and cannot be imported to Paper." + folder_not_found + "The specified Paper folder is cannot be found." + doc_length_exceeded + "The newly created Paper doc would be too large. Please split the content into multiple docs." + image_size_exceeded + "The imported document contains an image that is too large. The current limit is 1MB. This only applies to HTML with data URI." + +union PaperDocUpdatePolicy + append + "The content will be appended to the doc." + prepend + "The content will be prepended to the doc. The doc title will not be affected." + overwrite_all + "The document will be overwitten at the head with the provided content." + +struct PaperDocUpdateArgs extends RefPaperDoc + doc_update_policy PaperDocUpdatePolicy + "The policy used for the current update call." + revision Int64 + "The latest doc revision. This value must match the head revision or an error code will be returned. This is to prevent colliding writes." + import_format ImportFormat + "The format of provided data." + + example default + doc_update_policy = overwrite_all + import_format = html + doc_id = "uaSvRuxvnkFa12PTkBv5q" + revision = 12345 + + example prepend_example + doc_update_policy = prepend + import_format = plain_text + doc_id = "uaSvRuxvnkFa12PTkBv5q" + revision = 56556 + +union PaperDocUpdateError extends DocLookupError + content_malformed + "The provided content was malformed and cannot be imported to Paper." + revision_mismatch + "The provided revision does not match the document head." + doc_length_exceeded + "The newly created Paper doc would be too large, split the content into multiple docs." + image_size_exceeded + "The imported document contains an image that is too large. The current limit is 1MB. This only applies to HTML with data URI." + doc_archived + "This operation is not allowed on archived Paper docs." + doc_deleted + "This operation is not allowed on deleted Paper docs." + +struct PaperFolderCreateArg + name String + "The name of the new Paper folder." + parent_folder_id String? + "The encrypted Paper folder Id where the new Paper folder should be created. The API user has to have write access to this folder or error is thrown. If not supplied, the new folder will be created at top level." + is_team_folder Boolean? + "Whether the folder to be created should be a team folder. This value will be ignored if parent_folder_id is supplied, as the new folder will inherit the type (private or team folder) from its parent. We will by default create a top-level private folder if both parent_folder_id and is_team_folder are not supplied." + + example default + name = "my new folder" + + example createTopLevelTeamFolder + name = "my new folder" + is_team_folder = true + + example createSubFolder + name = "my new folder" + parent_folder_id = "e.gGYT6HSafpMej9bUv306GarglI7GGeAM3yvfZvXHO9u4mV" + +struct PaperFolderCreateResult + folder_id String + "Folder ID of the newly created folder." + + example default + folder_id = "abcd" + +union PaperFolderCreateError extends PaperApiBaseError + folder_not_found + "The specified parent Paper folder cannot be found." + invalid_folder_id + "The folder id cannot be decrypted to valid folder id." + +union PaperDocStatus + "The status of a Paper doc." + active + "The Paper doc is active." + deleted + "The Paper doc is deleted." + +struct GetDocMetadataArg + "Argument for retrieving Paper doc metadata. Accepts either a legacy Paper doc ID or a Cloud Doc file ID." + doc_id PaperDocId? + "Legacy Paper doc identifier." + file_id files.FileId? + "Dropbox file ID for Cloud Docs (post-PiFS migration)." + +struct PaperDocGetMetadataResult + "Metadata returned by docs/get_metadata." + doc_id PaperDocId + "The Paper doc ID." + owner String + "The Paper doc owner's email address." + title String + "The Paper doc title." + created_date common.DropboxTimestamp + "The Paper doc creation date." + status PaperDocStatus + "The Paper doc status." + revision Int64 + "The Paper doc revision. Simply an ever increasing number." + last_updated_date common.DropboxTimestamp + "The date when the Paper doc was last edited." + last_editor String + "The email address of the last editor of the Paper doc." + + example default + doc_id = "uaSvRuxvnkFa12PTkBv5q" + owner = "steph@example.com" + title = "Onbaording Doc" + created_date = "2016-01-20T00:00:00Z" + status = active + revision = 56556 + last_updated_date = "2017-01-02T00:00:00Z" + last_editor = "stephen@example.com" + diff --git a/riviera_api_v2_riviera_api_v2.stone b/riviera_api_v2_riviera_api_v2.stone new file mode 100644 index 0000000..ea6d314 --- /dev/null +++ b/riviera_api_v2_riviera_api_v2.stone @@ -0,0 +1,127 @@ +namespace riviera + +import async +import common + +union ErrorCode + unknown_error + bad_request + "400" + api_error + "409" + access_error + "403" + ratelimit_error + "429" + unavailable + "503" + + +union TimestampLevel + unknown + sentence + word + + +struct MediaDurationError + limit Int32 = 0 + +union ContentApiV2Error + server_error String = "" + user_error String = "" + media_duration_error MediaDurationError + no_audio_error + link_download_disabled_error + shared_link_password_protected + limit_exceeded_error + +struct GetTranscriptAsyncError + error_code ErrorCode = unknown_error + error_details ContentApiV2Error? + +union FileIdOrUrl + file_id String = "" + url String = "" + path String = "" + +struct GetTranscriptArgs + "Arguments for the asynchronous `get_transcript_async` route. + Exactly one of `file_id`, `path`, or `url` must be supplied via + `file_id_or_url` to identify the audio or video asset to transcribe." + file_id_or_url FileIdOrUrl? + "Identifier of the media asset to transcribe. Callers must set exactly + one of the oneof variants: + - file_id: a Dropbox-issued file id (format: \"id:\") for a file the + authenticated user has access to. + - path: an absolute Dropbox path, e.g. \"/folder/recording.mp4\". + - url: either a Dropbox shared link (www.dropbox.com) or an external + HTTPS URL pointing to a supported audio/video file. + - Dropbox shared links are resolved internally using the caller's + authenticated identity and the link's visibility / download + settings. They therefore require an authenticated user context + (anonymous `url` requests against Dropbox links are rejected with + an `ACCESS_ERROR`). Links protected by a password are rejected + with `shared_link_password_protected`; links with downloads + disabled are rejected with `link_download_disabled_error`. + - External URLs are fetched over HTTPS through the backend's + egress proxy and must point at a supported audio/video file + extension. + The referenced asset must be an audio or video file in a supported + format; requests against files with no audio track return a + `no_audio_error`." + timestamp_level TimestampLevel = unknown + "Granularity of the time offsets returned for each transcript segment. + Defaults to `SENTENCE. + - SENTENCE: one segment per spoken sentence (recommended). + - WORD: one segment per word, useful for fine-grained alignment such + as captioning or highlight-as-you-listen experiences." + included_special_words String = "" + "Comma-delimited list of non-lexical filler words to preserve in the + transcript output, e.g. `\"uh, ah, uhm\"`. By default these fillers are + stripped. Unrecognized tokens are ignored. Leave empty to use the + default filtering behavior." + audio_language String = "" + "Optional BCP-47 language tag hinting the spoken language of the source + audio (e.g. \"en-US\", \"ja-JP\"). When empty, the service auto-detects the + language; supplying a hint improves accuracy and latency for short or + ambiguous clips. Unsupported languages fall back to auto-detection." + +struct ApiTranscriptSegment + "Transcript segment for APIv2" + text String = "" + start_time Float64 = 0 + end_time Float64 = 0 + +struct ApiStructuredTranscript + "Structured transcript for APIv2" + segments List(ApiTranscriptSegment)? + transcript_locale String = "" + +struct GetTranscriptResult + structured_transcript ApiStructuredTranscript? + "The structured transcript produced for the requested media asset, with + per-segment text, start/end offsets (in seconds from the beginning of + the media), and the detected or caller-supplied locale." + +union GetTranscriptAsyncCheckResult + "Result type for EventBus async check - must end in \"CheckResult\"" + in_progress + complete GetTranscriptResult + failed GetTranscriptAsyncError + +route get_transcript_async (GetTranscriptArgs, async.LaunchResultBase, Void) + "Asynchronous transcript generation for audio and video files." + + attrs + auth = "app, user" + is_preview = true + scope = "files.content.read" + +route get_transcript_async/check (async.PollArg, GetTranscriptAsyncCheckResult, async.PollError) + "Returns the status or result of specified get_transcript_async task." + + attrs + auth = "app, user" + is_preview = true + scope = "files.content.read" + diff --git a/secondary_emails.stone b/secondary_emails_secondary_emails.stone similarity index 98% rename from secondary_emails.stone rename to secondary_emails_secondary_emails.stone index 300dea4..f7f8f42 100644 --- a/secondary_emails.stone +++ b/secondary_emails_secondary_emails.stone @@ -5,18 +5,18 @@ import common struct SecondaryEmail email common.EmailAddress "Secondary email address." - is_verified Boolean "Whether or not the secondary email address is verified to be owned by a user." example default email = "apple@orange.com" is_verified = true - + example second_sec_email email = "banana@honeydew.com" is_verified = true - + example third_sec_email email = "grape@strawberry.com" is_verified = false + diff --git a/seen_state.stone b/seen_state_apiv2_seen_state.stone similarity index 99% rename from seen_state.stone rename to seen_state_apiv2_seen_state.stone index c0584f6..6b73451 100644 --- a/seen_state.stone +++ b/seen_state_apiv2_seen_state.stone @@ -16,3 +16,4 @@ union PlatformType "The content was viewed on an unknown platform." mobile "The content was viewed on a mobile client. DEPRECATED: Use mobile_ios or mobile_android instead." + diff --git a/sharing.stone b/sharing.stone deleted file mode 100644 index 1c8925e..0000000 --- a/sharing.stone +++ /dev/null @@ -1,7 +0,0 @@ -namespace sharing - "This namespace contains endpoints and data types for creating and managing shared links and - shared folders." - -import common -import files -import users diff --git a/sharing_apiv2_file_metadata_service.stone b/sharing_apiv2_file_metadata_service.stone new file mode 100644 index 0000000..2951487 --- /dev/null +++ b/sharing_apiv2_file_metadata_service.stone @@ -0,0 +1,10 @@ +namespace sharing + +route get_file_metadata (GetFileMetadataArg, SharedFileMetadata, GetFileMetadataError) + "Returns shared file metadata." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "team_admin" + diff --git a/sharing_apiv2_list_file_member_service.stone b/sharing_apiv2_list_file_member_service.stone new file mode 100644 index 0000000..82fe6d6 --- /dev/null +++ b/sharing_apiv2_list_file_member_service.stone @@ -0,0 +1,11 @@ +namespace sharing + +route list_file_members (ListFileMembersArg, SharedFileMembers, ListFileMembersError) + "Use to obtain the members who have been invited to a file, both inherited + and uninherited members." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "whole_team" + diff --git a/sharing_apiv2_list_shared_links_api_v2.stone b/sharing_apiv2_list_shared_links_api_v2.stone new file mode 100644 index 0000000..9b4214a --- /dev/null +++ b/sharing_apiv2_list_shared_links_api_v2.stone @@ -0,0 +1,17 @@ +namespace sharing + +route list_shared_links (ListSharedLinksArg, ListSharedLinksResult, ListSharedLinksError) + "List shared links of this user. + If no path is given, returns a list of all shared links for the current user. For members of + business teams using team space and member folders, returns all shared links in the team + member's home folder unless the team space ID is specified in the request header. + If a non-empty path is given, returns a list of all shared links that allow access to the + given path - direct links to the given path and links to parent folders of the given path. + Links to parent folders can be suppressed by setting direct_only to true." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "sharing.read" + select_admin_mode = "whole_team" + diff --git a/shared_content_links.stone b/sharing_apiv2_shared_content_links.stone similarity index 98% rename from shared_content_links.stone rename to sharing_apiv2_shared_content_links.stone index dcc9d0f..d7c74a2 100644 --- a/shared_content_links.stone +++ b/sharing_apiv2_shared_content_links.stone @@ -2,7 +2,6 @@ namespace sharing import common - union LinkExpiry remove_expiry "Remove the currently set expiry for the link." @@ -10,25 +9,11 @@ union LinkExpiry "Set a new expiry or change an existing expiry." union LinkPassword - remove_password "Remove the currently set password for the link." - set_password String "Set a new password or change an existing password." -struct LinkSettings - "Settings that apply to a link." - access_level AccessLevel? - "The access level on the link for this file. Currently, - it only accepts 'viewer' and 'viewer_no_comment'." - audience LinkAudience? - "The type of audience on the link for this file." - expiry LinkExpiry? - "An expiry timestamp to set on a link." - password LinkPassword? - "The password for the link." - union LinkAudience public "Link is accessible by anyone." @@ -44,16 +29,6 @@ union LinkAudience members "Link is accessible only by members of the content." -struct LinkPermission - "Permissions for actions that can be performed on a link." - action LinkAction - allow Boolean - reason PermissionDeniedReason? - - example default - action = change_audience - allow = true - union LinkAction "Actions that can be performed on a link." change_access_level @@ -69,6 +44,28 @@ union LinkAction set_password "Create or modify the password of the link." +struct LinkSettings + "Settings that apply to a link." + access_level AccessLevel? + "The access level on the link for this file. Currently, + it only accepts 'viewer' and 'viewer_no_comment'." + audience LinkAudience? + "The type of audience on the link for this file." + expiry LinkExpiry? + "An expiry timestamp to set on a link." + password LinkPassword? + "The password for the link." + +struct LinkPermission + "Permissions for actions that can be performed on a link." + action LinkAction + allow Boolean + reason PermissionDeniedReason? + + example default + action = change_audience + allow = true + struct SharedContentLinkMetadataBase access_level AccessLevel? "The access level on the link for this file." @@ -84,7 +81,7 @@ struct SharedContentLinkMetadataBase "The current audience of the link." expiry common.DropboxTimestamp? "Whether the link has an expiry set on it. A link with an expiry will have its - audience changed to members when the expiry is reached." + audience changed to members when the expiry is reached." link_permissions List(LinkPermission) "A list of permissions for actions you can perform on the link." password_protected Boolean @@ -92,12 +89,10 @@ struct SharedContentLinkMetadataBase struct SharedContentLinkMetadata extends SharedContentLinkMetadataBase "Metadata of a shared link for a file or folder." - audience_exceptions AudienceExceptions? "The content inside this folder with link audience different than this folder's. This is only returned when an endpoint that returns metadata for a single shared folder is called, e.g. /get_folder_metadata." - url String "The URL of the link." @@ -148,3 +143,4 @@ struct AudienceExceptionContentInfo example default name = "sample file name" + diff --git a/sharing_apiv2_shared_link_file_api_v2.stone b/sharing_apiv2_shared_link_file_api_v2.stone new file mode 100644 index 0000000..8924313 --- /dev/null +++ b/sharing_apiv2_shared_link_file_api_v2.stone @@ -0,0 +1,13 @@ +namespace sharing + +route get_shared_link_file (GetSharedLinkFileArg, SharedLinkMetadata, GetSharedLinkFileError) + "Download the shared link's file from a user's Dropbox. + This is a download-style endpoint that returns the file content." + + attrs + allow_app_folder_app = true + auth = "app, user" + host = "content" + scope = "sharing.read" + style = "download" + diff --git a/sharing_apiv2_shared_links_api_v2.stone b/sharing_apiv2_shared_links_api_v2.stone new file mode 100644 index 0000000..c7108c5 --- /dev/null +++ b/sharing_apiv2_shared_links_api_v2.stone @@ -0,0 +1,35 @@ +namespace sharing + +route create_shared_link_with_settings (CreateSharedLinkWithSettingsArg, SharedLinkMetadata, CreateSharedLinkWithSettingsError) + "Create a shared link with custom settings. + If no settings are given then the default visibility is RequestedVisibility.public + (The resolved visibility, though, may depend on other aspects such as team and shared folder + settings)." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route get_shared_link_metadata (GetSharedLinkMetadataArg, SharedLinkMetadata, SharedLinkMetadataError) + "Get the shared link's metadata." + + attrs + allow_app_folder_app = true + auth = "app, user" + scope = "sharing.read" + +route modify_shared_link_settings (ModifySharedLinkSettingsArgs, SharedLinkMetadata, ModifySharedLinkSettingsError) + "Modify the shared link's settings. + If the requested visibility conflict with the shared links policy of the team or the + shared folder (in case the linked file is part of a shared folder) then the + LinkPermissions.resolved_visibility of the returned SharedLinkMetadata will + reflect the actual visibility of the shared link and the + LinkPermissions.requested_visibility will reflect the requested visibility." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "sharing.write" + diff --git a/sharing_apiv2_shared_links_sharing_api_v2.stone b/sharing_apiv2_shared_links_sharing_api_v2.stone new file mode 100644 index 0000000..932195c --- /dev/null +++ b/sharing_apiv2_shared_links_sharing_api_v2.stone @@ -0,0 +1,43 @@ +namespace sharing + +route create_shared_link (CreateSharedLinkArg, PathLinkMetadata, CreateSharedLinkError) deprecated + "Create a shared link. + If a shared link already exists for the given path, that link is returned. + Previously, it was technically possible to break a shared link by moving or + renaming the corresponding file or folder. In the future, this will no + longer be the case, so your app shouldn't rely on this behavior. Instead, if + your app needs to revoke a shared link, use revoke_shared_link. + DEPRECATED: Use create_shared_link_with_settings instead." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route get_shared_links (GetSharedLinksArg, GetSharedLinksResult, GetSharedLinksError) deprecated + "Returns a list of :type:`LinkMetadata` objects for this user, including collection links. + If no path is given, returns a list of all shared links for the current user, + including collection links, up to a maximum of 1000 links. + If a non-empty path is given, returns a list of all shared links that allow access + to the given path. Collection links are never returned in this case. + DEPRECATED: Use list_shared_links instead." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "sharing.read" + +route revoke_shared_link (RevokeSharedLinkArg, Void, RevokeSharedLinkError) + "Revoke a shared link. + Note that even after revoking a shared link to a file, the file may be accessible if there are + shared links leading to any of the file parent folders. To list all shared links that enable + access to a specific file, you can use the list_shared_links with the file as the + ListSharedLinksArg.path argument." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + diff --git a/shared_links.stone b/sharing_apiv2_shared_links_types.stone similarity index 81% rename from shared_links.stone rename to sharing_apiv2_shared_links_types.stone index 5b2a5d7..655d92c 100644 --- a/shared_links.stone +++ b/sharing_apiv2_shared_links_types.stone @@ -2,30 +2,96 @@ namespace sharing import common import files +import team_policies import users +alias GetSharedLinkFileArg = GetSharedLinkMetadataArg + alias Id = files.Id + alias Path = files.Path + +alias ReadPath = files.ReadPath + alias Rev = files.Rev + alias TeamInfo = users.Team -alias ReadPath = files.ReadPath -# -# Link Metadata definitions and route -# +union AlphaResolvedVisibility extends ResolvedVisibility + "check documentation for ResolvedVisibility." -struct GetSharedLinkMetadataArg - url String - "URL of the shared link." - path Path? - "If the shared link is to a folder, this parameter can be used to retrieve the metadata for - a specific file or sub-folder in this folder. A relative path should be used." - link_password String? - "If the shared link has a password, this parameter can be used." +union CreateSharedLinkError + path files.LookupError - example default - url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0" - path = "/Prime_Numbers.txt" +union_closed CreateSharedLinkWithSettingsError + path files.LookupError + email_not_verified + "This user's email address is not verified. This functionality is only + available on accounts with a verified email address. Users can verify + their email address :link:`here https://www.dropbox.com/help/317`." + shared_link_already_exists SharedLinkAlreadyExistsMetadata? + "The shared link already exists. You can call :route:`list_shared_links` to get the + existing link, or use the provided metadata if it is returned. + Existing link metadata will not be returned if custom settings were specified in the request that could make the existing link incompatible with the requested settings." + settings_error SharedLinkSettingsError + "There is an error with the given settings." + access_denied + "The user is not allowed to create a shared link to the specified file. For + example, this can occur if the file is restricted or if the user's links are + :link:`banned https://help.dropbox.com/files-folders/share/banned-links`." + banned_member + "The current user has been :link:`banned https://help.dropbox.com/files-folders/share/banned-links` for abuse reasons." + too_many_shared_folders + "Your Dropbox folder will have too many shared folders after the operation. + https://help.dropbox.com/share/shared-folder-faq#Is-there-a-limit-to-the-number-of-shared-folders-I-can-create" + +union GetSharedLinkFileError extends SharedLinkError + shared_link_is_directory + "Directories cannot be retrieved by this endpoint." + +union GetSharedLinksError + path files.MalformedPathError + +union LinkAccessLevel + viewer + "Users who use the link can view and comment on the content." + editor + "Users who use the link can edit, view and comment on the content." + +union LinkAudienceDisallowedReason extends VisibilityPolicyDisallowedReason + "check documentation for VisibilityPolicyDisallowedReason." + +union ListSharedLinksError + path files.LookupError + reset + "Indicates that the cursor has been invalidated. Call + :route:`list_shared_links` to obtain a new cursor." + +union ModifySharedLinkSettingsError extends SharedLinkError + settings_error SharedLinkSettingsError + "There is an error with the given settings." + email_not_verified + "This user's email address is not verified. This functionality is only + available on accounts with a verified email address. Users can verify + their email address :link:`here https://www.dropbox.com/help/317`." + +union_closed PendingUploadMode + "Flag to indicate pending upload default (for linking to not-yet-existing paths)." + file + "Assume pending uploads are files." + folder + "Assume pending uploads are folders." + +union RequestedLinkAccessLevel + viewer + "Users who use the link can view and comment on the content." + editor + "Users who use the link can edit, view and comment on the content. + Note not all file types support edit links yet." + max + "Request for the maximum access level you can set the link to." + default + "Request for the default access level the user has set." union_closed RequestedVisibility "The access permission that can be requested by the caller for the shared link. @@ -33,7 +99,6 @@ union_closed RequestedVisibility such as team and shared folder settings. Check the :type:`ResolvedVisibility` for more info on the possible resolved visibility values of shared links." - public "Anyone who has received the link can access it. No login required." team_only @@ -48,7 +113,6 @@ union ResolvedVisibility extends RequestedVisibility preferences and the team and shared folder settings. Check the :type:`RequestedVisibility` for more info on the possible visibility values that can be set by the shared link's owner." - team_and_password "Only members of the same team who have the link-specific password can access the link. Login is required." @@ -62,6 +126,9 @@ union ResolvedVisibility extends RequestedVisibility only_you "Only the current user can view this link." +union RevokeSharedLinkError extends SharedLinkError + shared_link_malformed + "Shared link is malformed." union SharedLinkAccessFailureReason login_required @@ -77,131 +144,115 @@ union SharedLinkAccessFailureReason owner_only "Access is allowed for the shared link's owner only." -struct LinkPermissions - resolved_visibility ResolvedVisibility? - "The current visibility of the link after considering the shared links policies of the - the team (in case the link's owner is part of a team) and the shared folder (in case the - linked file is part of a shared folder). This field is shown only if the caller has access - to this info (the link's owner always has access to this data). For some links, an - effective_audience value is returned instead." - requested_visibility RequestedVisibility? - "The shared link's requested visibility. This can be overridden by the team and shared - folder policies. The final visibility, after considering these policies, can be found in - :field:`resolved_visibility`. This is shown only if the caller is the link's - owner and resolved_visibility is returned instead of effective_audience." - can_revoke Boolean - "Whether the caller can revoke the shared link." - revoke_failure_reason SharedLinkAccessFailureReason? - "The failure reason for revoking the link. This field will only be present if the - :field:`can_revoke` is :val:`false`." - effective_audience LinkAudience? - "The type of audience who can benefit from the access level specified by the - `link_access_level` field." - link_access_level LinkAccessLevel? - "The access level that the link will grant to its users. A link can grant additional rights - to a user beyond their current access level. For example, if a user was invited as a viewer - to a file, and then opens a link with `link_access_level` set to `editor`, then they will - gain editor privileges. The `link_access_level` is a property of the link, and does not - depend on who is calling this API. In particular, `link_access_level` does not take into - account the API caller's current permissions to the content." - visibility_policies List(VisibilityPolicy) - "A list of policies that the user might be able to set for the visibility." - can_set_expiry Boolean - "Whether the user can set the expiry settings of the link. This refers to the ability to - create a new expiry and modify an existing expiry." - can_remove_expiry Boolean - "Whether the user can remove the expiry of the link." - allow_download Boolean - "Whether the link can be downloaded or not." - can_allow_download Boolean - "Whether the user can allow downloads via the link. This refers to the ability to remove a - no-download restriction on the link." - can_disallow_download Boolean - "Whether the user can disallow downloads via the link. This refers to the ability to impose - a no-download restriction on the link." - allow_comments Boolean - "Whether comments are enabled for the linked file. This takes the team commenting policy into account." - team_restricts_comments Boolean - "Whether the team has disabled commenting globally." - audience_options List(LinkAudienceOption)? - "A list of link audience options the user might be able to set as the new audience." - can_set_password Boolean? - "Whether the user can set a password for the link." - can_remove_password Boolean? - "Whether the user can remove the password of the link." - require_password Boolean? - "Whether the user is required to provide a password to view the link." - can_use_extended_sharing_controls Boolean? - "Whether the user can use extended sharing controls, based on their account type." +union SharedLinkAlreadyExistsMetadata + metadata SharedLinkMetadata + "Metadata of the shared link that already exists." - example default - resolved_visibility = public - can_revoke = false - revoke_failure_reason = owner_only - visibility_policies = [public, password] - can_set_expiry = false - can_remove_expiry = false - allow_download = true - can_allow_download = true - can_disallow_download = false - allow_comments = true - team_restricts_comments = true - audience_options = [public, team, no_one] - can_set_password = true - can_remove_password = true - require_password = false - can_use_extended_sharing_controls = false +union SharedLinkError + shared_link_not_found + "The shared link wasn't found." + shared_link_access_denied + "The caller is not allowed to access this shared link." + unsupported_link_type + "This type of link is not supported; use :route:`files.export` instead." + unsupported_parameter_field + "Private shared links do not support `path` or `link_password` parameter fields." -struct TeamMemberInfo - "Information about a team member." +union SharedLinkMetadataError extends SharedLinkError + "The potential errors for a call to get_shared_link_metadata." - team_info TeamInfo - "Information about the member's team." +union_closed SharedLinkSettingsError + invalid_settings + "The given settings are invalid + (for example, all attributes of the :type:`SharedLinkSettings` are empty, + the requested visibility is :field:`RequestedVisibility.password` but the + :field:`SharedLinkSettings.link_password` is missing, :field:`SharedLinkSettings.expires` + is set to the past, etc.)." + not_authorized + "User is not allowed to modify the settings of this link. Note that basic + users can only set :field:`RequestedVisibility.public` + as the :field:`SharedLinkSettings.requested_visibility` and cannot + set :field:`SharedLinkSettings.expires`." - display_name String - "The display name of the user." +union Visibility + "Who can access a shared link. + The most open visibility is :field:`public`. + The default depends on many aspects, such as team and user + preferences and shared folder settings." + public + "Anyone who has received the link can access it. No login required." + team_only + "Only members of the same team can + access the link. Login is required." + password + "A link-specific password is required to access the + link. Login is not required." + team_and_password + "Only members of the same team who + have the link-specific password can access the link." + shared_folder_only + "Only members of the shared folder containing the linked file + can access the link. Login is required." - member_id String? - "ID of user as a member of a team. This field will only be present if the member is in the - same team as current user." +union VisibilityPolicyDisallowedReason + delete_and_recreate + "The user needs to delete and recreate the link to change the visibility policy." + restricted_by_shared_folder + "The parent shared folder restricts sharing of links outside the shared folder. To change + the visibility policy, remove the restriction from the parent shared folder." + restricted_by_team + "The team policy prevents links being shared outside the team." + user_not_on_team + "The user needs to be on a team to set this policy." + user_account_type + "The user is a basic user or is on a limited team." + permission_denied + "The user does not have permission." + +union ChangeLinkExpirationPolicy + "Enumerates acceptable values for team's ChangeLinkExpirationPolicy setting." + allowed + not_allowed + +struct LinkMetadata + "Metadata for a shared link. This can be either a + :type:`PathLinkMetadata` or :type:`CollectionLinkMetadata`." + union + path PathLinkMetadata + collection CollectionLinkMetadata + url String + "URL of the shared link." + visibility Visibility + "Who can access the link." + expires common.DropboxTimestamp? + "Expiration time, if set. By default the link won't expire." example default - team_info = default - display_name = "Roger Rabbit" - member_id = "dbmid:abcd1234" + path = default struct SharedLinkMetadata "The metadata of a shared link." - union file FileLinkMetadata folder FolderLinkMetadata - url String "URL of the shared link." - id Id? "A unique identifier for the linked file." - name String "The linked file name (including extension). This never contains a slash." - expires common.DropboxTimestamp? "Expiration time, if set. By default the link won't expire." - path_lower String? "The lowercased full path in the user's Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user's - dropbox." - + dropbox and the user is the owner of the link." link_permissions LinkPermissions "The link's access permissions." - team_member_info TeamMemberInfo? "The team membership information of the link's owner. This field will only be present - if the link's owner is a team member." - + if the link's owner is a team member." content_owner_team_info TeamInfo? "The team information of the content's owner. This field will only be present if the content's owner is a team member and the content's owner team is different from the @@ -209,13 +260,42 @@ struct SharedLinkMetadata example default file = default - + example folder_link_metadata folder = default -struct FileLinkMetadata extends SharedLinkMetadata - "The metadata of a file shared link." - +struct CollectionLinkMetadata extends LinkMetadata + "Metadata for a collection-based shared link." + + example default + url = "https://www.dropbox.com/sh/s6fvw6ol7rmqo1x/AAAgWRSbjmYDvPpDB30Sykjfa?dl=0" + expires = null + visibility = public + +struct CreateSharedLinkArg + path String + "The path to share." + short_url Boolean = false + pending_upload PendingUploadMode? + "If it's okay to share a path that does not yet exist, set this to + either :field:`PendingUploadMode.file` or :field:`PendingUploadMode.folder` + to indicate whether to assume it's a file or folder." + + example default + path = "/Homework/Math/Prime_Numbers.txt" + +struct CreateSharedLinkWithSettingsArg + path ReadPath + "The path to be shared by the shared link." + settings SharedLinkSettings? + "The requested settings for the newly created shared link." + + example default + path = "/Prime_Numbers.txt" + settings = default + +struct FileLinkMetadata extends SharedLinkMetadata + "The metadata of a file shared link." client_modified common.DropboxTimestamp "The modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified @@ -254,25 +334,147 @@ struct FolderLinkMetadata extends SharedLinkMetadata team_member_info = default link_permissions = default -union SharedLinkError - shared_link_not_found - "The shared link wasn't found." - shared_link_access_denied - "The caller is not allowed to access this shared link." - unsupported_link_type - "This type of link is not supported; use :route:`files.export` instead." +struct GetSharedLinkMetadataArg + url String + "URL of the shared link." + path Path? + "If the shared link is to a folder, this parameter can be used to retrieve the metadata for + a specific file or sub-folder in this folder. A relative path should be used." + link_password String? + "If the shared link has a password, this parameter can be used." + + example default + url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0" + path = "/Prime_Numbers.txt" + +struct GetSharedLinksArg + path String? + "See :route:`get_shared_links` description." + + example default + path = "" + + example math_homework_links + path = "/Homework/Math" -route get_shared_link_metadata(GetSharedLinkMetadataArg, SharedLinkMetadata, SharedLinkError) - "Get the shared link's metadata." +struct GetSharedLinksResult + links List(LinkMetadata) + "Shared links applicable to the path argument." - attrs - auth = "app, user" - allow_app_folder_app = true - scope = "sharing.read" + example default + links = [default] -# -# List Shared links definitions and route -# +struct LinkAudienceOption + audience LinkAudience + "Specifies who can access the link." + allowed Boolean + "Whether the user calling this API can select this audience option." + disallowed_reason LinkAudienceDisallowedReason? + "If :field:`allowed` is :val:`false`, this will provide the reason that the user is not + permitted to set the visibility to this policy." + + example public + audience = public + allowed = true + + example team + audience = team + allowed = false + + example no_one + audience = no_one + allowed = true + +struct LinkPermissions + resolved_visibility ResolvedVisibility? + "The current visibility of the link after considering the shared links policies of the + the team (in case the link's owner is part of a team) and the shared folder (in case the + linked file is part of a shared folder). This field is shown only if the caller has access + to this info (the link's owner always has access to this data). For some links, an + effective_audience value is returned instead." + requested_visibility RequestedVisibility? + "The shared link's requested visibility. This can be overridden by the team and shared + folder policies. The final visibility, after considering these policies, can be found in + :field:`resolved_visibility`. This is shown only if the caller is the link's + owner and resolved_visibility is returned instead of effective_audience." + can_revoke Boolean + "Whether the caller can revoke the shared link." + revoke_failure_reason SharedLinkAccessFailureReason? + "The failure reason for revoking the link. This field will only be present if the + :field:`can_revoke` is :val:`false`." + effective_audience LinkAudience? + "The type of audience who can benefit from the access level specified by the + `link_access_level` field." + link_access_level LinkAccessLevel? + "The access level that the link will grant to its users. A link can grant additional rights + to a user beyond their current access level. For example, if a user was invited as a viewer + to a file, and then opens a link with `link_access_level` set to `editor`, then they will + gain editor privileges. The `link_access_level` is a property of the link, and does not + depend on who is calling this API. In particular, `link_access_level` does not take into + account the API caller's current permissions to the content." + visibility_policies List(VisibilityPolicy) + "A list of policies that the user might be able to set for the visibility." + can_set_expiry Boolean + "Whether the user can set the expiry settings of the link. This refers to the ability to + create a new expiry and modify an existing expiry." + can_remove_expiry Boolean + "Whether the user can remove the expiry of the link." + allow_download Boolean + "Whether the link can be downloaded or not." + can_allow_download Boolean + "Whether the user can allow downloads via the link. This refers to the ability to remove a + no-download restriction on the link." + can_disallow_download Boolean + "Whether the user can disallow downloads via the link. This refers to the ability to impose + a no-download restriction on the link." + allow_comments Boolean + "Whether comments are enabled for the linked file. This takes the team commenting policy into account." + team_restricts_comments Boolean + "Whether the team has disabled commenting globally." + audience_options List(LinkAudienceOption)? + "A list of link audience options the user might be able to set as the new audience." + can_set_password Boolean? + "Whether the user can set a password for the link." + can_remove_password Boolean? + "Whether the user can remove the password of the link." + require_password Boolean? + "Whether the user is required to provide a password to view the link." + can_use_extended_sharing_controls Boolean? + "Whether the user can use extended sharing controls, based on their account type." + can_sync Boolean? + "Whether a user can save the content to their Dropbox account." + can_request_access Boolean? + "Whether the user can request access to the content." + enforce_shared_link_password_policy team_policies.EnforceLinkPasswordPolicy? + "Whether the updated externally available shared link must have password set. + Not provided if the link is not team owned." + days_to_expire_policy team_policies.DefaultLinkExpirationDaysPolicy? + "Existing owning team's policy for default number of days from today to link's expiration. + Not provided if the link is not team owned." + change_shared_link_expiration_policy ChangeLinkExpirationPolicy? + "When owning team's policy :field:`change_shared_link_expiration_policy` is :field:`ChangeLinkExpirationPolicy.not_allowed`, + the updated externally available shared link expiration value cannot be less strict + than :field:`days_to_expire_policy`. + In this case :field:`days_to_expire_policy` is expected to be different from `none`. + Not provided if the link is not team owned." + + example default + resolved_visibility = public + can_revoke = false + revoke_failure_reason = owner_only + visibility_policies = [public, password] + can_set_expiry = false + can_remove_expiry = false + allow_download = true + can_allow_download = true + can_disallow_download = false + allow_comments = true + team_restricts_comments = true + audience_options = [public, team, no_one] + can_set_password = true + can_remove_password = true + require_password = false + can_use_extended_sharing_controls = false struct ListSharedLinksArg path ReadPath? @@ -283,18 +485,17 @@ struct ListSharedLinksArg "See :route:`list_shared_links` description." example default - "List all links." cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - + example path path = "/Homework/Math" - + example id path = "id:a4ayc_80_OEAAAAAAAAAYa" - + example rev path = "rev:a1c10ce0dd78" - + example id_no_parent_links path = "id:a4ayc_80_OEAAAAAAAAAYa" direct_only = true @@ -314,33 +515,35 @@ struct ListSharedLinksResult cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" has_more = true -union ListSharedLinksError - path files.LookupError - reset - "Indicates that the cursor has been invalidated. Call - :route:`list_shared_links` to obtain a new cursor." +struct ModifySharedLinkSettingsArgs + url String + "URL of the shared link to change its settings." + settings SharedLinkSettings + "Set of settings for the shared link." + remove_expiration Boolean = false + "If set to true, removes the expiration of the shared link." -route list_shared_links(ListSharedLinksArg, ListSharedLinksResult, ListSharedLinksError) - "List shared links of this user. + example default + url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0" + settings = default - If no path is given, returns a list of all shared links for the current user. For members of - business teams using team space and member folders, returns all shared links in the team - member's home folder unless the team space ID is specified in the request header. For more - information, refer to the :link:`Namespace Guide - https://www.dropbox.com/developers/reference/namespace-guide`. +struct PathLinkMetadata extends LinkMetadata + "Metadata for a path-based shared link." + path String + "Path in user's Dropbox." - If a non-empty path is given, returns a list of all shared links - that allow access to the given path - direct links to the given path and links to parent folders - of the given path. Links to parent folders can be suppressed by setting - direct_only to true." + example default + url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0" + path = "/Homework/Math/Prime_Numbers.txt" + expires = null + visibility = public - attrs - allow_app_folder_app = true - scope = "sharing.read" +struct RevokeSharedLinkArg + url String + "URL of the shared link." -# -# Modify shared link settings definitions and route -# + example default + url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0" struct SharedLinkSettings require_password Boolean? @@ -369,353 +572,20 @@ struct SharedLinkSettings access = viewer allow_download = true - -union LinkAccessLevel - viewer - "Users who use the link can view and comment on the content." - editor - "Users who use the link can edit, view and comment on the content." - -union RequestedLinkAccessLevel - viewer - "Users who use the link can view and comment on the content." - editor - "Users who use the link can edit, view and comment on the content. - Note not all file types support edit links yet." - max - "Request for the maximum access level you can set the link to." - default - "Request for the default access level the user has set." - -struct ModifySharedLinkSettingsArgs - url String - "URL of the shared link to change its settings." - settings SharedLinkSettings - "Set of settings for the shared link." - remove_expiration Boolean = false - "If set to true, removes the expiration of the shared link." - - example default - url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0" - settings = default - -union_closed SharedLinkSettingsError - invalid_settings - "The given settings are invalid - (for example, all attributes of the :type:`SharedLinkSettings` are empty, - the requested visibility is :field:`RequestedVisibility.password` but the - :field:`SharedLinkSettings.link_password` is missing, :field:`SharedLinkSettings.expires` - is set to the past, etc.)." - - not_authorized - "User is not allowed to modify the settings of this link. Note that basic - users can only set :field:`RequestedVisibility.public` - as the :field:`SharedLinkSettings.requested_visibility` and cannot - set :field:`SharedLinkSettings.expires`." - - -union ModifySharedLinkSettingsError extends SharedLinkError - settings_error SharedLinkSettingsError - "There is an error with the given settings." - email_not_verified - "This user's email address is not verified. This functionality is only - available on accounts with a verified email address. Users can verify - their email address :link:`here https://www.dropbox.com/help/317`." - -route modify_shared_link_settings(ModifySharedLinkSettingsArgs, SharedLinkMetadata, ModifySharedLinkSettingsError) - "Modify the shared link's settings. - - If the requested visibility conflict with the shared links policy of the team or the - shared folder (in case the linked file is part of a shared folder) then the - :field:`LinkPermissions.resolved_visibility` of the returned :type:`SharedLinkMetadata` will - reflect the actual visibility of the shared link and the - :field:`LinkPermissions.requested_visibility` will reflect the requested visibility." - - attrs - allow_app_folder_app = true - scope = "sharing.write" - -# -# Create shared link with settings definitions and route -# - -struct CreateSharedLinkWithSettingsArg - path ReadPath - "The path to be shared by the shared link." - settings SharedLinkSettings? - "The requested settings for the newly created shared link." - - example default - path = "/Prime_Numbers.txt" - settings = default - -union SharedLinkAlreadyExistsMetadata - metadata SharedLinkMetadata - "Metadata of the shared link that already exists." - -union_closed CreateSharedLinkWithSettingsError - path files.LookupError - email_not_verified - "This user's email address is not verified. This functionality is only - available on accounts with a verified email address. Users can verify - their email address :link:`here https://www.dropbox.com/help/317`." - shared_link_already_exists SharedLinkAlreadyExistsMetadata? - "The shared link already exists. You can call :route:`list_shared_links` to get the - existing link, or use the provided metadata if it is returned." - settings_error SharedLinkSettingsError - "There is an error with the given settings." - access_denied - "The user is not allowed to create a shared link to the specified file. For - example, this can occur if the file is restricted or if the user's links are - :link:`banned https://help.dropbox.com/files-folders/share/banned-links`." - -route create_shared_link_with_settings(CreateSharedLinkWithSettingsArg, SharedLinkMetadata, CreateSharedLinkWithSettingsError) - "Create a shared link with custom settings. - If no settings are given then the default visibility is :field:`RequestedVisibility.public` - (The resolved visibility, though, may depend on other aspects such as team and shared folder - settings)." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "sharing.write" - - -# -# Revoke shared link -# - -struct RevokeSharedLinkArg - url String - "URL of the shared link." - - example default - url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0" - -union RevokeSharedLinkError extends SharedLinkError - shared_link_malformed - "Shared link is malformed." - -route revoke_shared_link(RevokeSharedLinkArg, Void, RevokeSharedLinkError) - "Revoke a shared link. - - Note that even after revoking a shared link to a file, the file may be accessible if there are - shared links leading to any of the file parent folders. To list all shared links that enable - access to a specific file, you can use the :route:`list_shared_links` with the file as the - :field:`ListSharedLinksArg.path` argument." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "sharing.write" - -# -# NSLR endpoints -# - -union GetSharedLinkFileError extends SharedLinkError - shared_link_is_directory - "Directories cannot be retrieved by this endpoint." - -alias GetSharedLinkFileArg = GetSharedLinkMetadataArg - -route get_shared_link_file(GetSharedLinkFileArg, SharedLinkMetadata, GetSharedLinkFileError) - "Download the shared link's file from a user's Dropbox." - - attrs - host="content" - style="download" - allow_app_folder_app = true - scope = "sharing.read" - -# -# Deprecated endpoints -# - - -union Visibility - "Who can access a shared link. - The most open visibility is :field:`public`. - The default depends on many aspects, such as team and user - preferences and shared folder settings." - - public - "Anyone who has received the link can access it. No login required." - team_only - "Only members of the same team can - access the link. Login is required." - password - "A link-specific password is required to access the - link. Login is not required." - team_and_password - "Only members of the same team who - have the link-specific password can access the link." - shared_folder_only - "Only members of the shared folder containing the linked file - can access the link. Login is required." - -struct LinkMetadata - "Metadata for a shared link. This can be either a - :type:`PathLinkMetadata` or :type:`CollectionLinkMetadata`." - - union - path PathLinkMetadata - collection CollectionLinkMetadata - - url String - "URL of the shared link." - visibility Visibility - "Who can access the link." - expires common.DropboxTimestamp? - "Expiration time, if set. By default the link won't expire." - - example default - path = default - -struct PathLinkMetadata extends LinkMetadata - "Metadata for a path-based shared link." - - path String - "Path in user's Dropbox." - - example default - url = "https://www.dropbox.com/s/2sn712vy1ovegw8/Prime_Numbers.txt?dl=0" - path = "/Homework/Math/Prime_Numbers.txt" - expires = null - visibility = public - -struct CollectionLinkMetadata extends LinkMetadata - "Metadata for a collection-based shared link." - - example default - url = "https://www.dropbox.com/sh/s6fvw6ol7rmqo1x/AAAgWRSbjmYDvPpDB30Sykjfa?dl=0" - expires = null - visibility = public - -struct GetSharedLinksArg - - path String? - "See :route:`get_shared_links` description." - - example default - "Get all links, including collection links." - path = "" - - example math_homework_links - "Get links giving access to /Homework/Math." - path = "/Homework/Math" - -struct GetSharedLinksResult - links List(LinkMetadata) - "Shared links applicable to the path argument." - - example default - links = [default] - -union GetSharedLinksError - path files.MalformedPathError - -route get_shared_links(GetSharedLinksArg, GetSharedLinksResult, GetSharedLinksError) deprecated by list_shared_links - "Returns a list of :type:`LinkMetadata` objects for this user, - including collection links. - - If no path is given, returns a list of all shared links for the current - user, including collection links, up to a maximum of 1000 links. - - If a non-empty path is given, returns a list of all shared links - that allow access to the given path. Collection links are never - returned in this case." - - attrs - allow_app_folder_app = true - scope = "sharing.read" - -union_closed PendingUploadMode - "Flag to indicate pending upload default (for linking to not-yet-existing paths)." - - file - "Assume pending uploads are files." - folder - "Assume pending uploads are folders." - -struct CreateSharedLinkArg - - path String - "The path to share." - - short_url Boolean = false - - pending_upload PendingUploadMode? - "If it's okay to share a path that does not yet exist, set this to - either :field:`PendingUploadMode.file` or :field:`PendingUploadMode.folder` - to indicate whether to assume it's a file or folder." +struct TeamMemberInfo + "Information about a team member." + team_info TeamInfo + "Information about the member's team." + display_name String + "The display name of the user." + member_id String? + "ID of user as a member of a team. This field will only be present if the member is in the + same team as current user." example default - path = "/Homework/Math/Prime_Numbers.txt" - -union CreateSharedLinkError - path files.LookupError - -route create_shared_link(CreateSharedLinkArg, PathLinkMetadata, CreateSharedLinkError) deprecated by create_shared_link_with_settings - "Create a shared link. - - If a shared link already exists for the given path, that link is returned. - - Previously, it was technically possible to break a shared link by moving or - renaming the corresponding file or folder. In the future, this will no - longer be the case, so your app shouldn't rely on this behavior. Instead, if - your app needs to revoke a shared link, use :route:`revoke_shared_link`." - - attrs - allow_app_folder_app = true - select_admin_mode = "team_admin" - scope = "sharing.write" - -struct LinkAudienceOption - audience LinkAudience - "Specifies who can access the link." - allowed Boolean - "Whether the user calling this API can select this audience option." - disallowed_reason LinkAudienceDisallowedReason? - "If :field:`allowed` is :val:`false`, this will provide the reason that the user is not - permitted to set the visibility to this policy." - - example public - audience = public - allowed = true - - example team - audience = team - allowed = false - - example no_one - audience = no_one - allowed = true - -# -# Alpha version of LinkPermissions with visibility information and controls -# - -union VisibilityPolicyDisallowedReason - delete_and_recreate - "The user needs to delete and recreate the link to change the visibility policy." - restricted_by_shared_folder - "The parent shared folder restricts sharing of links outside the shared folder. To change - the visibility policy, remove the restriction from the parent shared folder." - restricted_by_team - "The team policy prevents links being shared outside the team." - user_not_on_team - "The user needs to be on a team to set this policy." - user_account_type - "The user is a basic user or is on a limited team." - permission_denied - "The user does not have permission." - -union LinkAudienceDisallowedReason extends VisibilityPolicyDisallowedReason - "check documentation for VisibilityPolicyDisallowedReason." - -union AlphaResolvedVisibility extends ResolvedVisibility - "check documentation for ResolvedVisibility." + team_info = default + display_name = "Roger Rabbit" + member_id = "dbmid:abcd1234" struct VisibilityPolicy policy RequestedVisibility @@ -734,42 +604,43 @@ struct VisibilityPolicy policy = public resolved_policy = public allowed = true - + example public_team policy = public resolved_policy = team_only allowed = false disallowed_reason = restricted_by_team - + example public_shared_folder policy = public resolved_policy = shared_folder_only allowed = false disallowed_reason = restricted_by_shared_folder - + example password policy = password resolved_policy = password allowed = true - + example password_team policy = password resolved_policy = team_and_password allowed = true - + example password_shared_folder policy = password resolved_policy = shared_folder_only allowed = false disallowed_reason = restricted_by_shared_folder - + example team_only policy = team_only resolved_policy = team_only allowed = true - + example team_shared_folder policy = team_only resolved_policy = shared_folder_only allowed = false disallowed_reason = restricted_by_shared_folder + diff --git a/sharing_apiv2_sharing_common_types.stone b/sharing_apiv2_sharing_common_types.stone new file mode 100644 index 0000000..9702e3e --- /dev/null +++ b/sharing_apiv2_sharing_common_types.stone @@ -0,0 +1,67 @@ +namespace sharing + "This namespace contains endpoints and data types for creating and managing shared links and shared folders." + +import common + +union AccessLevel + "Defines the access levels for collaborators." + owner + "The collaborator is the owner of the shared folder. Owners can + view and edit the shared folder as well as set the folder's + policies using :route:`update_folder_policy`." + editor + "The collaborator can both view and edit the shared folder." + viewer + "The collaborator can only view the shared folder." + viewer_no_comment + "The collaborator can only view the shared folder and does + not have any access to comments." + traverse + "The collaborator can only view the shared folder that they have + access to." + no_access + "If there is a Righteous Link on the folder which grants access + and the user has visited such link, they are allowed to perform + certain action (i.e. add themselves to the folder) via the link + access even though the user themselves are not a member on the + shared folder yet." + +struct InsufficientPlan + message String + "A message to tell the user to upgrade in order to support expected action." + upsell_url String? + "A URL to send the user to in order to obtain the account type they need, e.g. upgrading. + Absent if there is no action the user can take to upgrade." + +union PermissionDeniedReason + "Possible reasons the user is denied a permission." + user_not_same_team_as_owner + "User is not on the same team as the folder owner." + user_not_allowed_by_owner + "User is prohibited by the owner from taking the action." + target_is_indirect_member + "Target is indirectly a member of the folder, for example by being part of a group." + target_is_owner + "Target is the owner of the folder." + target_is_self + "Target is the user itself." + target_not_active + "Target is not an active member of the team." + folder_is_limited_team_folder + "Folder is team folder for a limited team." + owner_not_on_team + "The content owner needs to be on a Dropbox team to perform this action." + permission_denied + "The user does not have permission to perform this action on the link." + restricted_by_team + "The user's team policy prevents performing this action on the link." + user_account_type + "The user's account type does not support this action." + user_not_on_team + "The user needs to be on a Dropbox team to perform this action." + folder_is_inside_shared_folder + "Folder is inside of another shared folder." + restricted_by_parent_folder + "Policy cannot be changed due to restrictions from parent folder." + insufficient_plan InsufficientPlan + diff --git a/sharing_apiv2_sharing_files_async_service.stone b/sharing_apiv2_sharing_files_async_service.stone new file mode 100644 index 0000000..99f9c68 --- /dev/null +++ b/sharing_apiv2_sharing_files_async_service.stone @@ -0,0 +1,15 @@ +namespace sharing + +route list_file_members/batch (ListFileMembersBatchArg, List(ListFileMembersBatchResult), SharingUserError) + "Get members of multiple files at once. The arguments + to this route are more limited, and the limit on query result size per file + is more strict. To customize the results more, use the individual file + endpoint. + Inherited users and groups are not included in the result, and permissions are not + returned for this endpoint." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "whole_team" + diff --git a/sharing_apiv2_sharing_files_service.stone b/sharing_apiv2_sharing_files_service.stone new file mode 100644 index 0000000..d39ffcb --- /dev/null +++ b/sharing_apiv2_sharing_files_service.stone @@ -0,0 +1,93 @@ +namespace sharing + +route add_file_member (AddFileMemberArgs, List(FileMemberActionResult), AddFileMemberError) + "Adds specified members to a file." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route get_file_metadata/batch (GetFileMetadataBatchArg, List(GetFileMetadataBatchResult), SharingUserError) + "Returns shared file metadata." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "team_admin" + +route list_file_members/continue (ListFileMembersContinueArg, SharedFileMembers, ListFileMembersContinueError) + "Once a cursor has been retrieved from :route:`list_file_members` or + :route:`list_file_members/batch`, use this to paginate through all shared file members." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "whole_team" + +route list_received_files (ListFilesArg, ListFilesResult, SharingUserError) + "Returns a list of all files shared with current user." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "team_admin" + +route list_received_files/continue (ListFilesContinueArg, ListFilesResult, ListFilesContinueError) + "Get more results with a cursor from :route:`list_received_files`." + + attrs + auth = "user" + scope = "sharing.read" + +route remove_file_member (RemoveFileMemberArg, FileMemberActionIndividualResult, RemoveFileMemberError) deprecated + "Identical to remove_file_member_2 but with less information returned." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route remove_file_member_2 (RemoveFileMemberArg, FileMemberRemoveActionResult, RemoveFileMemberError) + "Removes a specified member from the file." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route relinquish_file_membership (RelinquishFileMembershipArg, Void, RelinquishFileMembershipError) + "The current user relinquishes their membership in the designated file." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route relinquish_access (RelinquishAccessArg, RelinquishAccessResult, RelinquishAccessError) + "Removes all self-removable access from a file or folder for the current + user. Best-effort and idempotent: attempts to drop link-visitor associations + and explicit ACL membership." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "private:sharing.write" + select_admin_mode = "whole_team" + +route unshare_file (UnshareFileArg, Void, UnshareFileError) + "Remove all members from this file. Does not remove inherited members." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route update_file_member (UpdateFileMemberArgs, MemberAccessLevelResult, FileMemberActionError) + "Changes a member's access on a shared file." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + diff --git a/sharing_files.stone b/sharing_apiv2_sharing_files_types.stone similarity index 78% rename from sharing_files.stone rename to sharing_apiv2_sharing_files_types.stone index d8b6123..b5401f6 100644 --- a/sharing_files.stone +++ b/sharing_apiv2_sharing_files_types.stone @@ -2,208 +2,70 @@ namespace sharing import common import files -import users import seen_state +import users -alias PathOrId = String(pattern="((\/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?", min_length=1) - -########################################### -# Generic route error related definitions # -########################################### - -union SharingUserError - "User account had a problem preventing this action." - email_unverified - "This user's email address is not verified. This functionality is only - available on accounts with a verified email address. Users can verify - their email address :link:`here https://www.dropbox.com/help/317`." - -union SharingFileAccessError - "User could not access this file." - - no_permission - "Current user does not have sufficient privileges to perform the desired action." - invalid_file - "File specified was not found." - is_folder - "A folder can't be shared this way. Use folder sharing or a shared link instead." - inside_public_folder - "A file inside a public folder can't be shared this way. Use a public link instead." - inside_osx_package - "A Mac OS X package can't be shared this way. Use a shared link instead." - - -union FileErrorResult - file_not_found_error files.Id - "File specified by id was not found." - invalid_file_action_error files.Id - "User does not have permission to take the specified action on the file." - permission_denied_error files.Id - "User does not have permission to access file specified by file.Id." +alias PathOrId = String(min_length=1, pattern="((\/|id:).*|nspath:[0-9]+:.*)|ns:[0-9]+(/.*)?") -############################################# -# File metadata and permissions definitions # -############################################# +union AddFileMemberError + "Errors for :route:`add_file_member`." + user_error SharingUserError + access_error SharingFileAccessError + rate_limit + "The user has reached the rate limit for invitations." + invalid_comment + "The custom message did not pass comment permissions checks." + banned_member + "The current user has been banned for abuse reasons." union FileAction "Sharing actions that may be taken on files." - disable_viewer_info "Disable viewer information on the file." - edit_contents "Change or edit contents of the file." - enable_viewer_info "Enable viewer information on the file." - invite_viewer "Add a member with view permissions." - invite_viewer_no_comment "Add a member with view permissions but no comment permissions." - invite_editor "Add a member with edit permissions." - unshare "Stop sharing this file." - relinquish_membership "Relinquish one's own membership to the file." - share_link "Use create_view_link and create_edit_link instead." - create_link "Use create_view_link and create_edit_link instead." - create_view_link "Create a shared link to a file that only allows users to view the content." - create_edit_link "Create a shared link to a file that allows users to edit the content." example default edit_contents = null -struct FilePermission - "Whether the user is allowed to take the sharing action on the file." - - action FileAction - "The action that the user may wish to take on the file." - allow Boolean - "True if the user is allowed to take the action." - reason PermissionDeniedReason? - "The reason why the user is denied the permission. Not present if the action - is allowed." - - example default - action = edit_contents - allow = false - reason = user_not_same_team_as_owner - -struct SharedFileMetadata - "Properties of the shared file." - - access_type AccessLevel? - "The current user's access level for this shared file." - - id files.FileId - "The ID of the file." - - expected_link_metadata ExpectedSharedContentLinkMetadata? - "The expected metadata of the link associated for the file when it is first shared. - Absent if the link already exists. This is for an unreleased feature so it may not be - returned yet." - - link_metadata SharedContentLinkMetadata? - "The metadata of the link associated for the file. This is for an unreleased feature so - it may not be returned yet." - - name String - "The name of this file." - - owner_display_names List(String)? - "The display names of the users that own the file. If the file is part - of a team folder, the display names of the team admins are also - included. Absent if the owner display names cannot be fetched." - - owner_team users.Team? - "The team that owns the file. This field is not present if the file - is not owned by a team." - - parent_shared_folder_id common.SharedFolderId? - "The ID of the parent shared folder. This field is present only if the - file is contained within a shared folder." - - path_display String? - "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. - Absent for unmounted files." - - path_lower String? - "The lower-case full path of this file. Absent for unmounted files." - - permissions List(FilePermission)? - "The sharing permissions that requesting user has on this file. This - corresponds to the entries given in :field:`GetFileMetadataBatchArg.actions` - or :field:`GetFileMetadataArg.actions`." - - policy FolderPolicy - "Policies governing this shared file." - - preview_url String - "URL for displaying a web preview of the shared file." - - time_invited common.DropboxTimestamp? - "Timestamp indicating when the current user was invited to this shared file. If the user was - not invited to the shared file, the timestamp will indicate when the user was invited to the - parent shared folder. This value may be absent." - - - example default - policy = default - permissions = [] - owner_display_names = ["Jane Doe"] - owner_team = default - preview_url = "https://www.dropbox.com/scl/fi/fir9vjelf" - path_lower = "/dir/file.txt" - path_display = "/dir/file.txt" - name = "file.txt" - id = "id:3kmLmQFnf1AAAAAAAAAAAw" - time_invited = "2016-01-20T00:00:00Z" - access_type = viewer - -union ViewerInfoPolicy - enabled - "Viewer information is available on this file." - disabled - "Viewer information is disabled on this file." - -################################## -# File membership mutation types # -################################## - -struct FileMemberActionResult - "Per-member result for :route:`add_file_member`." - - member MemberSelector - "One of specified input members." - result FileMemberActionIndividualResult - "The outcome of the action on this member." - sckey_sha1 String? - "The SHA-1 encrypted shared content key." - invitation_signature List(String)? - "The sharing sender-recipient invitation signatures for the input member_id. - A member_id can be a group and thus have multiple users and multiple invitation signatures." +union FileErrorResult + file_not_found_error files.Id + "File specified by id was not found." + invalid_file_action_error files.Id + "User does not have permission to take the specified action on the file." + permission_denied_error files.Id + "User does not have permission to access file specified by file.Id." - example default - member = default - result = default - sckey_sha1 = "32gggb672f987b2d94ef1741616bdf37d565e8c1" - invitation_signature = ["32gggb672f987b2d94ef1741616bdf37d565e8c1:c1ce0a9ef6ggg65e6e2f43514082ea5ffefd9cf5"] +union FileMemberActionError + invalid_member + "Specified member was not found." + no_permission + "User does not have permission to perform this action on this member." + access_error SharingFileAccessError + "Specified file was invalid or user does not have access." + no_explicit_access MemberAccessLevelResult + "The action cannot be completed because the target member does not have explicit access + to the file. The return value is the access that the member has to the file from a parent folder." union_closed FileMemberActionIndividualResult success AccessLevel? @@ -223,14 +85,78 @@ union FileMemberRemoveActionResult member_error FileMemberActionError "User was not able to remove this member." -union AddFileMemberError - "Errors for :route:`add_file_member`." +union GetFileMetadataError + "Error result for :route:`get_file_metadata`." user_error SharingUserError access_error SharingFileAccessError - rate_limit - "The user has reached the rate limit for invitations." - invalid_comment - "The custom message did not pass comment permissions checks." + +union GetFileMetadataIndividualResult + metadata SharedFileMetadata + "The result for this file if it was successful." + access_error SharingFileAccessError + "The result for this file if it was an error." + + example default + metadata = default + + example file_error + access_error = invalid_file + +union ListFileMembersContinueError + "Error for :route:`list_file_members/continue`." + user_error SharingUserError + access_error SharingFileAccessError + invalid_cursor + ":field:`ListFileMembersContinueArg.cursor` is invalid." + +union ListFileMembersError + "Error for :route:`list_file_members`." + user_error SharingUserError + access_error SharingFileAccessError + +union ListFileMembersIndividualResult + result ListFileMembersCountResult + "The results of the query for this file if it was successful." + access_error SharingFileAccessError + "The result of the query for this file if it was an error." + + example default + result = default + + example file_error + access_error = invalid_file + +union ListFilesContinueError + "Error results for :route:`list_received_files/continue`." + user_error SharingUserError + "User account had a problem." + invalid_cursor + ":field:`ListFilesContinueArg.cursor` is invalid." + +union RelinquishFileMembershipError + access_error SharingFileAccessError + group_access + "The current user has access to the shared file via a group. You can't relinquish + membership to a file shared via groups." + no_permission + "The current user does not have permission to perform this action." + +union RelinquishAccessError + "Error result for the relinquish_access endpoint." + invalid_file_id + "File or folder not found or has been deleted." + email_unverified + "Caller's email address is not verified." + owner + "User is the owner of the file/folder." + no_explicit_access + "User only has inherited access from a parent folder." + group_access + "User has access only via group membership." + team_folder + "Team folder restrictions apply." + no_permission + "Caller does not have permission to perform this action. Generic fallback." union RemoveFileMemberError "Errors for :route:`remove_file_member_2`." @@ -240,51 +166,53 @@ union RemoveFileMemberError "This member does not have explicit access to the file and therefore cannot be removed. The return value is the access that a user might have to the file from a parent folder." -union FileMemberActionError - invalid_member - "Specified member was not found." +union SharingFileAccessError + "User could not access this file." no_permission - "User does not have permission to perform this action on this member." - access_error SharingFileAccessError - "Specified file was invalid or user does not have access." - no_explicit_access MemberAccessLevelResult - "The action cannot be completed because the target member does not have explicit access - to the file. The return value is the access that the member has to the file from a parent folder." + "Current user does not have sufficient privileges to perform the desired action." + invalid_file + "File specified was not found." + is_folder + "A folder can't be shared this way. Use folder sharing or a shared link instead." + inside_public_folder + "A file inside a public folder can't be shared this way. Use a public link instead." + inside_osx_package + "A Mac OS X package can't be shared this way. Use a shared link instead." -##################### -# Route Definitions # -##################### +union SharingUserError + "User account had a problem preventing this action." + email_unverified + "This user's email address is not verified. This functionality is only + available on accounts with a verified email address. Users can verify + their email address :link:`here https://www.dropbox.com/help/317`." -route add_file_member(AddFileMemberArgs, List(FileMemberActionResult), AddFileMemberError) - "Adds specified members to a file." +union UnshareFileError + "Error result for :route:`unshare_file`." + user_error SharingUserError + access_error SharingFileAccessError - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" + example default + user_error = email_unverified struct AddFileMemberArgs "Arguments for :route:`add_file_member`." - file PathOrId "File to which to add members." - members List(MemberSelector) "Members to add. Note that even an email address is given, this may result in a user being directly added to the membership if that email is the user's main account email." - custom_message String? "Message to send to added members in their invitation." - quiet Boolean = false "Whether added members should be notified via email and device notifications of their invitation." - - access_level AccessLevel = viewer + access_level AccessLevel? "AccessLevel union object, describing what access level we want to give new members." - add_message_as_comment Boolean = false - "If the custom message should be added as a comment on the file." + "If the custom message should be added as a comment on the file. Only meant for Paper files." + fp_sealed_result String? + "The FingerprintJS Sealed Client Result value" example default file = "id:3kmLmQFnf1AAAAAAAAAAAw" @@ -293,76 +221,60 @@ struct AddFileMemberArgs quiet = false access_level = viewer -# -- - -struct UpdateFileMemberArgs - "Arguments for :route:`update_file_member`." - - file PathOrId - "File for which we are changing a member's access." +struct FileMemberActionResult + "Per-member result for :route:`add_file_member`." member MemberSelector - "The member whose access we are changing." - access_level AccessLevel - "The new access level for the member." + "One of specified input members." + result FileMemberActionIndividualResult + "The outcome of the action on this member." + sckey_sha1 String? + "The SHA-1 encrypted shared content key." + invitation_signature List(String)? + "The sharing sender-recipient invitation signatures for the input member_id. + A member_id can be a group and thus have multiple users and multiple invitation signatures." example default - file = "id:3kmLmQFnf1AAAAAAAAAAAw" member = default - access_level = viewer - -route update_file_member(UpdateFileMemberArgs, MemberAccessLevelResult, FileMemberActionError) - "Changes a member's access on a shared file." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" - -# -- + result = default + sckey_sha1 = "32gggb672f987b2d94ef1741616bdf37d565e8c1" + invitation_signature = ["32gggb672f987b2d94ef1741616bdf37d565e8c1:c1ce0a9ef6ggg65e6e2f43514082ea5ffefd9cf5"] -route get_file_metadata(GetFileMetadataArg, SharedFileMetadata, GetFileMetadataError) - "Returns shared file metadata." +struct FilePermission + "Whether the user is allowed to take the sharing action on the file." + action FileAction + "The action that the user may wish to take on the file." + allow Boolean + "True if the user is allowed to take the action." + reason PermissionDeniedReason? + "The reason why the user is denied the permission. Not present if the action + is allowed." - attrs - select_admin_mode = "team_admin" - scope = "sharing.read" + example default + action = edit_contents + allow = false + reason = user_not_same_team_as_owner struct GetFileMetadataArg "Arguments of :route:`get_file_metadata`." - file PathOrId "The file to query." actions List(FileAction)? "A list of `FileAction`s corresponding to `FilePermission`s that should appear in the - response's :field:`SharedFileMetadata.permissions` field describing the actions the - authenticated user can perform on the file." + response's :field:`SharedFileMetadata.permissions` field describing the actions the + authenticated user can perform on the file." example default file = "id:3kmLmQFnf1AAAAAAAAAAAw" actions = [] -union GetFileMetadataError - "Error result for :route:`get_file_metadata`." - - user_error SharingUserError - access_error SharingFileAccessError - -# -- - -route get_file_metadata/batch(GetFileMetadataBatchArg, List(GetFileMetadataBatchResult), SharingUserError) - "Returns shared file metadata." - - attrs - scope = "sharing.read" - struct GetFileMetadataBatchArg "Arguments of :route:`get_file_metadata/batch`." - files List(PathOrId, max_items=100) "The files to query." actions List(FileAction)? "A list of `FileAction`s corresponding to `FilePermission`s that should appear in the - response's :field:`SharedFileMetadata.permissions` field describing the actions the - authenticated user can perform on the file." + response's :field:`SharedFileMetadata.permissions` field describing the actions the + authenticated user can perform on the file." example default files = ["id:3kmLmQFnf1AAAAAAAAAAAw","id:VvTaJu2VZzAAAAAAAAAADQ"] @@ -370,7 +282,6 @@ struct GetFileMetadataBatchArg struct GetFileMetadataBatchResult "Per file results of :route:`get_file_metadata/batch`." - file PathOrId "This is the input file identifier corresponding to one of :field:`GetFileMetadataBatchArg.files`." @@ -380,122 +291,38 @@ struct GetFileMetadataBatchResult example default file = "id:3kmLmQFnf1AAAAAAAAAAAw" result = default - + example file_error file = "id:3kmLmQFnf1AAAAAAAAAAAw" result = file_error -union GetFileMetadataIndividualResult - metadata SharedFileMetadata - "The result for this file if it was successful." - access_error SharingFileAccessError - "The result for this file if it was an error." - - example default - metadata = default - - example file_error - access_error = invalid_file - -# -- - -route list_file_members(ListFileMembersArg, SharedFileMembers, ListFileMembersError) - "Use to obtain the members who have been invited to a file, both inherited - and uninherited members." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.read" - struct ListFileMembersArg "Arguments for :route:`list_file_members`." - file PathOrId "The file for which you want to see members." actions List(MemberAction)? "The actions for which to return permissions on a member." include_inherited Boolean = true "Whether to include members who only have access from a parent shared folder." - limit UInt32(min_value=1, max_value=300) = 100 + limit UInt32(max_value=300, min_value=1) = 100 "Number of members to return max per query. Defaults to 100 if no limit is specified." example default file = "id:3kmLmQFnf1AAAAAAAAAAAw" -struct SharedFileMembers - "Shared file user, group, and invitee membership. - - Used for the results of :route:`list_file_members` and - :route:`list_file_members/continue`, and used as part of the results - for :route:`list_file_members/batch`." - - users List(UserFileMembershipInfo) - "The list of user members of the shared file." - groups List(GroupMembershipInfo) - "The list of group members of the shared file." - invitees List(InviteeMembershipInfo) - "The list of invited members of a file, but have not logged in and - claimed this." - cursor String? - "Present if there are additional shared file members that have not been returned yet. Pass - the cursor into :route:`list_file_members/continue` to list additional members." - - example default - users = [default] - groups = [default] - invitees = [default] - -union ListFileMembersError - "Error for :route:`list_file_members`." - - user_error SharingUserError - access_error SharingFileAccessError - -struct UserFileMembershipInfo extends UserMembershipInfo - "The information about a user member of the shared content with an appended last seen timestamp." - - time_last_seen common.DropboxTimestamp? - "The UTC timestamp of when the user has last seen the content. Only populated if the - user has seen the content and the caller has a plan that includes viewer history." - platform_type seen_state.PlatformType? - "The platform on which the user has last seen the content, or unknown." - - example default - user = default - access_type = owner - permissions = [] - time_last_seen = "2016-01-20T00:00:00Z" - platform_type = unknown - -# -- - -route list_file_members/batch(ListFileMembersBatchArg, List(ListFileMembersBatchResult), SharingUserError) - "Get members of multiple files at once. The arguments - to this route are more limited, and the limit on query result size per file - is more strict. To customize the results more, use the individual file - endpoint. - - Inherited users and groups are not included in the result, and permissions are not - returned for this endpoint." - - attrs - scope = "sharing.read" - struct ListFileMembersBatchArg "Arguments for :route:`list_file_members/batch`." - files List(PathOrId, max_items=100) "Files for which to return members." - limit UInt32(max_value=20) = 10 - "Number of members to return max per query. Defaults to 10 if no limit is specified." + limit UInt32(max_value=3000) = 1000 + "Number of members to return max per query. Defaults to 1000 if no limit is specified." example default files = ["id:3kmLmQFnf1AAAAAAAAAAAw","id:VvTaJu2VZzAAAAAAAAAADQ"] - limit = 10 + limit = 1000 struct ListFileMembersBatchResult "Per-file result for :route:`list_file_members/batch`." - file PathOrId "This is the input file identifier, whether an ID or a path." result ListFileMembersIndividualResult @@ -504,47 +331,13 @@ struct ListFileMembersBatchResult example default file = "id:3kmLmQFnf1AAAAAAAAAAAw" result = default - + example member_error file = "id:3kmLmQFnf1AAAAAAAAAAAw" result = file_error - -struct ListFileMembersCountResult - members SharedFileMembers - "A list of members on this file." - member_count UInt32 - "The number of members on this file. This does not include inherited members." - - example default - members = default - member_count = 3 - -union ListFileMembersIndividualResult - result ListFileMembersCountResult - "The results of the query for this file if it was successful." - access_error SharingFileAccessError - "The result of the query for this file if it was an error." - - example default - result = default - - example file_error - access_error = invalid_file - -# -- - -route list_file_members/continue(ListFileMembersContinueArg, SharedFileMembers, ListFileMembersContinueError) - "Once a cursor has been retrieved from :route:`list_file_members` or - :route:`list_file_members/batch`, use this to paginate through all shared - file members." - - attrs - scope = "sharing.read" - struct ListFileMembersContinueArg "Arguments for :route:`list_file_members/continue`." - cursor String "The cursor returned by your last call to :route:`list_file_members`, :route:`list_file_members/continue`, or :route:`list_file_members/batch`." @@ -552,44 +345,40 @@ struct ListFileMembersContinueArg example default cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" -union ListFileMembersContinueError - "Error for :route:`list_file_members/continue`." - - user_error SharingUserError - access_error SharingFileAccessError - invalid_cursor - ":field:`ListFileMembersContinueArg.cursor` is invalid." - -# -- - -route list_received_files(ListFilesArg, ListFilesResult, SharingUserError) - "Returns a list of all files shared with current user. - - Does not include files the user has received via shared folders, and does - not include unclaimed invitations." +struct ListFileMembersCountResult + members SharedFileMembers + "A list of members on this file." + member_count UInt32 + "The number of members on this file. This does not include inherited members." - attrs - select_admin_mode = "team_admin" - scope = "sharing.read" + example default + members = default + member_count = 3 struct ListFilesArg "Arguments for :route:`list_received_files`." - - limit UInt32(min_value=1, max_value=300) = 100 + limit UInt32(max_value=300, min_value=1) = 100 "Number of files to return max per query. Defaults to 100 if no limit is specified." actions List(FileAction)? "A list of `FileAction`s corresponding to `FilePermission`s that should appear in the - response's :field:`SharedFileMetadata.permissions` field describing the actions the - authenticated user can perform on the file." + response's :field:`SharedFileMetadata.permissions` field describing the actions the + authenticated user can perform on the file." example default limit = 100 actions = [] +struct ListFilesContinueArg + "Arguments for :route:`list_received_files/continue`." + cursor String + "Cursor in :field:`ListFilesResult.cursor`." + + example default + cursor = "AzJJbGlzdF90eXBdofe9c3RPbGlzdGFyZ3NfYnlfZ2lkMRhcbric7Rdog9emfGRlc2MCRWxpbWl0BGRId" + struct ListFilesResult "Success results for :route:`list_received_files`." - entries List(SharedFileMetadata) "Information about the files shared with current user." cursor String? @@ -599,50 +388,29 @@ struct ListFilesResult entries = [default] cursor = "AzJJbGlzdF90eXBdofe9c3RPbGlzdGFyZ3NfYnlfZ2lkMRhcbric7Rdog9cmV2aXNpb24H3Qf6o1fkHxQ" -# -- - -route list_received_files/continue (ListFilesContinueArg, ListFilesResult, ListFilesContinueError) - "Get more results with a cursor from :route:`list_received_files`." - - attrs - scope = "sharing.read" - -struct ListFilesContinueArg - "Arguments for :route:`list_received_files/continue`." - - cursor String - "Cursor in :field:`ListFilesResult.cursor`." +struct RelinquishFileMembershipArg + file PathOrId + "The path or id for the file." example default - cursor = "AzJJbGlzdF90eXBdofe9c3RPbGlzdGFyZ3NfYnlfZ2lkMRhcbric7Rdog9emfGRlc2MCRWxpbWl0BGRId" - -union ListFilesContinueError - "Error results for :route:`list_received_files/continue`." - - user_error SharingUserError - "User account had a problem." - invalid_cursor - ":field:`ListFilesContinueArg.cursor` is invalid." - -# -- - -route remove_file_member(RemoveFileMemberArg, FileMemberActionIndividualResult, RemoveFileMemberError) deprecated by remove_file_member_2 - "Identical to remove_file_member_2 but with less information returned." + file = "id:3kmLmQFnf1AAAAAAAAAAAw" - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" +struct RelinquishAccessArg + "Removes all self-removable access from a file or folder. + For folders: always relinquishes without keeping a local copy + (leave_a_copy=false behavior). If you need control over keeping + folder contents, use the relinquish_folder_membership endpoint instead." + file_id String + "The id for the file or folder." -route remove_file_member_2(RemoveFileMemberArg, FileMemberRemoveActionResult, RemoveFileMemberError) - "Removes a specified member from the file." + example default + file_id = "id:3kmLmQFnf1AAAAAAAAAAAw" - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" +struct RelinquishAccessResult + "Returns an empty response for the relinquish_access endpoint." struct RemoveFileMemberArg "Arguments for :route:`remove_file_member_2`." - file PathOrId "File from which to remove members." member MemberSelector @@ -654,54 +422,119 @@ struct RemoveFileMemberArg file = "id:3kmLmQFnf1AAAAAAAAAAAw" member = default -# -- - -route relinquish_file_membership(RelinquishFileMembershipArg, Void, RelinquishFileMembershipError) - "The current user relinquishes their membership in the designated file. - Note that the current user may still have inherited access to this file - through the parent folder." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" - -struct RelinquishFileMembershipArg - file PathOrId - "The path or id for the file." +struct SharedFileMembers + "Shared file user, group, and invitee membership. + Used for the results of :route:`list_file_members` and + :route:`list_file_members/continue`, and used as part of the results + for :route:`list_file_members/batch`." + users List(UserFileMembershipInfo) + "The list of user members of the shared file." + groups List(GroupMembershipInfo) + "The list of group members of the shared file." + invitees List(InviteeMembershipInfo) + "The list of invited members of a file, but have not logged in and + claimed this." + cursor String? + "Present if there are additional shared file members that have not been returned yet. Pass + the cursor into :route:`list_file_members/continue` to list additional members." example default - file = "id:3kmLmQFnf1AAAAAAAAAAAw" - -union RelinquishFileMembershipError - access_error SharingFileAccessError - group_access - "The current user has access to the shared file via a group. You can't relinquish - membership to a file shared via groups." - no_permission - "The current user does not have permission to perform this action." - -# -- + users = [default] + groups = [default] + invitees = [default] -route unshare_file(UnshareFileArg, Void, UnshareFileError) - "Remove all members from this file. Does not remove inherited members." +struct SharedFileMetadata + "Properties of the shared file." + access_type AccessLevel? + "The current user's access level for this shared file." + id files.FileId + "The ID of the file." + expected_link_metadata ExpectedSharedContentLinkMetadata? + "The expected metadata of the link associated for the file when it is first shared. + Absent if the link already exists. This is for an unreleased feature so it may not be + returned yet." + link_metadata SharedContentLinkMetadata? + "The metadata of the link associated for the file. This is for an unreleased feature so + it may not be returned yet." + name String + "The name of this file." + owner_display_names List(String)? + "The display names of the users that own the file. If the file is part + of a team folder, the display names of the team admins are also + included. Absent if the owner display names cannot be fetched." + owner_team users.Team? + "The team that owns the file. This field is not present if the file + is not owned by a team." + parent_shared_folder_id common.SharedFolderId? + "The ID of the parent shared folder. This field is present only if the + file is contained within a shared folder." + path_display String? + "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. + Absent for unmounted files." + path_lower String? + "The lower-case full path of this file. Absent for unmounted files." + permissions List(FilePermission)? + "The sharing permissions that requesting user has on this file. This + corresponds to the entries given in :field:`GetFileMetadataBatchArg.actions` + or :field:`GetFileMetadataArg.actions`." + policy FolderPolicy + "Policies governing this shared file." + preview_url String + "URL for displaying a web preview of the shared file." + time_invited common.DropboxTimestamp? + "Timestamp indicating when the current user was invited to this shared file. If the user was + not invited to the shared file, the timestamp will indicate when the user was invited to the + parent shared folder. This value may be absent." - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" + example default + policy = default + permissions = [] + owner_display_names = ["Jane Doe"] + owner_team = default + preview_url = "https://www.dropbox.com/scl/fi/fir9vjelf" + path_lower = "/dir/file.txt" + path_display = "/dir/file.txt" + name = "file.txt" + id = "id:3kmLmQFnf1AAAAAAAAAAAw" + time_invited = "2016-01-20T00:00:00Z" + access_type = viewer struct UnshareFileArg "Arguments for :route:`unshare_file`." - file PathOrId "The file to unshare." example default file = "id:3kmLmQFnf1AAAAAAAAAAAw" -union UnshareFileError - "Error result for :route:`unshare_file`." - user_error SharingUserError - access_error SharingFileAccessError +struct UpdateFileMemberArgs + "Arguments for :route:`update_file_member`." + file PathOrId + "File for which we are changing a member's access." + member MemberSelector + "The member whose access we are changing." + access_level AccessLevel + "The new access level for the member." example default - user_error = email_unverified + file = "id:3kmLmQFnf1AAAAAAAAAAAw" + member = default + access_level = viewer + +struct UserFileMembershipInfo extends UserMembershipInfo + "The information about a user member of the shared content with an appended last seen timestamp." + time_last_seen common.DropboxTimestamp? + "The UTC timestamp of when the user has last seen the content. Only populated if the + user has seen the content and the caller has a plan that includes viewer history." + platform_type seen_state.PlatformType? + "The platform on which the user has last seen the content, or unknown." + + example default + user = default + access_type = owner + permissions = [] + time_last_seen = "2016-01-20T00:00:00Z" + platform_type = unknown + diff --git a/sharing_apiv2_sharing_folders_base.stone b/sharing_apiv2_sharing_folders_base.stone new file mode 100644 index 0000000..ae8682c --- /dev/null +++ b/sharing_apiv2_sharing_folders_base.stone @@ -0,0 +1,137 @@ +namespace sharing + +import account_id +import common +import users + + +alias DropboxId = String(min_length=1) + +union MemberPolicy + "Policy governing who can be a member of a shared folder. Only applicable + to folders owned by a user on a team." + team + "Only a teammate can become a member." + anyone + "Anyone can become a member." + team_and_approved + "Only a teammate and approved people can become a member." + +union AclUpdatePolicy + "Who can change a shared folder's access control list (ACL). In other words, who can add, + remove, or change the privileges of members." + owner + "Only the owner can update the ACL." + editors + "Any editor can update the ACL. This may be further restricted to + editors on the same team." + +union SharedLinkPolicy + "Who can view shared links in this folder." + anyone + "Links can be shared with anyone." + team + "Links can be shared with anyone on the same team as the owner." + members + "Links can only be shared among members of the shared folder." + +union ViewerInfoPolicy + enabled + "Viewer information is available on this file." + disabled + "Viewer information is disabled on this file." + +struct FolderPolicy + "A set of policies governing membership and privileges for a shared + folder." + member_policy MemberPolicy? + "Who can be a member of this shared folder, as set on the folder itself. + The effective policy may differ from this value if the team-wide policy + is more restrictive. Present only if the folder is owned by a team." + resolved_member_policy MemberPolicy? + "Who can be a member of this shared folder, taking into account both the + folder and the team-wide policy. This value may differ from that of + member_policy if the team-wide policy is more restrictive than the folder + policy. Present only if the folder is owned by a team." + acl_update_policy AclUpdatePolicy + "Who can add and remove members from this shared folder." + shared_link_policy SharedLinkPolicy + "Who links can be shared with." + viewer_info_policy ViewerInfoPolicy? + "Who can enable/disable viewer info for this shared folder." + + example default + member_policy = anyone + resolved_member_policy = team + acl_update_policy = owner + shared_link_policy = anyone + +union FolderAction + "Actions that may be taken on shared folders." + change_options + "Change folder options, such as who can be invited to join the folder." + disable_viewer_info + "Disable viewer information for this folder." + edit_contents + "Change or edit contents of the folder." + enable_viewer_info + "Enable viewer information on the folder." + invite_editor + "Invite a user or group to join the folder with read and write permission." + invite_viewer + "Invite a user or group to join the folder with read permission." + invite_viewer_no_comment + "Invite a user or group to join the folder with read permission but no comment permissions." + relinquish_membership + "Relinquish one's own membership in the folder." + unmount + "Unmount the folder." + unshare + "Stop sharing this folder." + leave_a_copy + "Keep a copy of the contents upon leaving or being kicked from the folder." + share_link + "Use create_view_link and create_edit_link instead." + create_link + "Use create_view_link and create_edit_link instead." + create_view_link + "Create a shared link that only allows users to view the content." + create_edit_link + "Create a shared link that allows users to edit the content." + set_access_inheritance + "Set whether the folder inherits permissions from its parent." + +struct SharedFolderMetadataBase + "Properties of the shared folder." + access_type AccessLevel + "The current user's access level for this shared folder." + is_inside_team_folder Boolean + "Whether this folder is inside of a team folder." + is_team_folder Boolean + "Whether this folder is a + :link:`team folder https://www.dropbox.com/en/help/986`." + owner_display_names List(String)? + "The display names of the users that own the folder. If the folder is + part of a team folder, the display names of the team admins are also + included. Absent if the owner display names cannot be fetched." + owner_team users.Team? + "The team that owns the folder. This field is not present if the folder + is not owned by a team." + parent_shared_folder_id common.SharedFolderId? + "The ID of the parent shared folder. This field is present only if the + folder is contained within another shared folder." + path_display String? + "The full path of this shared folder. Absent for unmounted folders." + path_lower String? + "The lower-cased full path of this shared folder. Absent for unmounted folders." + parent_folder_name String? + "Display name for the parent folder." + + example default + access_type = owner + is_inside_team_folder = false + is_team_folder = false + owner_display_names = ["Jane Doe"] + owner_team = default + parent_folder_name = "Parent Shared Folder" + diff --git a/sharing_folders.stone b/sharing_apiv2_sharing_folders_types.stone similarity index 65% rename from sharing_folders.stone rename to sharing_apiv2_sharing_folders_types.stone index dc487c9..3aee297 100644 --- a/sharing_folders.stone +++ b/sharing_apiv2_sharing_folders_types.stone @@ -6,131 +6,68 @@ import files import team_common import users_common -alias DropboxId = String(min_length=1) - -union AccessLevel - "Defines the access levels for collaborators." - - owner - "The collaborator is the owner of the shared folder. Owners can - view and edit the shared folder as well as set the folder's - policies using :route:`update_folder_policy`." - editor - "The collaborator can both view and edit the shared folder." - viewer - "The collaborator can only view the shared folder." - viewer_no_comment - "The collaborator can only view the shared folder and does - not have any access to comments." - traverse - "The collaborator can only view the shared folder that they have - access to." - no_access - "If there is a Righteous Link on the folder which grants access - and the user has visited such link, they are allowed to perform - certain action (i.e. add themselves to the folder) via the link - access even though the user themselves are not a member on the - shared folder yet." - -struct FolderPolicy - "A set of policies governing membership and privileges for a shared - folder." - - member_policy MemberPolicy? - "Who can be a member of this shared folder, as set on the folder itself. - The effective policy may differ from this value if the team-wide policy - is more restrictive. Present only if the folder is owned by a team." - resolved_member_policy MemberPolicy? - "Who can be a member of this shared folder, taking into account both the - folder and the team-wide policy. This value may differ from that of - member_policy if the team-wide policy is more restrictive than the folder - policy. Present only if the folder is owned by a team." - acl_update_policy AclUpdatePolicy - "Who can add and remove members from this shared folder." - shared_link_policy SharedLinkPolicy - "Who links can be shared with." - viewer_info_policy ViewerInfoPolicy? - "Who can enable/disable viewer info for this shared folder." +struct MemberPermission + "Whether the user is allowed to take the action on the associated member." + action MemberAction + "The action that the user may wish to take on the member." + allow Boolean + "True if the user is allowed to take the action." + reason PermissionDeniedReason? + "The reason why the user is denied the permission. Not present if the action is allowed." example default - member_policy = anyone - resolved_member_policy = team - acl_update_policy = owner - shared_link_policy = anyone - -union FolderAction - "Actions that may be taken on shared folders." - - change_options - "Change folder options, such as who can be invited to join the folder." - - disable_viewer_info - "Disable viewer information for this folder." - - edit_contents - "Change or edit contents of the folder." - - enable_viewer_info - "Enable viewer information on the folder." - - invite_editor - "Invite a user or group to join the folder with read and write permission." - - invite_viewer - "Invite a user or group to join the folder with read permission." - - invite_viewer_no_comment - "Invite a user or group to join the folder with read permission but no comment permissions." - - relinquish_membership - "Relinquish one's own membership in the folder." - - unmount - "Unmount the folder." - - unshare - "Stop sharing this folder." - - leave_a_copy - "Keep a copy of the contents upon leaving or being kicked from the folder." - - share_link - "Use create_link instead." - - create_link - "Create a shared link for folder." + action = make_owner + allow = false + reason = target_is_indirect_member - set_access_inheritance - "Set whether the folder inherits permissions from its parent." +struct ParentFolderAccessInfo + "Contains information about a parent folder that a member has access to." + folder_name String + "Display name for the folder." + shared_folder_id common.SharedFolderId + "The identifier of the parent shared folder." + permissions List(MemberPermission) + "The user's permissions for the parent shared folder." + path String + "The full path to the parent shared folder relative to the acting user's root." -struct FolderPermission - "Whether the user is allowed to take the action on the shared folder." + example default + folder_name = "Shared Folder" + shared_folder_id = "84528192421" + permissions = [] + path = "/Shared Folder" - action FolderAction - "The action that the user may wish to take on the folder." - allow Boolean - "True if the user is allowed to take the action." - reason PermissionDeniedReason? - "The reason why the user is denied the permission. Not present if the action - is allowed, or if no reason is available." +struct MemberAccessLevelResult + "Contains information about a member's access level to content after an operation." + access_level AccessLevel? + "The member still has this level of access to the content through a parent folder." + warning String? + "A localized string with additional information about why the user + has this access level to the content." + access_details List(ParentFolderAccessInfo)? + "The parent folders that a member has access to. The field is present if the user + has access to the first parent folder where the member gains access." example default - action = edit_contents - allow = false - reason = user_not_same_team_as_owner -union MemberPolicy - "Policy governing who can be a member of a shared folder. Only applicable - to folders owned by a user on a team." +union MemberSelector + "Includes different ways to identify a member of a shared folder." + dropbox_id DropboxId + "Dropbox account, team member, or group ID of member." + email common.EmailAddress + "Email address of member." - team - "Only a teammate can become a member." - anyone - "Anyone can become a member." + example default + email = "justin@example.com" + + example account + dropbox_id = "dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q" + + example group + dropbox_id = "g:98d36ed08e6290c2e9d536a392f974ee" union MemberAction "Actions that may be taken on members of a shared folder." - leave_a_copy "Allow the member to keep a copy of the folder when removing." make_editor @@ -144,84 +81,8 @@ union MemberAction remove "Remove the member from the folder." -struct MemberPermission - "Whether the user is allowed to take the action on the associated member." - - action MemberAction - "The action that the user may wish to take on the member." - allow Boolean - "True if the user is allowed to take the action." - reason PermissionDeniedReason? - "The reason why the user is denied the permission. Not present if the action is allowed." - - example default - action = make_owner - allow = false - reason = target_is_indirect_member - -union PermissionDeniedReason - "Possible reasons the user is denied a permission." - - user_not_same_team_as_owner - "User is not on the same team as the folder owner." - user_not_allowed_by_owner - "User is prohibited by the owner from taking the action." - target_is_indirect_member - "Target is indirectly a member of the folder, for example by being part of a group." - target_is_owner - "Target is the owner of the folder." - target_is_self - "Target is the user itself." - target_not_active - "Target is not an active member of the team." - folder_is_limited_team_folder - "Folder is team folder for a limited team." - owner_not_on_team - "The content owner needs to be on a Dropbox team to perform this action." - permission_denied - "The user does not have permission to perform this action on the link." - restricted_by_team - "The user's team policy prevents performing this action on the link." - user_account_type - "The user's account type does not support this action." - user_not_on_team - "The user needs to be on a Dropbox team to perform this action." - folder_is_inside_shared_folder - "Folder is inside of another shared folder." - restricted_by_parent_folder - "Policy cannot be changed due to restrictions from parent folder." - insufficient_plan InsufficientPlan - -struct InsufficientPlan - message String - "A message to tell the user to upgrade in order to support expected action." - upsell_url String? - "A URL to send the user to in order to obtain the account type they need, e.g. upgrading. - Absent if there is no action the user can take to upgrade." - -union AclUpdatePolicy - "Who can change a shared folder's access control list (ACL). In other words, who can add, - remove, or change the privileges of members." - - owner - "Only the owner can update the ACL." - editors - "Any editor can update the ACL. This may be further restricted to - editors on the same team." - -union SharedLinkPolicy - "Who can view shared links in this folder." - - anyone - "Links can be shared with anyone." - team - "Links can be shared with anyone on the same team as the owner." - members - "Links can only be shared among members of the shared folder." - struct MembershipInfo "The information about a member of the shared content." - access_type AccessLevel "The access type for this member. It contains inherited access type from parent folder, and acquired access type from this folder." @@ -231,7 +92,7 @@ struct MembershipInfo initials String? "Never set." is_inherited Boolean = false - "True if the member has access from a parent folder." + "True if the member has access on a parent folder." example default access_type = owner @@ -239,66 +100,9 @@ struct MembershipInfo initials = "JD" is_inherited = false -struct UserInfo - "Basic information about a user. Use :route:`users.get_account` and - :route:`users.get_account_batch` to obtain more detailed information." - - account_id users_common.AccountId - "The account ID of the user." - email String - "Email address of user." - display_name String - "The display name of the user." - same_team Boolean - "If the user is in the same team as current user." - team_member_id String? - "The team member ID of the shared folder member. Only present if - :field:`same_team` is true." - - example default - account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" - same_team = true - team_member_id = "dbmid:abcd1234" - email = "bob@example.com" - display_name = "Robert Smith" - -struct UserMembershipInfo extends MembershipInfo - "The information about a user member of the shared content." - - user UserInfo - "The account information for the membership user." - - example default - user = default - access_type = owner - permissions = [] - -union InviteeInfo - "Information about the recipient of a shared content invitation." - - email common.EmailAddress - "Email address of invited user." - - example default - email = "jessica@example.com" - -struct InviteeMembershipInfo extends MembershipInfo - "Information about an invited member of a shared content." - - invitee InviteeInfo - "Recipient of the invitation." - user UserInfo? - "The user this invitation is tied to, if available." - - example default - invitee = default - access_type = viewer - permissions = [] - struct GroupInfo extends team_common.GroupSummary "The information about a group. Groups is a way to manage a list of users - who need same access permission to the shared folder." - + who need same access permission to the shared folder." group_type team_common.GroupType "The type of group." is_member Boolean @@ -320,7 +124,6 @@ struct GroupInfo extends team_common.GroupSummary struct GroupMembershipInfo extends MembershipInfo "The information about a group member of the shared content." - group GroupInfo "The information about the membership group." @@ -329,382 +132,226 @@ struct GroupMembershipInfo extends MembershipInfo access_type = editor permissions = [] -struct SharedFolderMetadataBase - "Properties of the shared folder." - - access_type AccessLevel - "The current user's access level for this shared folder." - - is_inside_team_folder Boolean - "Whether this folder is inside of a team folder." - - is_team_folder Boolean - "Whether this folder is a - :link:`team folder https://www.dropbox.com/en/help/986`." +union InviteeInfo + "Information about the recipient of a shared content invitation." + email common.EmailAddress + "Email address of invited user." - owner_display_names List(String)? - "The display names of the users that own the folder. If the folder is - part of a team folder, the display names of the team admins are also - included. Absent if the owner display names cannot be fetched." + example default + email = "jessica@example.com" - owner_team users.Team? - "The team that owns the folder. This field is not present if the folder - is not owned by a team." +struct UserInfo + "Basic information about a user. Use :route:`users.get_account` and + :route:`users.get_account_batch` to obtain more detailed information." + account_id users_common.AccountId + "The account ID of the user." + email String + "Email address of user." + display_name String + "The display name of the user." + same_team Boolean + "If the user is in the same team as current user." + team_member_id String? + "The team member ID of the shared folder member. Only present if + :field:`same_team` is true." - parent_shared_folder_id common.SharedFolderId? - "The ID of the parent shared folder. This field is present only if the - folder is contained within another shared folder." + example default + account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" + same_team = true + team_member_id = "dbmid:abcd1234" + email = "bob@example.com" + display_name = "Robert Smith" - path_display String? - "The full path of this shared folder. Absent for unmounted folders." +struct InviteeMembershipInfo extends MembershipInfo + "Information about an invited member of a shared content." + invitee InviteeInfo + "Recipient of the invitation." + user UserInfo? + "The user this invitation is tied to, if available." - path_lower String? - "The lower-cased full path of this shared folder. Absent for unmounted folders." + example default + invitee = default + access_type = viewer + permissions = [] - parent_folder_name String? - "Display name for the parent folder." +struct UserMembershipInfo extends MembershipInfo + "The information about a user member of the shared content." + user UserInfo + "The account information for the membership user." example default + user = default access_type = owner - is_inside_team_folder = false - is_team_folder = false - owner_display_names = ["Jane Doe"] - owner_team = default - parent_folder_name = "Parent Shared Folder" + permissions = [] union AccessInheritance "Information about the inheritance policy of a shared folder." - inherit "The shared folder inherits its members from the parent folder." - no_inherit "The shared folder does not inherit its members from the parent folder." -# NOTE: If you modify this struct, also modify InternalSharedFolderMetadata, -# which is used by mobile -struct SharedFolderMetadata extends SharedFolderMetadataBase - "The metadata which includes basic information about the shared folder." - - link_metadata SharedContentLinkMetadata? - "The metadata of the shared content link to this shared folder. Absent if there is no - link on the folder. This is for an unreleased feature so it may not be returned yet." - - name String - "The name of the this shared folder." - - permissions List(FolderPermission)? - "Actions the current user may perform on the folder and its contents. - The set of permissions corresponds to the FolderActions in the request." +union AddFolderMemberError + access_error SharedFolderAccessError + "Unable to access shared folder." + email_unverified + "This user's email address is not verified. This functionality is only + available on accounts with a verified email address. Users can verify + their email address :link:`here https://www.dropbox.com/help/317`." + banned_member + "The current user has been banned." + bad_member AddMemberSelectorError + ":field:`AddFolderMemberArg.members` contains a bad invitation recipient." + cant_share_outside_team + "Your team policy does not allow sharing outside of the team." + too_many_members UInt64 = 0 + "The value is the member limit that was reached." + too_many_pending_invites UInt64 = 0 + "The value is the pending invite limit that was reached." + rate_limit + "The current user has hit the limit of invites they can send per day. Try again in 24 hours." + too_many_invitees + "The current user is trying to share with too many people at once." + insufficient_plan + "The current user's account doesn't support this action. An example of + this is when adding a read-only member. This action can only be + performed by users that have upgraded to a Pro or Business plan." + team_folder + "This action cannot be performed on a team shared folder." + no_permission + "The current user does not have permission to perform this action." + invalid_shared_folder + "Invalid shared folder error will be returned as an access_error." - policy FolderPolicy - "Policies governing this shared folder." + example default + no_permission = null + + example member + bad_member = default - preview_url String - "URL for displaying a web preview of the shared folder." - - shared_folder_id common.SharedFolderId - "The ID of the shared folder." - - time_invited common.DropboxTimestamp - "Timestamp indicating when the current user was invited to this shared folder." - - access_inheritance AccessInheritance = inherit - "Whether the folder inherits its members from its parent." - - example default - path_lower = "/dir" - link_metadata = default - name = "dir" - shared_folder_id = "84528192421" - permissions = [] - access_type = owner - is_inside_team_folder = false - is_team_folder = false - policy = default - time_invited = "2016-01-20T00:00:00Z" - preview_url = "https://www.dropbox.com/scl/fo/fir9vjelf" - access_inheritance = inherit - -union SharedFolderAccessError - "There is an error accessing the shared folder." - - invalid_id - "This shared folder ID is invalid." - not_a_member - "The user is not a member of the shared folder - thus cannot access it." - invalid_member - "The user does not exist or their account is disabled." - email_unverified - "Never set." - unmounted - "The shared folder is unmounted." - -struct MemberAccessLevelResult - "Contains information about a member's access level to content after an operation." - access_level AccessLevel? - "The member still has this level of access to the content through a parent folder." - warning String? - "A localized string with additional information about why the user - has this access level to the content." - access_details List(ParentFolderAccessInfo)? - "The parent folders that a member has access to. The field is present if the user - has access to the first parent folder where the member gains access." - - example default - -struct ParentFolderAccessInfo - "Contains information about a parent folder that a member has access to." - - folder_name String - "Display name for the folder." - - shared_folder_id common.SharedFolderId - "The identifier of the parent shared folder." - - permissions List(MemberPermission) - "The user's permissions for the parent shared folder." - - path String - "The full path to the parent shared folder relative to the acting user's root." - - example default - folder_name = "Shared Folder" - shared_folder_id = "84528192421" - permissions = [] - path = "/Shared Folder" - -# -- - -route list_folders(ListFoldersArgs, ListFoldersResult, Void) - "Return the list of all shared folders the current user has access to." - - attrs - scope = "sharing.read" - -struct ListFoldersArgs - limit UInt32(min_value=1, max_value=1000) = 1000 - "The maximum number of results to return per request." - actions List(FolderAction)? - "A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the - response's :field:`SharedFolderMetadata.permissions` field describing the actions the - authenticated user can perform on the folder." - - example default - limit = 100 - actions = [] - -struct ListFoldersResult - "Result for :route:`list_folders` or :route:`list_mountable_folders`, depending on which - endpoint was requested. - - Unmounted shared folders can be identified by the absence of - :field:`SharedFolderMetadata.path_lower`." - - entries List(SharedFolderMetadata) - "List of all shared folders the authenticated user has access to." - cursor String? - "Present if there are additional shared folders that have not been returned yet. Pass the - cursor into the corresponding continue endpoint (either :route:`list_folders/continue` - or :route:`list_mountable_folders/continue`) to list additional folders." +union AddMemberSelectorError + automatic_group + "Automatically created groups can only be added to team folders." + invalid_dropbox_id DropboxId + "The value is the ID that could not be identified." + invalid_email common.EmailAddress + "The value is the e-email address that is malformed." + invalid_group + "Provided group is invalid." + unverified_dropbox_id DropboxId + "The value is the ID of the Dropbox user with an unverified email + address. Invite unverified users by email address instead of by their + Dropbox ID." + group_deleted + "At least one of the specified groups in :field:`AddFolderMemberArg.members` + is deleted." + group_not_on_team + "Sharing to a group that is not on the current user's team." example default - entries = [default] - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - -# -- - -route list_folders/continue(ListFoldersContinueArg, ListFoldersResult, ListFoldersContinueError) - "Once a cursor has been retrieved from :route:`list_folders`, use this to paginate through all - shared folders. The cursor must come from a previous call to :route:`list_folders` or - :route:`list_folders/continue`." + invalid_dropbox_id = "dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q" - attrs - scope = "sharing.read" +union JobError + "Error occurred while performing an asynchronous job from :route:`unshare_folder` + or :route:`remove_folder_member`." + unshare_folder_error UnshareFolderError + "Error occurred while performing :route:`unshare_folder` action." + remove_folder_member_error RemoveFolderMemberError + "Error occurred while performing :route:`remove_folder_member` action." + relinquish_folder_membership_error RelinquishFolderMembershipError + "Error occurred while performing :route:`relinquish_folder_membership` action." -struct ListFoldersContinueArg - cursor String - "The cursor returned by the previous API call specified in the endpoint description." +union_closed JobStatus extends async.PollResultBase + complete + "The asynchronous job has finished." + failed JobError + "The asynchronous job returned an error." - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" +union ListFolderMembersContinueError + access_error SharedFolderAccessError + invalid_cursor + ":field:`ListFolderMembersContinueArg.cursor` is invalid." union ListFoldersContinueError invalid_cursor ":field:`ListFoldersContinueArg.cursor` is invalid." -# -- - -route list_mountable_folders(ListFoldersArgs, ListFoldersResult, Void) - "Return the list of all shared folders the current user can mount or unmount." - - attrs - scope = "sharing.read" - -# -- - -route list_mountable_folders/continue(ListFoldersContinueArg, ListFoldersResult, ListFoldersContinueError) - "Once a cursor has been retrieved from :route:`list_mountable_folders`, use this to paginate through all - mountable shared folders. The cursor must come from a previous call to :route:`list_mountable_folders` or - :route:`list_mountable_folders/continue`." - - attrs - scope = "sharing.read" - -# -- - -route get_folder_metadata(GetMetadataArgs, SharedFolderMetadata, SharedFolderAccessError) - "Returns shared folder metadata by its folder ID." - - attrs - select_admin_mode = "whole_team" - scope = "sharing.read" - -struct GetMetadataArgs - shared_folder_id common.SharedFolderId - "The ID for the shared folder." - actions List(FolderAction)? - "A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the - response's :field:`SharedFolderMetadata.permissions` field describing the actions the - authenticated user can perform on the folder." - - example default - shared_folder_id = "84528192421" - actions = [] - -# -- - -route list_folder_members(ListFolderMembersArgs, SharedFolderMembers, SharedFolderAccessError) - "Returns shared folder membership by its folder ID." - - attrs - select_admin_mode = "whole_team" - scope = "sharing.read" - -struct ListFolderMembersCursorArg - actions List(MemberAction)? - "This is a list indicating whether each returned member will include a boolean value - :field:`MemberPermission.allow` that describes whether the current user can perform - the MemberAction on the member." - - limit UInt32(min_value=1, max_value=1000) = 1000 - "The maximum number of results that include members, groups and invitees to return per request." - - example default - actions = [] - limit = 10 - -struct ListFolderMembersArgs extends ListFolderMembersCursorArg - shared_folder_id common.SharedFolderId - "The ID for the shared folder." - - example default - shared_folder_id = "84528192421" - actions = [] - limit = 10 - -struct SharedFolderMembers - "Shared folder user and group membership." - - users List(UserMembershipInfo) - "The list of user members of the shared folder." - groups List(GroupMembershipInfo) - "The list of group members of the shared folder." - invitees List(InviteeMembershipInfo) - "The list of invitees to the shared folder." - cursor String? - "Present if there are additional shared folder members that have not been returned yet. Pass - the cursor into :route:`list_folder_members/continue` to list additional members." - - example default - users = [default] - groups = [default] - invitees = [default] - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - -# -- +union MountFolderError + access_error SharedFolderAccessError + inside_shared_folder + "Mounting would cause a shared folder to be inside another, which is + disallowed." + insufficient_quota InsufficientQuotaAmounts + "The current user does not have enough space to mount the shared + folder." + already_mounted + "The shared folder is already mounted." + no_permission + "The current user does not have permission to perform this action." + not_mountable + "The shared folder is not mountable. One example where this can occur + is when the shared folder belongs within a team folder in the user's + Dropbox." + must_automount + "The shared folder is not mountable by directly call APIs, instead the + automounter is responsible for mounting it." -route list_folder_members/continue(ListFolderMembersContinueArg, SharedFolderMembers, ListFolderMembersContinueError) - "Once a cursor has been retrieved from :route:`list_folder_members`, use this to paginate - through all shared folder members." +union RelinquishFolderMembershipError + access_error SharedFolderAccessError + folder_owner + "The current user is the owner of the shared folder. Owners cannot relinquish membership to + their own folders. Try unsharing or transferring ownership first." + mounted + "The shared folder is currently mounted. Unmount the shared folder before relinquishing + membership." + group_access + "The current user has access to the shared folder via a group. You can't relinquish + membership to folders shared via groups." + team_folder + "This action cannot be performed on a team shared folder." + no_permission + "The current user does not have permission to perform this action." + no_explicit_access + "The current user only has inherited access to the shared folder. You can't relinquish + inherited membership to folders." - attrs - select_admin_mode = "whole_team" - scope = "sharing.read" +union RemoveFolderMemberError + access_error SharedFolderAccessError + member_error SharedFolderMemberError + folder_owner + "The target user is the owner of the shared folder. You can't remove + this user until ownership has been transferred to another member." + group_access + "The target user has access to the shared folder via a group." + team_folder + "This action cannot be performed on a team shared folder." + no_permission + "The current user does not have permission to perform this action." + too_many_files + "This shared folder has too many files for leaving a copy. You can + still remove this user without leaving a copy." -struct ListFolderMembersContinueArg - cursor String - "The cursor returned by your last call to :route:`list_folder_members` or - :route:`list_folder_members/continue`." +union_closed RemoveMemberJobStatus extends async.PollResultBase + complete MemberAccessLevelResult + "Removing the folder member has finished. The value is information about + whether the member has another form of access." + failed RemoveFolderMemberError example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + complete = default -union ListFolderMembersContinueError +union SetAccessInheritanceError access_error SharedFolderAccessError - invalid_cursor - ":field:`ListFolderMembersContinueArg.cursor` is invalid." - -# -- - -route share_folder(ShareFolderArg, ShareFolderLaunch, ShareFolderError ) - "Share a folder with collaborators. - - Most sharing will be completed synchronously. Large folders will be - completed asynchronously. To make testing the async case repeatable, set - `ShareFolderArg.force_async`. - - If a :field:`ShareFolderLaunch.async_job_id` is returned, you'll need to - call :route:`check_share_job_status` until the action completes to get the - metadata for the folder." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" - -# As of 2017-05, there are three kinds of arg: -# ShareFolderArg: The public stable version. We cannot make backwards-incompatible changes at all. -# ShareFolderInternalArg: The private stable version. We cannot make backwards-incompatible changes -# unless we are sure no clients in the wild are using the endpoint. -# AlphaShareFolderArg: The private experimental version. We can do what we want as long as it -# doesn't break web. -struct ShareFolderArgBase - acl_update_policy AclUpdatePolicy? - "Who can add and remove members of this shared folder." - force_async Boolean = false - "Whether to force the share to happen asynchronously." - member_policy MemberPolicy? - "Who can be a member of this shared folder. Only applicable if the - current user is on a team." - path files.WritePathOrId - "The path or the file id to the folder to share. If it does not exist, - then a new one is created." - shared_link_policy SharedLinkPolicy? - "The policy to apply to shared links created for content inside this - shared folder. The current user must be on a team to set this policy to - :field:`SharedLinkPolicy.members`." - viewer_info_policy ViewerInfoPolicy? - "Who can enable/disable viewer info for this shared folder." - access_inheritance AccessInheritance = inherit - "The access inheritance settings for the folder." + "Unable to access shared folder." + no_permission + "The current user does not have permission to perform this action." example default - path = "/example/workspace" - -struct ShareFolderArg extends ShareFolderArgBase - actions List(FolderAction)? - "A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the - response's :field:`SharedFolderMetadata.permissions` field describing the actions the - authenticated user can perform on the folder." - link_settings LinkSettings? - "Settings on the link for this folder." + no_permission = null - example default - path = "/example/workspace" - member_policy = team - acl_update_policy = editors - shared_link_policy = members +union ShareFolderError extends ShareFolderErrorBase + no_permission + "The current user does not have permission to perform this action." union ShareFolderErrorBase email_unverified @@ -714,15 +361,40 @@ union ShareFolderErrorBase bad_path SharePathError ":field:`ShareFolderArg.path` is invalid." team_policy_disallows_member_policy - "Team policy is more restrictive than :field:`ShareFolderArg.member_policy`." + "Team policy or group sharing settings are more restrictive than :field:`ShareFolderArg.member_policy`." disallowed_shared_link_policy "The current user's account is not allowed to select the specified :field:`ShareFolderArg.shared_link_policy`." -union ShareFolderError extends ShareFolderErrorBase +union ShareFolderErrorBaseV2 + email_unverified + "This user's email address is not verified. This functionality is only + available on accounts with a verified email address. Users can verify + their email address :link:`here https://www.dropbox.com/help/317`." + team_policy_disallows_member_policy + "Team policy or group sharing settings are more restrictive than :field:`ShareFolderArg.member_policy`." + disallowed_shared_link_policy + "The current user's account is not allowed to select the specified + :field:`ShareFolderArg.shared_link_policy`." + +union ShareFolderErrorV2 extends ShareFolderErrorBaseV2 no_permission "The current user does not have permission to perform this action." +union_closed ShareFolderJobStatus extends async.PollResultBase + complete SharedFolderMetadata + "The share job has finished. The value is the metadata for the folder." + failed ShareFolderError + + example default + complete = default + +union_closed ShareFolderLaunch extends async.LaunchResultBase + complete SharedFolderMetadata + + example default + complete = default + union SharePathError is_file "A file is at the specified path." @@ -758,116 +430,64 @@ union SharePathError is_family "We do not support sharing the Family folder." -# -- - -union_closed ShareFolderJobStatus extends async.PollResultBase - complete SharedFolderMetadata - "The share job has finished. The value is the metadata for the folder." - failed ShareFolderError - - example default - complete = default - -union_closed ShareFolderLaunch extends async.LaunchResultBase - complete SharedFolderMetadata - - example default - complete = default - -route check_share_job_status(async.PollArg, ShareFolderJobStatus, async.PollError) - "Returns the status of an asynchronous job for sharing a folder." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" - -union_closed JobStatus extends async.PollResultBase - complete - "The asynchronous job has finished." - failed JobError - "The asynchronous job returned an error." +union SharePathErrorBaseV2 + is_file + "A file is at the specified path." + inside_shared_folder + "We do not support sharing a folder inside a shared folder." + contains_shared_folder + "We do not support shared folders that contain shared folders." + contains_team_folder + "We do not support shared folders that contain team folders." + is_app_folder + "We do not support sharing an app folder." + inside_app_folder + "We do not support sharing a folder inside an app folder." + is_public_folder + "A public folder can't be shared this way. Use a public link instead." + inside_public_folder + "A folder inside a public folder can't be shared this way. Use a public + link instead." + already_shared SharedFolderMetadata + "Folder is already shared. Contains metadata about the existing shared folder." + invalid_path + "Path is not valid." + is_osx_package + "We do not support sharing a Mac OS X package." + inside_osx_package + "We do not support sharing a folder inside a Mac OS X package." + is_vault + "We do not support sharing the Vault folder." + is_vault_locked + "We do not support sharing a folder inside a locked Vault." -# -- +union SharePathErrorV2 extends SharePathErrorBaseV2 + is_family + "We do not support sharing the Family folder." + contains_app_folder + "We do not support shared folders that contain app folders." -union SharedFolderMemberError - invalid_dropbox_id - "The target dropbox_id is invalid." +union SharedFolderAccessError + "There is an error accessing the shared folder." + invalid_id + "This shared folder ID is invalid." not_a_member - "The target dropbox_id is not a member of the shared folder." - no_explicit_access MemberAccessLevelResult - "The target member only has inherited access to the shared folder." - -union JobError - "Error occurred while performing an asynchronous job from :route:`unshare_folder` - or :route:`remove_folder_member`." - - unshare_folder_error UnshareFolderError - "Error occurred while performing :route:`unshare_folder` action." - remove_folder_member_error RemoveFolderMemberError - "Error occurred while performing :route:`remove_folder_member` action." - relinquish_folder_membership_error RelinquishFolderMembershipError - "Error occurred while performing :route:`relinquish_folder_membership` action." - -route check_job_status(async.PollArg, JobStatus, async.PollError) - "Returns the status of an asynchronous job." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" - -# -- - -route unshare_folder(UnshareFolderArg, async.LaunchEmptyResult, UnshareFolderError) - "Allows a shared folder owner to unshare the folder. - - You'll need to call :route:`check_job_status` to determine if the action has - completed successfully." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" - -struct UnshareFolderArg - shared_folder_id common.SharedFolderId - "The ID for the shared folder." - leave_a_copy Boolean = false - "If true, members of this shared folder will get a copy of this folder - after it's unshared. Otherwise, it will be removed from their Dropbox. - The current user, who is an owner, will always retain their copy." - - example default - shared_folder_id = "84528192421" - leave_a_copy = false - -union UnshareFolderError - access_error SharedFolderAccessError - team_folder - "This action cannot be performed on a team shared folder." - no_permission - "The current user does not have permission to perform this action." - too_many_files - "This shared folder has too many files to be unshared." - -# -- - -route transfer_folder(TransferFolderArg, Void, TransferFolderError) - "Transfer ownership of a shared folder to a member of the shared folder. - - User must have :field:`AccessLevel.owner` access to the shared folder to perform a transfer." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" - -struct TransferFolderArg - shared_folder_id common.SharedFolderId - "The ID for the shared folder." - to_dropbox_id DropboxId - "A account or team member ID to transfer ownership to." + "The user is not a member of the shared folder + thus cannot access it." + invalid_member + "The user does not exist or their account is disabled." + email_unverified + "Never set." + unmounted + "The shared folder is unmounted." - example default - shared_folder_id = "84528192421" - to_dropbox_id = "dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q" +union SharedFolderMemberError + invalid_dropbox_id + "The target dropbox_id is invalid." + not_a_member + "The target dropbox_id is not a member of the shared folder." + no_explicit_access MemberAccessLevelResult + "The target member only has inherited access to the shared folder." union TransferFolderError access_error SharedFolderAccessError @@ -886,44 +506,37 @@ union TransferFolderError no_permission "The current user does not have permission to perform this action." -# -- - -route update_folder_policy(UpdateFolderPolicyArg, SharedFolderMetadata, UpdateFolderPolicyError) - "Update the sharing policies for a shared folder. - - User must have :field:`AccessLevel.owner` access to the shared folder to update its policies." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" +union UnmountFolderError + access_error SharedFolderAccessError + no_permission + "The current user does not have permission to perform this action." + not_unmountable + "The shared folder can't be unmounted. One example where this can occur + is when the shared folder's parent folder is also a shared folder that + resides in the current user's Dropbox." -struct UpdateFolderPolicyArg - "If any of the policies are unset, then they retain their current setting." +union UnshareFolderError + access_error SharedFolderAccessError + team_folder + "This action cannot be performed on a team shared folder." + no_permission + "The current user does not have permission to perform this action." + too_many_files + "This shared folder has too many files to be unshared." - shared_folder_id common.SharedFolderId - "The ID for the shared folder." - member_policy MemberPolicy? - "Who can be a member of this shared folder. Only applicable if the - current user is on a team." - acl_update_policy AclUpdatePolicy? - "Who can add and remove members of this shared folder." - viewer_info_policy ViewerInfoPolicy? - "Who can enable/disable viewer info for this shared folder." - shared_link_policy SharedLinkPolicy? - "The policy to apply to shared links created for content inside this - shared folder. The current user must be on a team to set this policy to - :field:`SharedLinkPolicy.members`." - link_settings LinkSettings? - "Settings on the link for this folder." - actions List(FolderAction)? - "A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the - response's :field:`SharedFolderMetadata.permissions` field describing the actions the - authenticated user can perform on the folder." - example default - shared_folder_id = "84528192421" - member_policy = team - acl_update_policy = owner - shared_link_policy = members +union UpdateFolderMemberError + access_error SharedFolderAccessError + member_error SharedFolderMemberError + no_explicit_access AddFolderMemberError + "If updating the access type required the member to be added to the shared folder + and there was an error when adding the member." + insufficient_plan + "The current user's account doesn't support this action. An example of + this is when downgrading a member from editor to viewer. This action + can only be performed by users that have upgraded to a Pro or Business + plan." + no_permission + "The current user does not have permission to perform this action." union UpdateFolderPolicyError access_error SharedFolderAccessError @@ -931,7 +544,7 @@ union UpdateFolderPolicyError ":field:`UpdateFolderPolicyArg.member_policy` was set even though user is not on a team." team_policy_disallows_member_policy - "Team policy is more restrictive than :field:`ShareFolderArg.member_policy`." + "Team policy or group sharing settings are more restrictive than :field:`ShareFolderArg.member_policy`." disallowed_shared_link_policy "The current account is not allowed to select the specified :field:`ShareFolderArg.shared_link_policy`." @@ -940,33 +553,19 @@ union UpdateFolderPolicyError team_folder "This action cannot be performed on a team shared folder." -# -- - -route add_folder_member(AddFolderMemberArg, Void, AddFolderMemberError) - "Allows an owner or editor (if the ACL update policy allows) of a shared - folder to add another member. - - For the new member to get access to all the functionality for this folder, - you will need to call :route:`mount_folder` on their behalf." - - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" - struct AddFolderMemberArg shared_folder_id common.SharedFolderId "The ID for the shared folder." - members List(AddMember) "The intended list of members to add. Added members will receive invites to join the shared folder." - quiet Boolean = false "Whether added members should be notified via email and device notifications of their invite." - custom_message String(min_length=1)? "Optional message to display to added members in their invitation." + fp_sealed_result String? + "The FingerprintJS Sealed Client Result value" example default members = [default, account] @@ -975,336 +574,341 @@ struct AddFolderMemberArg struct AddMember "The member and type of access the member should have when added to a shared folder." - member MemberSelector "The member to add to the shared folder." - access_level AccessLevel = viewer + access_level AccessLevel? "The access level to grant :field:`member` to the shared folder. :field:`AccessLevel.owner` is disallowed." example default member = default access_level = editor - + example account member = account access_level = viewer -union MemberSelector - "Includes different ways to identify a member of a shared folder." - - dropbox_id DropboxId - "Dropbox account, team member, or group ID of member." - email common.EmailAddress - "Email address of member." +struct FolderPermission + "Whether the user is allowed to take the action on the shared folder." + action FolderAction + "The action that the user may wish to take on the folder." + allow Boolean + "True if the user is allowed to take the action." + reason PermissionDeniedReason? + "The reason why the user is denied the permission. Not present if the action + is allowed, or if no reason is available." example default - email = "justin@example.com" - - example account - dropbox_id = "dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q" - - example group - dropbox_id = "g:98d36ed08e6290c2e9d536a392f974ee" + action = edit_contents + allow = false + reason = user_not_same_team_as_owner -union AddFolderMemberError - access_error SharedFolderAccessError - "Unable to access shared folder." - email_unverified - "This user's email address is not verified. This functionality is only - available on accounts with a verified email address. Users can verify - their email address :link:`here https://www.dropbox.com/help/317`." - banned_member - "The current user has been banned." - bad_member AddMemberSelectorError - ":field:`AddFolderMemberArg.members` contains a bad invitation recipient." - cant_share_outside_team - "Your team policy does not allow sharing outside of the team." - too_many_members UInt64 - "The value is the member limit that was reached." - too_many_pending_invites UInt64 - "The value is the pending invite limit that was reached." - rate_limit - "The current user has hit the limit of invites they can send per day. Try again in 24 hours." - too_many_invitees - "The current user is trying to share with too many people at once." - insufficient_plan - "The current user's account doesn't support this action. An example of - this is when adding a read-only member. This action can only be - performed by users that have upgraded to a Pro or Business plan." - team_folder - "This action cannot be performed on a team shared folder." - no_permission - "The current user does not have permission to perform this action." - invalid_shared_folder - "Invalid shared folder error will be returned as an access_error." +struct GetMetadataArgs + shared_folder_id common.SharedFolderId + "The ID for the shared folder." + actions List(FolderAction)? + "A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the + response's :field:`SharedFolderMetadata.permissions` field describing the actions the + authenticated user can perform on the folder." example default - no_permission = null + shared_folder_id = "84528192421" + actions = [] - example member - bad_member = default +struct InsufficientQuotaAmounts + space_needed UInt64 + "The amount of space needed to add the item (the size of the item)." + space_shortage UInt64 + "The amount of extra space needed to add the item." + space_left UInt64 + "The amount of space left in the user's Dropbox, less than space_needed." -union AddMemberSelectorError - automatic_group - "Automatically created groups can only be added to team folders." - invalid_dropbox_id DropboxId - "The value is the ID that could not be identified." - invalid_email common.EmailAddress - "The value is the e-email address that is malformed." - unverified_dropbox_id DropboxId - "The value is the ID of the Dropbox user with an unverified email - address. Invite unverified users by email address instead of by their - Dropbox ID." - group_deleted - "At least one of the specified groups in :field:`AddFolderMemberArg.members` - is deleted." - group_not_on_team - "Sharing to a group that is not on the current user's team." +struct ListFolderMembersArgs extends ListFolderMembersCursorArg + shared_folder_id common.SharedFolderId + "The ID for the shared folder. When path is provided, the folder ID will be extracted from the path instead." + path String? + "Optional path to get inherited members. When omitted, uses shared_folder_id to return direct members. + When provided, extracts folder ID from this path and returns users who have access through parent shared folder." example default - invalid_dropbox_id = "dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q" - -# -- + shared_folder_id = "84528192421" + actions = [] + limit = 10 + + example with_path_id + shared_folder_id = "67890" + path = "ns:67890/Documents/Folder" + actions = [] + limit = 10 + + example with_full_path + shared_folder_id = "84528192421" + path = "/Users/john/Dropbox/Documents/Folder" + actions = [] + limit = 10 -route remove_folder_member(RemoveFolderMemberArg, async.LaunchResultBase, RemoveFolderMemberError) - "Allows an owner or editor (if the ACL update policy allows) of a shared - folder to remove another member." +struct ListFolderMembersContinueArg + cursor String + "The cursor returned by your last call to :route:`list_folder_members` or + :route:`list_folder_members/continue`." - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" -struct RemoveFolderMemberArg - shared_folder_id common.SharedFolderId - "The ID for the shared folder." - member MemberSelector - "The member to remove from the folder." - leave_a_copy Boolean - "If true, the removed user will keep their copy of the folder after - it's unshared, assuming it was mounted. Otherwise, it will be removed - from their Dropbox. This must be set to false when removing a group, - or when the folder is within a team folder or another shared folder." +struct ListFolderMembersCursorArg + actions List(MemberAction)? + "This is a list indicating whether each returned member will include a boolean value + :field:`MemberPermission.allow` that describes whether the current user can perform + the MemberAction on the member." + limit UInt32(max_value=1000, min_value=1) = 1000 + "The maximum number of results that include members, groups and invitees to return per request." example default - shared_folder_id = "84528192421" - member = default - leave_a_copy = false + actions = [] + limit = 10 -union RemoveFolderMemberError - access_error SharedFolderAccessError - member_error SharedFolderMemberError - folder_owner - "The target user is the owner of the shared folder. You can't remove - this user until ownership has been transferred to another member." - group_access - "The target user has access to the shared folder via a group." - team_folder - "This action cannot be performed on a team shared folder." - no_permission - "The current user does not have permission to perform this action." - too_many_files - "This shared folder has too many files for leaving a copy. You can - still remove this user without leaving a copy." +struct ListFoldersArgs + limit UInt32(max_value=1000, min_value=1) = 1000 + "The maximum number of results to return per request." + actions List(FolderAction)? + "A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the + response's :field:`SharedFolderMetadata.permissions` field describing the actions the + authenticated user can perform on the folder." -union_closed RemoveMemberJobStatus extends async.PollResultBase - complete MemberAccessLevelResult - "Removing the folder member has finished. The value is information about - whether the member has another form of access." - failed RemoveFolderMemberError + example default + limit = 100 + actions = [] + +struct ListFoldersContinueArg + cursor String + "The cursor returned by the previous API call specified in the endpoint description." example default - complete = default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + +struct ListFoldersResult + "Result for :route:`list_folders` or :route:`list_mountable_folders`, depending on which + endpoint was requested. + Unmounted shared folders can be identified by the absence of + :field:`SharedFolderMetadata.path_lower`." + entries List(SharedFolderMetadata) + "List of all shared folders the authenticated user has access to." + cursor String? + "Present if there are additional shared folders that have not been returned yet. Pass the + cursor into the corresponding continue endpoint (either :route:`list_folders/continue` + or :route:`list_mountable_folders/continue`) to list additional folders." -route check_remove_member_job_status(async.PollArg, RemoveMemberJobStatus, async.PollError) - "Returns the status of an asynchronous job for sharing a folder." + example default + entries = [default] + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" +struct MountFolderArg + shared_folder_id common.SharedFolderId + "The ID of the shared folder to mount." -# -- + example default + shared_folder_id = "84528192421" -route update_folder_member(UpdateFolderMemberArg, MemberAccessLevelResult, UpdateFolderMemberError) - "Allows an owner or editor of a shared folder to update another member's - permissions." +struct RelinquishFolderMembershipArg + shared_folder_id common.SharedFolderId + "The ID for the shared folder." + leave_a_copy Boolean = false + "Keep a copy of the folder's contents upon relinquishing membership. + This must be set to false when the folder is within a team folder + or another shared folder." - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" + example default + shared_folder_id = "84528192421" + leave_a_copy = false -struct UpdateFolderMemberArg +struct RemoveFolderMemberArg shared_folder_id common.SharedFolderId "The ID for the shared folder." member MemberSelector - "The member of the shared folder to update. Only the - :field:`MemberSelector.dropbox_id` may be set at this time." - access_level AccessLevel - "The new access level for :field:`member`. :field:`AccessLevel.owner` - is disallowed." + "The member to remove from the folder." + leave_a_copy Boolean + "If true, the removed user will keep their copy of the folder after + it's unshared, assuming it was mounted. Otherwise, it will be removed + from their Dropbox. This must be set to false when removing a group, + or when the folder is within a team folder or another shared folder." example default shared_folder_id = "84528192421" member = default - access_level = editor - -union UpdateFolderMemberError - access_error SharedFolderAccessError - member_error SharedFolderMemberError - no_explicit_access AddFolderMemberError - "If updating the access type required the member to be added to the shared folder - and there was an error when adding the member." - insufficient_plan - "The current user's account doesn't support this action. An example of - this is when downgrading a member from editor to viewer. This action - can only be performed by users that have upgraded to a Pro or Business - plan." - no_permission - "The current user does not have permission to perform this action." - -# -- - -route mount_folder(MountFolderArg, SharedFolderMetadata, MountFolderError) - "The current user mounts the designated folder. - - Mount a shared folder for a user after they have been added as a member. - Once mounted, the shared folder will appear in their Dropbox." - - attrs - scope = "sharing.write" + leave_a_copy = false -# TODO(kelkabany): Consider exposing mount path as an argument. More error -# cases will be possible. -struct MountFolderArg +struct SetAccessInheritanceArg + access_inheritance AccessInheritance = inherit + "The access inheritance settings for the folder." shared_folder_id common.SharedFolderId - "The ID of the shared folder to mount." + "The ID for the shared folder." example default + access_inheritance = inherit shared_folder_id = "84528192421" -struct InsufficientQuotaAmounts - space_needed UInt64 - "The amount of space needed to add the item (the size of the item)." - space_shortage UInt64 - "The amount of extra space needed to add the item." - space_left UInt64 - "The amount of space left in the user's Dropbox, less than space_needed." +struct ShareFolderArg extends ShareFolderArgBase + actions List(FolderAction)? + "A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the + response's :field:`SharedFolderMetadata.permissions` field describing the actions the + authenticated user can perform on the folder." + link_settings LinkSettings? + "Settings on the link for this folder." -union MountFolderError - access_error SharedFolderAccessError - inside_shared_folder - "Mounting would cause a shared folder to be inside another, which is - disallowed." - insufficient_quota InsufficientQuotaAmounts - "The current user does not have enough space to mount the shared - folder." - already_mounted - "The shared folder is already mounted." - no_permission - "The current user does not have permission to perform this action." - not_mountable - "The shared folder is not mountable. One example where this can occur - is when the shared folder belongs within a team folder in the user's - Dropbox." + example default + path = "/example/workspace" + member_policy = team + acl_update_policy = editors + shared_link_policy = members + +struct ShareFolderArgBase + acl_update_policy AclUpdatePolicy? + "Who can add and remove members of this shared folder." + force_async Boolean = false + "Whether to force the share to happen asynchronously." + member_policy MemberPolicy? + "Who can be a member of this shared folder. Only applicable if the + current user is on a team." + path files.WritePathOrId + "The path or the file id to the folder to share. If it does not exist, + then a new one is created." + shared_link_policy SharedLinkPolicy? + "The policy to apply to shared links created for content inside this + shared folder. The current user must be on a team to set this policy to + :field:`SharedLinkPolicy.members`." + viewer_info_policy ViewerInfoPolicy? + "Who can enable/disable viewer info for this shared folder." + access_inheritance AccessInheritance = inherit + "The access inheritance settings for the folder." -# -- + example default + path = "/example/workspace" -route unmount_folder(UnmountFolderArg, Void, UnmountFolderError) - "The current user unmounts the designated folder. They can re-mount the - folder at a later time using :route:`mount_folder`." +struct SharedFolderMembers + "Shared folder user and group membership." + users List(UserMembershipInfo) + "The list of user members of the shared folder." + groups List(GroupMembershipInfo) + "The list of group members of the shared folder." + invitees List(InviteeMembershipInfo) + "The list of invitees to the shared folder." + cursor String? + "Present if there are additional shared folder members that have not been returned yet. Pass + the cursor into :route:`list_folder_members/continue` to list additional members." - attrs - select_admin_mode = "team_admin" - scope = "sharing.write" + example default + users = [default] + groups = [default] + invitees = [default] + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" -struct UnmountFolderArg +struct SharedFolderMetadata extends SharedFolderMetadataBase + "The metadata which includes basic information about the shared folder." + link_metadata SharedContentLinkMetadata? + "The metadata of the shared content link to this shared folder. Absent if there is no + link on the folder. This is for an unreleased feature so it may not be returned yet." + name String + "The name of the this shared folder." + permissions List(FolderPermission)? + "Actions the current user may perform on the folder and its contents. + The set of permissions corresponds to the FolderActions in the request." + policy FolderPolicy + "Policies governing this shared folder." + preview_url String + "URL for displaying a web preview of the shared folder." shared_folder_id common.SharedFolderId - "The ID for the shared folder." + "The ID of the shared folder." + time_invited common.DropboxTimestamp + "Timestamp indicating when the current user was invited to this shared folder." + access_inheritance AccessInheritance = inherit + "Whether the folder inherits its members from its parent." + folder_id files.FileId? + "The ID of the content." example default + path_lower = "/dir" + link_metadata = default + name = "dir" shared_folder_id = "84528192421" + permissions = [] + access_type = owner + is_inside_team_folder = false + is_team_folder = false + policy = default + time_invited = "2016-01-20T00:00:00Z" + preview_url = "https://www.dropbox.com/scl/fo/fir9vjelf" + access_inheritance = inherit + folder_id = "id:a4ayc_80_OEAAAAAAAAAXw" -union UnmountFolderError - access_error SharedFolderAccessError - no_permission - "The current user does not have permission to perform this action." - not_unmountable - "The shared folder can't be unmounted. One example where this can occur - is when the shared folder's parent folder is also a shared folder that - resides in the current user's Dropbox." - -# -- +struct TransferFolderArg + shared_folder_id common.SharedFolderId + "The ID for the shared folder." + to_dropbox_id DropboxId + "A account or team member ID to transfer ownership to." -route relinquish_folder_membership(RelinquishFolderMembershipArg, async.LaunchEmptyResult, RelinquishFolderMembershipError) - "The current user relinquishes their membership in the designated shared - folder and will no longer have access to the folder. A folder owner cannot - relinquish membership in their own folder. + example default + shared_folder_id = "84528192421" + to_dropbox_id = "dbid:AAEufNrMPSPe0dMQijRP0N_aZtBJRm26W4Q" - This will run synchronously if leave_a_copy is false, and asynchronously - if leave_a_copy is true." +struct UnmountFolderArg + shared_folder_id common.SharedFolderId + "The ID for the shared folder." - attrs - scope = "sharing.write" + example default + shared_folder_id = "84528192421" -struct RelinquishFolderMembershipArg +struct UnshareFolderArg shared_folder_id common.SharedFolderId "The ID for the shared folder." leave_a_copy Boolean = false - "Keep a copy of the folder's contents upon relinquishing membership. - This must be set to false when the folder is within a team folder - or another shared folder." + "If true, members of this shared folder will get a copy of this folder + after it's unshared. Otherwise, it will be removed from their Dropbox. + The current user, who is an owner, will always retain their copy." example default shared_folder_id = "84528192421" leave_a_copy = false -union RelinquishFolderMembershipError - access_error SharedFolderAccessError - folder_owner - "The current user is the owner of the shared folder. Owners cannot relinquish membership to - their own folders. Try unsharing or transferring ownership first." - mounted - "The shared folder is currently mounted. Unmount the shared folder before relinquishing - membership." - group_access - "The current user has access to the shared folder via a group. You can't relinquish - membership to folders shared via groups." - team_folder - "This action cannot be performed on a team shared folder." - no_permission - "The current user does not have permission to perform this action." - no_explicit_access - "The current user only has inherited access to the shared folder. You can't relinquish - inherited membership to folders." - -# -- - -route set_access_inheritance (SetAccessInheritanceArg, ShareFolderLaunch, SetAccessInheritanceError) - "Change the inheritance policy of an existing Shared Folder. Only permitted for shared folders in a shared team root. - - If a :field:`ShareFolderLaunch.async_job_id` is returned, you'll need to - call :route:`check_share_job_status` until the action completes to get the - metadata for the folder." - - attrs - scope = "sharing.write" - -struct SetAccessInheritanceArg - access_inheritance AccessInheritance = inherit - "The access inheritance settings for the folder." - +struct UpdateFolderMemberArg shared_folder_id common.SharedFolderId "The ID for the shared folder." + member MemberSelector + "The member of the shared folder to update. Only the + :field:`MemberSelector.dropbox_id` may be set at this time." + access_level AccessLevel + "The new access level for :field:`member`. :field:`AccessLevel.owner` + is disallowed." example default - access_inheritance = inherit shared_folder_id = "84528192421" + member = default + access_level = editor -union SetAccessInheritanceError - access_error SharedFolderAccessError - "Unable to access shared folder." - no_permission - "The current user does not have permission to perform this action." +struct UpdateFolderPolicyArg + "If any of the policies are unset, then they retain their current setting." + shared_folder_id common.SharedFolderId + "The ID for the shared folder." + member_policy MemberPolicy? + "Who can be a member of this shared folder. Only applicable if the + current user is on a team." + acl_update_policy AclUpdatePolicy? + "Who can add and remove members of this shared folder." + viewer_info_policy ViewerInfoPolicy? + "Who can enable/disable viewer info for this shared folder." + shared_link_policy SharedLinkPolicy? + "The policy to apply to shared links created for content inside this + shared folder. The current user must be on a team to set this policy to + :field:`SharedLinkPolicy.members`." + link_settings LinkSettings? + "Settings on the link for this folder." + actions List(FolderAction)? + "A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the + response's :field:`SharedFolderMetadata.permissions` field describing the actions the + authenticated user can perform on the folder." example default - no_permission = null + shared_folder_id = "84528192421" + member_policy = team + acl_update_policy = owner + shared_link_policy = members + diff --git a/sharing_folders_apiv2_sharing_folders.stone b/sharing_folders_apiv2_sharing_folders.stone new file mode 100644 index 0000000..4f157b4 --- /dev/null +++ b/sharing_folders_apiv2_sharing_folders.stone @@ -0,0 +1,174 @@ +namespace sharing + +import async + +route add_folder_member (AddFolderMemberArg, Void, AddFolderMemberError) + "Allows an owner or editor (if the ACL update policy allows) of a shared + folder to add another member. + For the new member to get access to all the functionality for this folder, + you will need to call :route:`mount_folder` on their behalf." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route check_job_status (async.PollArg, JobStatus, async.PollError) + "Returns the status of an asynchronous job." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route check_remove_member_job_status (async.PollArg, RemoveMemberJobStatus, async.PollError) + "Returns the status of an asynchronous job for sharing a folder." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route check_share_job_status (async.PollArg, ShareFolderJobStatus, async.PollError) + "Returns the status of an asynchronous job for sharing a folder." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route list_folder_members/continue (ListFolderMembersContinueArg, SharedFolderMembers, ListFolderMembersContinueError) + "Once a cursor has been retrieved from :route:`list_folder_members`, use this to paginate + through all shared folder members." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "whole_team" + +route list_folders (ListFoldersArgs, ListFoldersResult, Void) + "Return the list of all shared folders the current user has access to." + + attrs + auth = "user" + scope = "sharing.read" + +route list_folders/continue (ListFoldersContinueArg, ListFoldersResult, ListFoldersContinueError) + "Once a cursor has been retrieved from :route:`list_folders`, use this to paginate through all + shared folders. The cursor must come from a previous call to :route:`list_folders` or + :route:`list_folders/continue`." + + attrs + auth = "user" + scope = "sharing.read" + +route list_mountable_folders/continue (ListFoldersContinueArg, ListFoldersResult, ListFoldersContinueError) + "Once a cursor has been retrieved from :route:`list_mountable_folders`, use this to paginate through all + mountable shared folders. The cursor must come from a previous call to :route:`list_mountable_folders` or + :route:`list_mountable_folders/continue`." + + attrs + auth = "user" + scope = "sharing.read" + +route mount_folder (MountFolderArg, SharedFolderMetadata, MountFolderError) + "The current user mounts the designated folder. + Mount a shared folder for a user after they have been added as a member. + Once mounted, the shared folder will appear in their Dropbox." + + attrs + auth = "user" + scope = "sharing.write" + +route relinquish_folder_membership (RelinquishFolderMembershipArg, async.LaunchEmptyResult, RelinquishFolderMembershipError) + "The current user relinquishes their membership in the designated shared + folder and will no longer have access to the folder. A folder owner cannot + relinquish membership in their own folder. + This will run synchronously if leave_a_copy is false, and asynchronously + if leave_a_copy is true." + + attrs + auth = "user" + scope = "sharing.write" + +route remove_folder_member (RemoveFolderMemberArg, async.LaunchResultBase, RemoveFolderMemberError) + "Allows an owner or editor (if the ACL update policy allows) of a shared + folder to remove another member." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route set_access_inheritance (SetAccessInheritanceArg, ShareFolderLaunch, SetAccessInheritanceError) + "Change the inheritance policy of an existing Shared Folder. Only permitted for shared folders in a shared team root. + If a :field:`ShareFolderLaunch.async_job_id` is returned, you'll need to + call :route:`check_share_job_status` until the action completes to get the + metadata for the folder." + + attrs + auth = "user" + scope = "sharing.write" + +route share_folder (ShareFolderArg, ShareFolderLaunch, ShareFolderError) + "Share a folder with collaborators. + Most sharing will be completed synchronously. Large folders will be + completed asynchronously. To make testing the async case repeatable, set + `ShareFolderArg.force_async`. + If a :field:`ShareFolderLaunch.async_job_id` is returned, you'll need to + call :route:`check_share_job_status` until the action completes to get the + metadata for the folder." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route transfer_folder (TransferFolderArg, Void, TransferFolderError) + "Transfer ownership of a shared folder to a member of the shared folder. + User must have :field:`AccessLevel.owner` access to the shared folder to perform a transfer." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route unmount_folder (UnmountFolderArg, Void, UnmountFolderError) + "The current user unmounts the designated folder. They can re-mount the + folder at a later time using :route:`mount_folder`." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route unshare_folder (UnshareFolderArg, async.LaunchEmptyResult, UnshareFolderError) + "Allows a shared folder owner to unshare the folder. + Unshare will not work in following cases: + The shared folder contains shared folders OR the shared folder is inside another shared folder. + You'll need to call :route:`check_job_status` to determine if the action has + completed successfully." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route update_folder_member (UpdateFolderMemberArg, MemberAccessLevelResult, UpdateFolderMemberError) + "Allows an owner or editor of a shared folder to update another member's + permissions." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + +route update_folder_policy (UpdateFolderPolicyArg, SharedFolderMetadata, UpdateFolderPolicyError) + "Update the sharing policies for a shared folder. + User must have :field:`AccessLevel.owner` access to the shared folder to update its policies." + + attrs + auth = "user" + scope = "sharing.write" + select_admin_mode = "team_admin" + diff --git a/sharing_folders_apiv2_sharing_folders_members.stone b/sharing_folders_apiv2_sharing_folders_members.stone new file mode 100644 index 0000000..5fe145a --- /dev/null +++ b/sharing_folders_apiv2_sharing_folders_members.stone @@ -0,0 +1,25 @@ +namespace sharing + +route get_folder_metadata (GetMetadataArgs, SharedFolderMetadata, SharedFolderAccessError) + "Returns shared folder metadata by its folder ID." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "whole_team" + +route list_folder_members (ListFolderMembersArgs, SharedFolderMembers, SharedFolderAccessError) + "Returns shared folder membership by its folder ID." + + attrs + auth = "user" + scope = "sharing.read" + select_admin_mode = "whole_team" + +route list_mountable_folders (ListFoldersArgs, ListFoldersResult, Void) + "Return the list of all shared folders the current user can mount or unmount." + + attrs + auth = "user" + scope = "sharing.read" + diff --git a/stone_cfg.stone b/stone_cfg.stone index 8b77371..1858e86 100644 --- a/stone_cfg.stone +++ b/stone_cfg.stone @@ -2,7 +2,7 @@ namespace stone_cfg struct Route - auth String(pattern="^(user|team|app|noauth|app, user)$") = "user" + auth String(pattern="^(user|team|app|noauth|app,\\s*user|app,\\s*team)$") = "user" "The auth type for the route. In case of multiple values it should be sorted allphabetically" host String(pattern="^(api|content|notify)$") = "api" "The server to make the request to. " diff --git a/team.stone b/team.stone deleted file mode 100644 index 49024b7..0000000 --- a/team.stone +++ /dev/null @@ -1,354 +0,0 @@ -namespace team - -import common -import file_properties -import team_common -import team_policies -import users_common -import secondary_emails - -# Note that in the database, we also have members that are in state "deleted" -# meaning that the User has been permanently removed from the team. -# But the API is not going to expose such users externally. We will omit such users -# in API responses. -# -union_closed TeamMemberStatus - "The user's status as a member of a specific team." - - active - "User has successfully joined the team." - invited - "User has been invited to a team, but has not joined the team yet." - suspended - "User is no longer a member of the team, but the account can be un-suspended, - re-establishing the user as a team member." - removed RemovedStatus - "User is no longer a member of the team. - Removed users are only listed when include_removed is true in members/list." - -struct RemovedStatus - is_recoverable Boolean - "True if the removed team member is recoverable." - - is_disconnected Boolean - "True if the team member's account was converted to individual account." - - example default - is_recoverable = false - is_disconnected = false - -union_closed TeamMembershipType - full - "User uses a license and has full access to team resources like the shared quota." - limited - "User does not have access to the shared quota and team admins have restricted administrative control." - -struct MemberProfile - "Basic member profile." - - team_member_id team_common.TeamMemberId - "ID of user as a member of a team." - - external_id String? - "External ID that a team can attach to the user. - An application using the API may find it easier to use their - own IDs instead of Dropbox IDs like account_id or team_member_id." - - account_id users_common.AccountId? - "A user's account identifier." - - email String - "Email address of user." - - email_verified Boolean - "Is true if the user's email is verified to be owned by the user." - - secondary_emails List(secondary_emails.SecondaryEmail)? - "Secondary emails of a user." - - status TeamMemberStatus - "The user's status as a member of a specific team." - - name users.Name - "Representations for a person's name." - - membership_type TeamMembershipType - "The user's membership type: full (normal team member) vs limited (does not use a license; no access to the team's shared quota)." - - invited_on common.DropboxTimestamp? - "The date and time the user was invited to the team (contains value only when the member's status matches :field:`TeamMemberStatus.invited`)." - - joined_on common.DropboxTimestamp? - "The date and time the user joined as a member of a specific team." - - suspended_on common.DropboxTimestamp? - "The date and time the user was suspended from the team (contains value only when the member's status matches :field:`TeamMemberStatus.suspended`)." - - persistent_id String? - "Persistent ID that a team can attach to the user. - The persistent ID is unique ID to be used for SAML authentication." - - is_directory_restricted Boolean? - "Whether the user is a directory restricted user." - - profile_photo_url String? - "URL for the photo representing the user, if one is set." - - example default - team_member_id = "dbmid:1234567" - account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" - email = "mary@lamb.com" - email_verified = true - secondary_emails = [default, second_sec_email, third_sec_email] - status = active - name = default - membership_type = full - joined_on = "2015-05-12T15:50:38Z" - profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128" - -union_closed UserSelectorArg - "Argument for selecting a single user, either by team_member_id, external_id or email." - - team_member_id team_common.TeamMemberId - external_id team_common.MemberExternalId - email common.EmailAddress - - example default - team_member_id = "dbmid:efgh5678" - - example email - email = "dan@hotmail.com" - -union_closed UserSelectorError - "Error that can be returned whenever a struct derived from :type:`UserSelectorArg` is used." - - user_not_found - "No matching user found. The provided team_member_id, email, or external_id does not exist on this team." - -union_closed UsersSelectorArg - "Argument for selecting a list of users, either by team_member_ids, external_ids or emails." - - team_member_ids List(team_common.TeamMemberId) - "List of member IDs." - external_ids List(team_common.MemberExternalId) - "List of external user IDs." - emails List(common.EmailAddress) - "List of email addresses." - - - -# -# Handle DfB routes that do not have a better place to be. -# - -# -# Route get_info -# - -struct TeamGetInfoResult - - name String - "The name of the team." - - team_id String - "The ID of the team." - - num_licensed_users UInt32 - "The number of licenses available to the team." - - num_provisioned_users UInt32 - "The number of accounts that have been invited or are already active members of the team." - - num_used_licenses UInt32 = 0 - "The number of licenses used on the team." - - policies team_policies.TeamMemberPolicies - - example default - name="Dropbox Inc." - team_id="dbtid:1234abcd" - num_licensed_users=5 - num_provisioned_users=2 - num_used_licenses=1 - policies=default - -route get_info(Void, TeamGetInfoResult, Void) - "Retrieves information about a team." - - attrs - auth = "team" - scope = "team_info.read" - - -# -# Structs for token/get_authenticated_admin -# - -struct TokenGetAuthenticatedAdminResult - "Results for :route:`token/get_authenticated_admin`." - - admin_profile TeamMemberProfile - "The admin who authorized the token." - - example default - admin_profile = default - -union TokenGetAuthenticatedAdminError - "Error returned by :route:`token/get_authenticated_admin`." - - mapping_not_found - "The current token is not associated with a team admin, because mappings were not - recorded when the token was created. Consider re-authorizing a new access token - to record its authenticating admin." - admin_not_active - "Either the team admin that authorized this token is no longer an active member of the - team or no longer a team admin." - -# -# Route: token/get_authenticated_admin -# - -route token/get_authenticated_admin(Void, TokenGetAuthenticatedAdminResult, TokenGetAuthenticatedAdminError) - "Returns the member profile of the admin who generated the team access token used to make the call." - - attrs - auth = "team" - scope = "team_info.read" - -# -# Common types -# - -union Feature - "A set of features that a Dropbox Business account may support." - - upload_api_rate_limit - "The number of upload API calls allowed per month." - has_team_shared_dropbox - "Does this team have a shared team root." - has_team_file_events - "Does this team have file events." - has_team_selective_sync - "Does this team have team selective sync enabled." - -union FeatureValue - "The values correspond to entries in :type:`Feature`. You may get different value according - to your Dropbox Business plan." - - upload_api_rate_limit UploadApiRateLimitValue - has_team_shared_dropbox HasTeamSharedDropboxValue - has_team_file_events HasTeamFileEventsValue - has_team_selective_sync HasTeamSelectiveSyncValue - - example uploadRateLimited - upload_api_rate_limit = limited - - example hasTeamSharedDropbox - has_team_shared_dropbox = default - - example hasTeamFileEvents - has_team_file_events = ex_no_file_events - - example HasTeamSelectiveSync - has_team_selective_sync = default - -union UploadApiRateLimitValue - "The value for :field:`Feature.upload_api_rate_limit`." - - unlimited - "This team has unlimited upload API quota. So far both server version account and legacy - account type have unlimited monthly upload api quota." - limit UInt32 - "The number of upload API calls allowed per month." - - example limited - limit = 25000 - -union HasTeamSharedDropboxValue - "The value for :field:`Feature.has_team_shared_dropbox`." - - has_team_shared_dropbox Boolean - "Does this team have a shared team root." - - example default - has_team_shared_dropbox = false - -union HasTeamFileEventsValue - "The value for :field:`Feature.has_team_file_events`." - - enabled Boolean - "Does this team have file events." - - example ex_no_file_events - enabled = false - -union HasTeamSelectiveSyncValue - "The value for :field:`Feature.has_team_selective_sync`." - - has_team_selective_sync Boolean - "Does this team have team selective sync enabled." - - example default - has_team_selective_sync = true - -# -# Route: feature/get_value_batch -# - -struct FeaturesGetValuesBatchArg - features List(Feature) - "A list of features in :type:`Feature`. If the list is empty, - this route will return :type:`FeaturesGetValuesBatchError`." - - example listOfValues - features = [upload_api_rate_limit, has_team_shared_dropbox] - -struct FeaturesGetValuesBatchResult - values List(FeatureValue) - - example listOfResults - values = [uploadRateLimited, hasTeamSharedDropbox] - -union FeaturesGetValuesBatchError - empty_features_list - "At least one :type:`Feature` must be included in the - :type:`FeaturesGetValuesBatchArg`.features list." - -route features/get_values(FeaturesGetValuesBatchArg, FeaturesGetValuesBatchResult, FeaturesGetValuesBatchError) - "Get the values for one or more featues. This route allows you to check your account's - capability for what feature you can access or what value you have for certain features. - - Permission : Team information." - - attrs - auth = "team" - scope = "team_info.read" - -# -# Deprecated File Properties Routes -# - -route properties/template/add(file_properties.AddTemplateArg, file_properties.AddTemplateResult, file_properties.ModifyTemplateError) deprecated - "Permission : Team member file access." - - attrs - auth = "team" - scope = "files.team_metadata.write" - -route properties/template/update(file_properties.UpdateTemplateArg, file_properties.UpdateTemplateResult, file_properties.ModifyTemplateError) deprecated - "Permission : Team member file access." - attrs - auth = "team" - scope = "files.team_metadata.write" - -route properties/template/get(file_properties.GetTemplateArg, file_properties.GetTemplateResult, file_properties.TemplateError) deprecated - "Permission : Team member file access. The scope for the route is files.team_metadata.write." - attrs - auth = "team" - scope = "files.team_metadata.write" - -route properties/template/list(Void, file_properties.ListTemplateResult, file_properties.TemplateError) deprecated - "Permission : Team member file access. The scope for the route is files.team_metadata.write." - attrs - auth = "team" - scope = "files.team_metadata.write" diff --git a/team_apiv2_team_dfb_features.stone b/team_apiv2_team_dfb_features.stone new file mode 100644 index 0000000..bf710df --- /dev/null +++ b/team_apiv2_team_dfb_features.stone @@ -0,0 +1,11 @@ +namespace team + +route features/get_values (FeaturesGetValuesBatchArg, FeaturesGetValuesBatchResult, FeaturesGetValuesBatchError) + "Get the values for one or more features. This route allows you to check your account's + capability for what feature you can access or what value you have for certain features. + Permission : Team information." + + attrs + auth = "team" + scope = "team_info.read" + diff --git a/team_apiv2_team_dfb_get_info.stone b/team_apiv2_team_dfb_get_info.stone new file mode 100644 index 0000000..5d4bb29 --- /dev/null +++ b/team_apiv2_team_dfb_get_info.stone @@ -0,0 +1,9 @@ +namespace team + +route get_info (Void, TeamGetInfoResult, Void) + "Retrieves information about a team." + + attrs + auth = "team" + scope = "team_info.read" + diff --git a/team_apiv2_team_dfb_token.stone b/team_apiv2_team_dfb_token.stone new file mode 100644 index 0000000..df97817 --- /dev/null +++ b/team_apiv2_team_dfb_token.stone @@ -0,0 +1,9 @@ +namespace team + +route token/get_authenticated_admin (Void, TokenGetAuthenticatedAdminResult, TokenGetAuthenticatedAdminError) + "Returns the member profile of the admin who generated the team access token used to make the call." + + attrs + auth = "team" + scope = "team_info.read" + diff --git a/team_apiv2_team_file_properties_deprecated.stone b/team_apiv2_team_file_properties_deprecated.stone new file mode 100644 index 0000000..645b7f2 --- /dev/null +++ b/team_apiv2_team_file_properties_deprecated.stone @@ -0,0 +1,18 @@ +namespace team + +import file_properties + +route properties/template/add (file_properties.AddTemplateArg, file_properties.AddTemplateResult, file_properties.ModifyTemplateError) deprecated + "Permission : Team member file access." + + attrs + auth = "team" + scope = "files.team_metadata.write" + +route properties/template/get (file_properties.GetTemplateArg, file_properties.GetTemplateResult, file_properties.TemplateError) deprecated + "Permission : Team member file access. The scope for the route is files.team_metadata.write." + + attrs + auth = "team" + scope = "files.team_metadata.write" + diff --git a/team_groups.stone b/team_apiv2_team_groups.stone similarity index 86% rename from team_groups.stone rename to team_apiv2_team_groups.stone index 5a24813..630cdc9 100644 --- a/team_groups.stone +++ b/team_apiv2_team_groups.stone @@ -1,15 +1,13 @@ namespace team import async +import common import team_common -# -# Common types. -# +alias GroupsGetInfoResult = List(GroupsGetInfoItem) union_closed GroupAccessType "Role of a user in group." - member "User is a member of the group, but has no special permissions." owner @@ -20,7 +18,6 @@ union_closed GroupAccessType union_closed GroupSelector "Argument for selecting a single group, either by group_id or by external group ID." - group_id team_common.GroupId "Group ID." group_external_id team_common.GroupExternalId @@ -31,21 +28,17 @@ union_closed GroupSelector union GroupSelectorError "Error that can be raised when :type:`GroupSelector` is used." - group_not_found "No matching group found. No groups match the specified group ID." union GroupSelectorWithTeamGroupError extends GroupSelectorError "Error that can be raised when :type:`GroupSelector` is used and team groups are disallowed from being used." - system_managed_group_disallowed "This operation is not supported on system-managed groups." - union_closed GroupsSelector "Argument for selecting a list of groups, either by group_ids, or external group IDs." - group_ids List(team_common.GroupId) "List of group IDs." group_external_ids List(String) @@ -54,10 +47,101 @@ union_closed GroupsSelector example default group_ids = ["g:e2db7665347abcd600000000001a2b3c", "g:111111147abcd6000000000222222c"] +union GroupMemberSelectorError extends GroupSelectorWithTeamGroupError + "Error that can be raised when :type:`GroupMemberSelector` is used, and the user + is required to be a member of the specified group." + member_not_in_group + "The specified user is not a member of this group." + +union GroupMembersSelectorError extends GroupSelectorWithTeamGroupError + "Error that can be raised when :type:`GroupMembersSelector` is used, and the users + are required to be members of the specified group." + member_not_in_group + "At least one of the specified users is not a member of the group." + +union GroupsListContinueError + invalid_cursor + "The cursor is invalid." + +union_closed GroupsGetInfoItem + id_not_found String = "" + "An ID that was provided as a parameter to :route:`groups/get_info`, and + did not match a corresponding group. The ID can be a group ID, or an external ID, + depending on how the method was called." + group_info GroupFullInfo + "Info about a group." + + example default + group_info = default + +union GroupsGetInfoError + group_not_on_team + "The group is not on your team." + +union GroupCreateError + group_name_already_used + "The requested group name is already being used by another group." + group_name_invalid + "Group name is empty or has invalid characters." + external_id_already_in_use + "The requested external ID is already being used by another group." + system_managed_group_disallowed + "System-managed group cannot be manually created." + +union GroupDeleteError extends GroupSelectorWithTeamGroupError + group_already_deleted + "This group has already been deleted." + +union GroupUpdateError extends GroupSelectorWithTeamGroupError + group_name_already_used + "The requested group name is already being used by another group." + group_name_invalid + "Group name is empty or has invalid characters." + external_id_already_in_use + "The requested external ID is already being used by another group." + +union GroupMembersAddError extends GroupSelectorWithTeamGroupError + duplicate_user + "You cannot add duplicate users. One or more of the members + you are trying to add is already a member of the group." + group_not_in_team + "Group is not in this team. You cannot add members to a + group that is outside of your team." + members_not_in_team List(String) + "These members are not part of your team. Currently, you cannot add members + to a group if they are not part of your team, though this + may change in a subsequent version. To add new members to your Dropbox + Business team, use the :route:`members/add` endpoint." + users_not_found List(String) + "These users were not found in Dropbox." + user_must_be_active_to_be_owner + "A suspended user cannot be added to a group as :field:`GroupAccessType.owner`." + user_cannot_be_manager_of_company_managed_group List(String) + "A company-managed group cannot be managed by a user." + +union GroupMembersRemoveError extends GroupMembersSelectorError + group_not_in_team + "Group is not in this team. You cannot remove members from a group + that is outside of your team." + members_not_in_team List(String) + "These members are not part of your team." + users_not_found List(String) + "These users were not found in Dropbox." + +union GroupMemberSetAccessTypeError extends GroupMemberSelectorError + user_cannot_be_manager_of_company_managed_group + "A company managed group cannot be managed by a user." + +union GroupsMembersListContinueError + invalid_cursor + "The cursor is invalid." + +union GroupsPollError extends async.PollError + access_denied + "You are not allowed to poll this job." struct GroupMemberSelector "Argument for selecting a group and a single user." - group GroupSelector "Specify a group." user UserSelectorArg @@ -67,47 +151,21 @@ struct GroupMemberSelector group = default user = default - -union GroupMemberSelectorError extends GroupSelectorWithTeamGroupError - "Error that can be raised when :type:`GroupMemberSelector` is used, and the user - is required to be a member of the specified group." - - member_not_in_group - "The specified user is not a member of this group." - - struct GroupMembersSelector "Argument for selecting a group and a list of users." - group GroupSelector "Specify a group." users UsersSelectorArg "A list of users that are members of :field:`group`." - -union GroupMembersSelectorError extends GroupSelectorWithTeamGroupError - "Error that can be raised when :type:`GroupMembersSelector` is used, and the users - are required to be members of the specified group." - - member_not_in_group - "At least one of the specified users is not a member of the group." - - struct IncludeMembersArg - return_members Boolean = true "Whether to return the list of members in the group. - Note that the default value will cause all the group members - to be returned in the response. This may take a long time for large groups." - -#################### -# Group Info methods -#################### - + Note that the default value will cause all the group members + to be returned in the response. This may take a long time for large groups." struct GroupMemberInfo "Profile of group member, and role in group." - profile MemberProfile "Profile of group member." access_type GroupAccessType @@ -117,10 +175,8 @@ struct GroupMemberInfo profile = default access_type = default - struct GroupFullInfo extends team_common.GroupSummary "Full description of a group." - members List(GroupMemberInfo)? "List of group members." created UInt64 @@ -134,18 +190,13 @@ struct GroupFullInfo extends team_common.GroupSummary members = [default] created = 1447255518000 -# -# route groups/list -# - struct GroupsListArg - limit UInt32(min_value=1, max_value=1000) = 1000 + limit UInt32(max_value=1000, min_value=1) = 1000 "Number of results to return per call." example default limit = 100 - struct GroupsListResult groups List(team_common.GroupSummary) cursor String @@ -159,19 +210,6 @@ struct GroupsListResult cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" has_more = false -route groups/list(GroupsListArg, GroupsListResult, Void) - "Lists groups on a team. - - Permission : Team Information." - - attrs - auth = "team" - scope = "groups.read" - -# -# route groups/list/continue -# - struct GroupsListContinueArg cursor String "Indicates from what point to get the next set of groups." @@ -179,62 +217,6 @@ struct GroupsListContinueArg example default cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" -union GroupsListContinueError - invalid_cursor - "The cursor is invalid." - -route groups/list/continue(GroupsListContinueArg, GroupsListResult, GroupsListContinueError) - "Once a cursor has been retrieved from :route:`groups/list`, use this to paginate - through all groups. - - Permission : Team Information." - - attrs - auth = "team" - scope = "groups.read" - -# -# route groups/get_info -# - -union_closed GroupsGetInfoItem - id_not_found String - "An ID that was provided as a parameter to :route:`groups/get_info`, and - did not match a corresponding group. The ID can be a group ID, or an external ID, - depending on how the method was called." - group_info GroupFullInfo - "Info about a group." - - example default - group_info = default - - -alias GroupsGetInfoResult = List(GroupsGetInfoItem) - - -union GroupsGetInfoError - group_not_on_team - "The group is not on your team." - -route groups/get_info(GroupsSelector, GroupsGetInfoResult, GroupsGetInfoError) - "Retrieves information about one or more groups. Note that the optional field - :field:`GroupFullInfo.members` is not returned for system-managed groups. - - Permission : Team Information." - - attrs - auth = "team" - scope = "groups.read" - -########################## -# Group management methods -########################## - - -# -# route groups/create -# - struct GroupCreateArg group_name String "Group name." @@ -249,52 +231,6 @@ struct GroupCreateArg group_name = "Europe sales" group_external_id = "group-134" -union GroupCreateError - group_name_already_used - "The requested group name is already being used by another group." - group_name_invalid - "Group name is empty or has invalid characters." - external_id_already_in_use - "The requested external ID is already being used by another group." - system_managed_group_disallowed - "System-managed group cannot be manually created." - - -route groups/create(GroupCreateArg, GroupFullInfo, GroupCreateError) - "Creates a new, empty group, with a requested name. - - Permission : Team member management." - - attrs - auth = "team" - scope = "groups.write" - -# -# route groups/delete (async method) -# - -union GroupDeleteError extends GroupSelectorWithTeamGroupError - group_already_deleted - "This group has already been deleted." - - -route groups/delete(GroupSelector, async.LaunchEmptyResult, GroupDeleteError) - "Deletes a group. - - The group is deleted immediately. However the revoking of group-owned resources - may take additional time. - Use the :route:`groups/job_status/get` to determine whether this process has completed. - - Permission : Team member management." - - attrs - auth = "team" - scope = "groups.write" - -# -# route groups/update -# - struct GroupUpdateArgs extends IncludeMembersArg group GroupSelector "Specify a group." @@ -313,30 +249,8 @@ struct GroupUpdateArgs extends IncludeMembersArg new_group_external_id = "sales-234" new_group_management_type = company_managed -union GroupUpdateError extends GroupSelectorWithTeamGroupError - group_name_already_used - "The requested group name is already being used by another group." - group_name_invalid - "Group name is empty or has invalid characters." - external_id_already_in_use - "The requested external ID is already being used by another group." - -route groups/update(GroupUpdateArgs, GroupFullInfo, GroupUpdateError) - "Updates a group's name and/or external ID. - - Permission : Team member management." - - attrs - auth = "team" - scope = "groups.write" - -# -# Structures common to groups/members/add and groups/members/remove -# - struct GroupMembersChangeResult "Result returned by :route:`groups/members/add` and :route:`groups/members/remove`." - group_info GroupFullInfo "The group info after member change operation has been performed." async_job_id async.AsyncJobId @@ -346,13 +260,8 @@ struct GroupMembersChangeResult group_info = default async_job_id = "99988877733388" -# -# route groups/members/add (async method) -# - struct MemberAccess "Specify access type a member should have when joined to a group." - user UserSelectorArg "Identity of a user." access_type GroupAccessType @@ -372,44 +281,6 @@ struct GroupMembersAddArg extends IncludeMembersArg group = default members = [default] - -union GroupMembersAddError extends GroupSelectorWithTeamGroupError - duplicate_user - "You cannot add duplicate users. One or more of the members - you are trying to add is already a member of the group." - group_not_in_team - "Group is not in this team. You cannot add members to a - group that is outside of your team." - members_not_in_team List(String) - "These members are not part of your team. Currently, you cannot add members - to a group if they are not part of your team, though this - may change in a subsequent version. To add new members to your Dropbox - Business team, use the :route:`members/add` endpoint." - users_not_found List(String) - "These users were not found in Dropbox." - user_must_be_active_to_be_owner - "A suspended user cannot be added to a group as :field:`GroupAccessType.owner`." - user_cannot_be_manager_of_company_managed_group List(String) - "A company-managed group cannot be managed by a user." - - -route groups/members/add(GroupMembersAddArg, GroupMembersChangeResult, GroupMembersAddError) - "Adds members to a group. - - The members are added immediately. However the granting of group-owned resources - may take additional time. - Use the :route:`groups/job_status/get` to determine whether this process has completed. - - Permission : Team member management." - - attrs - auth = "team" - scope = "groups.write" - -# -# route groups/members/remove (async method) -# - struct GroupMembersRemoveArg extends IncludeMembersArg group GroupSelector "Group from which users will be removed." @@ -420,71 +291,23 @@ struct GroupMembersRemoveArg extends IncludeMembersArg group = default users = [default] -union GroupMembersRemoveError extends GroupMembersSelectorError - group_not_in_team - "Group is not in this team. You cannot remove members from a group - that is outside of your team." - members_not_in_team List(String) - "These members are not part of your team." - users_not_found List(String) - "These users were not found in Dropbox." - -route groups/members/remove(GroupMembersRemoveArg, GroupMembersChangeResult, GroupMembersRemoveError) - "Removes members from a group. - - The members are removed immediately. However the revoking of group-owned resources - may take additional time. - Use the :route:`groups/job_status/get` to determine whether this process has completed. - - This method permits removing the only owner of a group, even in cases where this is not - possible via the web client. - - Permission : Team member management." - - attrs - auth = "team" - scope = "groups.write" - -# -# route groups/members/set_access_type -# - - struct GroupMembersSetAccessTypeArg extends GroupMemberSelector access_type GroupAccessType "New group access type the user will have." return_members Boolean = true "Whether to return the list of members in the group. - Note that the default value will cause all the group members - to be returned in the response. This may take a long time for large groups." + Note that the default value will cause all the group members + to be returned in the response. This may take a long time for large groups." example default group = default user = default access_type = default -union GroupMemberSetAccessTypeError extends GroupMemberSelectorError - user_cannot_be_manager_of_company_managed_group - "A company managed group cannot be managed by a user." - -route groups/members/set_access_type(GroupMembersSetAccessTypeArg, GroupsGetInfoResult, GroupMemberSetAccessTypeError) - "Sets a member's access type in a group. - - Permission : Team member management." - - attrs - auth = "team" - scope = "groups.write" - - -# -# route groups/members/list -# - struct GroupsMembersListArg group GroupSelector "The group whose members are to be listed." - limit UInt32(min_value=1, max_value=1000) = 1000 + limit UInt32(max_value=1000, min_value=1) = 1000 "Number of results to return per call." example default @@ -504,57 +327,123 @@ struct GroupsMembersListResult cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" has_more = false +struct GroupsMembersListContinueArg + cursor String + "Indicates from what point to get the next set of groups." -route groups/members/list(GroupsMembersListArg, GroupsMembersListResult, GroupSelectorError) - "Lists members of a group. + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" +route groups/list (GroupsListArg, GroupsListResult, Void) + "Lists groups on a team. Permission : Team Information." attrs auth = "team" scope = "groups.read" -# -# route groups/members/list/continue -# +route groups/list/continue (GroupsListContinueArg, GroupsListResult, GroupsListContinueError) + "Once a cursor has been retrieved from :route:`groups/list`, use this to paginate + through all groups. + Permission : Team Information." -struct GroupsMembersListContinueArg - cursor String - "Indicates from what point to get the next set of groups." + attrs + auth = "team" + scope = "groups.read" - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" +route groups/get_info (GroupsSelector, GroupsGetInfoResult, GroupsGetInfoError) + "Retrieves information about one or more groups. Note that the optional field + :field:`GroupFullInfo.members` is not returned for system-managed groups. + Permission : Team Information." -union GroupsMembersListContinueError - invalid_cursor - "The cursor is invalid." + attrs + auth = "team" + scope = "groups.read" -route groups/members/list/continue(GroupsMembersListContinueArg, GroupsMembersListResult, GroupsMembersListContinueError) - "Once a cursor has been retrieved from :route:`groups/members/list`, use this to paginate - through all members of the group. +route groups/create (GroupCreateArg, GroupFullInfo, GroupCreateError) + "Creates a new, empty group, with a requested name. + Permission : Team member management." - Permission : Team information." + attrs + auth = "team" + scope = "groups.write" + +route groups/delete (GroupSelector, async.LaunchEmptyResult, GroupDeleteError) + "Deletes a group. + The group is deleted immediately. However the revoking of group-owned resources + may take additional time. + Use the :route:`groups/job_status/get` to determine whether this process has completed. + Permission : Team member management." + + attrs + auth = "team" + scope = "groups.write" + +route groups/update (GroupUpdateArgs, GroupFullInfo, GroupUpdateError) + "Updates a group's name and/or external ID. + Permission : Team member management." + + attrs + auth = "team" + scope = "groups.write" + +route groups/members/add (GroupMembersAddArg, GroupMembersChangeResult, GroupMembersAddError) + "Adds members to a group. + The members are added immediately. However the granting of group-owned resources + may take additional time. + Use the :route:`groups/job_status/get` to determine whether this process has completed. + Permission : Team member management." + + attrs + auth = "team" + scope = "groups.write" + +route groups/members/remove (GroupMembersRemoveArg, GroupMembersChangeResult, GroupMembersRemoveError) + "Removes members from a group. + The members are removed immediately. However the revoking of group-owned resources + may take additional time. + Use the :route:`groups/job_status/get` to determine whether this process has completed. + This method permits removing the only owner of a group, even in cases where this is not + possible via the web client. + Permission : Team member management." + + attrs + auth = "team" + scope = "groups.write" + +route groups/members/set_access_type (GroupMembersSetAccessTypeArg, GroupsGetInfoResult, GroupMemberSetAccessTypeError) + "Sets a member's access type in a group. + Permission : Team member management." + + attrs + auth = "team" + scope = "groups.write" + +route groups/members/list (GroupsMembersListArg, GroupsMembersListResult, GroupSelectorError) + "Lists members of a group. + Permission : Team Information." attrs auth = "team" scope = "groups.read" -# -# route groups/job_status/get -# +route groups/members/list/continue (GroupsMembersListContinueArg, GroupsMembersListResult, GroupsMembersListContinueError) + "Once a cursor has been retrieved from :route:`groups/members/list`, use this to paginate + through all members of the group. + Permission : Team information." -union GroupsPollError extends async.PollError - access_denied - "You are not allowed to poll this job." + attrs + auth = "team" + scope = "groups.read" -route groups/job_status/get(async.PollArg, async.PollEmptyResult, GroupsPollError) +route groups/job_status/get (async.PollArg, async.PollEmptyResult, GroupsPollError) "Once an async_job_id is returned from :route:`groups/delete`, :route:`groups/members/add` , or :route:`groups/members/remove` use this method to poll the status of granting/revoking group members' access to group-owned resources. - Permission : Team member management." attrs auth = "team" scope = "groups.write" + diff --git a/team_linked_apps.stone b/team_apiv2_team_linked_apps.stone similarity index 86% rename from team_linked_apps.stone rename to team_apiv2_team_linked_apps.stone index 4c4483d..ae8082e 100644 --- a/team_linked_apps.stone +++ b/team_apiv2_team_linked_apps.stone @@ -2,9 +2,34 @@ namespace team import common -# -# Structures for linked_apps/list_member_linked_apps -# +union ListMemberAppsError + "Error returned by :route:`linked_apps/list_member_linked_apps`." + member_not_found + "Member not found." + +union ListMembersAppsError + "Error returned by :route:`linked_apps/list_members_linked_apps`." + reset + "Indicates that the cursor has been invalidated. Call + :route:`linked_apps/list_members_linked_apps` again with an empty cursor to obtain a new cursor." + +union RevokeLinkedAppError + "Error returned by :route:`linked_apps/revoke_linked_app`." + app_not_found + "Application not found." + member_not_found + "Member not found." + app_folder_removal_not_supported + "App folder removal is not supported." + +union RevokeLinkedAppBatchError + "Error returned by :route:`linked_apps/revoke_linked_app_batch`." + +union ListTeamAppsError + "Error returned by :route:`linked_apps/list_team_linked_apps`." + reset + "Indicates that the cursor has been invalidated. Call + :route:`linked_apps/list_team_linked_apps` again with an empty cursor to obtain a new cursor." struct ListMemberAppsArg team_member_id String @@ -15,7 +40,6 @@ struct ListMemberAppsArg struct ApiApp "Information on linked third party applications." - app_id String "The application unique id." app_name String @@ -44,32 +68,8 @@ struct ListMemberAppsResult example default linked_api_apps = [default] -union ListMemberAppsError - "Error returned by :route:`linked_apps/list_member_linked_apps`." - - member_not_found - "Member not found." - -# -# Route: linked_apps/list_member_linked_apps -# - -route linked_apps/list_member_linked_apps(ListMemberAppsArg, ListMemberAppsResult, ListMemberAppsError) - "List all linked applications of the team member. - - Note, this endpoint does not list any team-linked applications." - - attrs - auth = "team" - scope = "sessions.list" - -# -# Structs for linked_apps/list_members_linked_apps -# - struct ListMembersAppsArg "Arguments for :route:`linked_apps/list_members_linked_apps`." - cursor String? "At the first call to the :route:`linked_apps/list_members_linked_apps` the cursor shouldn't be passed. Then, if the result of the call includes a cursor, the following requests should @@ -80,7 +80,6 @@ struct ListMembersAppsArg struct MemberLinkedApps "Information on linked applications of a team member." - team_member_id String "The member unique Id." linked_api_apps List(ApiApp) @@ -92,7 +91,6 @@ struct MemberLinkedApps struct ListMembersAppsResult "Information returned by :route:`linked_apps/list_members_linked_apps`." - apps List(MemberLinkedApps) "The linked applications of each member of the team." has_more Boolean @@ -107,29 +105,6 @@ struct ListMembersAppsResult has_more = true cursor = "AADAQO8ZWKvBkSMXb1J9dAYVvwZ0wcvfyzIBo2e1H-_N-67pfrYKTb4oN_3LG9_ilWjblZXuiR8ubjjiQQkHq-MvDjbe_6bkcJgjnTpowrRaQA" -union ListMembersAppsError - "Error returned by :route:`linked_apps/list_members_linked_apps`." - - reset - "Indicates that the cursor has been invalidated. Call - :route:`linked_apps/list_members_linked_apps` again with an empty cursor to obtain a new cursor." - -# -# Route: linked_apps/list_members_linked_apps -# -route linked_apps/list_members_linked_apps(ListMembersAppsArg, ListMembersAppsResult, ListMembersAppsError) - "List all applications linked to the team members' accounts. - - Note, this endpoint does not list any team-linked applications." - - attrs - auth = "team" - scope = "sessions.list" - -# -# Structs for linked_apps/revoke_linked_app -# - struct RevokeLinkedApiAppArg app_id String "The application's unique id." @@ -137,37 +112,12 @@ struct RevokeLinkedApiAppArg "The unique id of the member owning the device." keep_app_folder Boolean = true "This flag is not longer supported, the application dedicated folder (in case the application uses - one) will be kept." + one) will be kept." example default app_id = "dbaid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" team_member_id = "dbmid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" -union RevokeLinkedAppError - "Error returned by :route:`linked_apps/revoke_linked_app`." - - app_not_found - "Application not found." - member_not_found - "Member not found." - app_folder_removal_not_supported - "App folder removal is not supported." - -# -# Route: linked_apps/revoke_linked_app -# - -route linked_apps/revoke_linked_app(RevokeLinkedApiAppArg, Void, RevokeLinkedAppError) - "Revoke a linked application of the team member." - - attrs - auth = "team" - scope = "sessions.modify" - -# -# structs for linked_apps/revoke_linked_app_batch -# - struct RevokeLinkedApiAppBatchArg revoke_linked_app List(RevokeLinkedApiAppArg) @@ -175,7 +125,6 @@ struct RevokeLinkedApiAppBatchArg revoke_linked_app = [default] struct RevokeLinkedAppStatus - success Boolean "Result of the revoking request." error_type RevokeLinkedAppError? @@ -191,27 +140,8 @@ struct RevokeLinkedAppBatchResult example default revoke_linked_app_status = [default] -union RevokeLinkedAppBatchError - "Error returned by :route:`linked_apps/revoke_linked_app_batch`." - -# -# Route: linked_apps/revoke_linked_app_batch -# - -route linked_apps/revoke_linked_app_batch(RevokeLinkedApiAppBatchArg, RevokeLinkedAppBatchResult, RevokeLinkedAppBatchError) - "Revoke a list of linked applications of the team members." - - attrs - auth = "team" - scope = "sessions.modify" - -# -# Deprecated endpoints -# - struct ListTeamAppsArg "Arguments for :route:`linked_apps/list_team_linked_apps`." - cursor String? "At the first call to the :route:`linked_apps/list_team_linked_apps` the cursor shouldn't be passed. Then, if the result of the call includes a cursor, the following requests should @@ -222,7 +152,6 @@ struct ListTeamAppsArg struct ListTeamAppsResult "Information returned by :route:`linked_apps/list_team_linked_apps`." - apps List(MemberLinkedApps) "The linked applications of each member of the team." has_more Boolean @@ -237,18 +166,41 @@ struct ListTeamAppsResult has_more = true cursor = "AADAQO8ZWKvBkSMXb1J9dAYVvwZ0wcvfyzIBo2e1H-_N-67pfrYKTb4oN_3LG9_ilWjblZXuiR8ubjjiQQkHq-MvDjbe_6bkcJgjnTpowrRaQA" -union ListTeamAppsError - "Error returned by :route:`linked_apps/list_team_linked_apps`." +route linked_apps/list_member_linked_apps (ListMemberAppsArg, ListMemberAppsResult, ListMemberAppsError) + "List all linked applications of the team member. + Note, this endpoint does not list any team-linked applications." - reset - "Indicates that the cursor has been invalidated. Call - :route:`linked_apps/list_team_linked_apps` again with an empty cursor to obtain a new cursor." + attrs + auth = "team" + scope = "sessions.list" -route linked_apps/list_team_linked_apps(ListTeamAppsArg, ListTeamAppsResult, ListTeamAppsError) deprecated by linked_apps/list_members_linked_apps +route linked_apps/list_members_linked_apps (ListMembersAppsArg, ListMembersAppsResult, ListMembersAppsError) "List all applications linked to the team members' accounts. + Note, this endpoint does not list any team-linked applications." + attrs + auth = "team" + scope = "sessions.list" + +route linked_apps/revoke_linked_app (RevokeLinkedApiAppArg, Void, RevokeLinkedAppError) + "Revoke a linked application of the team member." + + attrs + auth = "team" + scope = "sessions.modify" + +route linked_apps/revoke_linked_app_batch (RevokeLinkedApiAppBatchArg, RevokeLinkedAppBatchResult, RevokeLinkedAppBatchError) + "Revoke a list of linked applications of the team members." + + attrs + auth = "team" + scope = "sessions.modify" + +route linked_apps/list_team_linked_apps (ListTeamAppsArg, ListTeamAppsResult, ListTeamAppsError) deprecated + "List all applications linked to the team members' accounts. Note, this endpoint doesn't list any team-linked applications." attrs auth = "team" scope = "sessions.list" + diff --git a/team_member_space_limits.stone b/team_apiv2_team_member_space_limits.stone similarity index 80% rename from team_member_space_limits.stone rename to team_apiv2_team_member_space_limits.stone index 5ea11e2..cad0bbe 100644 --- a/team_member_space_limits.stone +++ b/team_apiv2_team_member_space_limits.stone @@ -1,8 +1,8 @@ namespace team +import common -alias UserQuota = UInt32(min_value=15) - +alias UserQuota = UInt32(min_value=2) struct UserCustomQuotaArg "User and their required custom quota in GB (1 TB = 1024 GB)." @@ -10,142 +10,88 @@ struct UserCustomQuotaArg quota_gb UserQuota example default - user=default - quota_gb=30 - + user = default + quota_gb = 30 struct UserCustomQuotaResult "User and their custom quota in GB (1 TB = 1024 GB). - No quota returns if the user has no custom quota set." + No quota returns if the user has no custom quota set." user UserSelectorArg quota_gb UserQuota? - struct SetCustomQuotaArg users_and_quotas List(UserCustomQuotaArg) "List of users and their custom quotas." example default - users_and_quotas=[default] - + users_and_quotas = [default] union CustomQuotaError "Error returned when getting member custom quota." - too_many_users "A maximum of 1000 users can be set for a single call." - union SetCustomQuotaError extends CustomQuotaError "Error returned when setting member custom quota." - some_users_are_excluded "Some of the users are on the excluded users list and can't have custom quota set." - union CustomQuotaResult "User custom quota." - success UserCustomQuotaResult "User's custom quota." invalid_user UserSelectorArg "Invalid user (not in team)." - struct CustomQuotaUsersArg users List(UserSelectorArg) "List of users." example default - users=[default] - + users = [default] union RemoveCustomQuotaResult "User result for setting member custom quota." - success UserSelectorArg "Successfully removed user." invalid_user UserSelectorArg "Invalid user (not in team)." - -route member_space_limits/set_custom_quota(SetCustomQuotaArg, List(CustomQuotaResult), SetCustomQuotaError) - "Set users custom quota. Custom quota has to be at least 15GB. - A maximum of 1000 members can be specified in a single call. - Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. - (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space)." - - attrs - auth = "team" - scope = "members.read" - - -route member_space_limits/remove_custom_quota(CustomQuotaUsersArg, List(RemoveCustomQuotaResult), CustomQuotaError) - "Remove users custom quota. - A maximum of 1000 members can be specified in a single call. - Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. - (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space)." - - attrs - auth = "team" - scope = "members.write" - - -route member_space_limits/get_custom_quota(CustomQuotaUsersArg, List(CustomQuotaResult), CustomQuotaError) - "Get users custom quota. - A maximum of 1000 members can be specified in a single call. - Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. - (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space)." - - attrs - auth = "team" - scope = "members.read" - - struct ExcludedUsersUpdateArg "Argument of excluded users update operation. Should include a list of users to add/remove (according to endpoint), Maximum size of the list is 1000 users." - users List(UserSelectorArg)? "List of users to be added/removed." example default users = [default] - union ExcludedUsersUpdateError "Excluded users update error." - users_not_in_team "At least one of the users is not part of your team." too_many_users "A maximum of 1000 users for each of addition/removal can be supplied." - struct ExcludedUsersListArg "Excluded users list argument." - - limit UInt32(min_value=1, max_value=1000) = 1000 + limit UInt32(max_value=1000, min_value=1) = 1000 "Number of results to return per call." example default limit = 100 - struct ExcludedUsersListContinueArg "Excluded users list continue argument." - cursor String "Indicates from what point to get the next set of users." example default cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - struct ExcludedUsersListResult "Excluded users list result." - users List(MemberProfile) cursor String? "Pass the cursor into :route:`member_space_limits/excluded_users/list/continue` to obtain @@ -160,64 +106,84 @@ struct ExcludedUsersListResult cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" has_more = false - union ExcludedUsersUpdateStatus "Excluded users update operation status." - success "Update successful." - struct ExcludedUsersUpdateResult "Excluded users update result." - status ExcludedUsersUpdateStatus "Update status." example default status = success - union ExcludedUsersListError "Excluded users list error." - list_error "An error occurred." - union ExcludedUsersListContinueError "Excluded users list continue error." - invalid_cursor "The cursor is invalid." +route member_space_limits/set_custom_quota (SetCustomQuotaArg, List(CustomQuotaResult), SetCustomQuotaError) + "Set users custom quota. Custom quota has to be at least 2GB. + A maximum of 1000 members can be specified in a single call. + Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. + (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space)." -route member_space_limits/excluded_users/add(ExcludedUsersUpdateArg, ExcludedUsersUpdateResult, ExcludedUsersUpdateError) - "Add users to member space limits excluded users list." + attrs + auth = "team" + scope = "members.read" + +route member_space_limits/remove_custom_quota (CustomQuotaUsersArg, List(RemoveCustomQuotaResult), CustomQuotaError) + "Remove users custom quota. + A maximum of 1000 members can be specified in a single call. + Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. + (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space)." attrs auth = "team" scope = "members.write" +route member_space_limits/get_custom_quota (CustomQuotaUsersArg, List(CustomQuotaResult), CustomQuotaError) + "Get users custom quota. + A maximum of 1000 members can be specified in a single call. + Note: to apply a custom space limit, a team admin needs to set a member space limit for the team first. + (the team admin can check the settings here: https://www.dropbox.com/team/admin/settings/space)." + + attrs + auth = "team" + scope = "members.read" -route member_space_limits/excluded_users/remove(ExcludedUsersUpdateArg, ExcludedUsersUpdateResult, ExcludedUsersUpdateError) +route member_space_limits/excluded_users/add (ExcludedUsersUpdateArg, ExcludedUsersUpdateResult, ExcludedUsersUpdateError) + "Add users to member space limits excluded users list." + + attrs + auth = "team" + scope = "members.write" + +route member_space_limits/excluded_users/remove (ExcludedUsersUpdateArg, ExcludedUsersUpdateResult, ExcludedUsersUpdateError) "Remove users from member space limits excluded users list." attrs auth = "team" scope = "members.write" -route member_space_limits/excluded_users/list(ExcludedUsersListArg, ExcludedUsersListResult, ExcludedUsersListError) +route member_space_limits/excluded_users/list (ExcludedUsersListArg, ExcludedUsersListResult, ExcludedUsersListError) "List member space limits excluded users." attrs auth = "team" scope = "members.read" - -route member_space_limits/excluded_users/list/continue(ExcludedUsersListContinueArg, ExcludedUsersListResult, ExcludedUsersListContinueError) +route member_space_limits/excluded_users/list/continue (ExcludedUsersListContinueArg, ExcludedUsersListResult, ExcludedUsersListContinueError) "Continue listing member space limits excluded users." attrs auth = "team" scope = "members.read" + diff --git a/team_secondary_mails.stone b/team_apiv2_team_members_secondary_emails.stone similarity index 93% rename from team_secondary_mails.stone rename to team_apiv2_team_members_secondary_emails.stone index 05d7abc..3650bcf 100644 --- a/team_secondary_mails.stone +++ b/team_apiv2_team_members_secondary_emails.stone @@ -3,270 +3,189 @@ namespace team import common import secondary_emails -alias SecondaryEmail = secondary_emails.SecondaryEmail - - -struct UserSecondaryEmailsArg - "User and a list of secondary emails." - user UserSelectorArg - secondary_emails List(common.EmailAddress) - - example default - user = default - secondary_emails = ["bob2@hotmail.com", "bob@inst.gov"] - - -# -# add secondary emails -# - - union AddSecondaryEmailResult "Result of trying to add a secondary email to a user. 'success' is the only value indicating that a secondary email was successfully added to a user. The other values explain the type of error that occurred, and include the email for which the error occurred." - - success SecondaryEmail + success secondary_emails.SecondaryEmail "Describes a secondary email that was successfully added to a user." - unavailable common.EmailAddress "Secondary email is not available to be claimed by the user." - already_pending common.EmailAddress "Secondary email is already a pending email for the user." - already_owned_by_user common.EmailAddress "Secondary email is already a verified email for the user." - reached_limit common.EmailAddress "User already has the maximum number of secondary emails allowed." - transient_error common.EmailAddress "A transient error occurred. Please try again later." - too_many_updates common.EmailAddress "An error occurred due to conflicting updates. Please try again later." - unknown_error common.EmailAddress "An unknown error occurred." - rate_limited common.EmailAddress "Too many emails are being sent to this email address. Please try again later." example default success = default - + example unavailable unavailable = "alice@example.com" - -struct UserSecondaryEmailsResult - user UserSelectorArg - results List(AddSecondaryEmailResult) - - example default - user = default - results = [default, unavailable] - - union UserAddResult "Result of trying to add secondary emails to a user. 'success' is the only value indicating that a user was successfully retrieved for adding secondary emails. The other values explain the type of error that occurred, and include the user for which the error occurred." - success UserSecondaryEmailsResult "Describes a user and the results for each attempt to add a secondary email." - invalid_user UserSelectorArg "Specified user is not a valid target for adding secondary emails." - unverified UserSelectorArg "Secondary emails can only be added to verified users." - placeholder_user UserSelectorArg "Secondary emails cannot be added to placeholder users." example default success = default - + example invalid invalid_user = default - -struct AddSecondaryEmailsArg - new_secondary_emails List(UserSecondaryEmailsArg) - "List of users and secondary emails to add." - - example default - new_secondary_emails = [default] - - -struct AddSecondaryEmailsResult - results List(UserAddResult) - "List of users and secondary email results." - - example default - results = [default, invalid] - - union AddSecondaryEmailsError "Error returned when adding secondary emails fails." - secondary_emails_disabled "Secondary emails are disabled for the team." - too_many_emails "A maximum of 20 secondary emails can be added in a single call." - -route members/secondary_emails/add(AddSecondaryEmailsArg, AddSecondaryEmailsResult, AddSecondaryEmailsError) - "Add secondary emails to users. - - Permission : Team member management. - - Emails that are on verified domains will be verified automatically. - For each email address not on a verified domain a verification email will be sent." - - attrs - auth = "team" - scope = "members.write" - -# -# resend verification emails -# - - -struct ResendVerificationEmailArg - emails_to_resend List(UserSecondaryEmailsArg) - "List of users and secondary emails to resend verification emails to." - - example default - emails_to_resend = [default] - - union ResendSecondaryEmailResult "Result of trying to resend verification email to a secondary email address. 'success' is the only value indicating that a verification email was successfully sent. The other values explain the type of error that occurred, and include the email for which the error occurred." - success common.EmailAddress "A verification email was successfully sent to the secondary email address." - not_pending common.EmailAddress "This secondary email address is not pending for the user." - rate_limited common.EmailAddress "Too many emails are being sent to this email address. Please try again later." example default success = "alice@example.com" - -struct UserResendEmailsResult - user UserSelectorArg - results List(ResendSecondaryEmailResult) - - example default - user = default - results = [default] - - union UserResendResult "Result of trying to resend verification emails to a user. 'success' is the only value indicating that a user was successfully retrieved for sending verification emails. The other values explain the type of error that occurred, and include the user for which the error occurred." - success UserResendEmailsResult "Describes a user and the results for each attempt to resend verification emails." - invalid_user UserSelectorArg "Specified user is not a valid target for resending verification emails." example default success = default - + example invalid invalid_user = default - -struct ResendVerificationEmailResult - "List of users and resend results." - results List(UserResendResult) - - example default - results = [default] - - -route members/secondary_emails/resend_verification_emails(ResendVerificationEmailArg, ResendVerificationEmailResult, Void) - "Resend secondary email verification emails. - - Permission : Team member management." - - attrs - auth = "team" - scope = "members.write" - - -# -# delete secondary emails -# - - -struct DeleteSecondaryEmailsArg - emails_to_delete List(UserSecondaryEmailsArg) - "List of users and their secondary emails to delete." - - example default - emails_to_delete = [default] - - union DeleteSecondaryEmailResult "Result of trying to delete a secondary email address. 'success' is the only value indicating that a secondary email was successfully deleted. The other values explain the type of error that occurred, and include the email for which the error occurred." - success common.EmailAddress "The secondary email was successfully deleted." - not_found common.EmailAddress "The email address was not found for the user." - cannot_remove_primary common.EmailAddress "The email address is the primary email address of the user, and cannot be removed." example default success = "alice@example.com" - + example not_found not_found = "alic@example.com" - -struct UserDeleteEmailsResult - user UserSelectorArg - results List(DeleteSecondaryEmailResult) - - example default - user = default - results = [default, not_found] - - union UserDeleteResult "Result of trying to delete a user's secondary emails. 'success' is the only value indicating that a user was successfully retrieved for deleting secondary emails. The other values explain the type of error that occurred, and include the user for which the error occurred." - success UserDeleteEmailsResult "Describes a user and the results for each attempt to delete a secondary email." - invalid_user UserSelectorArg "Specified user is not a valid target for deleting secondary emails." example default success = default - + example invalid_user invalid_user = default +struct UserSecondaryEmailsArg + "User and a list of secondary emails." + user UserSelectorArg + secondary_emails List(common.EmailAddress) + + example default + user = default + secondary_emails = ["bob2@hotmail.com", "bob@inst.gov"] + +struct UserSecondaryEmailsResult + user UserSelectorArg + results List(AddSecondaryEmailResult) + + example default + user = default + results = [default, unavailable] + +struct AddSecondaryEmailsArg + new_secondary_emails List(UserSecondaryEmailsArg) + "List of users and secondary emails to add." + + example default + new_secondary_emails = [default] + +struct AddSecondaryEmailsResult + results List(UserAddResult) + "List of users and secondary email results." + + example default + results = [default, invalid] + +struct ResendVerificationEmailArg + emails_to_resend List(UserSecondaryEmailsArg) + "List of users and secondary emails to resend verification emails to." + + example default + emails_to_resend = [default] + +struct UserResendEmailsResult + user UserSelectorArg + results List(ResendSecondaryEmailResult) + + example default + user = default + results = [default] + +struct ResendVerificationEmailResult + "List of users and resend results." + results List(UserResendResult) + + example default + results = [default] + +struct DeleteSecondaryEmailsArg + emails_to_delete List(UserSecondaryEmailsArg) + "List of users and their secondary emails to delete." + + example default + emails_to_delete = [default] + +struct UserDeleteEmailsResult + user UserSelectorArg + results List(DeleteSecondaryEmailResult) + + example default + user = default + results = [default, not_found] struct DeleteSecondaryEmailsResult results List(UserDeleteResult) @@ -274,14 +193,30 @@ struct DeleteSecondaryEmailsResult example default results = [default] +route members/secondary_emails/add (AddSecondaryEmailsArg, AddSecondaryEmailsResult, AddSecondaryEmailsError) + "Add secondary emails to users. + Permission : Team member management. + Emails that are on verified domains will be verified automatically. + For each email address not on a verified domain a verification email will be sent." + + attrs + auth = "team" + scope = "members.write" -route members/secondary_emails/delete(DeleteSecondaryEmailsArg, DeleteSecondaryEmailsResult, Void) - "Delete secondary emails from users +route members/secondary_emails/resend_verification_emails (ResendVerificationEmailArg, ResendVerificationEmailResult, Void) + "Resend secondary email verification emails. + Permission : Team member management." - Permission : Team member management. + attrs + auth = "team" + scope = "members.write" +route members/secondary_emails/delete (DeleteSecondaryEmailsArg, DeleteSecondaryEmailsResult, Void) + "Delete secondary emails from users + Permission : Team member management. Users will be notified of deletions of verified secondary emails at both the secondary email and their primary email." attrs auth = "team" scope = "members.write" + diff --git a/team_sharing_allowlist.stone b/team_apiv2_team_sharing_allowlist.stone similarity index 97% rename from team_sharing_allowlist.stone rename to team_apiv2_team_sharing_allowlist.stone index 24e4ed7..ffb33ad 100644 --- a/team_sharing_allowlist.stone +++ b/team_apiv2_team_sharing_allowlist.stone @@ -2,6 +2,36 @@ namespace team import common +union SharingAllowlistAddError + malformed_entry String = "" + "One of provided values is not valid." + no_entries_provided + "Neither single domain nor email provided." + too_many_entries_provided + "Too many entries provided within one call." + team_limit_reached + "Team entries limit reached." + unknown_error + "Unknown error." + entries_already_exist String = "" + "Entries already exists." + +union SharingAllowlistListContinueError + invalid_cursor + "Provided cursor is not valid." + +union SharingAllowlistRemoveError + malformed_entry String = "" + "One of provided values is not valid." + entries_do_not_exist String = "" + "One or more provided values do not exist." + no_entries_provided + "Neither single domain nor email provided." + too_many_entries_provided + "Too many entries provided within one call." + unknown_error + "Unknown error." + struct SharingAllowlistAddArgs "Structure representing Approve List entries. Domain and emails are supported. At least one entry of any supported type is required." @@ -17,21 +47,6 @@ struct SharingAllowlistAddArgs struct SharingAllowlistAddResponse "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." -union SharingAllowlistAddError - malformed_entry String - "One of provided values is not valid." - no_entries_provided - "Neither single domain nor email provided." - too_many_entries_provided - "Too many entries provided within one call." - team_limit_reached - "Team entries limit reached." - unknown_error - "Unknown error." - entries_already_exist String - "Entries already exists." - - struct SharingAllowlistListArg limit UInt32(max_value=1000, min_value=1) = 1000 "The number of entries to fetch at one time." @@ -65,10 +80,6 @@ struct SharingAllowlistListResponse cursor = "dGVzdF9jdXJzb3IK" has_more = true -union SharingAllowlistListContinueError - invalid_cursor - "Provided cursor is not valid." - struct SharingAllowlistRemoveArgs domains List(String)? "List of domains represented by valid string representation (RFC-1034/5)." @@ -79,23 +90,9 @@ struct SharingAllowlistRemoveArgs domains = ["test-domain.com", "subdomain.some.com"] emails = ["adam@test-domain.com", "john@some.com"] - struct SharingAllowlistRemoveResponse "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." -union SharingAllowlistRemoveError - malformed_entry String - "One of provided values is not valid." - entries_do_not_exist String - "One or more provided values do not exist." - no_entries_provided - "Neither single domain nor email provided." - too_many_entries_provided - "Too many entries provided within one call." - unknown_error - "Unknown error." - - route sharing_allowlist/add (SharingAllowlistAddArgs, SharingAllowlistAddResponse, SharingAllowlistAddError) "Endpoint adds Approve List entries. Changes are effective immediately. Changes are committed in transaction. In case of single validation error - all entries are rejected. diff --git a/team_common.stone b/team_common_team_common.stone similarity index 99% rename from team_common.stone rename to team_common_team_common.stone index f663f43..cfd79dc 100644 --- a/team_common.stone +++ b/team_common_team_common.stone @@ -3,16 +3,19 @@ namespace team_common import common alias TeamMemberId = String + alias MemberExternalId = String(max_length=64) + alias GroupExternalId = String alias GroupId = String + alias ResellerId = String + alias TeamId = String struct GroupSummary "Information about a group." - group_name String group_id GroupId group_external_id GroupExternalId? @@ -28,10 +31,8 @@ struct GroupSummary member_count = 10 group_management_type = user_managed - union GroupManagementType "The group type determines how a group is managed." - user_managed "A group which is managed by selected users." company_managed @@ -39,10 +40,8 @@ union GroupManagementType system_managed "A group which is managed automatically by Dropbox." - union GroupType "The group type determines how a group is created and managed." - team "A group to which team members are automatically added. Applicable to :link:`team folders https://www.dropbox.com/help/986` only." @@ -56,10 +55,8 @@ struct TimeRange end_time common.DropboxTimestamp? "Optional ending time (exclusive)." - union MemberSpaceLimitType "The type of the space limit imposed on a team member." - off "The team member does not have imposed space limit." alert_only @@ -68,3 +65,4 @@ union MemberSpaceLimitType stop_sync "The team member has hard imposed space limit - Dropbox file sync will stop after the limit is reached." + diff --git a/team_log.stone b/team_log_apiv2_team_log.stone similarity index 89% rename from team_log.stone rename to team_log_apiv2_team_log.stone index ee08e55..5b06d85 100644 --- a/team_log.stone +++ b/team_log_apiv2_team_log.stone @@ -1,17 +1,39 @@ namespace team_log -import async import common -import team import team_common import users_common -############################### -# Routes declarations -############################### +alias TeamEventList = List(TeamEvent) + +union GetTeamEventsError + "Errors that can be raised when calling :route:`get_events`." + account_id_not_found + "No user found matching the provided account_id." + invalid_time_range + "Invalid time range." + invalid_filters + "Invalid filters. Do not specify both event_type and category parameters for the same call." + + example default + account_id_not_found = null + +union GetTeamEventsContinueError + "Errors that can be raised when calling :route:`get_events/continue`." + bad_cursor + "Bad cursor." + reset common.DropboxTimestamp + "Cursors are intended to be used quickly. Individual cursor values are normally valid for days, + but in rare cases may be reset sooner. + Cursor reset errors should be handled by fetching a new cursor from :route:`get_events`. + The associated value is the approximate timestamp of the most recent event returned by the cursor. + This should be used as a resumption point when calling :route:`get_events` to obtain a new cursor." + + example default + bad_cursor = null struct GetTeamEventsArg - limit UInt32(min_value=1, max_value=1000) = 1000 + limit UInt32(max_value=1000, min_value=1) = 1000 "The maximal number of results to return per call. Note that some calls may not return :field:`limit` number of events, and may even return no events, even with `has_more` set to true. In this case, callers should fetch again using :route:`get_events/continue`." @@ -28,25 +50,18 @@ struct GetTeamEventsArg together with category." example default - limit=50 - category=groups - -# This is used only for `json_encode` in metaserver/tests/util/event_helper.py -# simply because I don't know how to use the list. -alias TeamEventList = List(TeamEvent) + limit = 50 + category = groups struct GetTeamEventsResult events List(TeamEvent) "List of events. Note that events are not guaranteed to be sorted by their timestamp value." cursor String "Pass the cursor into :route:`get_events/continue` to obtain additional events. - The value of :field:`cursor` may change for each response from :route:`get_events/continue`, regardless of the value of :field:`has_more`; older cursor strings may expire. - Thus, callers should ensure that they update their cursor based on the latest value of :field:`cursor` after each call, and poll regularly if they wish to poll for new events. - Callers should handle reset exceptions for expired cursors." has_more Boolean "Is true if there may be additional events that have not been returned yet. @@ -58,69 +73,34 @@ struct GetTeamEventsResult cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" has_more = false -union GetTeamEventsError - "Errors that can be raised when calling :route:`get_events`." - - account_id_not_found - "No user found matching the provided account_id." - invalid_time_range - "Invalid time range." - invalid_filters - "Invalid filters. Do not specify both event_type and category parameters for the same call." +struct GetTeamEventsContinueArg + cursor String + "Indicates from what point to get the next set of events." example default - account_id_not_found = null + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" -route get_events(GetTeamEventsArg, GetTeamEventsResult, GetTeamEventsError) +route get_events (GetTeamEventsArg, GetTeamEventsResult, GetTeamEventsError) "Retrieves team events. If the result's :field:`GetTeamEventsResult.has_more` field is :val:`true`, call :route:`get_events/continue` with the returned cursor to retrieve more entries. If end_time is not specified in your request, you may use the returned cursor to poll :route:`get_events/continue` for new events. - Many attributes note 'may be missing due to historical data gap'. - Note that the file_operations category and & analogous paper events are not available on all Dropbox Business :link:`plans /business/plans-comparison`. Use :link:`features/get_values /developers/documentation/http/teams#team-features-get_values` to check for this feature. - Permission : Team Auditing." attrs auth = "team" scope = "events.read" -struct GetTeamEventsContinueArg - cursor String - "Indicates from what point to get the next set of events." - - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - - -union GetTeamEventsContinueError - "Errors that can be raised when calling :route:`get_events/continue`." - - bad_cursor - "Bad cursor." - - reset common.DropboxTimestamp - "Cursors are intended to be used quickly. Individual cursor values are normally valid for days, - but in rare cases may be reset sooner. - - Cursor reset errors should be handled by fetching a new cursor from :route:`get_events`. - - The associated value is the approximate timestamp of the most recent event returned by the cursor. - This should be used as a resumption point when calling :route:`get_events` to obtain a new cursor." - - example default - bad_cursor = null - -route get_events/continue(GetTeamEventsContinueArg, GetTeamEventsResult, GetTeamEventsContinueError) +route get_events/continue (GetTeamEventsContinueArg, GetTeamEventsResult, GetTeamEventsContinueError) "Once a cursor has been retrieved from :route:`get_events`, use this to paginate through all events. - Permission : Team Auditing." attrs auth = "team" scope = "events.read" + diff --git a/team_log_generated.stone b/team_log_stone_gen_team_log_generated.stone similarity index 83% rename from team_log_generated.stone rename to team_log_stone_gen_team_log_generated.stone index fb34c8b..4aac011 100644 --- a/team_log_generated.stone +++ b/team_log_stone_gen_team_log_generated.stone @@ -1,6 +1,3 @@ -# This file is @generated by code. Do not edit this file directly !! - - namespace team_log import common @@ -13,20 +10,19 @@ import team_policies import users_common alias FilePath = String + alias NamespaceId = String + alias EmailAddress = String(max_length=255) + alias AppId = String -alias IpAddress = String -alias RequestId = String +alias IpAddress = String -################### -# QuickActionType -################### +alias RequestId = String union QuickActionType "Quick action type." - delete_shared_link reset_password restore_file_or_folder @@ -37,31 +33,10 @@ union QuickActionType example default delete_shared_link = null -######################################## -# Union types that are used by events. -######################################## - -union AccessMethodLogInfo - "Indicates the method in which the action was performed." - - admin_console WebSessionLogInfo - "Admin console session details." - api ApiSessionLogInfo - "Api session details." - content_manager WebSessionLogInfo - "Content manager session details." - end_user SessionLogInfo - "End user session details." - enterprise_console WebSessionLogInfo - "Enterprise console session details." - sign_in_as WebSessionLogInfo - "Sign in as session details." - - example default - end_user = default - - example default2 - end_user = default2 +union TeamMembershipType + free + full + guest union AccountCaptureAvailability available @@ -75,118 +50,11 @@ union AccountCapturePolicy all_users disabled invited_users - prevent_personal_creation union AccountState locked unlocked -union ActionDetails - "Additional information indicating the action taken that caused status change." - - remove_action MemberRemoveActionType - "Define how the user was removed from the team." - team_invite_details TeamInviteDetails - "Additional information relevant when someone is invited to the team." - team_join_details JoinTeamDetails - "Additional information relevant when a new member joins the team." - - example default - team_join_details = default - - example default2 - team_join_details = default2 - -struct JoinTeamDetails - "Additional information relevant when a new member joins the team." - - linked_apps List(UserLinkedAppLogInfo) - "Linked applications. (Deprecated) Please use has_linked_apps boolean field instead." - linked_devices List(LinkedDeviceLogInfo) - "Linked devices. (Deprecated) Please use has_linked_devices boolean field instead." - linked_shared_folders List(FolderLogInfo) - "Linked shared folders. (Deprecated) Please use has_linked_shared_folders boolean field instead." - was_linked_apps_truncated Boolean? - "(Deprecated) True if the linked_apps list was truncated to the maximum supported length (50)." - was_linked_devices_truncated Boolean? - "(Deprecated) True if the linked_devices list was truncated to the maximum supported length (50)." - was_linked_shared_folders_truncated Boolean? - "(Deprecated) True if the linked_shared_folders list was truncated to the maximum supported length (50)." - has_linked_apps Boolean? - "True if the user had linked apps at event time." - has_linked_devices Boolean? - "True if the user had linked apps at event time." - has_linked_shared_folders Boolean? - "True if the user had linked shared folders at event time." - - example default - linked_apps = [default] - linked_devices = [default] - linked_shared_folders = [default] - was_linked_apps_truncated = true - was_linked_devices_truncated = true - was_linked_shared_folders_truncated = true - has_linked_apps = true - has_linked_devices = true - has_linked_shared_folders = true - - example default2 - linked_apps = [default2] - linked_devices = [default2] - linked_shared_folders = [default2] - was_linked_apps_truncated = false - was_linked_devices_truncated = false - was_linked_shared_folders_truncated = false - has_linked_apps = false - has_linked_devices = false - has_linked_shared_folders = false - -union LinkedDeviceLogInfo - "The device sessions that user is linked to." - - desktop_device_session DesktopDeviceSessionLogInfo - "desktop device session's details." - legacy_device_session LegacyDeviceSessionLogInfo - "legacy device session's details." - mobile_device_session MobileDeviceSessionLogInfo - "mobile device session's details." - web_device_session WebDeviceSessionLogInfo - "web device session's details." - - example default - mobile_device_session = default - - example default2 - mobile_device_session = default2 - -struct TeamInviteDetails - "Details about team invites" - - invite_method InviteMethod - "How the user was invited to the team." - additional_license_purchase Boolean? - "True if the invitation incurred an additional license purchase." - - example default - invite_method = invite_link - additional_license_purchase = true - - example default2 - invite_method = invite_link - additional_license_purchase = false - -union InviteMethod - auto_approve - invite_link - member_invite - moved_from_another_team - -union MemberRemoveActionType - delete - leave - offboard - offboard_and_retain_team_folders - union AdminAlertCategoryEnum "Alert category" account_takeover @@ -213,61 +81,6 @@ union AdminAlertSeverityEnum medium na -struct AdminAlertingAlertConfiguration - "Alert configurations" - - alert_state AdminAlertingAlertStatePolicy? - "Alert state." - sensitivity_level AdminAlertingAlertSensitivity? - "Sensitivity level." - recipients_settings RecipientsConfiguration? - "Recipient settings." - text String? - "Text." - excluded_file_extensions String? - "Excluded file extensions." - - example default - alert_state = off - sensitivity_level = invalid - recipients_settings = default - text = "abc" - excluded_file_extensions = "abc" - - example default2 - alert_state = off - sensitivity_level = invalid - recipients_settings = default2 - text = "xyz" - excluded_file_extensions = "xyz" - -struct RecipientsConfiguration - "Recipients Configuration" - - recipient_setting_type AlertRecipientsSettingType? - "Recipients setting type." - emails List(EmailAddress)? - "A list of user emails to notify." - groups List(String)? - "A list of groups to notify." - - example default - recipient_setting_type = invalid - emails = ["john_smith@acmecorp.com"] - groups = ["abc"] - - example default2 - recipient_setting_type = invalid - emails = ["jane_smith@acmecorp.com"] - groups = ["xyz"] - -union AlertRecipientsSettingType - "Alert recipients setting type" - custom_list - invalid - none - team_admins - union AdminAlertingAlertSensitivity "Alert sensitivity" high @@ -301,6 +114,8 @@ union AdminRole billing_admin compliance_admin content_admin + deprecated_freemium_team_member + freemium_team_creator limited_admin member_only reporting_admin @@ -309,6 +124,26 @@ union AdminRole team_admin user_management_admin +union AiThirdPartySharingDropboxBasePolicy + "Policy for deciding whether team users can use third party AI services" + admins_only + default + disabled + enabled + +union AlertRecipientsSettingType + "Alert recipients setting type" + custom_list + invalid + none + team_admins + +union AppleLoginPolicy + "Apple login policy" + default + disabled + enabled + union BackupStatus "Backup status" disabled @@ -319,48 +154,17 @@ union CameraUploadsPolicy disabled enabled +union CaptureTeamSpacePolicy + "Policy for deciding whether team users have access to the Capture team space" + disabled + enabled + union CaptureTranscriptPolicy "Policy for deciding whether team users can transcription in Capture" default disabled enabled -struct Certificate - "Certificate details." - - subject String - "Certificate subject." - issuer String - "Certificate issuer." - issue_date String - "Certificate issue date." - expiration_date String - "Certificate expiration date." - serial_number String - "Certificate serial number." - sha1_fingerprint String - "Certificate sha1 fingerprint." - common_name String? - "Certificate common name." - - example default - subject = "abc" - issuer = "abc" - issue_date = "abc" - expiration_date = "abc" - serial_number = "abc" - sha1_fingerprint = "abc" - common_name = "abc" - - example default2 - subject = "xyz" - issuer = "xyz" - issue_date = "xyz" - expiration_date = "xyz" - serial_number = "xyz" - sha1_fingerprint = "xyz" - common_name = "xyz" - union ChangeLinkExpirationPolicy "Policy for deciding whether the team's default expiration days policy must be enforced when an externally shared link is updated" allowed @@ -384,14 +188,49 @@ union ComputerBackupPolicy disabled enabled +union ContentDeletionProtectionPolicy + "Content deletion protection policy" + off + on_above_threshold + on_all_files + union ContentPermanentDeletePolicy "Policy for pemanent content deletion" disabled enabled -union DefaultLinkExpirationDaysPolicy - "Policy for the default number of days until an externally shared link expires" - day_1 +union DashConnectorStatus + "The status of the Connector" + fail + success + +union DashExternalSharingPolicy + "Policy for deciding whether team users can share Dash content externally" + default + disabled + enabled + +union DashPreviewOptOutStatus + "The new preview opt-out status" + opted_in + opted_out + +union DashStackSharingScope + "The stack sharing scope" + invited + public + team + unknown + +union DashStackType + "The type of stack backend" + cypress + reference_container + unknown + +union DefaultLinkExpirationDaysPolicy + "Policy for the default number of days until an externally shared link expires" + day_1 day_180 day_3 day_30 @@ -446,6 +285,7 @@ union ExtendedVersionHistoryPolicy union ExternalDriveBackupEligibilityStatus "External Drive Backup eligibility status" exceed_license_cap + skip success union ExternalDriveBackupPolicy @@ -463,64 +303,16 @@ union ExternalDriveBackupStatus empty unknown -struct FailureDetailsLogInfo - "Provides details about a failure" - - user_friendly_message String? - "A user friendly explanation of the error." - technical_error_message String? - "A technical explanation of the error. This is relevant for some errors." - - example default - user_friendly_message = "abc" - technical_error_message = "abc" - - example default2 - user_friendly_message = "xyz" - technical_error_message = "xyz" +union ExternalSharingSetting + "External sharing setting" + allow + forbid + unset union FedAdminRole enterprise_admin not_enterprise_admin -union FedExtraDetails - "More details about the organization or team." - - organization OrganizationDetails - "More details about the organization." - team TeamDetails - "More details about the team." - - example default - team = default - - example default2 - team = default2 - -struct TeamDetails - "More details about the team." - - team String - "The name of the team." - - example default - team = "My Team" - - example default2 - team = "My Team" - -struct OrganizationDetails - "More details about the organization." - - organization String - "The name of the organization." - - example default - organization = "My Organization" - - example default2 - organization = "My Organization" - union FedHandshakeAction accepted_invite canceled_invite @@ -529,58 +321,6 @@ union FedHandshakeAction rejected_invite removed_team -union FederationStatusChangeAdditionalInfo - "Additional information about the organization or connected team" - - connected_team_name ConnectedTeamName - "The name of the team." - non_trusted_team_details NonTrustedTeamDetails - "The email to which the request was sent." - organization_name OrganizationName - "The name of the organization." - - example default - connected_team_name = default - - example default2 - connected_team_name = default2 - -struct OrganizationName - "The name of the organization" - - organization String - "The name of the organization." - - example default - organization = "My Organization" - - example default2 - organization = "My Organization" - -struct NonTrustedTeamDetails - "The email to which the request was sent" - - team String - "The email to which the request was sent." - - example default - team = "abc" - - example default2 - team = "xyz" - -struct ConnectedTeamName - "The name of the team" - - team String - "The name of the team." - - example default - team = "My Team" - - example default2 - team = "My Team" - union FileCommentNotificationPolicy "Enable or disable file comments notifications" disabled @@ -591,38 +331,6 @@ union FileCommentsPolicy disabled enabled -struct FileRequestDetails - "File request details" - - asset_index UInt64 - "Asset position in the Assets list." - deadline FileRequestDeadline? - "File request deadline." - - example default - asset_index = 3 - deadline = default - - example default2 - asset_index = 4 - deadline = default2 - -struct FileRequestDeadline - "File request deadline" - - deadline common.DropboxTimestamp? - "The deadline for this file request. Might be missing due to historical data gap." - allow_late_uploads String? - "If set, allow uploads after the deadline has passed." - - example default - deadline = "2017-01-25T15:51:30Z" - allow_late_uploads = "one_day" - - example default2 - deadline = "2017-01-25T15:51:30Z" - allow_late_uploads = "one_day" - union FileRequestsPolicy "File requests policy" disabled @@ -633,35 +341,20 @@ union FileTransfersPolicy disabled enabled +union FlexibleFileNamesPolicy + "Flexible file names policy" + off + off_default + optional + optional_default + required + required_default + union FolderLinkRestrictionPolicy "Policy for deciding whether applying link restrictions on all team owned folders" disabled enabled -struct GeoLocationLogInfo - "Geographic location details." - - city String? - "City name." - region String? - "Region name." - country String? - "Country code." - ip_address IpAddress - "IP address." - - example default - city = "San Francisco" - region = "California" - country = "US" - ip_address = "45.56.78.100" - - example default2 - city = "San Francisco" - region = "California" - country = "US" - ip_address = "45.56.78.100" - union GoogleSsoPolicy "Google SSO policy" disabled @@ -685,6 +378,12 @@ union InviteAcceptanceEmailPolicy disabled enabled +union InviteMethod + auto_approve + invite_link + member_invite + moved_from_another_team + union LabelType "Label type" personal_information @@ -700,12 +399,21 @@ union LoginMethod apple_oauth first_party_token_exchange google_oauth + kakao_oauth lenovo_oauth + passkey password qr_code saml two_factor_authentication web_session + microsoft_oauth + +union MemberRemoveActionType + delete + leave + offboard + offboard_and_retain_team_folders union MemberRequestsPolicy auto_accept @@ -731,21 +439,11 @@ union MemberSuggestionsPolicy disabled enabled -struct MemberTransferredInternalFields - "Internal only - fields for target team computations" - - source_team_id team_common.TeamId - "Internal only - team user was moved from." - target_team_id team_common.TeamId - "Internal only - team user was moved to." - - example default - source_team_id = "dbtid:AAE3tIYgVuVT1gZork5wQJbXbmlrkBMq26c" - target_team_id = "dbtid:AAE3tIYgVuVT1gZork5wQJbXbmlrkBMq26c" - - example default2 - source_team_id = "dbtid:AAFAqKNLrx_W9MFkS2gWftX0QfTZpo03WsE" - target_team_id = "dbtid:AAFAqKNLrx_W9MFkS2gWftX0QfTZpo03WsE" +union MicrosoftLoginPolicy + "Microsoft login policy" + default + disabled + enabled union MicrosoftOfficeAddinPolicy "Microsoft Office addin policy" @@ -789,8 +487,15 @@ union PassPolicy disabled enabled +union PasskeyLoginPolicy + "Passkey login policy" + default + disabled + enabled + union PlacementRestriction australia_only + canada_only europe_only japan_only none @@ -801,21 +506,30 @@ union PolicyType disposition retention -struct RelocateAssetReferencesLogInfo - "Provides the indices of the source asset and the destination asset for a relocate action." +union PreviewsAiPolicy + "Policy for deciding whether team users can use Previews AI" + default + disabled + enabled - src_asset_index UInt64 - "Source asset position in the Assets list." - dest_asset_index UInt64 - "Destination asset position in the Assets list." +union ReplayAddingPeoplePolicy + "Policy for deciding who can be added to Replay content" + anyone + team_and_allowlist + team_only - example default - src_asset_index = 3 - dest_asset_index = 3 +union ReplayLinkAccess + "Who can access this Replay link" + anyone_logged_in + no_login_required + team_and_approved + team_only - example default2 - src_asset_index = 4 - dest_asset_index = 4 +union ReplaySharingPolicy + "Policy for deciding who Replay content can be shared with through links" + anyone + team_and_allowlist + team_only union ResellerRole not_reseller @@ -835,6 +549,18 @@ union SecondaryMailsPolicy disabled enabled +union SendAndTrackPolicy + "Policy for deciding whether team users can use Send and Track" + default + disabled + enabled + +union SendExternalSharingPolicy + "Policy for deciding whether team users can share Send content externally" + default + disabled + enabled + union SendForSignaturePolicy "Policy for controlling team access to send for signature feature" disabled @@ -851,6 +577,12 @@ union SharedLinkAccessLevel reader writer +union SharedLinkDefaultPermissionsPolicy + "Policy for deciding the default permissions granted through shared links" + default + edit + view + union SharedLinkVisibility "Defines who has access to a shared link." no_one @@ -876,26 +608,10 @@ union SharingMemberPolicy forbid forbid_with_exclusions -struct ShowcaseDocumentLogInfo - "Showcase document's logged information." - - showcase_id String - "Showcase document Id." - showcase_title String - "Showcase document title." - - example default - showcase_id = "fvti8SoWq5tdyM1YMXl5z" - showcase_title = "Sample Showcase Proposal" - - example default2 - showcase_id = "fvti8SoWq5tdyM1YMXl5z" - showcase_title = "Sample Showcase Proposal" - -union ShowcaseDownloadPolicy - "Policy for controlling if files can be downloaded from Showcases by team members" - disabled - enabled +union ShowcaseDownloadPolicy + "Policy for controlling if files can be downloaded from Showcases by team members" + disabled + enabled union ShowcaseEnabledPolicy "Policy for controlling whether Showcase is enabled." @@ -907,6 +623,17 @@ union ShowcaseExternalSharingPolicy disabled enabled +union SignExternalSharingPolicy + "Policy for deciding whether team users can share Sign content externally" + default + disabled + enabled + +union SignTemplateCreationPermissionPolicy + "Policy for controlling if team members can create templates" + disabled + enabled + union SmartSyncOptOutPolicy default opted_out @@ -922,6 +649,12 @@ union SpaceLimitsStatus over_quota within_quota +union StackCrossTeamAccessPolicy + "Policy for whether a team's content can be reached via Stacks owned by other teams" + allowed + default + disallowed + union TeamBrandingPolicy "Policy for controlling team access to setting up branding feature" disabled @@ -932,356 +665,283 @@ union TeamExtensionsPolicy disabled enabled -struct TeamLogInfo - "Team's logged information." +union TeamMemberStorageRequestPolicy + "Policy for deciding whether team members can request increased storage limits from admins" + default + disabled + enabled - display_name String - "Team display name." +union TeamSelectiveSyncPolicy + "Policy for controlling whether team selective sync is enabled for team." + disabled + enabled - example default - display_name = "A Team" +union TfaConfiguration + "Two factor authentication configuration. Note: the enabled option is deprecated." + authenticator + disabled + enabled + sms - example default2 - display_name = "A Team" +union TimeUnit + days + hours + milliseconds + minutes + months + seconds + weeks + years -union TeamMembershipType - free - full - guest +union TopLevelContentPolicy + "Policy for deciding whether members can edit team folders at the top level of the team space" + admins_only + everyone -union TeamMergeRequestAcceptedExtraDetails - "Team merge request acceptance details" +union TrustedNonTeamMemberType + enterprise_admin + multi_instance_admin - primary_team PrimaryTeamRequestAcceptedDetails - "Team merge request accepted details shown to the primary team." - secondary_team SecondaryTeamRequestAcceptedDetails - "Team merge request accepted details shown to the secondary team." +union TrustedTeamsRequestAction + accepted + declined + expired + invited + revoked - example default - primary_team = default +union TrustedTeamsRequestState + invited + linked + unlinked - example default2 - primary_team = default2 +union TwoAccountPolicy + "Policy for pairing personal account to work account" + disabled + enabled -struct SecondaryTeamRequestAcceptedDetails - "Team merge request acceptance details shown to the secondary team" +union WatermarkingPolicy + "Policy for controlling team access to watermarking feature" + disabled + enabled - primary_team String - "The primary team name." - sent_by String - "The name of the secondary team admin who sent the request originally." +union ActionDetails + "Additional information indicating the action taken that caused status change." + remove_action MemberRemoveActionType + "Define how the user was removed from the team." + team_invite_details TeamInviteDetails + "Additional information relevant when someone is invited to the team" + team_join_details JoinTeamDetails + "Additional information relevant when a new member joins the team." example default - primary_team = "IT Department" - sent_by = "Dan Eveninglily" - + team_join_details = default + example default2 - primary_team = "IT Department" - sent_by = "Dan Eveninglily" - -struct PrimaryTeamRequestAcceptedDetails - "Team merge request acceptance details shown to the primary team" + team_join_details = default2 - secondary_team String - "The secondary team name." - sent_by String - "The name of the secondary team admin who sent the request originally." +union AssetLogInfo + "Asset details." + file FileLogInfo + "File's details." + folder FolderLogInfo + "Folder's details." + paper_document PaperDocumentLogInfo + "Paper document's details." + paper_folder PaperFolderLogInfo + "Paper folder's details." + showcase_document ShowcaseDocumentLogInfo + "Showcase document's details." example default - secondary_team = "IT Department" - sent_by = "Dan Eveninglily" - + file = default + example default2 - secondary_team = "IT Department" - sent_by = "Dan Eveninglily" - -union TeamMergeRequestCanceledExtraDetails - "Team merge request cancellation details" + file = default2 - primary_team PrimaryTeamRequestCanceledDetails - "Team merge request cancellation details shown to the primary team." - secondary_team SecondaryTeamRequestCanceledDetails - "Team merge request cancellation details shown to the secondary team." +union FedExtraDetails + "More details about the organization or team." + organization OrganizationDetails + "More details about the organization." + team TeamDetails + "More details about the team." example default - primary_team = default - + team = default + example default2 - primary_team = default2 - -struct SecondaryTeamRequestCanceledDetails - "Team merge request cancellation details shown to the secondary team" + team = default2 - sent_to String - "The email of the primary team admin that the request was sent to." - sent_by String - "The name of the secondary team admin who sent the request originally." +union FederationStatusChangeAdditionalInfo + "Additional information about the organization or connected team" + connected_team_name ConnectedTeamName + "The name of the team" + non_trusted_team_details NonTrustedTeamDetails + "The email to which the request was sent" + organization_name OrganizationName + "The name of the organization" example default - sent_to = "admin@it_department.com" - sent_by = "Dan Eveninglily" - + connected_team_name = default + example default2 - sent_to = "admin@it_department.com" - sent_by = "Dan Eveninglily" - -struct PrimaryTeamRequestCanceledDetails - "Team merge request cancellation details shown to the primary team" + connected_team_name = default2 - secondary_team String - "The secondary team name." - sent_by String - "The name of the secondary team admin who sent the request originally." +union LinkedDeviceLogInfo + "The device sessions that user is linked to." + desktop_device_session DesktopDeviceSessionLogInfo + "desktop device session's details." + legacy_device_session LegacyDeviceSessionLogInfo + "legacy device session's details." + mobile_device_session MobileDeviceSessionLogInfo + "mobile device session's details." + web_device_session WebDeviceSessionLogInfo + "web device session's details." example default - secondary_team = "IT Department" - sent_by = "Dan Eveninglily" - + mobile_device_session = default + example default2 - secondary_team = "IT Department" - sent_by = "Dan Eveninglily" + mobile_device_session = default2 -union TeamMergeRequestExpiredExtraDetails - "Team merge request expiration details" +union ParticipantLogInfo + "A user or group" + group GroupLogInfo + "Group details." + user UserLogInfo + "A user with a Dropbox account." - primary_team PrimaryTeamRequestExpiredDetails - "Team merge request canceled details shown to the primary team." - secondary_team SecondaryTeamRequestExpiredDetails - "Team merge request canceled details shown to the secondary team." + example default + user = default + + example default2 + user = default2 + +union TeamMergeRequestAcceptedExtraDetails + "Team merge request acceptance details" + primary_team PrimaryTeamRequestAcceptedDetails + "Team merge request accepted details shown to the primary team" + secondary_team SecondaryTeamRequestAcceptedDetails + "Team merge request accepted details shown to the secondary team" example default primary_team = default - + example default2 primary_team = default2 -struct SecondaryTeamRequestExpiredDetails - "Team merge request expiration details shown to the secondary team" - - sent_to String - "The email of the primary team admin the request was sent to." +union TeamMergeRequestCanceledExtraDetails + "Team merge request cancellation details" + primary_team PrimaryTeamRequestCanceledDetails + "Team merge request cancellation details shown to the primary team" + secondary_team SecondaryTeamRequestCanceledDetails + "Team merge request cancellation details shown to the secondary team" example default - sent_to = "admin@it_department.com" - + primary_team = default + example default2 - sent_to = "admin@it_department.com" - -struct PrimaryTeamRequestExpiredDetails - "Team merge request expiration details shown to the primary team" + primary_team = default2 - secondary_team String - "The secondary team name." - sent_by String - "The name of the secondary team admin who sent the request originally." +union TeamMergeRequestExpiredExtraDetails + "Team merge request expiration details" + primary_team PrimaryTeamRequestExpiredDetails + "Team merge request canceled details shown to the primary team" + secondary_team SecondaryTeamRequestExpiredDetails + "Team merge request canceled details shown to the secondary team" example default - secondary_team = "IT Department" - sent_by = "Dan Eveninglily" - + primary_team = default + example default2 - secondary_team = "IT Department" - sent_by = "Dan Eveninglily" + primary_team = default2 union TeamMergeRequestReminderExtraDetails "Team merge request reminder details" - primary_team PrimaryTeamRequestReminderDetails - "Team merge request reminder details shown to the primary team." + "Team merge request reminder details shown to the primary team" secondary_team SecondaryTeamRequestReminderDetails - "Team merge request reminder details shown to the secondary team." + "Team merge request reminder details shown to the secondary team" example default primary_team = default - + example default2 primary_team = default2 -struct SecondaryTeamRequestReminderDetails - "Team merge request reminder details shown to the secondary team" - - sent_to String - "The email of the primary team admin the request was sent to." - - example default - sent_to = "admin@it_department.com" - - example default2 - sent_to = "admin@it_department.com" - -struct PrimaryTeamRequestReminderDetails - "Team merge request reminder details shown to the primary team" - - secondary_team String - "The secondary team name." - sent_to String - "The name of the primary team admin the request was sent to." - - example default - secondary_team = "IT Department" - sent_to = "Dan Eveninglily" - - example default2 - secondary_team = "IT Department" - sent_to = "Dan Eveninglily" - -struct TeamName - "Team name details" - - team_display_name String - "Team's display name." - team_legal_name String - "Team's legal name." - - example default - team_display_name = "abc" - team_legal_name = "abc" - - example default2 - team_display_name = "xyz" - team_legal_name = "xyz" - -union TeamSelectiveSyncPolicy - "Policy for controlling whether team selective sync is enabled for team." - disabled - enabled - -union TfaConfiguration - "Two factor authentication configuration. Note: the enabled option is deprecated." - authenticator - disabled - enabled - sms - -union TimeUnit - days - hours - milliseconds - minutes - months - seconds - weeks - years - -struct TrustedNonTeamMemberLogInfo extends UserLogInfo - "User that is not a member of the team but considered trusted." - - trusted_non_team_member_type TrustedNonTeamMemberType - "Indicates the type of the member of a trusted team." - team TeamLogInfo? - "Details about this user's trusted team." - - example default - account_id = "dbid:AAHgR8xsQP48a5DQUGPo-Vxsrjd0OByVmho" - display_name = "John Smith" - email = "john_smith@acmecorp.com" - trusted_non_team_member_type = multi_instance_admin - team = default - - example default2 - account_id = "dbid:AAGx4oiLtHdvRdNxUpvvJBXYgR4BS19c9kw" - display_name = "Jane Smith" - email = "jane_smith@acmecorp.com" - trusted_non_team_member_type = multi_instance_admin - team = default2 - -union TrustedNonTeamMemberType - enterprise_admin - multi_instance_admin - -union TrustedTeamsRequestAction - accepted - declined - expired - invited - revoked - -union TrustedTeamsRequestState - invited - linked - unlinked - -union TwoAccountPolicy - "Policy for pairing personal account to work account" - disabled - enabled - -struct UserNameLogInfo - "User's name logged information" - - given_name String - "Given name." - surname String - "Surname." - locale String? - "Locale. Might be missing due to historical data gap." - - example default - given_name = "abc" - surname = "abc" - locale = "abc" - - example default2 - given_name = "xyz" - surname = "xyz" - locale = "xyz" - -union WatermarkingPolicy - "Policy for controlling team access to watermarking feature" - disabled - enabled - -union WebSessionsFixedLengthPolicy - "Web sessions fixed length policy." - - defined DurationLogInfo - "Defined fixed session length." - undefined - "Undefined fixed session length." +union WebSessionsFixedLengthPolicy + "Web sessions fixed length policy." + defined DurationLogInfo + "Defined fixed session length." + undefined + "Undefined fixed session length." example default defined = default - + example default2 defined = default2 union WebSessionsIdleLengthPolicy "Web sessions idle length policy." - defined DurationLogInfo "Defined idle session length." - undefined + undefined "Undefined idle session length." example default defined = default - + example default2 defined = default2 -################## -# Built-in types -################## +struct AddonLogInfo + "Add-on logged information" + addon_name String + "Add-on name." -struct ApiSessionLogInfo - "Api session." + example default + addon_name = "abc" + + example default2 + addon_name = "xyz" - request_id RequestId - "Api request ID." +struct AdminAlertingAlertConfiguration + "Alert configurations" + alert_state AdminAlertingAlertStatePolicy? + "Alert state." + sensitivity_level AdminAlertingAlertSensitivity? + "Sensitivity level." + recipients_settings RecipientsConfiguration? + "Recipient settings." + text String? + "Text." + excluded_file_extensions String? + "Excluded file extensions." + malware_exclusion_state MalwareExclusionState? + "Malware exclusion list state." example default - request_id = "dbarid:f451ce673cc5da6818aed4c160a3ebaa" - + alert_state = off + sensitivity_level = invalid + recipients_settings = default + text = "abc" + excluded_file_extensions = "abc" + malware_exclusion_state = default + example default2 - request_id = "dbarid:f451ce673cc5da6818aed4c160a3ebaa" + alert_state = off + sensitivity_level = invalid + recipients_settings = default2 + text = "xyz" + excluded_file_extensions = "xyz" + malware_exclusion_state = default2 struct AppLogInfo "App's logged information." union - user_or_team_linked_app UserOrTeamLinkedAppLogInfo - user_linked_app UserLinkedAppLogInfo team_linked_app TeamLinkedAppLogInfo - + user_linked_app UserLinkedAppLogInfo + user_or_team_linked_app UserOrTeamLinkedAppLogInfo app_id AppId? "App unique ID." display_name String? @@ -1289,43 +949,58 @@ struct AppLogInfo example default team_linked_app = default - + example default2 team_linked_app = default2 -struct DesktopSessionLogInfo extends SessionLogInfo - "Desktop session." +struct Certificate + "Certificate details." + subject String + "Certificate subject." + issuer String + "Certificate issuer." + issue_date String + "Certificate issue date." + expiration_date String + "Certificate expiration date." + serial_number String + "Certificate serial number." + sha1_fingerprint String + "Certificate sha1 fingerprint." + common_name String? + "Certificate common name." example default - session_id = "dbwsid:123456789012345678901234567890123456789" - + subject = "abc" + issuer = "abc" + issue_date = "abc" + expiration_date = "abc" + serial_number = "abc" + sha1_fingerprint = "abc" + common_name = "abc" + example default2 - session_id = "dbwsid:abcd5678901234567890123456789012345abcd" - -struct DeviceSessionLogInfo - "Device's session logged information." - union - desktop_device_session DesktopDeviceSessionLogInfo - mobile_device_session MobileDeviceSessionLogInfo - web_device_session WebDeviceSessionLogInfo - legacy_device_session LegacyDeviceSessionLogInfo + subject = "xyz" + issuer = "xyz" + issue_date = "xyz" + expiration_date = "xyz" + serial_number = "xyz" + sha1_fingerprint = "xyz" + common_name = "xyz" - ip_address IpAddress? - "The IP address of the last activity from this session." - created common.DropboxTimestamp? - "The time this session was created." - updated common.DropboxTimestamp? - "The time of the last activity from this session." +struct ConnectedTeamName + "The name of the team" + team String + "The name of the team." example default - desktop_device_session = default - + team = "My Team" + example default2 - desktop_device_session = default2 + team = "My Team" struct DesktopDeviceSessionLogInfo extends DeviceSessionLogInfo "Information about linked Dropbox desktop client sessions" - session_info DesktopSessionLogInfo? "Desktop session unique id." host_name String @@ -1349,7 +1024,7 @@ struct DesktopDeviceSessionLogInfo extends DeviceSessionLogInfo client_version = "abc" platform = "abc" is_delete_on_unlink_supported = true - + example default2 ip_address = "45.56.78.100" created = "2017-01-25T15:51:30Z" @@ -1361,77 +1036,212 @@ struct DesktopDeviceSessionLogInfo extends DeviceSessionLogInfo platform = "xyz" is_delete_on_unlink_supported = false -struct MobileDeviceSessionLogInfo extends DeviceSessionLogInfo - "Information about linked Dropbox mobile client sessions" - - session_info MobileSessionLogInfo? - "Mobile session unique id." - device_name String - "The device name." - client_type team.MobileClientPlatform - "The mobile application type." - client_version String? - "The Dropbox client version." - os_version String? - "The hosting OS version." - last_carrier String? - "last carrier used by the device." +struct DesktopSessionLogInfo extends SessionLogInfo + "Desktop session." example default - ip_address = "45.56.78.100" - created = "2017-01-25T15:51:30Z" - updated = "2017-01-25T15:51:30Z" - session_info = default - device_name = "abc" - client_type = iphone - client_version = "abc" - os_version = "abc" - last_carrier = "abc" + session_id = "dbwsid:123456789012345678901234567890123456789" + + example default2 + session_id = "dbwsid:abcd5678901234567890123456789012345abcd" + +struct DeviceSessionLogInfo + "Device's session logged information." + union + desktop_device_session DesktopDeviceSessionLogInfo + legacy_device_session LegacyDeviceSessionLogInfo + mobile_device_session MobileDeviceSessionLogInfo + web_device_session WebDeviceSessionLogInfo + ip_address IpAddress? + "The IP address of the last activity from this session." + created common.DropboxTimestamp? + "The time this session was created." + updated common.DropboxTimestamp? + "The time of the last activity from this session." + example default + desktop_device_session = default + example default2 - ip_address = "45.56.78.100" - created = "2017-01-25T15:51:30Z" - updated = "2017-01-25T15:51:30Z" - session_info = default2 - device_name = "xyz" - client_type = iphone - client_version = "xyz" - os_version = "xyz" - last_carrier = "xyz" + desktop_device_session = default2 -struct WebDeviceSessionLogInfo extends DeviceSessionLogInfo - "Information on active web sessions" +struct DurationLogInfo + "Represents a time duration: unit and amount" + unit TimeUnit + "Time unit." + amount UInt64 + "Amount of time." - session_info WebSessionLogInfo? - "Web session unique id." - user_agent String - "Information on the hosting device." - os String - "Information on the hosting operating system." - browser String - "Information on the browser used for this web session." + example default + unit = milliseconds + amount = 3 + + example default2 + unit = milliseconds + amount = 4 + +struct ExternalUserLogInfo + "A user without a Dropbox account." + user_identifier String + "An external user identifier." + identifier_type IdentifierType + "Identifier type." example default - ip_address = "45.56.78.100" - created = "2017-01-25T15:51:30Z" - updated = "2017-01-25T15:51:30Z" - session_info = default - user_agent = "abc" - os = "abc" - browser = "abc" + user_identifier = "david@example.com" + identifier_type = email + + example default2 + user_identifier = "david@example.com" + identifier_type = email + +struct FailureDetailsLogInfo + "Provides details about a failure" + user_friendly_message String? + "A user friendly explanation of the error." + technical_error_message String? + "A technical explanation of the error. This is relevant for some errors." + example default + user_friendly_message = "abc" + technical_error_message = "abc" + example default2 - ip_address = "45.56.78.100" - created = "2017-01-25T15:51:30Z" - updated = "2017-01-25T15:51:30Z" - session_info = default2 - user_agent = "xyz" - os = "xyz" - browser = "xyz" + user_friendly_message = "xyz" + technical_error_message = "xyz" + +struct FileLogInfo extends FileOrFolderLogInfo + "File's logged information." + + example default + path = default + display_name = "reports.xls" + file_id = "id:jQKLsZFQImAAAAAAEZAAQt" + file_size = 3 + + example default2 + path = default2 + display_name = "reports.xls" + file_id = "id:jQKLsZFQImAAAAAAEZAAQt" + file_size = 4 + +struct FileRequestDeadline + "File request deadline" + deadline common.DropboxTimestamp? + "The deadline for this file request. Might be missing due to historical data gap." + allow_late_uploads String? + "If set, allow uploads after the deadline has passed." + + example default + deadline = "2017-01-25T15:51:30Z" + allow_late_uploads = "one_day" + + example default2 + deadline = "2017-01-25T15:51:30Z" + allow_late_uploads = "one_day" + +struct FileRequestDetails + "File request details" + asset_index UInt64 + "Asset position in the Assets list." + deadline FileRequestDeadline? + "File request deadline." + has_password Boolean? + "Flag represents if this file request has password." + + example default + asset_index = 3 + deadline = default + has_password = true + + example default2 + asset_index = 4 + deadline = default2 + has_password = false + +struct FolderLogInfo extends FileOrFolderLogInfo + "Folder's logged information." + file_count UInt64? + "Number of files within the folder." + + example default + path = default + display_name = "reports.xls" + file_id = "id:jQKLsZFQImAAAAAAEZAAQt" + file_size = 3 + file_count = 3 + + example default2 + path = default2 + display_name = "reports.xls" + file_id = "id:jQKLsZFQImAAAAAAEZAAQt" + file_size = 4 + file_count = 4 + +struct GroupLogInfo + "Group's logged information." + group_id team_common.GroupId? + "The unique id of this group." + display_name String + "The name of this group." + external_id team_common.GroupExternalId? + "External group ID." + + example default + group_id = "g:e2db7665347abcd600000000001a2b3c" + display_name = "abc" + external_id = "some group id" + + example default2 + group_id = "g:hujn7665347abcd600000000001a2b3d" + display_name = "xyz" + external_id = "another group id" + +struct JoinTeamDetails + "Additional information relevant when a new member joins the team." + linked_apps List(UserLinkedAppLogInfo) + "Linked applications. (Deprecated) Please use has_linked_apps boolean field instead." + linked_devices List(LinkedDeviceLogInfo) + "Linked devices. (Deprecated) Please use has_linked_devices boolean field instead." + linked_shared_folders List(FolderLogInfo) + "Linked shared folders. (Deprecated) Please use has_linked_shared_folders boolean field instead." + was_linked_apps_truncated Boolean? + "(Deprecated) True if the linked_apps list was truncated to the maximum supported length (50)." + was_linked_devices_truncated Boolean? + "(Deprecated) True if the linked_devices list was truncated to the maximum supported length (50)." + was_linked_shared_folders_truncated Boolean? + "(Deprecated) True if the linked_shared_folders list was truncated to the maximum supported length (50)." + has_linked_apps Boolean? + "True if the user had linked apps at event time." + has_linked_devices Boolean? + "True if the user had linked apps at event time." + has_linked_shared_folders Boolean? + "True if the user had linked shared folders at event time." + + example default + linked_apps = [default] + linked_devices = [default] + linked_shared_folders = [default] + was_linked_apps_truncated = true + was_linked_devices_truncated = true + was_linked_shared_folders_truncated = true + has_linked_apps = true + has_linked_devices = true + has_linked_shared_folders = true + + example default2 + linked_apps = [default2] + linked_devices = [default2] + linked_shared_folders = [default2] + was_linked_apps_truncated = false + was_linked_devices_truncated = false + was_linked_shared_folders_truncated = false + has_linked_apps = false + has_linked_devices = false + has_linked_shared_folders = false struct LegacyDeviceSessionLogInfo extends DeviceSessionLogInfo "Information on sessions, in legacy format" - session_info SessionLogInfo? "Session unique id." display_name String? @@ -1464,7 +1274,7 @@ struct LegacyDeviceSessionLogInfo extends DeviceSessionLogInfo device_type = "abc" client_version = "abc" legacy_uniq_id = "abc" - + example default2 ip_address = "45.56.78.100" created = "2017-01-25T15:51:30Z" @@ -1479,199 +1289,184 @@ struct LegacyDeviceSessionLogInfo extends DeviceSessionLogInfo client_version = "xyz" legacy_uniq_id = "xyz" -struct SessionLogInfo - "Session's logged information." - union - web WebSessionLogInfo - desktop DesktopSessionLogInfo - mobile MobileSessionLogInfo - - session_id common.SessionId? - "Session ID." +struct LinkSettingsLogInfo + "Link Settings" + name String + "Link Name." + require_email Boolean + "Email Required." + downloadable Boolean + "Downloadable." + expire_at common.DropboxTimestamp? + "Expires at." + password_required Boolean + "Password required." + url String + "Link URL." example default - desktop = default - + name = "abc" + require_email = true + downloadable = true + expire_at = "2017-01-25T15:51:30Z" + password_required = true + url = "abc" + example default2 - desktop = default2 - -struct UserLogInfo - "User's logged information." - union - team_member TeamMemberLogInfo - trusted_non_team_member TrustedNonTeamMemberLogInfo - non_team_member NonTeamMemberLogInfo + name = "xyz" + require_email = false + downloadable = false + expire_at = "2017-01-25T15:51:30Z" + password_required = false + url = "xyz" + +struct MalwareExclusionState + "Malware exclusion list state" + excluded_file_hashes_count Int64 + "The number of files that are excluded from the monitoring for malware alerts." + file_path_from_last_exclusion String? + "The file path of the last exclusion operation." + file_path_from_last_inclusion String? + "The file path of the last inclusion operation." + + example default + excluded_file_hashes_count = 3 + file_path_from_last_exclusion = "abc" + file_path_from_last_inclusion = "abc" + + example default2 + excluded_file_hashes_count = 4 + file_path_from_last_exclusion = "xyz" + file_path_from_last_inclusion = "xyz" - account_id users_common.AccountId? - "User unique ID." - display_name common.DisplayNameLegacy? - "User display name." - email EmailAddress? - "User email address." +struct MemberTransferredInternalFields + "Internal only - fields for target team computations" + source_team_id team_common.TeamId + "Internal only - team user was moved from." + target_team_id team_common.TeamId + "Internal only - team user was moved to." example default - non_team_member = default - + source_team_id = "dbtid:AAE3tIYgVuVT1gZork5wQJbXbmlrkBMq26c" + target_team_id = "dbtid:AAE3tIYgVuVT1gZork5wQJbXbmlrkBMq26c" + example default2 - non_team_member = default2 + source_team_id = "dbtid:AAFAqKNLrx_W9MFkS2gWftX0QfTZpo03WsE" + target_team_id = "dbtid:AAFAqKNLrx_W9MFkS2gWftX0QfTZpo03WsE" -struct UserLinkedAppLogInfo extends AppLogInfo - "User linked app" +struct MobileDeviceSessionLogInfo extends DeviceSessionLogInfo + "Information about linked Dropbox mobile client sessions" + session_info MobileSessionLogInfo? + "Mobile session unique id." + device_name String + "The device name." + client_type team.MobileClientPlatform + "The mobile application type." + client_version String? + "The Dropbox client version." + os_version String? + "The hosting OS version." + last_carrier String? + "last carrier used by the device." example default - app_id = "dbaid:AAFhvuxku2OYumUaV17x6ExFhr6OPrwjTKs" - display_name = "abc" - + ip_address = "45.56.78.100" + created = "2017-01-25T15:51:30Z" + updated = "2017-01-25T15:51:30Z" + session_info = default + device_name = "abc" + client_type = iphone + client_version = "abc" + os_version = "abc" + last_carrier = "abc" + example default2 - app_id = "dbaid:AAG1NxJeBtby__IZENPAvDGeOssreFpPALE" - display_name = "xyz" + ip_address = "45.56.78.100" + created = "2017-01-25T15:51:30Z" + updated = "2017-01-25T15:51:30Z" + session_info = default2 + device_name = "xyz" + client_type = iphone + client_version = "xyz" + os_version = "xyz" + last_carrier = "xyz" -struct UserOrTeamLinkedAppLogInfo extends AppLogInfo - "User or team linked app. Used when linked type is missing due to historical data gap." +struct MobileSessionLogInfo extends SessionLogInfo + "Mobile session." example default - app_id = "dbaid:AAFhvuxku2OYumUaV17x6ExFhr6OPrwjTKs" - display_name = "abc" - + session_id = "dbwsid:123456789012345678901234567890123456789" + example default2 - app_id = "dbaid:AAG1NxJeBtby__IZENPAvDGeOssreFpPALE" - display_name = "xyz" + session_id = "dbwsid:abcd5678901234567890123456789012345abcd" -struct TeamMemberLogInfo extends UserLogInfo - "Team member's logged information." +struct NamespaceRelativePathLogInfo + "Namespace relative path details." + ns_id NamespaceId? + "Namespace ID." + relative_path FilePath? + "A path relative to the specified namespace ID." + is_shared_namespace Boolean? + "True if the namespace is shared." - team_member_id team_common.TeamMemberId? - "Team member ID." - member_external_id team_common.MemberExternalId? - "Team member external ID." - team TeamLogInfo? - "Details about this user’s team for enterprise event." + example default + ns_id = "1234" + relative_path = "/Contract Work/Product Design" + is_shared_namespace = true + + example default2 + ns_id = "1234" + relative_path = "/Contract Work/Draft" + is_shared_namespace = false + +struct NonTeamMemberLogInfo extends UserLogInfo + "Non team member's logged information." example default account_id = "dbid:AAHgR8xsQP48a5DQUGPo-Vxsrjd0OByVmho" display_name = "John Smith" email = "john_smith@acmecorp.com" - team_member_id = "dbmid:AAFoi-tmvRuQR0jU-3fN4B-9nZo6nHcDO9Q" - member_external_id = "ADSYNC S-1-5-21-1004296348-1135238915-682003432-1224" - team = default - + example default2 account_id = "dbid:AAGx4oiLtHdvRdNxUpvvJBXYgR4BS19c9kw" display_name = "Jane Smith" email = "jane_smith@acmecorp.com" - team_member_id = "dbmid:AAFoi-tmvRuQR0jU-3fN4B-9nZo6nHcDO9Q" - member_external_id = "ADSYNC S-1-5-21-1004296348-1135238915-682003432-1225" - team = default2 - -struct TeamLinkedAppLogInfo extends AppLogInfo - "Team linked app" - - example default - app_id = "dbaid:AAFhvuxku2OYumUaV17x6ExFhr6OPrwjTKs" - display_name = "abc" - - example default2 - app_id = "dbaid:AAG1NxJeBtby__IZENPAvDGeOssreFpPALE" - display_name = "xyz" - -struct FileOrFolderLogInfo - "Generic information relevant both for files and folders" - - path PathLogInfo - "Path relative to event context." - display_name String? - "Display name." - file_id String? - "Unique ID." - file_size UInt64? - "File or folder size in bytes." - - example default - path = default - display_name = "reports.xls" - file_id = "id:jQKLsZFQImAAAAAAEZAAQt" - file_size = 3 - - example default2 - path = default2 - display_name = "reports.xls" - file_id = "id:jQKLsZFQImAAAAAAEZAAQt" - file_size = 4 - -struct FileLogInfo extends FileOrFolderLogInfo - "File's logged information." - - example default - path = default - display_name = "reports.xls" - file_id = "id:jQKLsZFQImAAAAAAEZAAQt" - file_size = 3 - - example default2 - path = default2 - display_name = "reports.xls" - file_id = "id:jQKLsZFQImAAAAAAEZAAQt" - file_size = 4 - -struct FolderLogInfo extends FileOrFolderLogInfo - "Folder's logged information." - file_count UInt64? - "Number of files within the folder." +struct NonTrustedTeamDetails + "The email to which the request was sent" + team String + "The email to which the request was sent." example default - path = default - display_name = "reports.xls" - file_id = "id:jQKLsZFQImAAAAAAEZAAQt" - file_size = 3 - file_count = 3 - + team = "abc" + example default2 - path = default2 - display_name = "reports.xls" - file_id = "id:jQKLsZFQImAAAAAAEZAAQt" - file_size = 4 - file_count = 4 - -struct GroupLogInfo - "Group's logged information." + team = "xyz" - group_id team_common.GroupId? - "The unique id of this group." - display_name String - "The name of this group." - external_id team_common.GroupExternalId? - "External group ID." +struct OrganizationDetails + "More details about the organization." + organization String + "The name of the organization." example default - group_id = "g:e2db7665347abcd600000000001a2b3c" - display_name = "abc" - external_id = "some group id" - + organization = "My Organization" + example default2 - group_id = "g:hujn7665347abcd600000000001a2b3d" - display_name = "xyz" - external_id = "another group id" - -struct PathLogInfo - "Path's details." + organization = "My Organization" - contextual FilePath? - "Fully qualified path relative to event's context." - namespace_relative NamespaceRelativePathLogInfo - "Path relative to the namespace containing the content." +struct OrganizationName + "The name of the organization" + organization String + "The name of the organization." example default - contextual = "/Contract Work/Product Design" - namespace_relative = default - + organization = "My Organization" + example default2 - contextual = "/Contract Work/Draft" - namespace_relative = default2 + organization = "My Organization" struct PaperDocumentLogInfo "Paper document's logged information." - doc_id String "Papers document Id." doc_title String @@ -1680,14 +1475,13 @@ struct PaperDocumentLogInfo example default doc_id = "abc" doc_title = "abc" - + example default2 doc_id = "xyz" doc_title = "xyz" struct PaperFolderLogInfo "Paper folder's logged information." - folder_id String "Papers folder Id." folder_name String @@ -1696,143 +1490,542 @@ struct PaperFolderLogInfo example default folder_id = "abc" folder_name = "abc" - + example default2 folder_id = "xyz" folder_name = "xyz" -struct NonTeamMemberLogInfo extends UserLogInfo - "Non team member's logged information." +struct PathLogInfo + "Path's details." + contextual FilePath? + "Fully qualified path relative to event's context." + namespace_relative NamespaceRelativePathLogInfo + "Path relative to the namespace containing the content." example default - account_id = "dbid:AAHgR8xsQP48a5DQUGPo-Vxsrjd0OByVmho" - display_name = "John Smith" - email = "john_smith@acmecorp.com" - + contextual = "/Contract Work/Product Design" + namespace_relative = default + example default2 - account_id = "dbid:AAGx4oiLtHdvRdNxUpvvJBXYgR4BS19c9kw" - display_name = "Jane Smith" - email = "jane_smith@acmecorp.com" - -struct NamespaceRelativePathLogInfo - "Namespace relative path details." + contextual = "/Contract Work/Draft" + namespace_relative = default2 - ns_id NamespaceId? - "Namespace ID." - relative_path FilePath? - "A path relative to the specified namespace ID." - is_shared_namespace Boolean? - "True if the namespace is shared." +struct PrimaryTeamRequestAcceptedDetails + "Team merge request acceptance details shown to the primary team" + secondary_team String + "The secondary team name." + sent_by String + "The name of the secondary team admin who sent the request originally." example default - ns_id = "1234" - relative_path = "/Contract Work/Product Design" - is_shared_namespace = true - + secondary_team = "IT Department" + sent_by = "Dan Eveninglily" + example default2 - ns_id = "1234" - relative_path = "/Contract Work/Draft" - is_shared_namespace = false + secondary_team = "IT Department" + sent_by = "Dan Eveninglily" -struct WebSessionLogInfo extends SessionLogInfo - "Web session." +struct PrimaryTeamRequestCanceledDetails + "Team merge request cancellation details shown to the primary team" + secondary_team String + "The secondary team name." + sent_by String + "The name of the secondary team admin who sent the request originally." example default - session_id = "dbwsid:123456789012345678901234567890123456789" + secondary_team = "IT Department" + sent_by = "Dan Eveninglily" + + example default2 + secondary_team = "IT Department" + sent_by = "Dan Eveninglily" + +struct PrimaryTeamRequestExpiredDetails + "Team merge request expiration details shown to the primary team" + secondary_team String + "The secondary team name." + sent_by String + "The name of the secondary team admin who sent the request originally." + example default + secondary_team = "IT Department" + sent_by = "Dan Eveninglily" + example default2 - session_id = "dbwsid:abcd5678901234567890123456789012345abcd" + secondary_team = "IT Department" + sent_by = "Dan Eveninglily" -struct MobileSessionLogInfo extends SessionLogInfo - "Mobile session." +struct PrimaryTeamRequestReminderDetails + "Team merge request reminder details shown to the primary team" + secondary_team String + "The secondary team name." + sent_to String + "The name of the primary team admin the request was sent to." example default - session_id = "dbwsid:123456789012345678901234567890123456789" + secondary_team = "IT Department" + sent_to = "Dan Eveninglily" + + example default2 + secondary_team = "IT Department" + sent_to = "Dan Eveninglily" + +struct ProductLogInfo + "Product logged information" + product_name String + "Product name." + example default + product_name = "abc" + example default2 - session_id = "dbwsid:abcd5678901234567890123456789012345abcd" + product_name = "xyz" -struct ResellerLogInfo - "Reseller information." +struct RecipientsConfiguration + "Recipients Configuration" + recipient_setting_type AlertRecipientsSettingType? + "Recipients setting type." + emails List(EmailAddress)? + "A list of user emails to notify." + groups List(String)? + "A list of groups to notify." - reseller_name String - "Reseller name." - reseller_email EmailAddress - "Reseller email." + example default + recipient_setting_type = invalid + emails = ["john_smith@acmecorp.com"] + groups = ["abc"] + + example default2 + recipient_setting_type = invalid + emails = ["jane_smith@acmecorp.com"] + groups = ["xyz"] + +struct RelocateAssetReferencesLogInfo + "Provides the indices of the source asset and the destination asset for a relocate action." + src_asset_index UInt64 + "Source asset position in the Assets list." + dest_asset_index UInt64 + "Destination asset position in the Assets list." example default - reseller_name = "abc" - reseller_email = "john_smith@acmecorp.com" + src_asset_index = 3 + dest_asset_index = 3 + + example default2 + src_asset_index = 4 + dest_asset_index = 4 +struct SecondaryTeamRequestAcceptedDetails + "Team merge request acceptance details shown to the secondary team" + primary_team String + "The primary team name." + sent_by String + "The name of the secondary team admin who sent the request originally." + + example default + primary_team = "IT Department" + sent_by = "Dan Eveninglily" + example default2 - reseller_name = "xyz" - reseller_email = "jane_smith@acmecorp.com" + primary_team = "IT Department" + sent_by = "Dan Eveninglily" -struct OriginLogInfo - "The origin from which the actor performed the action." +struct SecondaryTeamRequestCanceledDetails + "Team merge request cancellation details shown to the secondary team" + sent_to String + "The email of the primary team admin that the request was sent to." + sent_by String + "The name of the secondary team admin who sent the request originally." - geo_location GeoLocationLogInfo? - "Geographic location details." - access_method AccessMethodLogInfo - "The method that was used to perform the action." + example default + sent_to = "admin@it_department.com" + sent_by = "Dan Eveninglily" + + example default2 + sent_to = "admin@it_department.com" + sent_by = "Dan Eveninglily" + +struct SecondaryTeamRequestExpiredDetails + "Team merge request expiration details shown to the secondary team" + sent_to String + "The email of the primary team admin the request was sent to." example default - geo_location = default - access_method = default + sent_to = "admin@it_department.com" + + example default2 + sent_to = "admin@it_department.com" + +struct SecondaryTeamRequestReminderDetails + "Team merge request reminder details shown to the secondary team" + sent_to String + "The email of the primary team admin the request was sent to." + example default + sent_to = "admin@it_department.com" + example default2 - geo_location = default2 - access_method = default2 + sent_to = "admin@it_department.com" -struct DurationLogInfo - "Represents a time duration: unit and amount" +struct SessionLogInfo + "Session's logged information." + union + desktop DesktopSessionLogInfo + mobile MobileSessionLogInfo + web WebSessionLogInfo + session_id common.SessionId? + "Session ID." - unit TimeUnit - "Time unit." - amount UInt64 - "Amount of time." + example default + desktop = default + + example default2 + desktop = default2 + +struct ShowcaseDocumentLogInfo + "Showcase document's logged information." + showcase_id String + "Showcase document Id." + showcase_title String + "Showcase document title." example default - unit = milliseconds - amount = 3 + showcase_id = "fvti8SoWq5tdyM1YMXl5z" + showcase_title = "Sample Showcase Proposal" + + example default2 + showcase_id = "fvti8SoWq5tdyM1YMXl5z" + showcase_title = "Sample Showcase Proposal" + +struct TeamDetails + "More details about the team." + team String + "The name of the team." + + example default + team = "My Team" + + example default2 + team = "My Team" + +struct TeamInviteDetails + "Details about team invites" + invite_method InviteMethod + "How the user was invited to the team." + additional_license_purchase Boolean? + "True if the invitation incurred an additional license purchase." + example default + invite_method = invite_link + additional_license_purchase = true + example default2 - unit = milliseconds - amount = 4 + invite_method = invite_link + additional_license_purchase = false -struct ExternalUserLogInfo - "A user without a Dropbox account." +struct TeamLinkedAppLogInfo extends AppLogInfo + "Team linked app" - user_identifier String - "An external user identifier." - identifier_type IdentifierType - "Identifier type." + example default + app_id = "dbaid:AAFhvuxku2OYumUaV17x6ExFhr6OPrwjTKs" + display_name = "abc" + + example default2 + app_id = "dbaid:AAG1NxJeBtby__IZENPAvDGeOssreFpPALE" + display_name = "xyz" + +struct TeamLogInfo + "Team's logged information." + display_name String + "Team display name." example default - user_identifier = "david@example.com" - identifier_type = email + display_name = "A Team" + + example default2 + display_name = "A Team" + +struct TeamMemberLogInfo extends UserLogInfo + "Team member's logged information." + team_member_id team_common.TeamMemberId? + "Team member ID." + member_external_id team_common.MemberExternalId? + "Team member external ID." + team TeamLogInfo? + "Details about this user’s team for enterprise event." + + example default + account_id = "dbid:AAHgR8xsQP48a5DQUGPo-Vxsrjd0OByVmho" + display_name = "John Smith" + email = "john_smith@acmecorp.com" + team_member_id = "dbmid:AAFoi-tmvRuQR0jU-3fN4B-9nZo6nHcDO9Q" + member_external_id = "ADSYNC S-1-5-21-1004296348-1135238915-682003432-1224" + team = default + + example default2 + account_id = "dbid:AAGx4oiLtHdvRdNxUpvvJBXYgR4BS19c9kw" + display_name = "Jane Smith" + email = "jane_smith@acmecorp.com" + team_member_id = "dbmid:AAFoi-tmvRuQR0jU-3fN4B-9nZo6nHcDO9Q" + member_external_id = "ADSYNC S-1-5-21-1004296348-1135238915-682003432-1225" + team = default2 + +struct TeamName + "Team name details" + team_display_name String + "Team's display name." + team_legal_name String + "Team's legal name." + + example default + team_display_name = "abc" + team_legal_name = "abc" + + example default2 + team_display_name = "xyz" + team_legal_name = "xyz" + +struct TrustedNonTeamMemberLogInfo extends UserLogInfo + "User that is not a member of the team but considered trusted." + trusted_non_team_member_type TrustedNonTeamMemberType + "Indicates the type of the member of a trusted team." + team TeamLogInfo? + "Details about this user's trusted team." + + example default + account_id = "dbid:AAHgR8xsQP48a5DQUGPo-Vxsrjd0OByVmho" + display_name = "John Smith" + email = "john_smith@acmecorp.com" + trusted_non_team_member_type = multi_instance_admin + team = default + + example default2 + account_id = "dbid:AAGx4oiLtHdvRdNxUpvvJBXYgR4BS19c9kw" + display_name = "Jane Smith" + email = "jane_smith@acmecorp.com" + trusted_non_team_member_type = multi_instance_admin + team = default2 + +struct UserLinkedAppLogInfo extends AppLogInfo + "User linked app" + + example default + app_id = "dbaid:AAFhvuxku2OYumUaV17x6ExFhr6OPrwjTKs" + display_name = "abc" + + example default2 + app_id = "dbaid:AAG1NxJeBtby__IZENPAvDGeOssreFpPALE" + display_name = "xyz" + +struct UserLogInfo + "User's logged information." + union + non_team_member NonTeamMemberLogInfo + team_member TeamMemberLogInfo + trusted_non_team_member TrustedNonTeamMemberLogInfo + account_id users_common.AccountId? + "User unique ID." + display_name common.DisplayNameLegacy? + "User display name." + email EmailAddress? + "User email address." + + example default + non_team_member = default + + example default2 + non_team_member = default2 + +struct UserNameLogInfo + "User's name logged information" + given_name String + "Given name." + surname String + "Surname." + locale String? + "Locale. Might be missing due to historical data gap." + + example default + given_name = "abc" + surname = "abc" + locale = "abc" + + example default2 + given_name = "xyz" + surname = "xyz" + locale = "xyz" + +struct UserOrTeamLinkedAppLogInfo extends AppLogInfo + "User or team linked app. Used when linked type is missing due to historical data gap." + + example default + app_id = "dbaid:AAFhvuxku2OYumUaV17x6ExFhr6OPrwjTKs" + display_name = "abc" + + example default2 + app_id = "dbaid:AAG1NxJeBtby__IZENPAvDGeOssreFpPALE" + display_name = "xyz" + +struct WebDeviceSessionLogInfo extends DeviceSessionLogInfo + "Information on active web sessions" + session_info WebSessionLogInfo? + "Web session unique id." + user_agent String + "Information on the hosting device." + os String + "Information on the hosting operating system." + browser String + "Information on the browser used for this web session." + + example default + ip_address = "45.56.78.100" + created = "2017-01-25T15:51:30Z" + updated = "2017-01-25T15:51:30Z" + session_info = default + user_agent = "abc" + os = "abc" + browser = "abc" + + example default2 + ip_address = "45.56.78.100" + created = "2017-01-25T15:51:30Z" + updated = "2017-01-25T15:51:30Z" + session_info = default2 + user_agent = "xyz" + os = "xyz" + browser = "xyz" + +struct WebSessionLogInfo extends SessionLogInfo + "Web session." + + example default + session_id = "dbwsid:123456789012345678901234567890123456789" + + example default2 + session_id = "dbwsid:abcd5678901234567890123456789012345abcd" + +struct ApiSessionLogInfo + "Api session." + request_id RequestId + "Api request ID." + + example default + request_id = "dbarid:f451ce673cc5da6818aed4c160a3ebaa" + + example default2 + request_id = "dbarid:f451ce673cc5da6818aed4c160a3ebaa" + +struct FileOrFolderLogInfo + "Generic information relevant both for files and folders" + path PathLogInfo + "Path relative to event context." + display_name String? + "Display name." + file_id String? + "Unique ID." + file_size UInt64? + "File or folder size in bytes." + + example default + path = default + display_name = "reports.xls" + file_id = "id:jQKLsZFQImAAAAAAEZAAQt" + file_size = 3 + + example default2 + path = default2 + display_name = "reports.xls" + file_id = "id:jQKLsZFQImAAAAAAEZAAQt" + file_size = 4 + +struct GeoLocationLogInfo + "Geographic location details." + city String? + "City name." + region String? + "Region name." + country String? + "Country code." + ip_address IpAddress + "IP address." + + example default + city = "San Francisco" + region = "California" + country = "US" + ip_address = "45.56.78.100" + + example default2 + city = "San Francisco" + region = "California" + country = "US" + ip_address = "45.56.78.100" + +struct MissingDetails + "An indication that an error occurred while retrieving the event. Some attributes of the event may be omitted as a result." + source_event_fields String? + "All the data that could be retrieved and converted from the source event." + +struct OriginLogInfo + "The origin from which the actor performed the action." + geo_location GeoLocationLogInfo? + "Geographic location details." + access_method AccessMethodLogInfo + "The method that was used to perform the action." + + example default + geo_location = default + access_method = default + + example default2 + geo_location = default2 + access_method = default2 + +struct ResellerLogInfo + "Reseller information." + reseller_name String + "Reseller name." + reseller_email EmailAddress + "Reseller email." + example default + reseller_name = "abc" + reseller_email = "john_smith@acmecorp.com" + example default2 - user_identifier = "david@example.com" - identifier_type = email - -struct MissingDetails - "An indication that an error occurred while retrieving the event. Some attributes of the event may be omitted as a result." + reseller_name = "xyz" + reseller_email = "jane_smith@acmecorp.com" - source_event_fields String? - "All the data that could be retrieved and converted from the source event." +union AccessMethodLogInfo + "Indicates the method in which the action was performed." + admin_console WebSessionLogInfo + "Admin console session details." + api ApiSessionLogInfo + "Api session details." + content_manager WebSessionLogInfo + "Content manager session details." + end_user SessionLogInfo + "End user session details." + enterprise_console WebSessionLogInfo + "Enterprise console session details." + sign_in_as WebSessionLogInfo + "Sign in as session details." + example default + end_user = default + + example default2 + end_user = default2 union ActorLogInfo "The entity who performed the action." - admin UserLogInfo "The admin who did the action." - anonymous + anonymous "Anonymous actor." app AppLogInfo "The application who did the action." - dropbox + dropbox "Action done by Dropbox." reseller ResellerLogInfo "Action done by reseller." @@ -1841,40 +2034,19 @@ union ActorLogInfo example default user = default - + example default2 user = default2 -union AssetLogInfo - "Asset details." - - file FileLogInfo - "File's details." - folder FolderLogInfo - "Folder's details." - paper_document PaperDocumentLogInfo - "Paper document's details." - paper_folder PaperFolderLogInfo - "Paper folder's details." - showcase_document ShowcaseDocumentLogInfo - "Showcase document's details." - - example default - file = default - - example default2 - file = default2 - union ContextLogInfo "The primary entity on which the action was done." - - anonymous + anonymous "Anonymous context." non_team_member NonTeamMemberLogInfo "Action was done on behalf of a non team member." organization_team TeamLogInfo "Action was done on behalf of a team that's part of an organization." - team + team "Action was done on behalf of the team." team_member TeamMemberLogInfo "Action was done on behalf of a team member." @@ -1883,33 +2055,20 @@ union ContextLogInfo example default team_member = default - + example default2 team_member = default2 -union ParticipantLogInfo - "A user or group" - - group GroupLogInfo - "Group details." - user UserLogInfo - "A user with a Dropbox account." - - example default - user = default - - example default2 - user = default2 - union EventCategory "Category of events in event audit log." - admin_alerting "Events that involve team related alerts." apps "Events that apply to management of linked apps." comments "Events that have to do with comments on files and Paper documents." + dash + "Events that apply to Dropbox Dash" data_governance "Events that involve data governance actions" devices @@ -1938,6 +2097,8 @@ union EventCategory "Events that apply to all types of sharing and collaboration." showcase "Events that apply to Dropbox Showcase." + signatures + "Events that apply to Dropbox Sign" sso "Events that involve using or configuring single sign-on as well as administrative policies concerning single sign-on." team_folders @@ -1954,13 +2115,8 @@ union EventCategory example default sharing = null -############################# -# Types for specific events -############################# - struct AdminAlertingAlertStateChangedDetails "Changed an alert state." - alert_name String "Alert name." alert_severity AdminAlertSeverityEnum @@ -1984,7 +2140,6 @@ struct AdminAlertingAlertStateChangedDetails struct AdminAlertingChangedAlertConfigDetails "Changed an alert setting." - alert_name String "Alert Name." previous_alert_config AdminAlertingAlertConfiguration @@ -1999,7 +2154,6 @@ struct AdminAlertingChangedAlertConfigDetails struct AdminAlertingTriggeredAlertDetails "Triggered security alert." - alert_name String "Alert name." alert_severity AdminAlertSeverityEnum @@ -2017,7 +2171,6 @@ struct AdminAlertingTriggeredAlertDetails struct RansomwareRestoreProcessCompletedDetails "Completed ransomware restore process." - status String "The status of the restore process." restored_files_count Int64 @@ -2032,7 +2185,6 @@ struct RansomwareRestoreProcessCompletedDetails struct RansomwareRestoreProcessStartedDetails "Started ransomware restore process." - extension String "Ransomware filename extension." @@ -2041,7 +2193,6 @@ struct RansomwareRestoreProcessStartedDetails struct AppBlockedByPermissionsDetails "Failed to connect app for member." - app_info AppLogInfo "Relevant application details." @@ -2050,7 +2201,6 @@ struct AppBlockedByPermissionsDetails struct AppLinkTeamDetails "Linked app for team." - app_info AppLogInfo "Relevant application details." @@ -2059,7 +2209,6 @@ struct AppLinkTeamDetails struct AppLinkUserDetails "Linked app for member." - app_info AppLogInfo "Relevant application details." @@ -2068,7 +2217,6 @@ struct AppLinkUserDetails struct AppUnlinkTeamDetails "Unlinked app for team." - app_info AppLogInfo "Relevant application details." @@ -2077,7 +2225,6 @@ struct AppUnlinkTeamDetails struct AppUnlinkUserDetails "Unlinked app for member." - app_info AppLogInfo "Relevant application details." @@ -2086,7 +2233,6 @@ struct AppUnlinkUserDetails struct IntegrationConnectedDetails "Connected integration for member." - integration_name String "Name of the third-party integration." @@ -2095,7 +2241,6 @@ struct IntegrationConnectedDetails struct IntegrationDisconnectedDetails "Disconnected integration for member." - integration_name String "Name of the third-party integration." @@ -2104,7 +2249,6 @@ struct IntegrationDisconnectedDetails struct FileAddCommentDetails "Added file comment." - comment_text String? "Comment text." @@ -2113,7 +2257,6 @@ struct FileAddCommentDetails struct FileChangeCommentSubscriptionDetails "Subscribed to or unsubscribed from comment notifications for file." - new_value FileCommentNotificationPolicy "New file comment subscription." previous_value FileCommentNotificationPolicy? @@ -2125,7 +2268,6 @@ struct FileChangeCommentSubscriptionDetails struct FileDeleteCommentDetails "Deleted file comment." - comment_text String? "Comment text." @@ -2134,7 +2276,6 @@ struct FileDeleteCommentDetails struct FileEditCommentDetails "Edited file comment." - comment_text String? "Comment text." previous_comment_text String @@ -2146,7 +2287,6 @@ struct FileEditCommentDetails struct FileLikeCommentDetails "Liked file comment." - comment_text String? "Comment text." @@ -2155,7 +2295,6 @@ struct FileLikeCommentDetails struct FileResolveCommentDetails "Resolved file comment." - comment_text String? "Comment text." @@ -2164,7 +2303,6 @@ struct FileResolveCommentDetails struct FileUnlikeCommentDetails "Unliked file comment." - comment_text String? "Comment text." @@ -2173,16 +2311,385 @@ struct FileUnlikeCommentDetails struct FileUnresolveCommentDetails "Unresolved file comment." - comment_text String? "Comment text." example default comment_text = "abc" +struct DashAddedCommentToStackDetails + "Added a comment to a stack." + stack_name String + "The name of the stack where the comment exists." + stack_item_name String + "The name of the stack item that the comment is tied to." + comment_text String + "The text of the comment." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_item_name = "abc" + comment_text = "abc" + stack_type = unknown + +struct DashAddedConnectorDetails + "Connected to a user connector." + connector_name String + "The name of the Connector." + connector_status DashConnectorStatus + "The status of the Connector." + + example default + connector_name = "abc" + connector_status = fail + +struct DashAddedLinkToStackDetails + "Added a link to a stack." + stack_name String + "The name of the stack." + stack_item_link String + "The link to the item in the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_item_link = "abc" + stack_type = unknown + +struct DashAddedTeamEmailDomainAllowlistDetails + "Admin added an email domain to the team allowlist." + email_domain String + "The email domain that gets added/removed from the team allowlist." + + example default + email_domain = "abc" + +struct DashAdminAddedOrgWideConnectorDetails + "Admin added an admin connector." + connector_name String + "The name of the Connector." + connector_status DashConnectorStatus + "The status of the Connector." + + example default + connector_name = "abc" + connector_status = fail + +struct DashAdminDisabledConnectorDetails + "Admin disabled a user connector." + connector_name String + "The name of the Connector." + connector_status DashConnectorStatus? + "The status of the Connector." + + example default + connector_name = "abc" + connector_status = fail + +struct DashAdminEnabledConnectorDetails + "Admin enabled a user connector." + connector_name String + "The name of the Connector." + connector_status DashConnectorStatus? + "The status of the Connector." + + example default + connector_name = "abc" + connector_status = fail + +struct DashAdminRemovedOrgWideConnectorDetails + "Admin removed an admin connector." + connector_name String + "The name of the Connector." + connector_status DashConnectorStatus + "The status of the Connector." + + example default + connector_name = "abc" + connector_status = fail + +struct DashArchivedStackDetails + "Archived a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashChangedAudienceOfSharedLinkToStackDetails + "Changed the audience of a shared link to a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashClonedStackDetails + "Cloned stack." + stack_name String + "The name of the stack." + actor_email String + "Email of the actor." + new_cloned_stack_name String + "New cloned stack name." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + actor_email = "abc" + new_cloned_stack_name = "abc" + stack_type = unknown + +struct DashConnectorToolsCallDetails + "Called a tool on a connector." + connector_name String + "The name of the connector." + tool_name String + "The name of the tool that was called." + surface String? + "The surface from which the tool was called." + + example default + connector_name = "abc" + tool_name = "abc" + surface = "abc" + +struct DashCreatedStackDetails + "Created a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashDeletedCommentFromStackDetails + "Deleted a comment from a stack." + stack_name String + "The name of the stack where the comment exists." + stack_item_name String + "The name of the stack item that the comment is tied to." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_item_name = "abc" + stack_type = unknown + +struct DashDeletedStackDetails + "Deleted a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashEditedCommentInStackDetails + "Edited a comment in a stack." + stack_name String + "The name of the stack where the comment exists." + stack_item_name String + "The name of the stack item that the comment is tied to." + comment_text String + "The text of the comment." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_item_name = "abc" + comment_text = "abc" + stack_type = unknown + +struct DashExternalUserOpenedStackDetails + "External user opened a stack." + stack_name String + "The name of the stack." + stack_sharing_scope DashStackSharingScope + "The sharing scope of the stack." + is_invited Boolean + "Whether the user was invited to the stack." + is_verified Boolean + "Whether the user has verified their email address." + stack_owner_team_id Int64? + "The team ID of the stack owner." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_sharing_scope = unknown + is_invited = true + is_verified = true + stack_owner_team_id = 3 + stack_type = unknown + +struct DashFirstLaunchedDesktopDetails + "Opened the desktop app for the first time." + os_name String + "The name of the operating system." + + example default + os_name = "abc" + +struct DashFirstLaunchedExtensionDetails + "Opened the extension for the first time." + browser_name String + "The name of the web browser." + + example default + browser_name = "abc" + +struct DashFirstLaunchedWebStartPageDetails + "Opened the web Start Page for the first time." + browser_name String + "The name of the web browser." + + example default + browser_name = "abc" + +struct DashOpenedSharedLinkToStackDetails + "Checked access permissions to a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashOpenedStackDetails + "Opened a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashPreviewOptOutStatusChangedDetails + "Changed the preview opt-out status." + opt_out_status DashPreviewOptOutStatus + "The new preview opt-out status." + + example default + opt_out_status = opted_in + +struct DashRemovedConnectorDetails + "Disconnected a user connector." + connector_name String + "The name of the Connector." + connector_status DashConnectorStatus + "The status of the Connector." + + example default + connector_name = "abc" + connector_status = fail + +struct DashRemovedLinkFromStackDetails + "Removed a link from a stack." + stack_name String + "The name of the stack." + stack_item_link String + "The link to the item in the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_item_link = "abc" + stack_type = unknown + +struct DashRemovedSharedLinkToStackDetails + "Removed a shared link to a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashRemovedTeamEmailDomainAllowlistDetails + "Admin removed an email domain from the team allowlist." + email_domain String + "The email domain that gets added/removed from the team allowlist." + + example default + email_domain = "abc" + +struct DashRenamedStackDetails + "Renamed a stack." + old_name String + "The old name of the stack." + new_name String + "The new name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + old_name = "abc" + new_name = "abc" + stack_type = unknown + +struct DashSharedLinkToStackDetails + "Shared a link to a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashUnarchivedStackDetails + "Unarchived a stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashViewedCompanyStackDetails + "Member viewed a company stack." + stack_name String + "The name of the stack." + stack_type DashStackType? + "The type of stack backend." + + example default + stack_name = "abc" + stack_type = unknown + +struct DashViewedExternalAiActivityReportDetails + "Admin viewed the external AI activity report." + struct GovernancePolicyAddFoldersDetails "Added folders to policy." - governance_policy_id String "Policy ID." name String @@ -2200,7 +2707,6 @@ struct GovernancePolicyAddFoldersDetails struct GovernancePolicyAddFolderFailedDetails "Couldn't add a folder to a policy." - governance_policy_id String "Policy ID." name String @@ -2221,7 +2727,6 @@ struct GovernancePolicyAddFolderFailedDetails struct GovernancePolicyContentDisposedDetails "Content disposed." - governance_policy_id String "Policy ID." name String @@ -2239,7 +2744,6 @@ struct GovernancePolicyContentDisposedDetails struct GovernancePolicyCreateDetails "Activated a new policy." - governance_policy_id String "Policy ID." name String @@ -2260,7 +2764,6 @@ struct GovernancePolicyCreateDetails struct GovernancePolicyDeleteDetails "Deleted a policy." - governance_policy_id String "Policy ID." name String @@ -2275,7 +2778,6 @@ struct GovernancePolicyDeleteDetails struct GovernancePolicyEditDetailsDetails "Edited policy." - governance_policy_id String "Policy ID." name String @@ -2299,7 +2801,6 @@ struct GovernancePolicyEditDetailsDetails struct GovernancePolicyEditDurationDetails "Changed policy duration." - governance_policy_id String "Policy ID." name String @@ -2320,7 +2821,6 @@ struct GovernancePolicyEditDurationDetails struct GovernancePolicyExportCreatedDetails "Created a policy download." - governance_policy_id String "Policy ID." name String @@ -2338,7 +2838,6 @@ struct GovernancePolicyExportCreatedDetails struct GovernancePolicyExportRemovedDetails "Removed a policy download." - governance_policy_id String "Policy ID." name String @@ -2356,7 +2855,6 @@ struct GovernancePolicyExportRemovedDetails struct GovernancePolicyRemoveFoldersDetails "Removed folders from policy." - governance_policy_id String "Policy ID." name String @@ -2377,7 +2875,6 @@ struct GovernancePolicyRemoveFoldersDetails struct GovernancePolicyReportCreatedDetails "Created a summary report for a policy." - governance_policy_id String "Policy ID." name String @@ -2392,7 +2889,6 @@ struct GovernancePolicyReportCreatedDetails struct GovernancePolicyZipPartDownloadedDetails "Downloaded content from a policy." - governance_policy_id String "Policy ID." name String @@ -2413,7 +2909,6 @@ struct GovernancePolicyZipPartDownloadedDetails struct LegalHoldsActivateAHoldDetails "Activated a hold." - legal_hold_id String "Hold ID." name String @@ -2431,7 +2926,6 @@ struct LegalHoldsActivateAHoldDetails struct LegalHoldsAddMembersDetails "Added members to a hold." - legal_hold_id String "Hold ID." name String @@ -2443,7 +2937,6 @@ struct LegalHoldsAddMembersDetails struct LegalHoldsChangeHoldDetailsDetails "Edited details for a hold." - legal_hold_id String "Hold ID." name String @@ -2461,7 +2954,6 @@ struct LegalHoldsChangeHoldDetailsDetails struct LegalHoldsChangeHoldNameDetails "Renamed a hold." - legal_hold_id String "Hold ID." previous_value String @@ -2476,7 +2968,6 @@ struct LegalHoldsChangeHoldNameDetails struct LegalHoldsExportAHoldDetails "Exported hold." - legal_hold_id String "Hold ID." name String @@ -2491,7 +2982,6 @@ struct LegalHoldsExportAHoldDetails struct LegalHoldsExportCancelledDetails "Canceled export for a hold." - legal_hold_id String "Hold ID." name String @@ -2506,7 +2996,6 @@ struct LegalHoldsExportCancelledDetails struct LegalHoldsExportDownloadedDetails "Downloaded export for a hold." - legal_hold_id String "Hold ID." name String @@ -2527,7 +3016,6 @@ struct LegalHoldsExportDownloadedDetails struct LegalHoldsExportRemovedDetails "Removed export for a hold." - legal_hold_id String "Hold ID." name String @@ -2542,7 +3030,6 @@ struct LegalHoldsExportRemovedDetails struct LegalHoldsReleaseAHoldDetails "Released a hold." - legal_hold_id String "Hold ID." name String @@ -2554,7 +3041,6 @@ struct LegalHoldsReleaseAHoldDetails struct LegalHoldsRemoveMembersDetails "Removed members from a hold." - legal_hold_id String "Hold ID." name String @@ -2566,7 +3052,6 @@ struct LegalHoldsRemoveMembersDetails struct LegalHoldsReportAHoldDetails "Created a summary report for a hold." - legal_hold_id String "Hold ID." name String @@ -2578,7 +3063,6 @@ struct LegalHoldsReportAHoldDetails struct DeviceChangeIpDesktopDetails "Changed IP address associated with active desktop session." - device_session_info DeviceSessionLogInfo "Device's session logged information." @@ -2587,7 +3071,6 @@ struct DeviceChangeIpDesktopDetails struct DeviceChangeIpMobileDetails "Changed IP address associated with active mobile session." - device_session_info DeviceSessionLogInfo? "Device's session logged information." @@ -2596,7 +3079,6 @@ struct DeviceChangeIpMobileDetails struct DeviceChangeIpWebDetails "Changed IP address associated with active web session." - user_agent String "Web browser name." @@ -2605,7 +3087,6 @@ struct DeviceChangeIpWebDetails struct DeviceDeleteOnUnlinkFailDetails "Failed to delete all files from unlinked device." - session_info SessionLogInfo? "Session unique id." display_name String? @@ -2620,7 +3101,6 @@ struct DeviceDeleteOnUnlinkFailDetails struct DeviceDeleteOnUnlinkSuccessDetails "Deleted all files from unlinked device." - session_info SessionLogInfo? "Session unique id." display_name String? @@ -2632,7 +3112,6 @@ struct DeviceDeleteOnUnlinkSuccessDetails struct DeviceLinkFailDetails "Failed to link device." - ip_address IpAddress? "IP address. Might be missing due to historical data gap." device_type DeviceType @@ -2644,7 +3123,6 @@ struct DeviceLinkFailDetails struct DeviceLinkSuccessDetails "Linked device." - device_session_info DeviceSessionLogInfo? "Device's session logged information." @@ -2659,7 +3137,6 @@ struct DeviceManagementEnabledDetails struct DeviceSyncBackupStatusChangedDetails "Enabled/disabled backup for computer." - desktop_device_session_info DesktopDeviceSessionLogInfo "Device's session logged information." previous_value BackupStatus @@ -2674,7 +3151,6 @@ struct DeviceSyncBackupStatusChangedDetails struct DeviceUnlinkDetails "Disconnected device." - session_info SessionLogInfo? "Session unique id." display_name String? @@ -2689,7 +3165,6 @@ struct DeviceUnlinkDetails struct DropboxPasswordsExportedDetails "Exported passwords." - platform String "The platform the device runs export." @@ -2698,7 +3173,6 @@ struct DropboxPasswordsExportedDetails struct DropboxPasswordsNewDeviceEnrolledDetails "Enrolled new Dropbox Passwords device." - is_first_device Boolean "Whether it's a first device enrolled." platform String @@ -2713,7 +3187,6 @@ struct EmmRefreshAuthTokenDetails struct ExternalDriveBackupEligibilityStatusCheckedDetails "Checked external drive backup eligibility status." - desktop_device_session_info DesktopDeviceSessionLogInfo "Device's session logged information." status ExternalDriveBackupEligibilityStatus @@ -2728,7 +3201,6 @@ struct ExternalDriveBackupEligibilityStatusCheckedDetails struct ExternalDriveBackupStatusChangedDetails "Modified external drive backup." - desktop_device_session_info DesktopDeviceSessionLogInfo "Device's session logged information." previous_value ExternalDriveBackupStatus @@ -2743,7 +3215,6 @@ struct ExternalDriveBackupStatusChangedDetails struct AccountCaptureChangeAvailabilityDetails "Granted/revoked option to enable account capture on team domains." - new_value AccountCaptureAvailability "New account capture availabilty value." previous_value AccountCaptureAvailability? @@ -2755,7 +3226,6 @@ struct AccountCaptureChangeAvailabilityDetails struct AccountCaptureMigrateAccountDetails "Account-captured user migrated account to team." - domain_name String "Domain name." @@ -2764,7 +3234,6 @@ struct AccountCaptureMigrateAccountDetails struct AccountCaptureNotificationEmailsSentDetails "Sent account capture email to all unmanaged members." - domain_name String "Domain name." notification_type AccountCaptureNotificationType? @@ -2776,7 +3245,6 @@ struct AccountCaptureNotificationEmailsSentDetails struct AccountCaptureRelinquishAccountDetails "Account-captured user changed account email to personal email." - domain_name String "Domain name." @@ -2794,7 +3262,6 @@ struct DomainInvitesDeclineRequestToJoinTeamDetails struct DomainInvitesEmailExistingUsersDetails "Sent domain invites to existing domain accounts." - domain_name String "Domain names." num_recipients UInt64 @@ -2815,7 +3282,6 @@ struct DomainInvitesSetInviteNewUserPrefToYesDetails struct DomainVerificationAddDomainFailDetails "Failed to verify team domain." - domain_name String "Domain name." verification_method String? @@ -2827,68 +3293,135 @@ struct DomainVerificationAddDomainFailDetails struct DomainVerificationAddDomainSuccessDetails "Verified team domain." - domain_names List(String) "Domain names." verification_method String? "Domain name verification method. Might be missing due to historical data gap." example default - domain_names = ["mars.com"] - verification_method = "abc" - -struct DomainVerificationRemoveDomainDetails - "Removed domain from list of verified team domains." + domain_names = ["mars.com"] + verification_method = "abc" + +struct DomainVerificationRemoveDomainDetails + "Removed domain from list of verified team domains." + domain_names List(String) + "Domain names." + + example default + domain_names = ["mars.com"] + +struct EnabledDomainInvitesDetails + "Enabled domain invites." + +struct EncryptedFolderCancelTeamKeyRotationDetails + "Canceled team key rotation." + team_key_id String + "Identifier of the team key." + + example default + team_key_id = "abc" + +struct EncryptedFolderEnrollBackupKeyDetails + "Added recovery key." + backup_key_id String + "Identifier of the recovery key." + + example default + backup_key_id = "abc" + +struct EncryptedFolderEnrollClientDetails + "Enrolled device." + client_key_id String + "Identifier of the client key." + + example default + client_key_id = "abc" + +struct EncryptedFolderEnrollTeamDetails + "Activated team folder encryption." + +struct EncryptedFolderFinishTeamUnenrollmentDetails + "Deactivated team folder encryption." + +struct EncryptedFolderInitTeamKeyRotationDetails + "Initiated team key rotation." + team_key_id String + "Identifier of the team key." + + example default + team_key_id = "abc" + +struct EncryptedFolderInitTeamUnenrollmentDetails + "Initiated deactivation of team folder encryption." + +struct EncryptedFolderRemoveBackupKeyDetails + "Removed recovery key." + backup_key_id String + "Identifier of the recovery key." + + example default + backup_key_id = "abc" + +struct EncryptedFolderRotateTeamKeyDetails + "Rotated team key." + team_key_id String + "Identifier of the team key." + + example default + team_key_id = "abc" - domain_names List(String) - "Domain names." +struct EncryptedFolderUnenrollClientDetails + "Unenrolled device." + client_key_id String + "Identifier of the client key." example default - domain_names = ["mars.com"] + client_key_id = "abc" -struct EnabledDomainInvitesDetails - "Enabled domain invites." +struct TeamEncryptionKeyActivateKeyDetails + "Activated team encryption key." + key_management_type String + "Type of key management." + + example default + key_management_type = "abc" struct TeamEncryptionKeyCancelKeyDeletionDetails "Canceled team encryption key deletion." - example default struct TeamEncryptionKeyCreateKeyDetails "Created team encryption key." - example default +struct TeamEncryptionKeyDeactivateKeyDetails + "Deactivated team encryption key." + struct TeamEncryptionKeyDeleteKeyDetails "Deleted team encryption key." - example default struct TeamEncryptionKeyDisableKeyDetails "Disabled team encryption key." - example default struct TeamEncryptionKeyEnableKeyDetails "Enabled team encryption key." - example default struct TeamEncryptionKeyRotateKeyDetails "Rotated team encryption key." - example default struct TeamEncryptionKeyScheduleKeyDeletionDetails "Scheduled encryption key deletion." - example default struct ApplyNamingConventionDetails @@ -2905,7 +3438,6 @@ struct FileAddFromAutomationDetails struct FileCopyDetails "Copied files and/or folders." - relocate_action_details List(RelocateAssetReferencesLogInfo) "Relocate action details." @@ -2926,7 +3458,6 @@ struct FileGetCopyReferenceDetails struct FileLockingLockStatusChangedDetails "Locked/unlocked editing for a file." - previous_value LockStatus "Previous lock status of the file." new_value LockStatus @@ -2938,7 +3469,6 @@ struct FileLockingLockStatusChangedDetails struct FileMoveDetails "Moved files and/or folders." - relocate_action_details List(RelocateAssetReferencesLogInfo) "Relocate action details." @@ -2948,7 +3478,6 @@ struct FileMoveDetails struct FilePermanentlyDeleteDetails "Permanently deleted files and/or folders." - example default struct FilePreviewDetails @@ -2956,7 +3485,6 @@ struct FilePreviewDetails struct FileRenameDetails "Renamed files and/or folders." - relocate_action_details List(RelocateAssetReferencesLogInfo) "Relocate action details." @@ -2974,7 +3502,6 @@ struct FileRollbackChangesDetails struct FileSaveCopyReferenceDetails "Saved file/folder using copy reference." - relocate_action_details List(RelocateAssetReferencesLogInfo) "Relocate action details." @@ -2983,7 +3510,6 @@ struct FileSaveCopyReferenceDetails struct FolderOverviewDescriptionChangedDetails "Updated folder overview." - folder_overview_location_asset UInt64 "Folder Overview location position in the Assets list." @@ -2992,7 +3518,6 @@ struct FolderOverviewDescriptionChangedDetails struct FolderOverviewItemPinnedDetails "Pinned item to folder overview." - folder_overview_location_asset UInt64 "Folder Overview location position in the Assets list." pinned_items_asset_indices List(UInt64) @@ -3004,7 +3529,6 @@ struct FolderOverviewItemPinnedDetails struct FolderOverviewItemUnpinnedDetails "Unpinned item from folder overview." - folder_overview_location_asset UInt64 "Folder Overview location position in the Assets list." pinned_items_asset_indices List(UInt64) @@ -3016,7 +3540,6 @@ struct FolderOverviewItemUnpinnedDetails struct ObjectLabelAddedDetails "Added a label." - label_type LabelType "Labels mark a file or folder." @@ -3025,7 +3548,6 @@ struct ObjectLabelAddedDetails struct ObjectLabelRemovedDetails "Removed a label." - label_type LabelType "Labels mark a file or folder." @@ -3034,7 +3556,6 @@ struct ObjectLabelRemovedDetails struct ObjectLabelUpdatedValueDetails "Updated a label's value." - label_type LabelType "Labels mark a file or folder." @@ -3047,9 +3568,19 @@ struct OrganizeFolderWithTidyDetails struct ReplayFileDeleteDetails "Deleted files in Replay." +struct ReplayFileDownloadedDetails + "Downloaded files in Replay." + +struct ReplayTeamProjectCreatedDetails + "Created a team project in Replay." + name String + "Name of the newly created team project." + + example default + name = "abc" + struct RewindFolderDetails "Rewound a folder." - rewind_folder_target_ts_ms common.DropboxTimestamp "Folder was Rewound to this date." @@ -3064,7 +3595,6 @@ struct UndoOrganizeFolderWithTidyDetails struct UserTagsAddedDetails "Tagged a file." - values List(String) "values." @@ -3073,7 +3603,6 @@ struct UserTagsAddedDetails struct UserTagsRemovedDetails "Removed tags." - values List(String) "values." @@ -3082,7 +3611,6 @@ struct UserTagsRemovedDetails struct EmailIngestReceiveFileDetails "Received files via Email to Dropbox." - inbox_name String "Inbox name." attachment_names List(String) @@ -3101,9 +3629,22 @@ struct EmailIngestReceiveFileDetails from_name = "John Smith" from_email = "john_smith@acmecorp.com" +struct FileRequestAutoCloseDetails + "Auto closed file request." + file_request_id file_requests.FileRequestId? + "File request id. Might be missing due to historical data gap." + reason String? + "Reason for the auto close." + previous_details FileRequestDetails? + "Previous file request details. Might be missing due to historical data gap." + + example default + file_request_id = "oaCAVmEyrqYnkZX9955Y" + reason = "abc" + previous_details = default + struct FileRequestChangeDetails "Changed file request." - file_request_id file_requests.FileRequestId? "File request id. Might be missing due to historical data gap." previous_details FileRequestDetails? @@ -3118,7 +3659,6 @@ struct FileRequestChangeDetails struct FileRequestCloseDetails "Closed file request." - file_request_id file_requests.FileRequestId? "File request id. Might be missing due to historical data gap." previous_details FileRequestDetails? @@ -3130,7 +3670,6 @@ struct FileRequestCloseDetails struct FileRequestCreateDetails "Created file request." - file_request_id file_requests.FileRequestId? "File request id. Might be missing due to historical data gap." request_details FileRequestDetails? @@ -3142,7 +3681,6 @@ struct FileRequestCreateDetails struct FileRequestDeleteDetails "Delete file request." - file_request_id file_requests.FileRequestId? "File request id. Might be missing due to historical data gap." previous_details FileRequestDetails? @@ -3154,7 +3692,6 @@ struct FileRequestDeleteDetails struct FileRequestReceiveFileDetails "Received files for file request." - file_request_id file_requests.FileRequestId? "File request id. Might be missing due to historical data gap." file_request_details FileRequestDetails? @@ -3175,7 +3712,6 @@ struct FileRequestReceiveFileDetails struct GroupAddExternalIdDetails "Added external ID for group." - new_value team_common.GroupExternalId "Current external id." @@ -3184,7 +3720,6 @@ struct GroupAddExternalIdDetails struct GroupAddMemberDetails "Added team members to group." - is_group_owner Boolean "Is group owner." @@ -3193,7 +3728,6 @@ struct GroupAddMemberDetails struct GroupChangeExternalIdDetails "Changed external ID for group." - new_value team_common.GroupExternalId "Current external id." previous_value team_common.GroupExternalId @@ -3205,7 +3739,6 @@ struct GroupChangeExternalIdDetails struct GroupChangeManagementTypeDetails "Changed group management type." - new_value team_common.GroupManagementType "New group management type." previous_value team_common.GroupManagementType? @@ -3217,7 +3750,6 @@ struct GroupChangeManagementTypeDetails struct GroupChangeMemberRoleDetails "Changed manager permissions of group member." - is_group_owner Boolean "Is group owner." @@ -3226,7 +3758,6 @@ struct GroupChangeMemberRoleDetails struct GroupCreateDetails "Created group." - is_company_managed Boolean? "Is company managed group." join_policy GroupJoinPolicy? @@ -3238,7 +3769,6 @@ struct GroupCreateDetails struct GroupDeleteDetails "Deleted group." - is_company_managed Boolean? "Is company managed group." @@ -3248,9 +3778,19 @@ struct GroupDeleteDetails struct GroupDescriptionUpdatedDetails "Updated group." +struct GroupExternalSharingSettingOverrideChangedDetails + "Changed group's external sharing setting." + new_value ExternalSharingSetting + "New external sharing setting." + previous_value ExternalSharingSetting + "Previous external sharing setting." + + example default + new_value = unset + previous_value = unset + struct GroupJoinPolicyUpdatedDetails "Updated group join policy." - is_company_managed Boolean? "Is company managed group." join_policy GroupJoinPolicy? @@ -3265,7 +3805,6 @@ struct GroupMovedDetails struct GroupRemoveExternalIdDetails "Removed external ID for group." - previous_value team_common.GroupExternalId "Old external id." @@ -3277,7 +3816,6 @@ struct GroupRemoveMemberDetails struct GroupRenameDetails "Renamed group." - previous_value String "Previous display name." new_value String @@ -3289,7 +3827,6 @@ struct GroupRenameDetails struct AccountLockOrUnlockedDetails "Unlocked/locked account after failed sign in attempts." - previous_value AccountState "The previous account status." new_value AccountState @@ -3301,7 +3838,6 @@ struct AccountLockOrUnlockedDetails struct EmmErrorDetails "Failed to sign in via EMM." - error_details FailureDetailsLogInfo "Error details." @@ -3310,7 +3846,6 @@ struct EmmErrorDetails struct GuestAdminSignedInViaTrustedTeamsDetails "Started trusted team admin session." - team_name String? "Host team name." trusted_team_name String? @@ -3322,7 +3857,6 @@ struct GuestAdminSignedInViaTrustedTeamsDetails struct GuestAdminSignedOutViaTrustedTeamsDetails "Ended trusted team admin session." - team_name String? "Host team name." trusted_team_name String? @@ -3334,7 +3868,6 @@ struct GuestAdminSignedOutViaTrustedTeamsDetails struct LoginFailDetails "Failed to sign in." - is_emm_managed Boolean? "Tells if the login device is EMM managed. Might be missing due to historical data gap." login_method LoginMethod @@ -3349,7 +3882,6 @@ struct LoginFailDetails struct LoginSuccessDetails "Signed in." - is_emm_managed Boolean? "Tells if the login device is EMM managed. Might be missing due to historical data gap." login_method LoginMethod @@ -3361,7 +3893,6 @@ struct LoginSuccessDetails struct LogoutDetails "Signed out." - login_id String? "Login session id." @@ -3382,13 +3913,34 @@ struct SignInAsSessionStartDetails struct SsoErrorDetails "Failed to sign in via SSO." - error_details FailureDetailsLogInfo "Error details." example default error_details = default +struct AddonAssignedDetails + "Add-on Assigned." + user_name UserNameLogInfo + "User's name." + addon_name AddonLogInfo + "Add-on name." + + example default + user_name = default + addon_name = default + +struct AddonRemovedDetails + "Add-on Removed." + user_name UserNameLogInfo + "User's name." + addon_name AddonLogInfo + "Add-on name." + + example default + user_name = default + addon_name = default + struct BackupAdminInvitationSentDetails "Invited members to activate Backup." @@ -3397,7 +3949,6 @@ struct BackupInvitationOpenedDetails struct CreateTeamInviteLinkDetails "Created team invite link." - link_url String "The invite link url that was created." expiry_date String @@ -3409,7 +3960,6 @@ struct CreateTeamInviteLinkDetails struct DeleteTeamInviteLinkDetails "Deleted team invite link." - link_url String "The invite link url that was deleted." @@ -3418,7 +3968,6 @@ struct DeleteTeamInviteLinkDetails struct MemberAddExternalIdDetails "Added an external ID for team member." - new_value team_common.MemberExternalId "Current external id." @@ -3427,7 +3976,6 @@ struct MemberAddExternalIdDetails struct MemberAddNameDetails "Added team member name." - new_value UserNameLogInfo "New user's name." @@ -3436,7 +3984,6 @@ struct MemberAddNameDetails struct MemberChangeAdminRoleDetails "Changed team member admin role." - new_value AdminRole? "New admin role. This field is relevant when the admin role is changed or whenthe user role changes from no admin rights to with admin rights." previous_value AdminRole? @@ -3448,7 +3995,6 @@ struct MemberChangeAdminRoleDetails struct MemberChangeEmailDetails "Changed team member email." - new_value EmailAddress "New email." previous_value EmailAddress? @@ -3460,7 +4006,6 @@ struct MemberChangeEmailDetails struct MemberChangeExternalIdDetails "Changed the external ID for team member." - new_value team_common.MemberExternalId "Current external id." previous_value team_common.MemberExternalId @@ -3472,7 +4017,6 @@ struct MemberChangeExternalIdDetails struct MemberChangeMembershipTypeDetails "Changed membership type (limited/full) of member." - prev_value TeamMembershipType "Previous membership type." new_value TeamMembershipType @@ -3484,7 +4028,6 @@ struct MemberChangeMembershipTypeDetails struct MemberChangeNameDetails "Changed team member name." - new_value UserNameLogInfo "New user's name." previous_value UserNameLogInfo? @@ -3496,7 +4039,6 @@ struct MemberChangeNameDetails struct MemberChangeResellerRoleDetails "Changed team member reseller role." - new_value ResellerRole "New reseller role. This field is relevant when the reseller role is changed." previous_value ResellerRole @@ -3508,14 +4050,12 @@ struct MemberChangeResellerRoleDetails struct MemberChangeStatusDetails "Changed member status (invited, joined, suspended, etc.)." - previous_value MemberStatus? "Previous member status. Might be missing due to historical data gap." new_value MemberStatus "New member status." action ActionDetails? - "Additional information indicating the action taken -that caused status change." + "Additional information indicating the action taken that caused status change." new_team String? "The user's new team name. This field is relevant when the user is transferred off the team." previous_team String? @@ -3539,7 +4079,6 @@ struct MemberPermanentlyDeleteAccountContentsDetails struct MemberRemoveExternalIdDetails "Removed the external ID for team member." - previous_value team_common.MemberExternalId "Old external id." @@ -3551,7 +4090,6 @@ struct MemberSetProfilePhotoDetails struct MemberSpaceLimitsAddCustomQuotaDetails "Set custom member space limit." - new_value UInt64 "New custom quota value in bytes." @@ -3560,7 +4098,6 @@ struct MemberSpaceLimitsAddCustomQuotaDetails struct MemberSpaceLimitsChangeCustomQuotaDetails "Changed custom member space limit." - previous_value UInt64 "Previous custom quota value in bytes." new_value UInt64 @@ -3572,7 +4109,6 @@ struct MemberSpaceLimitsChangeCustomQuotaDetails struct MemberSpaceLimitsChangeStatusDetails "Changed space limit status." - previous_value SpaceLimitsStatus "Previous storage quota status." new_value SpaceLimitsStatus @@ -3587,7 +4123,6 @@ struct MemberSpaceLimitsRemoveCustomQuotaDetails struct MemberSuggestDetails "Suggested person to add to team." - suggested_members List(EmailAddress) "suggested users emails." @@ -3599,16 +4134,36 @@ struct MemberTransferAccountContentsDetails struct PendingSecondaryEmailAddedDetails "Added pending secondary email." - secondary_email EmailAddress "New pending secondary email." example default secondary_email = "john_smith@acmecorp.com" +struct ProductAssignedToMemberDetails + "Product assigned to team member." + user_name UserNameLogInfo + "User's name." + product_name ProductLogInfo + "Product name." + + example default + user_name = default + product_name = default + +struct ProductRemovedFromMemberDetails + "Product removed from team member." + user_name UserNameLogInfo + "User's name." + product_name ProductLogInfo + "Product name." + + example default + user_name = default + product_name = default + struct SecondaryEmailDeletedDetails "Deleted secondary email." - secondary_email EmailAddress "Deleted secondary email." @@ -3617,7 +4172,6 @@ struct SecondaryEmailDeletedDetails struct SecondaryEmailVerifiedDetails "Verified secondary email." - secondary_email EmailAddress "Verified secondary email." @@ -3626,7 +4180,6 @@ struct SecondaryEmailVerifiedDetails struct SecondaryMailsPolicyChangedDetails "Secondary mails policy changed." - previous_value SecondaryMailsPolicy "Previous secondary mails policy." new_value SecondaryMailsPolicy @@ -3638,7 +4191,6 @@ struct SecondaryMailsPolicyChangedDetails struct BinderAddPageDetails "Added Binder page." - event_uuid String "Event unique identifier." doc_title String @@ -3653,7 +4205,6 @@ struct BinderAddPageDetails struct BinderAddSectionDetails "Added Binder section." - event_uuid String "Event unique identifier." doc_title String @@ -3668,7 +4219,6 @@ struct BinderAddSectionDetails struct BinderRemovePageDetails "Removed Binder page." - event_uuid String "Event unique identifier." doc_title String @@ -3683,7 +4233,6 @@ struct BinderRemovePageDetails struct BinderRemoveSectionDetails "Removed Binder section." - event_uuid String "Event unique identifier." doc_title String @@ -3698,7 +4247,6 @@ struct BinderRemoveSectionDetails struct BinderRenamePageDetails "Renamed Binder page." - event_uuid String "Event unique identifier." doc_title String @@ -3716,7 +4264,6 @@ struct BinderRenamePageDetails struct BinderRenameSectionDetails "Renamed Binder section." - event_uuid String "Event unique identifier." doc_title String @@ -3734,7 +4281,6 @@ struct BinderRenameSectionDetails struct BinderReorderPageDetails "Reordered Binder page." - event_uuid String "Event unique identifier." doc_title String @@ -3749,7 +4295,6 @@ struct BinderReorderPageDetails struct BinderReorderSectionDetails "Reordered Binder section." - event_uuid String "Event unique identifier." doc_title String @@ -3764,7 +4309,6 @@ struct BinderReorderSectionDetails struct PaperContentAddMemberDetails "Added users and/or groups to Paper doc/folder." - event_uuid String "Event unique identifier." @@ -3773,7 +4317,6 @@ struct PaperContentAddMemberDetails struct PaperContentAddToFolderDetails "Added Paper doc/folder to folder." - event_uuid String "Event unique identifier." target_asset_index UInt64 @@ -3788,7 +4331,6 @@ struct PaperContentAddToFolderDetails struct PaperContentArchiveDetails "Archived Paper doc/folder." - event_uuid String "Event unique identifier." @@ -3797,7 +4339,6 @@ struct PaperContentArchiveDetails struct PaperContentCreateDetails "Created Paper doc/folder." - event_uuid String "Event unique identifier." @@ -3806,7 +4347,6 @@ struct PaperContentCreateDetails struct PaperContentPermanentlyDeleteDetails "Permanently deleted Paper doc/folder." - event_uuid String "Event unique identifier." @@ -3815,7 +4355,6 @@ struct PaperContentPermanentlyDeleteDetails struct PaperContentRemoveFromFolderDetails "Removed Paper doc/folder from folder." - event_uuid String "Event unique identifier." target_asset_index UInt64? @@ -3830,7 +4369,6 @@ struct PaperContentRemoveFromFolderDetails struct PaperContentRemoveMemberDetails "Removed users and/or groups from Paper doc/folder." - event_uuid String "Event unique identifier." @@ -3839,7 +4377,6 @@ struct PaperContentRemoveMemberDetails struct PaperContentRenameDetails "Renamed Paper doc/folder." - event_uuid String "Event unique identifier." @@ -3848,7 +4385,6 @@ struct PaperContentRenameDetails struct PaperContentRestoreDetails "Restored archived Paper doc/folder." - event_uuid String "Event unique identifier." @@ -3857,7 +4393,6 @@ struct PaperContentRestoreDetails struct PaperDocAddCommentDetails "Added Paper doc comment." - event_uuid String "Event unique identifier." comment_text String? @@ -3869,7 +4404,6 @@ struct PaperDocAddCommentDetails struct PaperDocChangeMemberRoleDetails "Changed member permissions for Paper doc." - event_uuid String "Event unique identifier." access_type PaperAccessType @@ -3881,7 +4415,6 @@ struct PaperDocChangeMemberRoleDetails struct PaperDocChangeSharingPolicyDetails "Changed sharing setting for Paper doc." - event_uuid String "Event unique identifier." public_sharing_policy String? @@ -3896,7 +4429,6 @@ struct PaperDocChangeSharingPolicyDetails struct PaperDocChangeSubscriptionDetails "Followed/unfollowed Paper doc." - event_uuid String "Event unique identifier." new_subscription_level String @@ -3911,7 +4443,6 @@ struct PaperDocChangeSubscriptionDetails struct PaperDocDeletedDetails "Archived Paper doc." - event_uuid String "Event unique identifier." @@ -3920,7 +4451,6 @@ struct PaperDocDeletedDetails struct PaperDocDeleteCommentDetails "Deleted Paper doc comment." - event_uuid String "Event unique identifier." comment_text String? @@ -3932,7 +4462,6 @@ struct PaperDocDeleteCommentDetails struct PaperDocDownloadDetails "Downloaded Paper doc in specific format." - event_uuid String "Event unique identifier." export_file_format PaperDownloadFormat @@ -3944,7 +4473,6 @@ struct PaperDocDownloadDetails struct PaperDocEditDetails "Edited Paper doc." - event_uuid String "Event unique identifier." @@ -3953,7 +4481,6 @@ struct PaperDocEditDetails struct PaperDocEditCommentDetails "Edited Paper doc comment." - event_uuid String "Event unique identifier." comment_text String? @@ -3965,7 +4492,6 @@ struct PaperDocEditCommentDetails struct PaperDocFollowedDetails "Followed Paper doc." - event_uuid String "Event unique identifier." @@ -3974,7 +4500,6 @@ struct PaperDocFollowedDetails struct PaperDocMentionDetails "Mentioned user in Paper doc." - event_uuid String "Event unique identifier." @@ -3983,7 +4508,6 @@ struct PaperDocMentionDetails struct PaperDocOwnershipChangedDetails "Transferred ownership of Paper doc." - event_uuid String "Event unique identifier." old_owner_user_id users_common.AccountId? @@ -3998,7 +4522,6 @@ struct PaperDocOwnershipChangedDetails struct PaperDocRequestAccessDetails "Requested access to Paper doc." - event_uuid String "Event unique identifier." @@ -4007,7 +4530,6 @@ struct PaperDocRequestAccessDetails struct PaperDocResolveCommentDetails "Resolved Paper doc comment." - event_uuid String "Event unique identifier." comment_text String? @@ -4019,7 +4541,6 @@ struct PaperDocResolveCommentDetails struct PaperDocRevertDetails "Restored Paper doc to previous version." - event_uuid String "Event unique identifier." @@ -4028,7 +4549,6 @@ struct PaperDocRevertDetails struct PaperDocSlackShareDetails "Shared Paper doc via Slack." - event_uuid String "Event unique identifier." @@ -4037,7 +4557,6 @@ struct PaperDocSlackShareDetails struct PaperDocTeamInviteDetails "Shared Paper doc with users and/or groups." - event_uuid String "Event unique identifier." @@ -4046,7 +4565,6 @@ struct PaperDocTeamInviteDetails struct PaperDocTrashedDetails "Deleted Paper doc." - event_uuid String "Event unique identifier." @@ -4055,7 +4573,6 @@ struct PaperDocTrashedDetails struct PaperDocUnresolveCommentDetails "Unresolved Paper doc comment." - event_uuid String "Event unique identifier." comment_text String? @@ -4067,7 +4584,6 @@ struct PaperDocUnresolveCommentDetails struct PaperDocUntrashedDetails "Restored Paper doc." - event_uuid String "Event unique identifier." @@ -4076,7 +4592,6 @@ struct PaperDocUntrashedDetails struct PaperDocViewDetails "Viewed Paper doc." - event_uuid String "Event unique identifier." @@ -4085,7 +4600,6 @@ struct PaperDocViewDetails struct PaperExternalViewAllowDetails "Changed Paper external sharing setting to anyone." - event_uuid String "Event unique identifier." @@ -4094,7 +4608,6 @@ struct PaperExternalViewAllowDetails struct PaperExternalViewDefaultTeamDetails "Changed Paper external sharing setting to default team." - event_uuid String "Event unique identifier." @@ -4103,7 +4616,6 @@ struct PaperExternalViewDefaultTeamDetails struct PaperExternalViewForbidDetails "Changed Paper external sharing setting to team-only." - event_uuid String "Event unique identifier." @@ -4112,7 +4624,6 @@ struct PaperExternalViewForbidDetails struct PaperFolderChangeSubscriptionDetails "Followed/unfollowed Paper folder." - event_uuid String "Event unique identifier." new_subscription_level String @@ -4127,7 +4638,6 @@ struct PaperFolderChangeSubscriptionDetails struct PaperFolderDeletedDetails "Archived Paper folder." - event_uuid String "Event unique identifier." @@ -4136,7 +4646,6 @@ struct PaperFolderDeletedDetails struct PaperFolderFollowedDetails "Followed Paper folder." - event_uuid String "Event unique identifier." @@ -4145,7 +4654,6 @@ struct PaperFolderFollowedDetails struct PaperFolderTeamInviteDetails "Shared Paper folder with users and/or groups." - event_uuid String "Event unique identifier." @@ -4154,7 +4662,6 @@ struct PaperFolderTeamInviteDetails struct PaperPublishedLinkChangePermissionDetails "Changed permissions for published doc." - event_uuid String "Event unique identifier." new_permission_level String @@ -4169,7 +4676,6 @@ struct PaperPublishedLinkChangePermissionDetails struct PaperPublishedLinkCreateDetails "Published doc." - event_uuid String "Event unique identifier." @@ -4178,7 +4684,6 @@ struct PaperPublishedLinkCreateDetails struct PaperPublishedLinkDisabledDetails "Unpublished doc." - event_uuid String "Event unique identifier." @@ -4187,7 +4692,6 @@ struct PaperPublishedLinkDisabledDetails struct PaperPublishedLinkViewDetails "Viewed published doc." - event_uuid String "Event unique identifier." @@ -4208,7 +4712,6 @@ struct ClassificationCreateReportDetails struct ClassificationCreateReportFailDetails "Couldn't create Classification report." - failure_reason team.TeamReportFailureReason "Failure reason." @@ -4226,7 +4729,6 @@ struct ExportMembersReportDetails struct ExportMembersReportFailDetails "Failed to create members data report." - failure_reason team.TeamReportFailureReason "Failure reason." @@ -4238,7 +4740,17 @@ struct ExternalSharingCreateReportDetails struct ExternalSharingReportFailedDetails "Couldn't create External sharing report." + failure_reason team.TeamReportFailureReason + "Failure reason." + + example default + failure_reason = temporary_error + +struct MemberAccessDetailsCreateReportDetails + "Created member access report." +struct MemberAccessDetailsCreateReportFailedDetails + "Couldn't generate member access report." failure_reason team.TeamReportFailureReason "Failure reason." @@ -4247,7 +4759,6 @@ struct ExternalSharingReportFailedDetails struct NoExpirationLinkGenCreateReportDetails "Report created: Links created with no expiration." - start_date common.DropboxTimestamp "Report start date." end_date common.DropboxTimestamp @@ -4259,7 +4770,6 @@ struct NoExpirationLinkGenCreateReportDetails struct NoExpirationLinkGenReportFailedDetails "Couldn't create report: Links created with no expiration." - failure_reason team.TeamReportFailureReason "Failure reason." @@ -4268,7 +4778,6 @@ struct NoExpirationLinkGenReportFailedDetails struct NoPasswordLinkGenCreateReportDetails "Report created: Links created without passwords." - start_date common.DropboxTimestamp "Report start date." end_date common.DropboxTimestamp @@ -4280,7 +4789,6 @@ struct NoPasswordLinkGenCreateReportDetails struct NoPasswordLinkGenReportFailedDetails "Couldn't create report: Links created without passwords." - failure_reason team.TeamReportFailureReason "Failure reason." @@ -4289,7 +4797,6 @@ struct NoPasswordLinkGenReportFailedDetails struct NoPasswordLinkViewCreateReportDetails "Report created: Views of links without passwords." - start_date common.DropboxTimestamp "Report start date." end_date common.DropboxTimestamp @@ -4301,7 +4808,6 @@ struct NoPasswordLinkViewCreateReportDetails struct NoPasswordLinkViewReportFailedDetails "Couldn't create report: Views of links without passwords." - failure_reason team.TeamReportFailureReason "Failure reason." @@ -4310,7 +4816,6 @@ struct NoPasswordLinkViewReportFailedDetails struct OutdatedLinkViewCreateReportDetails "Report created: Views of old links." - start_date common.DropboxTimestamp "Report start date." end_date common.DropboxTimestamp @@ -4322,7 +4827,6 @@ struct OutdatedLinkViewCreateReportDetails struct OutdatedLinkViewReportFailedDetails "Couldn't create report: Views of old links." - failure_reason team.TeamReportFailureReason "Failure reason." @@ -4337,7 +4841,17 @@ struct RansomwareAlertCreateReportDetails struct RansomwareAlertCreateReportFailedDetails "Couldn't generate ransomware report." + failure_reason team.TeamReportFailureReason + "Failure reason." + + example default + failure_reason = temporary_error + +struct SharedFoldersCreateReportDetails + "Created shared folders report." +struct SharedFoldersCreateReportFailedDetails + "Couldn't generate shared folders report." failure_reason team.TeamReportFailureReason "Failure reason." @@ -4349,7 +4863,6 @@ struct SmartSyncCreateAdminPrivilegeReportDetails struct TeamActivityCreateReportDetails "Created team activity report." - start_date common.DropboxTimestamp "Report start date." end_date common.DropboxTimestamp @@ -4361,7 +4874,28 @@ struct TeamActivityCreateReportDetails struct TeamActivityCreateReportFailDetails "Couldn't generate team activity report." + failure_reason team.TeamReportFailureReason + "Failure reason." + + example default + failure_reason = temporary_error + +struct TeamFoldersCreateReportDetails + "Created team folders report." + +struct TeamFoldersCreateReportFailedDetails + "Couldn't generate team folders report." + failure_reason team.TeamReportFailureReason + "Failure reason." + example default + failure_reason = temporary_error + +struct TeamStorageCreateReportDetails + "Created team storage report." + +struct TeamStorageCreateReportFailedDetails + "Couldn't generate team storage report." failure_reason team.TeamReportFailureReason "Failure reason." @@ -4370,7 +4904,6 @@ struct TeamActivityCreateReportFailDetails struct CollectionShareDetails "Shared album." - album_name String "Album name." @@ -4379,7 +4912,6 @@ struct CollectionShareDetails struct FileTransfersFileAddDetails "Transfer files added." - file_transfer_id String "Transfer id." @@ -4388,7 +4920,6 @@ struct FileTransfersFileAddDetails struct FileTransfersTransferDeleteDetails "Deleted transfer." - file_transfer_id String "Transfer id." @@ -4397,7 +4928,6 @@ struct FileTransfersTransferDeleteDetails struct FileTransfersTransferDownloadDetails "Transfer downloaded." - file_transfer_id String "Transfer id." @@ -4406,7 +4936,6 @@ struct FileTransfersTransferDownloadDetails struct FileTransfersTransferSendDetails "Sent transfer." - file_transfer_id String "Transfer id." @@ -4415,7 +4944,6 @@ struct FileTransfersTransferSendDetails struct FileTransfersTransferViewDetails "Viewed transfer." - file_transfer_id String "Transfer id." @@ -4442,9 +4970,25 @@ struct OpenNoteSharedDetails struct ReplayFileSharedLinkCreatedDetails "Created shared link in Replay." + is_watermarked Boolean? + "Indicates whether it was a watermark share link." + access ReplayLinkAccess? + "The Replay sharing policy in place when the link was created. Might be missing due to historical data gap." + + example default + is_watermarked = true + access = no_login_required struct ReplayFileSharedLinkModifiedDetails - "Modified shared link in Replay." + "Changed shared link in Replay." + is_watermarked Boolean? + "Indicates whether it was a watermark share link." + access ReplayLinkAccess? + "The Replay sharing policy in place when the link was modified. Might be missing due to historical data gap." + + example default + is_watermarked = true + access = no_login_required struct ReplayProjectTeamAddDetails "Added member to Replay Project." @@ -4452,9 +4996,66 @@ struct ReplayProjectTeamAddDetails struct ReplayProjectTeamDeleteDetails "Removed member from Replay Project." +struct SendAndTrackFileAddedDetails + "File added to Send and Track." + +struct SendAndTrackFileRenamedDetails + "File renamed in Send and Track." + previous_value String? + "Previous file name." + + example default + previous_value = "abc" + +struct SendAndTrackFileUpdatedDetails + "File updated in Send and Track." + +struct SendAndTrackLinkCreatedDetails + "Link created in Send and Track." + link_settings LinkSettingsLogInfo + "Link Settings." + + example default + link_settings = default + +struct SendAndTrackLinkDeletedDetails + "Link deleted in Send and Track." + shared_content_link String + "Shared content link." + + example default + shared_content_link = "abc" + +struct SendAndTrackLinkUpdatedDetails + "Send and Track Link Updated." + link_settings LinkSettingsLogInfo + "Link Settings." + previous_link_name String? + "Previous link name." + + example default + link_settings = default + previous_link_name = "abc" + +struct SendAndTrackLinkViewedDetails + "Send and Track Link Visited." + link_settings LinkSettingsLogInfo + "Link Settings." + email_address String? + "Visitor Email address." + link_owner String? + "Link Owner." + + example default + link_settings = default + email_address = "abc" + link_owner = "abc" + +struct SendAndTrackRemovedFileAndAssociatedLinksDetails + "Send and Track file and associated links deleted." + struct SfAddGroupDetails "Added team to shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4472,7 +5073,6 @@ struct SfAddGroupDetails struct SfAllowNonMembersToViewSharedLinksDetails "Allowed non-collaborators to view links to files in shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4487,7 +5087,6 @@ struct SfAllowNonMembersToViewSharedLinksDetails struct SfExternalInviteWarnDetails "Set team members to see warning before sharing folders outside team." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4505,7 +5104,6 @@ struct SfExternalInviteWarnDetails struct SfFbInviteDetails "Invited Facebook users to shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4520,7 +5118,6 @@ struct SfFbInviteDetails struct SfFbInviteChangeRoleDetails "Changed Facebook user's role in shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4538,7 +5135,6 @@ struct SfFbInviteChangeRoleDetails struct SfFbUninviteDetails "Uninvited Facebook user from shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4550,7 +5146,6 @@ struct SfFbUninviteDetails struct SfInviteGroupDetails "Invited group to shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." @@ -4559,7 +5154,6 @@ struct SfInviteGroupDetails struct SfTeamGrantAccessDetails "Granted access to shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4571,7 +5165,6 @@ struct SfTeamGrantAccessDetails struct SfTeamInviteDetails "Invited team members to shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4586,7 +5179,6 @@ struct SfTeamInviteDetails struct SfTeamInviteChangeRoleDetails "Changed team member's role in shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4604,7 +5196,6 @@ struct SfTeamInviteChangeRoleDetails struct SfTeamJoinDetails "Joined team member's shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4616,7 +5207,6 @@ struct SfTeamJoinDetails struct SfTeamJoinFromOobLinkDetails "Joined team member's shared folder from link." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4634,7 +5224,6 @@ struct SfTeamJoinFromOobLinkDetails struct SfTeamUninviteDetails "Unshared folder with team member." - target_asset_index UInt64 "Target asset position in the Assets list." original_folder_name String @@ -4646,7 +5235,6 @@ struct SfTeamUninviteDetails struct SharedContentAddInviteesDetails "Invited user to Dropbox and added them to shared file/folder." - shared_content_access_level sharing.AccessLevel "Shared content access level." invitees List(EmailAddress) @@ -4658,7 +5246,6 @@ struct SharedContentAddInviteesDetails struct SharedContentAddLinkExpiryDetails "Added expiration date to link for shared file/folder." - new_value common.DropboxTimestamp? "New shared content link expiration date. Might be missing due to historical data gap." @@ -4670,7 +5257,6 @@ struct SharedContentAddLinkPasswordDetails struct SharedContentAddMemberDetails "Added users and/or groups to shared file/folder." - shared_content_access_level sharing.AccessLevel "Shared content access level." @@ -4679,7 +5265,6 @@ struct SharedContentAddMemberDetails struct SharedContentChangeDownloadsPolicyDetails "Changed whether members can download shared file/folder." - new_value DownloadPolicyType "New downloads policy." previous_value DownloadPolicyType? @@ -4691,7 +5276,6 @@ struct SharedContentChangeDownloadsPolicyDetails struct SharedContentChangeInviteeRoleDetails "Changed access type of invitee to shared file/folder before invite was accepted." - previous_access_level sharing.AccessLevel? "Previous access level. Might be missing due to historical data gap." new_access_level sharing.AccessLevel @@ -4706,7 +5290,6 @@ struct SharedContentChangeInviteeRoleDetails struct SharedContentChangeLinkAudienceDetails "Changed link audience of shared file/folder." - new_value sharing.LinkAudience "New link audience value." previous_value sharing.LinkAudience? @@ -4718,7 +5301,6 @@ struct SharedContentChangeLinkAudienceDetails struct SharedContentChangeLinkExpiryDetails "Changed link expiration of shared file/folder." - new_value common.DropboxTimestamp? "New shared content link expiration date. Might be missing due to historical data gap." previous_value common.DropboxTimestamp? @@ -4733,7 +5315,6 @@ struct SharedContentChangeLinkPasswordDetails struct SharedContentChangeMemberRoleDetails "Changed access type of shared file/folder member." - previous_access_level sharing.AccessLevel? "Previous access level. Might be missing due to historical data gap." new_access_level sharing.AccessLevel @@ -4745,7 +5326,6 @@ struct SharedContentChangeMemberRoleDetails struct SharedContentChangeViewerInfoPolicyDetails "Changed whether members can see who viewed shared file/folder." - new_value sharing.ViewerInfoPolicy "New viewer info policy." previous_value sharing.ViewerInfoPolicy? @@ -4757,7 +5337,6 @@ struct SharedContentChangeViewerInfoPolicyDetails struct SharedContentClaimInvitationDetails "Acquired membership of shared file/folder by accepting invite." - shared_content_link String? "Shared content link." @@ -4766,7 +5345,6 @@ struct SharedContentClaimInvitationDetails struct SharedContentCopyDetails "Copied shared file/folder to own Dropbox." - shared_content_link String "Shared content link." shared_content_owner UserLogInfo? @@ -4784,7 +5362,6 @@ struct SharedContentCopyDetails struct SharedContentDownloadDetails "Downloaded shared file/folder." - shared_content_link String "Shared content link." shared_content_owner UserLogInfo? @@ -4802,7 +5379,6 @@ struct SharedContentRelinquishMembershipDetails struct SharedContentRemoveInviteesDetails "Removed invitee from shared file/folder before invite was accepted." - invitees List(EmailAddress) "A list of invitees." @@ -4811,7 +5387,6 @@ struct SharedContentRemoveInviteesDetails struct SharedContentRemoveLinkExpiryDetails "Removed link expiration date of shared file/folder." - previous_value common.DropboxTimestamp? "Previous shared content link expiration date. Might be missing due to historical data gap." @@ -4823,7 +5398,6 @@ struct SharedContentRemoveLinkPasswordDetails struct SharedContentRemoveMemberDetails "Removed user/group from shared file/folder." - shared_content_access_level sharing.AccessLevel? "Shared content access level." @@ -4832,7 +5406,6 @@ struct SharedContentRemoveMemberDetails struct SharedContentRequestAccessDetails "Requested access to shared file/folder." - shared_content_link String? "Shared content link." @@ -4841,7 +5414,6 @@ struct SharedContentRequestAccessDetails struct SharedContentRestoreInviteesDetails "Restored shared file/folder invitees." - shared_content_access_level sharing.AccessLevel "Shared content access level." invitees List(EmailAddress) @@ -4853,7 +5425,6 @@ struct SharedContentRestoreInviteesDetails struct SharedContentRestoreMemberDetails "Restored users and/or groups to membership of shared file/folder." - shared_content_access_level sharing.AccessLevel "Shared content access level." @@ -4863,12 +5434,10 @@ struct SharedContentRestoreMemberDetails struct SharedContentUnshareDetails "Unshared file/folder by clearing membership." - example default struct SharedContentViewDetails "Previewed shared file/folder." - shared_content_link String "Shared content link." shared_content_owner UserLogInfo? @@ -4883,7 +5452,6 @@ struct SharedContentViewDetails struct SharedFolderChangeLinkPolicyDetails "Changed who can access shared folder via link." - new_value sharing.SharedLinkPolicy "New shared folder link policy." previous_value sharing.SharedLinkPolicy? @@ -4895,7 +5463,6 @@ struct SharedFolderChangeLinkPolicyDetails struct SharedFolderChangeMembersInheritancePolicyDetails "Changed whether shared folder inherits members from parent folder." - new_value SharedFolderMembersInheritancePolicy "New member inheritance policy." previous_value SharedFolderMembersInheritancePolicy? @@ -4907,7 +5474,6 @@ struct SharedFolderChangeMembersInheritancePolicyDetails struct SharedFolderChangeMembersManagementPolicyDetails "Changed who can add/remove members of shared folder." - new_value sharing.AclUpdatePolicy "New members management policy." previous_value sharing.AclUpdatePolicy? @@ -4919,7 +5485,6 @@ struct SharedFolderChangeMembersManagementPolicyDetails struct SharedFolderChangeMembersPolicyDetails "Changed who can become member of shared folder." - new_value sharing.MemberPolicy "New external invite policy." previous_value sharing.MemberPolicy? @@ -4931,7 +5496,6 @@ struct SharedFolderChangeMembersPolicyDetails struct SharedFolderCreateDetails "Created shared folder." - target_ns_id NamespaceId? "Target namespace ID." @@ -4946,7 +5510,6 @@ struct SharedFolderMountDetails struct SharedFolderNestDetails "Changed parent of shared folder." - previous_parent_ns_id NamespaceId? "Previous parent namespace ID." new_parent_ns_id NamespaceId? @@ -4964,7 +5527,6 @@ struct SharedFolderNestDetails struct SharedFolderTransferOwnershipDetails "Transferred ownership of shared folder to another member." - previous_owner_email EmailAddress? "The email address of the previous shared folder owner." new_owner_email EmailAddress @@ -4979,40 +5541,45 @@ struct SharedFolderUnmountDetails struct SharedLinkAddExpiryDetails "Added shared link expiration date." - new_value common.DropboxTimestamp "New shared link expiration date." + is_consolidation_action Boolean? + "Indicates whether this was a consolidation action by system." example default new_value = "2017-01-25T15:51:30Z" + is_consolidation_action = true struct SharedLinkChangeExpiryDetails "Changed shared link expiration date." - new_value common.DropboxTimestamp? "New shared link expiration date. Might be missing due to historical data gap." previous_value common.DropboxTimestamp? "Previous shared link expiration date. Might be missing due to historical data gap." + is_consolidation_action Boolean? + "Indicates whether this was a consolidation action by system." example default new_value = "2017-01-25T15:51:30Z" previous_value = "2017-01-25T15:51:30Z" + is_consolidation_action = true struct SharedLinkChangeVisibilityDetails "Changed visibility of shared link." - new_value SharedLinkVisibility "New shared link visibility." previous_value SharedLinkVisibility? "Previous shared link visibility. Might be missing due to historical data gap." + is_consolidation_action Boolean? + "Indicates whether this was a consolidation action by system." example default new_value = public previous_value = public + is_consolidation_action = true struct SharedLinkCopyDetails "Added file/folder to Dropbox from shared link." - shared_link_owner UserLogInfo? "Shared link owner details. Might be missing due to historical data gap." @@ -5021,7 +5588,6 @@ struct SharedLinkCopyDetails struct SharedLinkCreateDetails "Created shared link." - shared_link_access_level SharedLinkAccessLevel? "Defines who can access the shared link. Might be missing due to historical data gap." @@ -5030,7 +5596,6 @@ struct SharedLinkCreateDetails struct SharedLinkDisableDetails "Removed shared link." - shared_link_owner UserLogInfo? "Shared link owner details. Might be missing due to historical data gap." @@ -5039,7 +5604,6 @@ struct SharedLinkDisableDetails struct SharedLinkDownloadDetails "Downloaded file/folder from shared link." - shared_link_owner UserLogInfo? "Shared link owner details. Might be missing due to historical data gap." @@ -5048,16 +5612,17 @@ struct SharedLinkDownloadDetails struct SharedLinkRemoveExpiryDetails "Removed shared link expiration date." - previous_value common.DropboxTimestamp? "Previous shared link expiration date. Might be missing due to historical data gap." example default previous_value = "2017-01-25T15:51:30Z" +struct SharedLinkRemoveVisitorDetails + "Removed link visitor." + struct SharedLinkSettingsAddExpirationDetails "Added an expiration date to the shared link." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5072,7 +5637,6 @@ struct SharedLinkSettingsAddExpirationDetails struct SharedLinkSettingsAddPasswordDetails "Added a password to the shared link." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5084,7 +5648,6 @@ struct SharedLinkSettingsAddPasswordDetails struct SharedLinkSettingsAllowDownloadDisabledDetails "Disabled downloads." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5096,7 +5659,6 @@ struct SharedLinkSettingsAllowDownloadDisabledDetails struct SharedLinkSettingsAllowDownloadEnabledDetails "Enabled downloads." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5108,7 +5670,6 @@ struct SharedLinkSettingsAllowDownloadEnabledDetails struct SharedLinkSettingsChangeAudienceDetails "Changed the audience of the shared link." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5126,7 +5687,6 @@ struct SharedLinkSettingsChangeAudienceDetails struct SharedLinkSettingsChangeExpirationDetails "Changed the expiration date of the shared link." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5144,7 +5704,6 @@ struct SharedLinkSettingsChangeExpirationDetails struct SharedLinkSettingsChangePasswordDetails "Changed the password of the shared link." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5156,7 +5715,6 @@ struct SharedLinkSettingsChangePasswordDetails struct SharedLinkSettingsRemoveExpirationDetails "Removed the expiration date from the shared link." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5171,7 +5729,6 @@ struct SharedLinkSettingsRemoveExpirationDetails struct SharedLinkSettingsRemovePasswordDetails "Removed the password from the shared link." - shared_content_access_level sharing.AccessLevel "Shared content access level." shared_content_link String? @@ -5183,7 +5740,6 @@ struct SharedLinkSettingsRemovePasswordDetails struct SharedLinkShareDetails "Added members as audience of shared link." - shared_link_owner UserLogInfo? "Shared link owner details. Might be missing due to historical data gap." external_users List(ExternalUserLogInfo)? @@ -5195,7 +5751,6 @@ struct SharedLinkShareDetails struct SharedLinkViewDetails "Opened shared link." - shared_link_owner UserLogInfo? "Shared link owner details. Might be missing due to historical data gap." @@ -5207,7 +5762,6 @@ struct SharedNoteOpenedDetails struct ShmodelDisableDownloadsDetails "Disabled downloads for link." - shared_link_owner UserLogInfo? "Shared link owner details. Might be missing due to historical data gap." @@ -5216,7 +5770,6 @@ struct ShmodelDisableDownloadsDetails struct ShmodelEnableDownloadsDetails "Enabled downloads for link." - shared_link_owner UserLogInfo? "Shared link owner details. Might be missing due to historical data gap." @@ -5228,7 +5781,6 @@ struct ShmodelGroupShareDetails struct ShowcaseAccessGrantedDetails "Granted access to showcase." - event_uuid String "Event unique identifier." @@ -5237,7 +5789,6 @@ struct ShowcaseAccessGrantedDetails struct ShowcaseAddMemberDetails "Added member to showcase." - event_uuid String "Event unique identifier." @@ -5246,7 +5797,6 @@ struct ShowcaseAddMemberDetails struct ShowcaseArchivedDetails "Archived showcase." - event_uuid String "Event unique identifier." @@ -5255,7 +5805,6 @@ struct ShowcaseArchivedDetails struct ShowcaseCreatedDetails "Created showcase." - event_uuid String "Event unique identifier." @@ -5264,7 +5813,6 @@ struct ShowcaseCreatedDetails struct ShowcaseDeleteCommentDetails "Deleted showcase comment." - event_uuid String "Event unique identifier." comment_text String? @@ -5276,7 +5824,6 @@ struct ShowcaseDeleteCommentDetails struct ShowcaseEditedDetails "Edited showcase." - event_uuid String "Event unique identifier." @@ -5285,7 +5832,6 @@ struct ShowcaseEditedDetails struct ShowcaseEditCommentDetails "Edited showcase comment." - event_uuid String "Event unique identifier." comment_text String? @@ -5297,7 +5843,6 @@ struct ShowcaseEditCommentDetails struct ShowcaseFileAddedDetails "Added file to showcase." - event_uuid String "Event unique identifier." @@ -5306,7 +5851,6 @@ struct ShowcaseFileAddedDetails struct ShowcaseFileDownloadDetails "Downloaded file from showcase." - event_uuid String "Event unique identifier." download_type String @@ -5318,7 +5862,6 @@ struct ShowcaseFileDownloadDetails struct ShowcaseFileRemovedDetails "Removed file from showcase." - event_uuid String "Event unique identifier." @@ -5327,7 +5870,6 @@ struct ShowcaseFileRemovedDetails struct ShowcaseFileViewDetails "Viewed file in showcase." - event_uuid String "Event unique identifier." @@ -5336,7 +5878,6 @@ struct ShowcaseFileViewDetails struct ShowcasePermanentlyDeletedDetails "Permanently deleted showcase." - event_uuid String "Event unique identifier." @@ -5345,7 +5886,6 @@ struct ShowcasePermanentlyDeletedDetails struct ShowcasePostCommentDetails "Added showcase comment." - event_uuid String "Event unique identifier." comment_text String? @@ -5357,7 +5897,6 @@ struct ShowcasePostCommentDetails struct ShowcaseRemoveMemberDetails "Removed member from showcase." - event_uuid String "Event unique identifier." @@ -5366,7 +5905,6 @@ struct ShowcaseRemoveMemberDetails struct ShowcaseRenamedDetails "Renamed showcase." - event_uuid String "Event unique identifier." @@ -5375,7 +5913,6 @@ struct ShowcaseRenamedDetails struct ShowcaseRequestAccessDetails "Requested access to showcase." - event_uuid String "Event unique identifier." @@ -5384,7 +5921,6 @@ struct ShowcaseRequestAccessDetails struct ShowcaseResolveCommentDetails "Resolved showcase comment." - event_uuid String "Event unique identifier." comment_text String? @@ -5396,7 +5932,6 @@ struct ShowcaseResolveCommentDetails struct ShowcaseRestoredDetails "Unarchived showcase." - event_uuid String "Event unique identifier." @@ -5405,7 +5940,6 @@ struct ShowcaseRestoredDetails struct ShowcaseTrashedDetails "Deleted showcase." - event_uuid String "Event unique identifier." @@ -5414,7 +5948,6 @@ struct ShowcaseTrashedDetails struct ShowcaseTrashedDeprecatedDetails "Deleted showcase (old version)." - event_uuid String "Event unique identifier." @@ -5423,7 +5956,6 @@ struct ShowcaseTrashedDeprecatedDetails struct ShowcaseUnresolveCommentDetails "Unresolved showcase comment." - event_uuid String "Event unique identifier." comment_text String? @@ -5435,7 +5967,6 @@ struct ShowcaseUnresolveCommentDetails struct ShowcaseUntrashedDetails "Restored showcase." - event_uuid String "Event unique identifier." @@ -5444,7 +5975,6 @@ struct ShowcaseUntrashedDetails struct ShowcaseUntrashedDeprecatedDetails "Restored showcase (old version)." - event_uuid String "Event unique identifier." @@ -5453,16 +5983,116 @@ struct ShowcaseUntrashedDeprecatedDetails struct ShowcaseViewDetails "Viewed showcase." - event_uuid String "Event unique identifier." example default event_uuid = "abc" +struct SignSignatureRequestCanceledDetails + "Canceled signature request." + recipient String + "The recipient of the signature request." + file_name String + "The name of the related file." + + example default + recipient = "abc" + file_name = "abc" + +struct SignSignatureRequestCompletedDetails + "Completed signature request." + recipient String + "The recipient of the signature request." + file_name String + "The name of the related file." + + example default + recipient = "abc" + file_name = "abc" + +struct SignSignatureRequestDeclinedDetails + "Declined signature request." + recipient String + "The recipient of the signature request." + file_name String + "The name of the related file." + + example default + recipient = "abc" + file_name = "abc" + +struct SignSignatureRequestOpenedDetails + "Opened signature request." + recipient String + "The recipient of the signature request." + file_name String + "The name of the related file." + + example default + recipient = "abc" + file_name = "abc" + +struct SignSignatureRequestReminderSentDetails + "Sent signature request reminder." + recipient String + "The recipient of the signature request." + file_name String + "The name of the related file." + + example default + recipient = "abc" + file_name = "abc" + +struct SignSignatureRequestSentDetails + "Sent signature request." + recipient String + "The recipient of the signature request." + file_name String + "The name of the related file." + + example default + recipient = "abc" + file_name = "abc" + +struct SignTemplateCreatedDetails + "Created template." + access_level String + "The access level of the template." + file_name String + "The name of the related file." + + example default + access_level = "abc" + file_name = "abc" + +struct SignTemplateSharedDetails + "Shared template." + access_level String + "The access level of the template." + file_name String + "The name of the related file." + + example default + access_level = "abc" + file_name = "abc" + +struct RiscSecurityEventDetails + "RISC security event received from external provider." + event_type String + "RISC event type (e.g., account-disabled, token-revoked)." + reason String + "Reason for the RISC event." + issuer String + "Identity provider issuer (e.g., https://accounts.google.com)." + + example default + event_type = "https://schemas.openid.net/secevent/risc/event-type/account-disabled" + reason = "hijacking" + issuer = "https://accounts.google.com" + struct SsoAddCertDetails "Added X.509 certificate for SSO." - certificate_details Certificate "SSO certificate details." @@ -5471,7 +6101,6 @@ struct SsoAddCertDetails struct SsoAddLoginUrlDetails "Added sign-in URL for SSO." - new_value String "New single sign-on login URL." @@ -5480,7 +6109,6 @@ struct SsoAddLoginUrlDetails struct SsoAddLogoutUrlDetails "Added sign-out URL for SSO." - new_value String? "New single sign-on logout URL." @@ -5489,7 +6117,6 @@ struct SsoAddLogoutUrlDetails struct SsoChangeCertDetails "Changed X.509 certificate for SSO." - previous_certificate_details Certificate? "Previous SSO certificate details. Might be missing due to historical data gap." new_certificate_details Certificate @@ -5501,7 +6128,6 @@ struct SsoChangeCertDetails struct SsoChangeLoginUrlDetails "Changed sign-in URL for SSO." - previous_value String "Previous single sign-on login URL." new_value String @@ -5513,7 +6139,6 @@ struct SsoChangeLoginUrlDetails struct SsoChangeLogoutUrlDetails "Changed sign-out URL for SSO." - previous_value String? "Previous single sign-on logout URL. Might be missing due to historical data gap." new_value String? @@ -5525,7 +6150,6 @@ struct SsoChangeLogoutUrlDetails struct SsoChangeSamlIdentityModeDetails "Changed SAML identity mode for SSO." - previous_value Int64 "Previous single sign-on identity mode." new_value Int64 @@ -5540,7 +6164,6 @@ struct SsoRemoveCertDetails struct SsoRemoveLoginUrlDetails "Removed sign-in URL for SSO." - previous_value String "Previous single sign-on login URL." @@ -5549,7 +6172,6 @@ struct SsoRemoveLoginUrlDetails struct SsoRemoveLogoutUrlDetails "Removed sign-out URL for SSO." - previous_value String "Previous single sign-on logout URL." @@ -5558,7 +6180,6 @@ struct SsoRemoveLogoutUrlDetails struct TeamFolderChangeStatusDetails "Changed archival status of team folder." - new_value team.TeamFolderStatus "New team folder status." previous_value team.TeamFolderStatus? @@ -5573,7 +6194,6 @@ struct TeamFolderCreateDetails struct TeamFolderDowngradeDetails "Downgraded team folder to regular shared folder." - target_asset_index UInt64 "Target asset position in the Assets list." @@ -5585,7 +6205,6 @@ struct TeamFolderPermanentlyDeleteDetails struct TeamFolderRenameDetails "Renamed active/archived team folder." - previous_folder_name String "Previous folder name." new_folder_name String @@ -5597,7 +6216,6 @@ struct TeamFolderRenameDetails struct TeamSelectiveSyncSettingsChangedDetails "Changed sync default." - previous_value files.SyncSetting "Previous value." new_value files.SyncSetting @@ -5609,7 +6227,6 @@ struct TeamSelectiveSyncSettingsChangedDetails struct AccountCaptureChangePolicyDetails "Changed account capture setting on team domain." - new_value AccountCapturePolicy "New account capture policy." previous_value AccountCapturePolicy? @@ -5621,7 +6238,6 @@ struct AccountCaptureChangePolicyDetails struct AdminEmailRemindersChangedDetails "Changed admin reminder settings for requests to join the team." - new_value AdminEmailRemindersPolicy "To." previous_value AdminEmailRemindersPolicy @@ -5631,15 +6247,36 @@ struct AdminEmailRemindersChangedDetails new_value = default previous_value = default +struct AiThirdPartySharingDropboxBasePolicyChangedDetails + "Changed AI third party sharing policy for team." + new_value AiThirdPartySharingDropboxBasePolicy + "To." + previous_value AiThirdPartySharingDropboxBasePolicy + "From." + + example default + new_value = default + previous_value = default + struct AllowDownloadDisabledDetails "Disabled downloads." struct AllowDownloadEnabledDetails "Enabled downloads." +struct AppleLoginChangePolicyDetails + "Enabled/disabled Apple login for team." + new_value AppleLoginPolicy + "New Apple login policy." + previous_value AppleLoginPolicy? + "Previous Apple login policy. Might be missing due to historical data gap." + + example default + new_value = default + previous_value = default + struct AppPermissionsChangedDetails "Changed app permissions." - app_name String? "Name of the app." permission AdminConsoleAppPermission? @@ -5657,7 +6294,6 @@ struct AppPermissionsChangedDetails struct CameraUploadsPolicyChangedDetails "Changed camera uploads setting for team." - new_value CameraUploadsPolicy "New camera uploads setting." previous_value CameraUploadsPolicy @@ -5667,9 +6303,19 @@ struct CameraUploadsPolicyChangedDetails new_value = disabled previous_value = disabled +struct CaptureTeamSpacePolicyChangedDetails + "Changed Capture team space policy for team." + new_value CaptureTeamSpacePolicy + "To." + previous_value CaptureTeamSpacePolicy + "From." + + example default + new_value = enabled + previous_value = enabled + struct CaptureTranscriptPolicyChangedDetails "Changed Capture transcription policy for team." - new_value CaptureTranscriptPolicy "To." previous_value CaptureTranscriptPolicy @@ -5681,7 +6327,6 @@ struct CaptureTranscriptPolicyChangedDetails struct ClassificationChangePolicyDetails "Changed classification policy for team." - previous_value ClassificationPolicyEnumWrapper "Previous classification policy." new_value ClassificationPolicyEnumWrapper @@ -5696,7 +6341,6 @@ struct ClassificationChangePolicyDetails struct ComputerBackupPolicyChangedDetails "Changed computer backup policy for team." - new_value ComputerBackupPolicy "New computer backup policy." previous_value ComputerBackupPolicy @@ -5708,7 +6352,6 @@ struct ComputerBackupPolicyChangedDetails struct ContentAdministrationPolicyChangedDetails "Changed content management setting." - new_value String "New content administration policy." previous_value String @@ -5718,9 +6361,36 @@ struct ContentAdministrationPolicyChangedDetails new_value = "abc" previous_value = "abc" +struct ContentDeletionProtectionChangePolicyDetails + "Changed content deletion protection policy for team." + new_value ContentDeletionProtectionPolicy + "New content deletion protection policy." + new_threshold_bytes UInt64? + "New threshold value in bytes (only present when new policy is on_above_threshold)." + previous_value ContentDeletionProtectionPolicy? + "Previous content deletion protection policy. Might be missing due to historical data gap." + previous_threshold_bytes UInt64? + "Previous threshold value in bytes (only present when previous policy was on_above_threshold)." + + example default + new_value = off + new_threshold_bytes = 3 + previous_value = off + previous_threshold_bytes = 3 + +struct DashExternalSharingPolicyChangedDetails + "Changed Dash external sharing policy for team." + new_value DashExternalSharingPolicy + "To." + previous_value DashExternalSharingPolicy + "From." + + example default + new_value = default + previous_value = default + struct DataPlacementRestrictionChangePolicyDetails "Set restrictions on data center locations where team data resides." - previous_value PlacementRestriction "Previous placement restriction." new_value PlacementRestriction @@ -5732,7 +6402,6 @@ struct DataPlacementRestrictionChangePolicyDetails struct DataPlacementRestrictionSatisfyPolicyDetails "Completed restrictions on data center locations where team data resides." - placement_restriction PlacementRestriction "Placement restriction." @@ -5744,7 +6413,6 @@ struct DeviceApprovalsAddExceptionDetails struct DeviceApprovalsChangeDesktopPolicyDetails "Set/removed limit on number of computers member can link to team Dropbox account." - new_value DeviceApprovalsPolicy? "New desktop device approvals policy. Might be missing due to historical data gap." previous_value DeviceApprovalsPolicy? @@ -5756,7 +6424,6 @@ struct DeviceApprovalsChangeDesktopPolicyDetails struct DeviceApprovalsChangeMobilePolicyDetails "Set/removed limit on number of mobile devices member can link to team Dropbox account." - new_value DeviceApprovalsPolicy? "New mobile device approvals policy. Might be missing due to historical data gap." previous_value DeviceApprovalsPolicy? @@ -5768,7 +6435,6 @@ struct DeviceApprovalsChangeMobilePolicyDetails struct DeviceApprovalsChangeOverageActionDetails "Changed device approvals setting when member is over limit." - new_value team_policies.RolloutMethod? "New over the limits policy. Might be missing due to historical data gap." previous_value team_policies.RolloutMethod? @@ -5780,7 +6446,6 @@ struct DeviceApprovalsChangeOverageActionDetails struct DeviceApprovalsChangeUnlinkActionDetails "Changed device approvals setting when member unlinks approved device." - new_value DeviceUnlinkPolicy? "New device unlink policy. Might be missing due to historical data gap." previous_value DeviceUnlinkPolicy? @@ -5801,7 +6466,6 @@ struct DirectoryRestrictionsRemoveMembersDetails struct DropboxPasswordsPolicyChangedDetails "Changed Dropbox Passwords policy for team." - new_value DropboxPasswordsPolicy "To." previous_value DropboxPasswordsPolicy @@ -5813,7 +6477,6 @@ struct DropboxPasswordsPolicyChangedDetails struct EmailIngestPolicyChangedDetails "Changed email to Dropbox policy for team." - new_value EmailIngestPolicy "To." previous_value EmailIngestPolicy @@ -5828,7 +6491,6 @@ struct EmmAddExceptionDetails struct EmmChangePolicyDetails "Enabled/disabled enterprise mobility management for members." - new_value team_policies.EmmState "New enterprise mobility management policy." previous_value team_policies.EmmState? @@ -5843,7 +6505,6 @@ struct EmmRemoveExceptionDetails struct ExtendedVersionHistoryChangePolicyDetails "Accepted/opted out of extended version history." - new_value ExtendedVersionHistoryPolicy "New extended version history policy." previous_value ExtendedVersionHistoryPolicy? @@ -5855,7 +6516,6 @@ struct ExtendedVersionHistoryChangePolicyDetails struct ExternalDriveBackupPolicyChangedDetails "Changed external drive backup policy for team." - new_value ExternalDriveBackupPolicy "New external drive backup policy." previous_value ExternalDriveBackupPolicy @@ -5867,7 +6527,6 @@ struct ExternalDriveBackupPolicyChangedDetails struct FileCommentsChangePolicyDetails "Enabled/disabled commenting on team files." - new_value FileCommentsPolicy "New commenting on team files policy." previous_value FileCommentsPolicy? @@ -5879,7 +6538,6 @@ struct FileCommentsChangePolicyDetails struct FileLockingPolicyChangedDetails "Changed file locking policy for team." - new_value team_policies.FileLockingPolicyState "New file locking policy." previous_value team_policies.FileLockingPolicyState @@ -5891,7 +6549,6 @@ struct FileLockingPolicyChangedDetails struct FileProviderMigrationPolicyChangedDetails "Changed File Provider Migration policy for team." - new_value team_policies.FileProviderMigrationPolicyState "To." previous_value team_policies.FileProviderMigrationPolicyState @@ -5903,7 +6560,6 @@ struct FileProviderMigrationPolicyChangedDetails struct FileRequestsChangePolicyDetails "Enabled/disabled file requests." - new_value FileRequestsPolicy "New file requests policy." previous_value FileRequestsPolicy? @@ -5921,7 +6577,6 @@ struct FileRequestsEmailsRestrictedToTeamOnlyDetails struct FileTransfersPolicyChangedDetails "Changed file transfers policy for team." - new_value FileTransfersPolicy "New file transfers policy." previous_value FileTransfersPolicy @@ -5931,9 +6586,19 @@ struct FileTransfersPolicyChangedDetails new_value = disabled previous_value = disabled +struct FlexibleFileNamesPolicyChangedDetails + "Changed flexible file names policy for team." + new_value FlexibleFileNamesPolicy + "New flexible file names policy." + previous_value FlexibleFileNamesPolicy? + "Previous flexible file names policy. Might be missing due to historical data gap." + + example default + new_value = off + previous_value = off + struct FolderLinkRestrictionPolicyChangedDetails "Changed folder link restrictions policy for team." - new_value FolderLinkRestrictionPolicy "To." previous_value FolderLinkRestrictionPolicy @@ -5945,7 +6610,6 @@ struct FolderLinkRestrictionPolicyChangedDetails struct GoogleSsoChangePolicyDetails "Enabled/disabled Google single sign-on for team." - new_value GoogleSsoPolicy "New Google single sign-on policy." previous_value GoogleSsoPolicy? @@ -5957,7 +6621,6 @@ struct GoogleSsoChangePolicyDetails struct GroupUserManagementChangePolicyDetails "Changed who can create groups." - new_value team_policies.GroupCreation "New group users management policy." previous_value team_policies.GroupCreation? @@ -5969,7 +6632,6 @@ struct GroupUserManagementChangePolicyDetails struct IntegrationPolicyChangedDetails "Changed integration policy for team." - integration_name String "Name of the third-party integration." new_value IntegrationPolicy @@ -5984,7 +6646,6 @@ struct IntegrationPolicyChangedDetails struct InviteAcceptanceEmailPolicyChangedDetails "Changed invite accept email policy for team." - new_value InviteAcceptanceEmailPolicy "To." previous_value InviteAcceptanceEmailPolicy @@ -5996,7 +6657,6 @@ struct InviteAcceptanceEmailPolicyChangedDetails struct MemberRequestsChangePolicyDetails "Changed whether users can find team when not invited." - new_value MemberRequestsPolicy "New member change requests policy." previous_value MemberRequestsPolicy? @@ -6008,7 +6668,6 @@ struct MemberRequestsChangePolicyDetails struct MemberSendInvitePolicyChangedDetails "Changed member send invite policy for team." - new_value MemberSendInvitePolicy "New team member send invite policy." previous_value MemberSendInvitePolicy @@ -6023,7 +6682,6 @@ struct MemberSpaceLimitsAddExceptionDetails struct MemberSpaceLimitsChangeCapsTypePolicyDetails "Changed member space limit type for team." - previous_value SpaceCapsType "Previous space limit type." new_value SpaceCapsType @@ -6035,7 +6693,6 @@ struct MemberSpaceLimitsChangeCapsTypePolicyDetails struct MemberSpaceLimitsChangePolicyDetails "Changed team default member space limit." - previous_value UInt64? "Previous team default limit value in bytes. Might be missing due to historical data gap." new_value UInt64? @@ -6050,7 +6707,6 @@ struct MemberSpaceLimitsRemoveExceptionDetails struct MemberSuggestionsChangePolicyDetails "Enabled/disabled option for team members to suggest people to add to team." - new_value MemberSuggestionsPolicy "New team member suggestions policy." previous_value MemberSuggestionsPolicy? @@ -6060,9 +6716,19 @@ struct MemberSuggestionsChangePolicyDetails new_value = disabled previous_value = disabled +struct MicrosoftLoginChangePolicyDetails + "Enabled/disabled Microsoft login for team." + new_value MicrosoftLoginPolicy + "New Microsoft login policy." + previous_value MicrosoftLoginPolicy? + "Previous Microsoft login policy. Might be missing due to historical data gap." + + example default + new_value = default + previous_value = default + struct MicrosoftOfficeAddinChangePolicyDetails "Enabled/disabled Microsoft Office add-in." - new_value MicrosoftOfficeAddinPolicy "New Microsoft Office addin policy." previous_value MicrosoftOfficeAddinPolicy? @@ -6074,7 +6740,6 @@ struct MicrosoftOfficeAddinChangePolicyDetails struct NetworkControlChangePolicyDetails "Enabled/disabled network control." - new_value NetworkControlPolicy "New network control policy." previous_value NetworkControlPolicy? @@ -6086,7 +6751,6 @@ struct NetworkControlChangePolicyDetails struct PaperChangeDeploymentPolicyDetails "Changed whether Dropbox Paper, when enabled, is deployed to all members or to specific members." - new_value team_policies.PaperDeploymentPolicy "New Dropbox Paper deployment policy." previous_value team_policies.PaperDeploymentPolicy? @@ -6098,7 +6762,6 @@ struct PaperChangeDeploymentPolicyDetails struct PaperChangeMemberLinkPolicyDetails "Changed whether non-members can view Paper docs with link." - new_value PaperMemberPolicy "New paper external link accessibility policy." @@ -6107,7 +6770,6 @@ struct PaperChangeMemberLinkPolicyDetails struct PaperChangeMemberPolicyDetails "Changed whether members can share Paper docs outside team, and if docs are accessible only by team members or anyone by default." - new_value PaperMemberPolicy "New paper external accessibility policy." previous_value PaperMemberPolicy? @@ -6119,7 +6781,6 @@ struct PaperChangeMemberPolicyDetails struct PaperChangePolicyDetails "Enabled/disabled Dropbox Paper for team." - new_value team_policies.PaperEnabledPolicy "New Dropbox Paper policy." previous_value team_policies.PaperEnabledPolicy? @@ -6131,7 +6792,6 @@ struct PaperChangePolicyDetails struct PaperDefaultFolderPolicyChangedDetails "Changed Paper Default Folder Policy setting for team." - new_value PaperDefaultFolderPolicy "New Paper Default Folder Policy." previous_value PaperDefaultFolderPolicy @@ -6143,7 +6803,6 @@ struct PaperDefaultFolderPolicyChangedDetails struct PaperDesktopPolicyChangedDetails "Enabled/disabled Paper Desktop for team." - new_value PaperDesktopPolicy "New Paper Desktop policy." previous_value PaperDesktopPolicy @@ -6159,9 +6818,19 @@ struct PaperEnabledUsersGroupAdditionDetails struct PaperEnabledUsersGroupRemovalDetails "Removed users from Paper-enabled users list." +struct PasskeyLoginPolicyChangedDetails + "Changed passkey login policy for team." + new_value PasskeyLoginPolicy + "New passkey login policy." + previous_value PasskeyLoginPolicy? + "Previous passkey login policy. Might be missing due to historical data gap." + + example default + new_value = default + previous_value = default + struct PasswordStrengthRequirementsChangePolicyDetails "Changed team password strength requirements." - previous_value team_policies.PasswordStrengthPolicy "Old password strength policy." new_value team_policies.PasswordStrengthPolicy @@ -6173,7 +6842,6 @@ struct PasswordStrengthRequirementsChangePolicyDetails struct PermanentDeleteChangePolicyDetails "Enabled/disabled ability of team members to permanently delete content." - new_value ContentPermanentDeletePolicy "New permanent delete content policy." previous_value ContentPermanentDeletePolicy? @@ -6183,9 +6851,41 @@ struct PermanentDeleteChangePolicyDetails new_value = disabled previous_value = disabled +struct PreviewsAiPolicyChangedDetails + "Changed Dropbox AI policy for team." + new_value PreviewsAiPolicy + "To." + previous_value PreviewsAiPolicy + "From." + + example default + new_value = default + previous_value = default + +struct ReplayAddingPeoplePolicyChangedDetails + "Changed the policy for adding people to Replay content." + new_value ReplayAddingPeoplePolicy + "To." + previous_value ReplayAddingPeoplePolicy + "From." + + example default + new_value = anyone + previous_value = anyone + +struct ReplaySharingPolicyChangedDetails + "Changed the policy for sharing Replay content." + new_value ReplaySharingPolicy + "To." + previous_value ReplaySharingPolicy + "From." + + example default + new_value = anyone + previous_value = anyone + struct ResellerSupportChangePolicyDetails "Enabled/disabled reseller support." - new_value ResellerSupportPolicy "New Reseller support policy." previous_value ResellerSupportPolicy @@ -6197,7 +6897,6 @@ struct ResellerSupportChangePolicyDetails struct RewindPolicyChangedDetails "Changed Rewind policy for team." - new_value RewindPolicy "New Dropbox Rewind policy." previous_value RewindPolicy @@ -6207,9 +6906,30 @@ struct RewindPolicyChangedDetails new_value = admins_only previous_value = admins_only +struct SendAndTrackPolicyChangedDetails + "Changed “Send and track” policy for team." + new_value SendAndTrackPolicy + "To." + previous_value SendAndTrackPolicy + "From." + + example default + new_value = default + previous_value = default + +struct SendExternalSharingPolicyChangedDetails + "Changed “Send and track” external sharing policy for team." + new_value SendExternalSharingPolicy + "To." + previous_value SendExternalSharingPolicy + "From." + + example default + new_value = default + previous_value = default + struct SendForSignaturePolicyChangedDetails "Changed send for signature policy for team." - new_value SendForSignaturePolicy "New send for signature policy." previous_value SendForSignaturePolicy @@ -6219,9 +6939,19 @@ struct SendForSignaturePolicyChangedDetails new_value = disabled previous_value = disabled +struct SharedLinkDefaultPermissionsPolicyChangedDetails + "Changed shared link default permissions policy for team." + new_value SharedLinkDefaultPermissionsPolicy + "To." + previous_value SharedLinkDefaultPermissionsPolicy + "From." + + example default + new_value = default + previous_value = default + struct SharingChangeFolderJoinPolicyDetails "Changed whether team members can join shared folders owned outside team." - new_value SharingFolderJoinPolicy "New external join policy." previous_value SharingFolderJoinPolicy? @@ -6233,7 +6963,6 @@ struct SharingChangeFolderJoinPolicyDetails struct SharingChangeLinkAllowChangeExpirationPolicyDetails "Changed the allow remove or change expiration policy for the links shared outside of the team." - new_value EnforceLinkPasswordPolicy "To." previous_value EnforceLinkPasswordPolicy? @@ -6245,7 +6974,6 @@ struct SharingChangeLinkAllowChangeExpirationPolicyDetails struct SharingChangeLinkDefaultExpirationPolicyDetails "Changed the default expiration for the links shared outside of the team." - new_value DefaultLinkExpirationDaysPolicy "To." previous_value DefaultLinkExpirationDaysPolicy? @@ -6257,7 +6985,6 @@ struct SharingChangeLinkDefaultExpirationPolicyDetails struct SharingChangeLinkEnforcePasswordPolicyDetails "Changed the password requirement for the links shared outside of the team." - new_value ChangeLinkExpirationPolicy "To." previous_value ChangeLinkExpirationPolicy? @@ -6269,7 +6996,6 @@ struct SharingChangeLinkEnforcePasswordPolicyDetails struct SharingChangeLinkPolicyDetails "Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default." - new_value SharingLinkPolicy "New external link accessibility policy." previous_value SharingLinkPolicy? @@ -6281,7 +7007,6 @@ struct SharingChangeLinkPolicyDetails struct SharingChangeMemberPolicyDetails "Changed whether members can share files/folders outside team." - new_value SharingMemberPolicy "New external invite policy." previous_value SharingMemberPolicy? @@ -6293,7 +7018,6 @@ struct SharingChangeMemberPolicyDetails struct ShowcaseChangeDownloadPolicyDetails "Enabled/disabled downloading files from Dropbox Showcase for team." - new_value ShowcaseDownloadPolicy "New Dropbox Showcase download policy." previous_value ShowcaseDownloadPolicy @@ -6305,7 +7029,6 @@ struct ShowcaseChangeDownloadPolicyDetails struct ShowcaseChangeEnabledPolicyDetails "Enabled/disabled Dropbox Showcase for team." - new_value ShowcaseEnabledPolicy "New Dropbox Showcase policy." previous_value ShowcaseEnabledPolicy @@ -6317,7 +7040,6 @@ struct ShowcaseChangeEnabledPolicyDetails struct ShowcaseChangeExternalSharingPolicyDetails "Enabled/disabled sharing Dropbox Showcase externally for team." - new_value ShowcaseExternalSharingPolicy "New Dropbox Showcase external sharing policy." previous_value ShowcaseExternalSharingPolicy @@ -6327,9 +7049,30 @@ struct ShowcaseChangeExternalSharingPolicyDetails new_value = disabled previous_value = disabled +struct SignExternalSharingPolicyChangedDetails + "Changed Signatures external sharing policy for team." + new_value SignExternalSharingPolicy + "To." + previous_value SignExternalSharingPolicy + "From." + + example default + new_value = default + previous_value = default + +struct SignTemplateCreationPermissionChangedDetails + "Changed template creation permission." + new_value SignTemplateCreationPermissionPolicy + "New template creation permission policy." + previous_value SignTemplateCreationPermissionPolicy + "Previous template creation permission policy." + + example default + new_value = disabled + previous_value = disabled + struct SmarterSmartSyncPolicyChangedDetails "Changed automatic Smart Sync setting for team." - previous_value team_policies.SmarterSmartSyncPolicyState "Previous automatic Smart Sync setting." new_value team_policies.SmarterSmartSyncPolicyState @@ -6341,7 +7084,6 @@ struct SmarterSmartSyncPolicyChangedDetails struct SmartSyncChangePolicyDetails "Changed default Smart Sync setting for team members." - new_value team_policies.SmartSyncPolicy? "New smart sync policy." previous_value team_policies.SmartSyncPolicy? @@ -6353,7 +7095,6 @@ struct SmartSyncChangePolicyDetails struct SmartSyncNotOptOutDetails "Opted team into Smart Sync." - previous_value SmartSyncOptOutPolicy "Previous Smart Sync opt out policy." new_value SmartSyncOptOutPolicy @@ -6365,7 +7106,6 @@ struct SmartSyncNotOptOutDetails struct SmartSyncOptOutDetails "Opted team out of Smart Sync." - previous_value SmartSyncOptOutPolicy "Previous Smart Sync opt out policy." new_value SmartSyncOptOutPolicy @@ -6377,7 +7117,6 @@ struct SmartSyncOptOutDetails struct SsoChangePolicyDetails "Changed single sign-on setting for team." - new_value team_policies.SsoPolicy "New single sign-on policy." previous_value team_policies.SsoPolicy? @@ -6387,9 +7126,19 @@ struct SsoChangePolicyDetails new_value = disabled previous_value = disabled +struct StackCrossTeamAccessPolicyChangedDetails + "Changed cross-team Stack access policy for team." + new_value StackCrossTeamAccessPolicy + "New cross-team Stack access policy." + previous_value StackCrossTeamAccessPolicy? + "Previous cross-team Stack access policy. Might be missing due to historical data gap." + + example default + new_value = default + previous_value = default + struct TeamBrandingPolicyChangedDetails "Changed team branding policy for team." - new_value TeamBrandingPolicy "New team branding policy." previous_value TeamBrandingPolicy @@ -6401,7 +7150,6 @@ struct TeamBrandingPolicyChangedDetails struct TeamExtensionsPolicyChangedDetails "Changed App Integrations setting for team." - new_value TeamExtensionsPolicy "New Extensions policy." previous_value TeamExtensionsPolicy @@ -6411,9 +7159,19 @@ struct TeamExtensionsPolicyChangedDetails new_value = disabled previous_value = disabled +struct TeamMemberStorageRequestPolicyChangedDetails + "Changed team member storage request policy for team." + new_value TeamMemberStorageRequestPolicy + "New team member storage request policy." + previous_value TeamMemberStorageRequestPolicy? + "Previous team member storage request policy. Might be missing due to historical data gap." + + example default + new_value = default + previous_value = default + struct TeamSelectiveSyncPolicyChangedDetails "Enabled/disabled Team Selective Sync for team." - new_value TeamSelectiveSyncPolicy "New Team Selective Sync policy." previous_value TeamSelectiveSyncPolicy @@ -6425,7 +7183,6 @@ struct TeamSelectiveSyncPolicyChangedDetails struct TeamSharingWhitelistSubjectsChangedDetails "Edited the approved list for sharing externally." - added_whitelist_subjects List(String) "Domains or emails added to the approved list for sharing externally." removed_whitelist_subjects List(String) @@ -6439,8 +7196,7 @@ struct TfaAddExceptionDetails "Added members to two factor authentication exception list." struct TfaChangePolicyDetails - "Changed two-step verification setting for team." - + "Changed two-factor authentication setting for team." new_value team_policies.TwoStepVerificationPolicy "New change policy." previous_value team_policies.TwoStepVerificationPolicy? @@ -6453,9 +7209,19 @@ struct TfaChangePolicyDetails struct TfaRemoveExceptionDetails "Removed members from two factor authentication exception list." +struct TopLevelContentPolicyChangedDetails + "Changed top level content setting for team." + new_value TopLevelContentPolicy + "To." + previous_value TopLevelContentPolicy + "From." + + example default + new_value = everyone + previous_value = everyone + struct TwoAccountChangePolicyDetails "Enabled/disabled option for members to link personal Dropbox account and team account to same computer." - new_value TwoAccountPolicy "New two account policy." previous_value TwoAccountPolicy? @@ -6467,7 +7233,6 @@ struct TwoAccountChangePolicyDetails struct ViewerInfoPolicyChangedDetails "Changed team policy for viewer info." - previous_value PassPolicy "Previous Viewer Info policy." new_value PassPolicy @@ -6479,7 +7244,6 @@ struct ViewerInfoPolicyChangedDetails struct WatermarkingPolicyChangedDetails "Changed watermarking policy for team." - new_value WatermarkingPolicy "New watermarking policy." previous_value WatermarkingPolicy @@ -6491,7 +7255,6 @@ struct WatermarkingPolicyChangedDetails struct WebSessionsChangeActiveSessionLimitDetails "Changed limit on active sessions per member." - previous_value String "Previous max number of concurrent active sessions policy." new_value String @@ -6503,7 +7266,6 @@ struct WebSessionsChangeActiveSessionLimitDetails struct WebSessionsChangeFixedLengthPolicyDetails "Changed how long members can stay signed in to Dropbox.com." - new_value WebSessionsFixedLengthPolicy? "New session length policy. Might be missing due to historical data gap." previous_value WebSessionsFixedLengthPolicy? @@ -6515,7 +7277,6 @@ struct WebSessionsChangeFixedLengthPolicyDetails struct WebSessionsChangeIdleLengthPolicyDetails "Changed how long team members can be idle while signed in to Dropbox.com." - new_value WebSessionsIdleLengthPolicy? "New idle length policy. Might be missing due to historical data gap." previous_value WebSessionsIdleLengthPolicy? @@ -6533,7 +7294,6 @@ struct DataResidencyMigrationRequestUnsuccessfulDetails struct TeamMergeFromDetails "Merged another team into this team." - team_name String "The name of the team that was merged into this team." @@ -6542,7 +7302,6 @@ struct TeamMergeFromDetails struct TeamMergeToDetails "Merged this team into another team." - team_name String "The name of the team that this team was merged into." @@ -6560,7 +7319,6 @@ struct TeamProfileChangeBackgroundDetails struct TeamProfileChangeDefaultLanguageDetails "Changed default language for team." - new_value common.LanguageCode "New team's default language." previous_value common.LanguageCode @@ -6575,7 +7333,6 @@ struct TeamProfileChangeLogoDetails struct TeamProfileChangeNameDetails "Changed team name." - previous_value TeamName? "Previous teams name. Might be missing due to historical data gap." new_value TeamName @@ -6591,18 +7348,23 @@ struct TeamProfileRemoveBackgroundDetails struct TeamProfileRemoveLogoDetails "Removed team logo displayed on shared link headers." +struct PasskeyAddDetails + "Added passkey for login." + +struct PasskeyRemoveDetails + "Removed passkey for login." + struct TfaAddBackupPhoneDetails - "Added backup phone for two-step verification." + "Added backup phone for two-factor authentication." struct TfaAddSecurityKeyDetails - "Added security key for two-step verification." + "Added security key for two-factor authentication." struct TfaChangeBackupPhoneDetails - "Changed backup phone for two-step verification." + "Changed backup phone for two-factor authentication." struct TfaChangeStatusDetails - "Enabled/disabled/changed two-step verification setting." - + "Enabled/disabled/changed two-factor authentication setting." new_value TfaConfiguration "The new two factor authentication configuration." previous_value TfaConfiguration? @@ -6616,17 +7378,16 @@ struct TfaChangeStatusDetails used_rescue_code = true struct TfaRemoveBackupPhoneDetails - "Removed backup phone for two-step verification." + "Removed backup phone for two-factor authentication." struct TfaRemoveSecurityKeyDetails - "Removed security key for two-step verification." + "Removed security key for two-factor authentication." struct TfaResetDetails - "Reset two-step verification for team member." + "Reset two-factor authentication for team member." struct ChangedEnterpriseAdminRoleDetails "Changed enterprise admin role." - previous_value FedAdminRole "The member’s previous enterprise admin role." new_value FedAdminRole @@ -6641,7 +7402,6 @@ struct ChangedEnterpriseAdminRoleDetails struct ChangedEnterpriseConnectedTeamStatusDetails "Changed enterprise-connected team status." - action FedHandshakeAction "The preformed change in the team’s connection status." additional_info FederationStatusChangeAdditionalInfo @@ -6662,7 +7422,6 @@ struct EndedEnterpriseAdminSessionDetails struct EndedEnterpriseAdminSessionDeprecatedDetails "Ended enterprise admin session." - federation_extra_details FedExtraDetails "More information about the organization or team." @@ -6671,7 +7430,6 @@ struct EndedEnterpriseAdminSessionDeprecatedDetails struct EnterpriseSettingsLockingDetails "Changed who can update a setting." - team_name String "The secondary team name." settings_page_name String @@ -6689,7 +7447,6 @@ struct EnterpriseSettingsLockingDetails struct GuestAdminChangeStatusDetails "Changed guest team admin status." - is_guest Boolean "True for guest, false for host." guest_team_name String? @@ -6713,7 +7470,6 @@ struct GuestAdminChangeStatusDetails struct StartedEnterpriseAdminSessionDetails "Started enterprise admin session." - federation_extra_details FedExtraDetails "More information about the organization or team." @@ -6722,7 +7478,6 @@ struct StartedEnterpriseAdminSessionDetails struct TeamMergeRequestAcceptedDetails "Accepted a team merge request." - request_accepted_details TeamMergeRequestAcceptedExtraDetails "Team merge request acceptance details." @@ -6731,7 +7486,6 @@ struct TeamMergeRequestAcceptedDetails struct TeamMergeRequestAcceptedShownToPrimaryTeamDetails "Accepted a team merge request." - secondary_team String "The secondary team name." sent_by String @@ -6743,7 +7497,6 @@ struct TeamMergeRequestAcceptedShownToPrimaryTeamDetails struct TeamMergeRequestAcceptedShownToSecondaryTeamDetails "Accepted a team merge request." - primary_team String "The primary team name." sent_by String @@ -6755,7 +7508,6 @@ struct TeamMergeRequestAcceptedShownToSecondaryTeamDetails struct TeamMergeRequestAutoCanceledDetails "Automatically canceled team merge request." - details String? "The cancellation reason." @@ -6764,7 +7516,6 @@ struct TeamMergeRequestAutoCanceledDetails struct TeamMergeRequestCanceledDetails "Canceled a team merge request." - request_canceled_details TeamMergeRequestCanceledExtraDetails "Team merge request cancellation details." @@ -6773,7 +7524,6 @@ struct TeamMergeRequestCanceledDetails struct TeamMergeRequestCanceledShownToPrimaryTeamDetails "Canceled a team merge request." - secondary_team String "The secondary team name." sent_by String @@ -6785,7 +7535,6 @@ struct TeamMergeRequestCanceledShownToPrimaryTeamDetails struct TeamMergeRequestCanceledShownToSecondaryTeamDetails "Canceled a team merge request." - sent_to String "The email of the primary team admin that the request was sent to." sent_by String @@ -6797,7 +7546,6 @@ struct TeamMergeRequestCanceledShownToSecondaryTeamDetails struct TeamMergeRequestExpiredDetails "Team merge request expired." - request_expired_details TeamMergeRequestExpiredExtraDetails "Team merge request expiration details." @@ -6806,7 +7554,6 @@ struct TeamMergeRequestExpiredDetails struct TeamMergeRequestExpiredShownToPrimaryTeamDetails "Team merge request expired." - secondary_team String "The secondary team name." sent_by String @@ -6818,7 +7565,6 @@ struct TeamMergeRequestExpiredShownToPrimaryTeamDetails struct TeamMergeRequestExpiredShownToSecondaryTeamDetails "Team merge request expired." - sent_to String "The email of the primary team admin the request was sent to." @@ -6827,7 +7573,6 @@ struct TeamMergeRequestExpiredShownToSecondaryTeamDetails struct TeamMergeRequestRejectedShownToPrimaryTeamDetails "Rejected a team merge request." - secondary_team String "The secondary team name." sent_by String @@ -6839,7 +7584,6 @@ struct TeamMergeRequestRejectedShownToPrimaryTeamDetails struct TeamMergeRequestRejectedShownToSecondaryTeamDetails "Rejected a team merge request." - sent_by String "The name of the secondary team admin who sent the request originally." @@ -6848,7 +7592,6 @@ struct TeamMergeRequestRejectedShownToSecondaryTeamDetails struct TeamMergeRequestReminderDetails "Sent a team merge request reminder." - request_reminder_details TeamMergeRequestReminderExtraDetails "Team merge request reminder details." @@ -6857,7 +7600,6 @@ struct TeamMergeRequestReminderDetails struct TeamMergeRequestReminderShownToPrimaryTeamDetails "Sent a team merge request reminder." - secondary_team String "The secondary team name." sent_to String @@ -6869,7 +7611,6 @@ struct TeamMergeRequestReminderShownToPrimaryTeamDetails struct TeamMergeRequestReminderShownToSecondaryTeamDetails "Sent a team merge request reminder." - sent_to String "The email of the primary team admin the request was sent to." @@ -6878,7 +7619,6 @@ struct TeamMergeRequestReminderShownToSecondaryTeamDetails struct TeamMergeRequestRevokedDetails "Canceled the team merge." - team String "The name of the other team." @@ -6887,7 +7627,6 @@ struct TeamMergeRequestRevokedDetails struct TeamMergeRequestSentShownToPrimaryTeamDetails "Requested to merge their Dropbox team into yours." - secondary_team String "The secondary team name." sent_to String @@ -6899,20 +7638,14 @@ struct TeamMergeRequestSentShownToPrimaryTeamDetails struct TeamMergeRequestSentShownToSecondaryTeamDetails "Requested to merge your team into another Dropbox team." - sent_to String "The email of the primary team admin the request was sent to." example default sent_to = "admin@it_department.com" -################# -# Event Details -################# - union EventDetails "Additional fields depending on the event type." - admin_alerting_alert_state_changed_details AdminAlertingAlertStateChangedDetails admin_alerting_changed_alert_config_details AdminAlertingChangedAlertConfigDetails admin_alerting_triggered_alert_details AdminAlertingTriggeredAlertDetails @@ -6933,6 +7666,38 @@ union EventDetails file_resolve_comment_details FileResolveCommentDetails file_unlike_comment_details FileUnlikeCommentDetails file_unresolve_comment_details FileUnresolveCommentDetails + dash_added_comment_to_stack_details DashAddedCommentToStackDetails + dash_added_connector_details DashAddedConnectorDetails + dash_added_link_to_stack_details DashAddedLinkToStackDetails + dash_added_team_email_domain_allowlist_details DashAddedTeamEmailDomainAllowlistDetails + dash_admin_added_org_wide_connector_details DashAdminAddedOrgWideConnectorDetails + dash_admin_disabled_connector_details DashAdminDisabledConnectorDetails + dash_admin_enabled_connector_details DashAdminEnabledConnectorDetails + dash_admin_removed_org_wide_connector_details DashAdminRemovedOrgWideConnectorDetails + dash_archived_stack_details DashArchivedStackDetails + dash_changed_audience_of_shared_link_to_stack_details DashChangedAudienceOfSharedLinkToStackDetails + dash_cloned_stack_details DashClonedStackDetails + dash_connector_tools_call_details DashConnectorToolsCallDetails + dash_created_stack_details DashCreatedStackDetails + dash_deleted_comment_from_stack_details DashDeletedCommentFromStackDetails + dash_deleted_stack_details DashDeletedStackDetails + dash_edited_comment_in_stack_details DashEditedCommentInStackDetails + dash_external_user_opened_stack_details DashExternalUserOpenedStackDetails + dash_first_launched_desktop_details DashFirstLaunchedDesktopDetails + dash_first_launched_extension_details DashFirstLaunchedExtensionDetails + dash_first_launched_web_start_page_details DashFirstLaunchedWebStartPageDetails + dash_opened_shared_link_to_stack_details DashOpenedSharedLinkToStackDetails + dash_opened_stack_details DashOpenedStackDetails + dash_preview_opt_out_status_changed_details DashPreviewOptOutStatusChangedDetails + dash_removed_connector_details DashRemovedConnectorDetails + dash_removed_link_from_stack_details DashRemovedLinkFromStackDetails + dash_removed_shared_link_to_stack_details DashRemovedSharedLinkToStackDetails + dash_removed_team_email_domain_allowlist_details DashRemovedTeamEmailDomainAllowlistDetails + dash_renamed_stack_details DashRenamedStackDetails + dash_shared_link_to_stack_details DashSharedLinkToStackDetails + dash_unarchived_stack_details DashUnarchivedStackDetails + dash_viewed_company_stack_details DashViewedCompanyStackDetails + dash_viewed_external_ai_activity_report_details DashViewedExternalAiActivityReportDetails governance_policy_add_folders_details GovernancePolicyAddFoldersDetails governance_policy_add_folder_failed_details GovernancePolicyAddFolderFailedDetails governance_policy_content_disposed_details GovernancePolicyContentDisposedDetails @@ -6987,8 +7752,20 @@ union EventDetails domain_verification_add_domain_success_details DomainVerificationAddDomainSuccessDetails domain_verification_remove_domain_details DomainVerificationRemoveDomainDetails enabled_domain_invites_details EnabledDomainInvitesDetails + encrypted_folder_cancel_team_key_rotation_details EncryptedFolderCancelTeamKeyRotationDetails + encrypted_folder_enroll_backup_key_details EncryptedFolderEnrollBackupKeyDetails + encrypted_folder_enroll_client_details EncryptedFolderEnrollClientDetails + encrypted_folder_enroll_team_details EncryptedFolderEnrollTeamDetails + encrypted_folder_finish_team_unenrollment_details EncryptedFolderFinishTeamUnenrollmentDetails + encrypted_folder_init_team_key_rotation_details EncryptedFolderInitTeamKeyRotationDetails + encrypted_folder_init_team_unenrollment_details EncryptedFolderInitTeamUnenrollmentDetails + encrypted_folder_remove_backup_key_details EncryptedFolderRemoveBackupKeyDetails + encrypted_folder_rotate_team_key_details EncryptedFolderRotateTeamKeyDetails + encrypted_folder_unenroll_client_details EncryptedFolderUnenrollClientDetails + team_encryption_key_activate_key_details TeamEncryptionKeyActivateKeyDetails team_encryption_key_cancel_key_deletion_details TeamEncryptionKeyCancelKeyDeletionDetails team_encryption_key_create_key_details TeamEncryptionKeyCreateKeyDetails + team_encryption_key_deactivate_key_details TeamEncryptionKeyDeactivateKeyDetails team_encryption_key_delete_key_details TeamEncryptionKeyDeleteKeyDetails team_encryption_key_disable_key_details TeamEncryptionKeyDisableKeyDetails team_encryption_key_enable_key_details TeamEncryptionKeyEnableKeyDetails @@ -7020,12 +7797,15 @@ union EventDetails object_label_updated_value_details ObjectLabelUpdatedValueDetails organize_folder_with_tidy_details OrganizeFolderWithTidyDetails replay_file_delete_details ReplayFileDeleteDetails + replay_file_downloaded_details ReplayFileDownloadedDetails + replay_team_project_created_details ReplayTeamProjectCreatedDetails rewind_folder_details RewindFolderDetails undo_naming_convention_details UndoNamingConventionDetails undo_organize_folder_with_tidy_details UndoOrganizeFolderWithTidyDetails user_tags_added_details UserTagsAddedDetails user_tags_removed_details UserTagsRemovedDetails email_ingest_receive_file_details EmailIngestReceiveFileDetails + file_request_auto_close_details FileRequestAutoCloseDetails file_request_change_details FileRequestChangeDetails file_request_close_details FileRequestCloseDetails file_request_create_details FileRequestCreateDetails @@ -7039,6 +7819,7 @@ union EventDetails group_create_details GroupCreateDetails group_delete_details GroupDeleteDetails group_description_updated_details GroupDescriptionUpdatedDetails + group_external_sharing_setting_override_changed_details GroupExternalSharingSettingOverrideChangedDetails group_join_policy_updated_details GroupJoinPolicyUpdatedDetails group_moved_details GroupMovedDetails group_remove_external_id_details GroupRemoveExternalIdDetails @@ -7056,6 +7837,8 @@ union EventDetails sign_in_as_session_end_details SignInAsSessionEndDetails sign_in_as_session_start_details SignInAsSessionStartDetails sso_error_details SsoErrorDetails + addon_assigned_details AddonAssignedDetails + addon_removed_details AddonRemovedDetails backup_admin_invitation_sent_details BackupAdminInvitationSentDetails backup_invitation_opened_details BackupInvitationOpenedDetails create_team_invite_link_details CreateTeamInviteLinkDetails @@ -7081,6 +7864,8 @@ union EventDetails member_suggest_details MemberSuggestDetails member_transfer_account_contents_details MemberTransferAccountContentsDetails pending_secondary_email_added_details PendingSecondaryEmailAddedDetails + product_assigned_to_member_details ProductAssignedToMemberDetails + product_removed_from_member_details ProductRemovedFromMemberDetails secondary_email_deleted_details SecondaryEmailDeletedDetails secondary_email_verified_details SecondaryEmailVerifiedDetails secondary_mails_policy_changed_details SecondaryMailsPolicyChangedDetails @@ -7144,6 +7929,8 @@ union EventDetails export_members_report_fail_details ExportMembersReportFailDetails external_sharing_create_report_details ExternalSharingCreateReportDetails external_sharing_report_failed_details ExternalSharingReportFailedDetails + member_access_details_create_report_details MemberAccessDetailsCreateReportDetails + member_access_details_create_report_failed_details MemberAccessDetailsCreateReportFailedDetails no_expiration_link_gen_create_report_details NoExpirationLinkGenCreateReportDetails no_expiration_link_gen_report_failed_details NoExpirationLinkGenReportFailedDetails no_password_link_gen_create_report_details NoPasswordLinkGenCreateReportDetails @@ -7155,9 +7942,15 @@ union EventDetails paper_admin_export_start_details PaperAdminExportStartDetails ransomware_alert_create_report_details RansomwareAlertCreateReportDetails ransomware_alert_create_report_failed_details RansomwareAlertCreateReportFailedDetails + shared_folders_create_report_details SharedFoldersCreateReportDetails + shared_folders_create_report_failed_details SharedFoldersCreateReportFailedDetails smart_sync_create_admin_privilege_report_details SmartSyncCreateAdminPrivilegeReportDetails team_activity_create_report_details TeamActivityCreateReportDetails team_activity_create_report_fail_details TeamActivityCreateReportFailDetails + team_folders_create_report_details TeamFoldersCreateReportDetails + team_folders_create_report_failed_details TeamFoldersCreateReportFailedDetails + team_storage_create_report_details TeamStorageCreateReportDetails + team_storage_create_report_failed_details TeamStorageCreateReportFailedDetails collection_share_details CollectionShareDetails file_transfers_file_add_details FileTransfersFileAddDetails file_transfers_transfer_delete_details FileTransfersTransferDeleteDetails @@ -7174,6 +7967,14 @@ union EventDetails replay_file_shared_link_modified_details ReplayFileSharedLinkModifiedDetails replay_project_team_add_details ReplayProjectTeamAddDetails replay_project_team_delete_details ReplayProjectTeamDeleteDetails + send_and_track_file_added_details SendAndTrackFileAddedDetails + send_and_track_file_renamed_details SendAndTrackFileRenamedDetails + send_and_track_file_updated_details SendAndTrackFileUpdatedDetails + send_and_track_link_created_details SendAndTrackLinkCreatedDetails + send_and_track_link_deleted_details SendAndTrackLinkDeletedDetails + send_and_track_link_updated_details SendAndTrackLinkUpdatedDetails + send_and_track_link_viewed_details SendAndTrackLinkViewedDetails + send_and_track_removed_file_and_associated_links_details SendAndTrackRemovedFileAndAssociatedLinksDetails sf_add_group_details SfAddGroupDetails sf_allow_non_members_to_view_shared_links_details SfAllowNonMembersToViewSharedLinksDetails sf_external_invite_warn_details SfExternalInviteWarnDetails @@ -7229,6 +8030,7 @@ union EventDetails shared_link_disable_details SharedLinkDisableDetails shared_link_download_details SharedLinkDownloadDetails shared_link_remove_expiry_details SharedLinkRemoveExpiryDetails + shared_link_remove_visitor_details SharedLinkRemoveVisitorDetails shared_link_settings_add_expiration_details SharedLinkSettingsAddExpirationDetails shared_link_settings_add_password_details SharedLinkSettingsAddPasswordDetails shared_link_settings_allow_download_disabled_details SharedLinkSettingsAllowDownloadDisabledDetails @@ -7268,6 +8070,15 @@ union EventDetails showcase_untrashed_details ShowcaseUntrashedDetails showcase_untrashed_deprecated_details ShowcaseUntrashedDeprecatedDetails showcase_view_details ShowcaseViewDetails + sign_signature_request_canceled_details SignSignatureRequestCanceledDetails + sign_signature_request_completed_details SignSignatureRequestCompletedDetails + sign_signature_request_declined_details SignSignatureRequestDeclinedDetails + sign_signature_request_opened_details SignSignatureRequestOpenedDetails + sign_signature_request_reminder_sent_details SignSignatureRequestReminderSentDetails + sign_signature_request_sent_details SignSignatureRequestSentDetails + sign_template_created_details SignTemplateCreatedDetails + sign_template_shared_details SignTemplateSharedDetails + risc_security_event_details RiscSecurityEventDetails sso_add_cert_details SsoAddCertDetails sso_add_login_url_details SsoAddLoginUrlDetails sso_add_logout_url_details SsoAddLogoutUrlDetails @@ -7286,14 +8097,19 @@ union EventDetails team_selective_sync_settings_changed_details TeamSelectiveSyncSettingsChangedDetails account_capture_change_policy_details AccountCaptureChangePolicyDetails admin_email_reminders_changed_details AdminEmailRemindersChangedDetails + ai_third_party_sharing_dropbox_base_policy_changed_details AiThirdPartySharingDropboxBasePolicyChangedDetails allow_download_disabled_details AllowDownloadDisabledDetails allow_download_enabled_details AllowDownloadEnabledDetails + apple_login_change_policy_details AppleLoginChangePolicyDetails app_permissions_changed_details AppPermissionsChangedDetails camera_uploads_policy_changed_details CameraUploadsPolicyChangedDetails + capture_team_space_policy_changed_details CaptureTeamSpacePolicyChangedDetails capture_transcript_policy_changed_details CaptureTranscriptPolicyChangedDetails classification_change_policy_details ClassificationChangePolicyDetails computer_backup_policy_changed_details ComputerBackupPolicyChangedDetails content_administration_policy_changed_details ContentAdministrationPolicyChangedDetails + content_deletion_protection_change_policy_details ContentDeletionProtectionChangePolicyDetails + dash_external_sharing_policy_changed_details DashExternalSharingPolicyChangedDetails data_placement_restriction_change_policy_details DataPlacementRestrictionChangePolicyDetails data_placement_restriction_satisfy_policy_details DataPlacementRestrictionSatisfyPolicyDetails device_approvals_add_exception_details DeviceApprovalsAddExceptionDetails @@ -7318,6 +8134,7 @@ union EventDetails file_requests_emails_enabled_details FileRequestsEmailsEnabledDetails file_requests_emails_restricted_to_team_only_details FileRequestsEmailsRestrictedToTeamOnlyDetails file_transfers_policy_changed_details FileTransfersPolicyChangedDetails + flexible_file_names_policy_changed_details FlexibleFileNamesPolicyChangedDetails folder_link_restriction_policy_changed_details FolderLinkRestrictionPolicyChangedDetails google_sso_change_policy_details GoogleSsoChangePolicyDetails group_user_management_change_policy_details GroupUserManagementChangePolicyDetails @@ -7330,6 +8147,7 @@ union EventDetails member_space_limits_change_policy_details MemberSpaceLimitsChangePolicyDetails member_space_limits_remove_exception_details MemberSpaceLimitsRemoveExceptionDetails member_suggestions_change_policy_details MemberSuggestionsChangePolicyDetails + microsoft_login_change_policy_details MicrosoftLoginChangePolicyDetails microsoft_office_addin_change_policy_details MicrosoftOfficeAddinChangePolicyDetails network_control_change_policy_details NetworkControlChangePolicyDetails paper_change_deployment_policy_details PaperChangeDeploymentPolicyDetails @@ -7340,11 +8158,18 @@ union EventDetails paper_desktop_policy_changed_details PaperDesktopPolicyChangedDetails paper_enabled_users_group_addition_details PaperEnabledUsersGroupAdditionDetails paper_enabled_users_group_removal_details PaperEnabledUsersGroupRemovalDetails + passkey_login_policy_changed_details PasskeyLoginPolicyChangedDetails password_strength_requirements_change_policy_details PasswordStrengthRequirementsChangePolicyDetails permanent_delete_change_policy_details PermanentDeleteChangePolicyDetails + previews_ai_policy_changed_details PreviewsAiPolicyChangedDetails + replay_adding_people_policy_changed_details ReplayAddingPeoplePolicyChangedDetails + replay_sharing_policy_changed_details ReplaySharingPolicyChangedDetails reseller_support_change_policy_details ResellerSupportChangePolicyDetails rewind_policy_changed_details RewindPolicyChangedDetails + send_and_track_policy_changed_details SendAndTrackPolicyChangedDetails + send_external_sharing_policy_changed_details SendExternalSharingPolicyChangedDetails send_for_signature_policy_changed_details SendForSignaturePolicyChangedDetails + shared_link_default_permissions_policy_changed_details SharedLinkDefaultPermissionsPolicyChangedDetails sharing_change_folder_join_policy_details SharingChangeFolderJoinPolicyDetails sharing_change_link_allow_change_expiration_policy_details SharingChangeLinkAllowChangeExpirationPolicyDetails sharing_change_link_default_expiration_policy_details SharingChangeLinkDefaultExpirationPolicyDetails @@ -7354,18 +8179,23 @@ union EventDetails showcase_change_download_policy_details ShowcaseChangeDownloadPolicyDetails showcase_change_enabled_policy_details ShowcaseChangeEnabledPolicyDetails showcase_change_external_sharing_policy_details ShowcaseChangeExternalSharingPolicyDetails + sign_external_sharing_policy_changed_details SignExternalSharingPolicyChangedDetails + sign_template_creation_permission_changed_details SignTemplateCreationPermissionChangedDetails smarter_smart_sync_policy_changed_details SmarterSmartSyncPolicyChangedDetails smart_sync_change_policy_details SmartSyncChangePolicyDetails smart_sync_not_opt_out_details SmartSyncNotOptOutDetails smart_sync_opt_out_details SmartSyncOptOutDetails sso_change_policy_details SsoChangePolicyDetails + stack_cross_team_access_policy_changed_details StackCrossTeamAccessPolicyChangedDetails team_branding_policy_changed_details TeamBrandingPolicyChangedDetails team_extensions_policy_changed_details TeamExtensionsPolicyChangedDetails + team_member_storage_request_policy_changed_details TeamMemberStorageRequestPolicyChangedDetails team_selective_sync_policy_changed_details TeamSelectiveSyncPolicyChangedDetails team_sharing_whitelist_subjects_changed_details TeamSharingWhitelistSubjectsChangedDetails tfa_add_exception_details TfaAddExceptionDetails tfa_change_policy_details TfaChangePolicyDetails tfa_remove_exception_details TfaRemoveExceptionDetails + top_level_content_policy_changed_details TopLevelContentPolicyChangedDetails two_account_change_policy_details TwoAccountChangePolicyDetails viewer_info_policy_changed_details ViewerInfoPolicyChangedDetails watermarking_policy_changed_details WatermarkingPolicyChangedDetails @@ -7384,6 +8214,8 @@ union EventDetails team_profile_change_name_details TeamProfileChangeNameDetails team_profile_remove_background_details TeamProfileRemoveBackgroundDetails team_profile_remove_logo_details TeamProfileRemoveLogoDetails + passkey_add_details PasskeyAddDetails + passkey_remove_details PasskeyRemoveDetails tfa_add_backup_phone_details TfaAddBackupPhoneDetails tfa_add_security_key_details TfaAddSecurityKeyDetails tfa_change_backup_phone_details TfaChangeBackupPhoneDetails @@ -7422,11 +8254,6 @@ union EventDetails example default shared_content_download_details = default - -############## -# Event Type -############## - struct AdminAlertingAlertStateChangedType description String @@ -7547,6 +8374,198 @@ struct FileUnresolveCommentType example default description = "(comments) Unresolved file comment" +struct DashAddedCommentToStackType + description String + + example default + description = "(dash) Added a comment to a stack" + +struct DashAddedConnectorType + description String + + example default + description = "(dash) Connected to a user connector" + +struct DashAddedLinkToStackType + description String + + example default + description = "(dash) Added a link to a stack" + +struct DashAddedTeamEmailDomainAllowlistType + description String + + example default + description = "(dash) Admin added an email domain to the team allowlist" + +struct DashAdminAddedOrgWideConnectorType + description String + + example default + description = "(dash) Admin added an admin connector" + +struct DashAdminDisabledConnectorType + description String + + example default + description = "(dash) Admin disabled a user connector" + +struct DashAdminEnabledConnectorType + description String + + example default + description = "(dash) Admin enabled a user connector" + +struct DashAdminRemovedOrgWideConnectorType + description String + + example default + description = "(dash) Admin removed an admin connector" + +struct DashArchivedStackType + description String + + example default + description = "(dash) Archived a stack" + +struct DashChangedAudienceOfSharedLinkToStackType + description String + + example default + description = "(dash) Changed the audience of a shared link to a stack" + +struct DashClonedStackType + description String + + example default + description = "(dash) Cloned stack" + +struct DashConnectorToolsCallType + description String + + example default + description = "(dash) Called a tool on a connector" + +struct DashCreatedStackType + description String + + example default + description = "(dash) Created a stack" + +struct DashDeletedCommentFromStackType + description String + + example default + description = "(dash) Deleted a comment from a stack" + +struct DashDeletedStackType + description String + + example default + description = "(dash) Deleted a stack" + +struct DashEditedCommentInStackType + description String + + example default + description = "(dash) Edited a comment in a stack" + +struct DashExternalUserOpenedStackType + description String + + example default + description = "(dash) External user opened a stack" + +struct DashFirstLaunchedDesktopType + description String + + example default + description = "(dash) Opened the desktop app for the first time" + +struct DashFirstLaunchedExtensionType + description String + + example default + description = "(dash) Opened the extension for the first time" + +struct DashFirstLaunchedWebStartPageType + description String + + example default + description = "(dash) Opened the web Start Page for the first time" + +struct DashOpenedSharedLinkToStackType + description String + + example default + description = "(dash) Checked access permissions to a stack" + +struct DashOpenedStackType + description String + + example default + description = "(dash) Opened a stack" + +struct DashPreviewOptOutStatusChangedType + description String + + example default + description = "(dash) Changed the preview opt-out status" + +struct DashRemovedConnectorType + description String + + example default + description = "(dash) Disconnected a user connector" + +struct DashRemovedLinkFromStackType + description String + + example default + description = "(dash) Removed a link from a stack" + +struct DashRemovedSharedLinkToStackType + description String + + example default + description = "(dash) Removed a shared link to a stack" + +struct DashRemovedTeamEmailDomainAllowlistType + description String + + example default + description = "(dash) Admin removed an email domain from the team allowlist" + +struct DashRenamedStackType + description String + + example default + description = "(dash) Renamed a stack" + +struct DashSharedLinkToStackType + description String + + example default + description = "(dash) Shared a link to a stack" + +struct DashUnarchivedStackType + description String + + example default + description = "(dash) Unarchived a stack" + +struct DashViewedCompanyStackType + description String + + example default + description = "(dash) Member viewed a company stack" + +struct DashViewedExternalAiActivityReportType + description String + + example default + description = "(dash) Admin viewed the external AI activity report" + struct GovernancePolicyAddFoldersType description String @@ -7803,73 +8822,139 @@ struct AccountCaptureRelinquishAccountType description String example default - description = "(domains) Account-captured user changed account email to personal email" + description = "(domains) Account-captured user changed account email to personal email" + +struct DisabledDomainInvitesType + description String + + example default + description = "(domains) Disabled domain invites (deprecated, no longer logged)" + +struct DomainInvitesApproveRequestToJoinTeamType + description String + + example default + description = "(domains) Approved user's request to join team" + +struct DomainInvitesDeclineRequestToJoinTeamType + description String + + example default + description = "(domains) Declined user's request to join team" + +struct DomainInvitesEmailExistingUsersType + description String + + example default + description = "(domains) Sent domain invites to existing domain accounts (deprecated, no longer logged)" + +struct DomainInvitesRequestToJoinTeamType + description String + + example default + description = "(domains) Requested to join team" + +struct DomainInvitesSetInviteNewUserPrefToNoType + description String + + example default + description = "(domains) Disabled \"Automatically invite new users\" (deprecated, no longer logged)" + +struct DomainInvitesSetInviteNewUserPrefToYesType + description String + + example default + description = "(domains) Enabled \"Automatically invite new users\" (deprecated, no longer logged)" + +struct DomainVerificationAddDomainFailType + description String + + example default + description = "(domains) Failed to verify team domain" + +struct DomainVerificationAddDomainSuccessType + description String + + example default + description = "(domains) Verified team domain" + +struct DomainVerificationRemoveDomainType + description String + + example default + description = "(domains) Removed domain from list of verified team domains" + +struct EnabledDomainInvitesType + description String + + example default + description = "(domains) Enabled domain invites (deprecated, no longer logged)" -struct DisabledDomainInvitesType +struct EncryptedFolderCancelTeamKeyRotationType description String example default - description = "(domains) Disabled domain invites (deprecated, no longer logged)" + description = "(encryption) Canceled team key rotation" -struct DomainInvitesApproveRequestToJoinTeamType +struct EncryptedFolderEnrollBackupKeyType description String example default - description = "(domains) Approved user's request to join team" + description = "(encryption) Added recovery key" -struct DomainInvitesDeclineRequestToJoinTeamType +struct EncryptedFolderEnrollClientType description String example default - description = "(domains) Declined user's request to join team" + description = "(encryption) Enrolled device" -struct DomainInvitesEmailExistingUsersType +struct EncryptedFolderEnrollTeamType description String example default - description = "(domains) Sent domain invites to existing domain accounts (deprecated, no longer logged)" + description = "(encryption) Activated team folder encryption" -struct DomainInvitesRequestToJoinTeamType +struct EncryptedFolderFinishTeamUnenrollmentType description String example default - description = "(domains) Requested to join team" + description = "(encryption) Deactivated team folder encryption" -struct DomainInvitesSetInviteNewUserPrefToNoType +struct EncryptedFolderInitTeamKeyRotationType description String example default - description = "(domains) Disabled \"Automatically invite new users\" (deprecated, no longer logged)" + description = "(encryption) Initiated team key rotation" -struct DomainInvitesSetInviteNewUserPrefToYesType +struct EncryptedFolderInitTeamUnenrollmentType description String example default - description = "(domains) Enabled \"Automatically invite new users\" (deprecated, no longer logged)" + description = "(encryption) Initiated deactivation of team folder encryption" -struct DomainVerificationAddDomainFailType +struct EncryptedFolderRemoveBackupKeyType description String example default - description = "(domains) Failed to verify team domain" + description = "(encryption) Removed recovery key" -struct DomainVerificationAddDomainSuccessType +struct EncryptedFolderRotateTeamKeyType description String example default - description = "(domains) Verified team domain" + description = "(encryption) Rotated team key" -struct DomainVerificationRemoveDomainType +struct EncryptedFolderUnenrollClientType description String example default - description = "(domains) Removed domain from list of verified team domains" + description = "(encryption) Unenrolled device" -struct EnabledDomainInvitesType +struct TeamEncryptionKeyActivateKeyType description String example default - description = "(domains) Enabled domain invites (deprecated, no longer logged)" + description = "(encryption) Activated team encryption key" struct TeamEncryptionKeyCancelKeyDeletionType description String @@ -7883,6 +8968,12 @@ struct TeamEncryptionKeyCreateKeyType example default description = "(encryption) Created team encryption key" +struct TeamEncryptionKeyDeactivateKeyType + description String + + example default + description = "(encryption) Deactivated team encryption key" + struct TeamEncryptionKeyDeleteKeyType description String @@ -8069,6 +9160,18 @@ struct ReplayFileDeleteType example default description = "(file_operations) Deleted files in Replay" +struct ReplayFileDownloadedType + description String + + example default + description = "(file_operations) Downloaded files in Replay" + +struct ReplayTeamProjectCreatedType + description String + + example default + description = "(file_operations) Created a team project in Replay" + struct RewindFolderType description String @@ -8105,6 +9208,12 @@ struct EmailIngestReceiveFileType example default description = "(file_requests) Received files via Email to Dropbox" +struct FileRequestAutoCloseType + description String + + example default + description = "(file_requests) Auto closed file request" + struct FileRequestChangeType description String @@ -8183,6 +9292,12 @@ struct GroupDescriptionUpdatedType example default description = "(groups) Updated group (deprecated, no longer logged)" +struct GroupExternalSharingSettingOverrideChangedType + description String + + example default + description = "(groups) Changed group's external sharing setting" + struct GroupJoinPolicyUpdatedType description String @@ -8285,6 +9400,18 @@ struct SsoErrorType example default description = "(logins) Failed to sign in via SSO (deprecated, replaced by 'Failed to sign in')" +struct AddonAssignedType + description String + + example default + description = "(members) Add-on Assigned" + +struct AddonRemovedType + description String + + example default + description = "(members) Add-on Removed" + struct BackupAdminInvitationSentType description String @@ -8435,6 +9562,18 @@ struct PendingSecondaryEmailAddedType example default description = "(members) Added pending secondary email" +struct ProductAssignedToMemberType + description String + + example default + description = "(members) Product assigned to team member" + +struct ProductRemovedFromMemberType + description String + + example default + description = "(members) Product removed from team member" + struct SecondaryEmailDeletedType description String @@ -8813,6 +9952,18 @@ struct ExternalSharingReportFailedType example default description = "(reports) Couldn't create External sharing report" +struct MemberAccessDetailsCreateReportType + description String + + example default + description = "(reports) Created member access report" + +struct MemberAccessDetailsCreateReportFailedType + description String + + example default + description = "(reports) Couldn't generate member access report" + struct NoExpirationLinkGenCreateReportType description String @@ -8879,6 +10030,18 @@ struct RansomwareAlertCreateReportFailedType example default description = "(reports) Couldn't generate ransomware report" +struct SharedFoldersCreateReportType + description String + + example default + description = "(reports) Created shared folders report" + +struct SharedFoldersCreateReportFailedType + description String + + example default + description = "(reports) Couldn't generate shared folders report" + struct SmartSyncCreateAdminPrivilegeReportType description String @@ -8897,6 +10060,30 @@ struct TeamActivityCreateReportFailType example default description = "(reports) Couldn't generate team activity report" +struct TeamFoldersCreateReportType + description String + + example default + description = "(reports) Created team folders report" + +struct TeamFoldersCreateReportFailedType + description String + + example default + description = "(reports) Couldn't generate team folders report" + +struct TeamStorageCreateReportType + description String + + example default + description = "(reports) Created team storage report" + +struct TeamStorageCreateReportFailedType + description String + + example default + description = "(reports) Couldn't generate team storage report" + struct CollectionShareType description String @@ -8979,7 +10166,7 @@ struct ReplayFileSharedLinkModifiedType description String example default - description = "(sharing) Modified shared link in Replay" + description = "(sharing) Changed shared link in Replay" struct ReplayProjectTeamAddType description String @@ -8993,6 +10180,54 @@ struct ReplayProjectTeamDeleteType example default description = "(sharing) Removed member from Replay Project" +struct SendAndTrackFileAddedType + description String + + example default + description = "(sharing) File added to Send and Track" + +struct SendAndTrackFileRenamedType + description String + + example default + description = "(sharing) File renamed in Send and Track" + +struct SendAndTrackFileUpdatedType + description String + + example default + description = "(sharing) File updated in Send and Track" + +struct SendAndTrackLinkCreatedType + description String + + example default + description = "(sharing) Link created in Send and Track" + +struct SendAndTrackLinkDeletedType + description String + + example default + description = "(sharing) Link deleted in Send and Track" + +struct SendAndTrackLinkUpdatedType + description String + + example default + description = "(sharing) Send and Track Link Updated" + +struct SendAndTrackLinkViewedType + description String + + example default + description = "(sharing) Send and Track Link Visited" + +struct SendAndTrackRemovedFileAndAssociatedLinksType + description String + + example default + description = "(sharing) Send and Track file and associated links deleted" + struct SfAddGroupType description String @@ -9323,6 +10558,12 @@ struct SharedLinkRemoveExpiryType example default description = "(sharing) Removed shared link expiration date" +struct SharedLinkRemoveVisitorType + description String + + example default + description = "(sharing) Removed link visitor" + struct SharedLinkSettingsAddExpirationType description String @@ -9557,6 +10798,60 @@ struct ShowcaseViewType example default description = "(showcase) Viewed showcase" +struct SignSignatureRequestCanceledType + description String + + example default + description = "(signatures) Canceled signature request" + +struct SignSignatureRequestCompletedType + description String + + example default + description = "(signatures) Completed signature request" + +struct SignSignatureRequestDeclinedType + description String + + example default + description = "(signatures) Declined signature request" + +struct SignSignatureRequestOpenedType + description String + + example default + description = "(signatures) Opened signature request" + +struct SignSignatureRequestReminderSentType + description String + + example default + description = "(signatures) Sent signature request reminder" + +struct SignSignatureRequestSentType + description String + + example default + description = "(signatures) Sent signature request" + +struct SignTemplateCreatedType + description String + + example default + description = "(signatures) Created template" + +struct SignTemplateSharedType + description String + + example default + description = "(signatures) Shared template" + +struct RiscSecurityEventType + description String + + example default + description = "(sso) RISC security event received from external provider" + struct SsoAddCertType description String @@ -9665,6 +10960,12 @@ struct AdminEmailRemindersChangedType example default description = "(team_policies) Changed admin reminder settings for requests to join the team" +struct AiThirdPartySharingDropboxBasePolicyChangedType + description String + + example default + description = "(team_policies) Changed AI third party sharing policy for team" + struct AllowDownloadDisabledType description String @@ -9677,6 +10978,12 @@ struct AllowDownloadEnabledType example default description = "(team_policies) Enabled downloads (deprecated, no longer logged)" +struct AppleLoginChangePolicyType + description String + + example default + description = "(team_policies) Enabled/disabled Apple login for team" + struct AppPermissionsChangedType description String @@ -9689,6 +10996,12 @@ struct CameraUploadsPolicyChangedType example default description = "(team_policies) Changed camera uploads setting for team" +struct CaptureTeamSpacePolicyChangedType + description String + + example default + description = "(team_policies) Changed Capture team space policy for team" + struct CaptureTranscriptPolicyChangedType description String @@ -9713,6 +11026,18 @@ struct ContentAdministrationPolicyChangedType example default description = "(team_policies) Changed content management setting" +struct ContentDeletionProtectionChangePolicyType + description String + + example default + description = "(team_policies) Changed content deletion protection policy for team" + +struct DashExternalSharingPolicyChangedType + description String + + example default + description = "(team_policies) Changed Dash external sharing policy for team" + struct DataPlacementRestrictionChangePolicyType description String @@ -9857,6 +11182,12 @@ struct FileTransfersPolicyChangedType example default description = "(team_policies) Changed file transfers policy for team" +struct FlexibleFileNamesPolicyChangedType + description String + + example default + description = "(team_policies) Changed flexible file names policy for team" + struct FolderLinkRestrictionPolicyChangedType description String @@ -9929,6 +11260,12 @@ struct MemberSuggestionsChangePolicyType example default description = "(team_policies) Enabled/disabled option for team members to suggest people to add to team" +struct MicrosoftLoginChangePolicyType + description String + + example default + description = "(team_policies) Enabled/disabled Microsoft login for team" + struct MicrosoftOfficeAddinChangePolicyType description String @@ -9989,6 +11326,12 @@ struct PaperEnabledUsersGroupRemovalType example default description = "(team_policies) Removed users from Paper-enabled users list" +struct PasskeyLoginPolicyChangedType + description String + + example default + description = "(team_policies) Changed passkey login policy for team" + struct PasswordStrengthRequirementsChangePolicyType description String @@ -10001,6 +11344,24 @@ struct PermanentDeleteChangePolicyType example default description = "(team_policies) Enabled/disabled ability of team members to permanently delete content" +struct PreviewsAiPolicyChangedType + description String + + example default + description = "(team_policies) Changed Dropbox AI policy for team" + +struct ReplayAddingPeoplePolicyChangedType + description String + + example default + description = "(team_policies) Changed the policy for adding people to Replay content" + +struct ReplaySharingPolicyChangedType + description String + + example default + description = "(team_policies) Changed the policy for sharing Replay content" + struct ResellerSupportChangePolicyType description String @@ -10013,12 +11374,30 @@ struct RewindPolicyChangedType example default description = "(team_policies) Changed Rewind policy for team" +struct SendAndTrackPolicyChangedType + description String + + example default + description = "(team_policies) Changed “Send and track” policy for team" + +struct SendExternalSharingPolicyChangedType + description String + + example default + description = "(team_policies) Changed “Send and track” external sharing policy for team" + struct SendForSignaturePolicyChangedType description String example default description = "(team_policies) Changed send for signature policy for team" +struct SharedLinkDefaultPermissionsPolicyChangedType + description String + + example default + description = "(team_policies) Changed shared link default permissions policy for team" + struct SharingChangeFolderJoinPolicyType description String @@ -10073,6 +11452,18 @@ struct ShowcaseChangeExternalSharingPolicyType example default description = "(team_policies) Enabled/disabled sharing Dropbox Showcase externally for team" +struct SignExternalSharingPolicyChangedType + description String + + example default + description = "(team_policies) Changed Signatures external sharing policy for team" + +struct SignTemplateCreationPermissionChangedType + description String + + example default + description = "(team_policies) Changed template creation permission" + struct SmarterSmartSyncPolicyChangedType description String @@ -10103,6 +11494,12 @@ struct SsoChangePolicyType example default description = "(team_policies) Changed single sign-on setting for team" +struct StackCrossTeamAccessPolicyChangedType + description String + + example default + description = "(team_policies) Changed cross-team Stack access policy for team" + struct TeamBrandingPolicyChangedType description String @@ -10115,6 +11512,12 @@ struct TeamExtensionsPolicyChangedType example default description = "(team_policies) Changed App Integrations setting for team" +struct TeamMemberStorageRequestPolicyChangedType + description String + + example default + description = "(team_policies) Changed team member storage request policy for team" + struct TeamSelectiveSyncPolicyChangedType description String @@ -10137,7 +11540,7 @@ struct TfaChangePolicyType description String example default - description = "(team_policies) Changed two-step verification setting for team" + description = "(team_policies) Changed two-factor authentication setting for team" struct TfaRemoveExceptionType description String @@ -10145,6 +11548,12 @@ struct TfaRemoveExceptionType example default description = "(team_policies) Removed members from two factor authentication exception list" +struct TopLevelContentPolicyChangedType + description String + + example default + description = "(team_policies) Changed top level content setting for team" + struct TwoAccountChangePolicyType description String @@ -10253,47 +11662,59 @@ struct TeamProfileRemoveLogoType example default description = "(team_profile) Removed team logo displayed on shared link headers" +struct PasskeyAddType + description String + + example default + description = "(tfa) Added passkey for login" + +struct PasskeyRemoveType + description String + + example default + description = "(tfa) Removed passkey for login" + struct TfaAddBackupPhoneType description String example default - description = "(tfa) Added backup phone for two-step verification" + description = "(tfa) Added backup phone for two-factor authentication" struct TfaAddSecurityKeyType description String example default - description = "(tfa) Added security key for two-step verification" + description = "(tfa) Added security key for two-factor authentication" struct TfaChangeBackupPhoneType description String example default - description = "(tfa) Changed backup phone for two-step verification" + description = "(tfa) Changed backup phone for two-factor authentication" struct TfaChangeStatusType description String example default - description = "(tfa) Enabled/disabled/changed two-step verification setting" + description = "(tfa) Enabled/disabled/changed two-factor authentication setting" struct TfaRemoveBackupPhoneType description String example default - description = "(tfa) Removed backup phone for two-step verification" + description = "(tfa) Removed backup phone for two-factor authentication" struct TfaRemoveSecurityKeyType description String example default - description = "(tfa) Removed security key for two-step verification" + description = "(tfa) Removed security key for two-factor authentication" struct TfaResetType description String example default - description = "(tfa) Reset two-step verification for team member" + description = "(tfa) Reset two-factor authentication for team member" struct ChangedEnterpriseAdminRoleType description String @@ -10445,10 +11866,8 @@ struct TeamMergeRequestSentShownToSecondaryTeamType example default description = "(trusted_teams) Requested to merge your team into another Dropbox team" - union EventType "The type of the event with description." - admin_alerting_alert_state_changed AdminAlertingAlertStateChangedType "(admin_alerting) Changed an alert state" admin_alerting_changed_alert_config AdminAlertingChangedAlertConfigType @@ -10489,6 +11908,70 @@ union EventType "(comments) Unliked file comment (deprecated, no longer logged)" file_unresolve_comment FileUnresolveCommentType "(comments) Unresolved file comment" + dash_added_comment_to_stack DashAddedCommentToStackType + "(dash) Added a comment to a stack" + dash_added_connector DashAddedConnectorType + "(dash) Connected to a user connector" + dash_added_link_to_stack DashAddedLinkToStackType + "(dash) Added a link to a stack" + dash_added_team_email_domain_allowlist DashAddedTeamEmailDomainAllowlistType + "(dash) Admin added an email domain to the team allowlist" + dash_admin_added_org_wide_connector DashAdminAddedOrgWideConnectorType + "(dash) Admin added an admin connector" + dash_admin_disabled_connector DashAdminDisabledConnectorType + "(dash) Admin disabled a user connector" + dash_admin_enabled_connector DashAdminEnabledConnectorType + "(dash) Admin enabled a user connector" + dash_admin_removed_org_wide_connector DashAdminRemovedOrgWideConnectorType + "(dash) Admin removed an admin connector" + dash_archived_stack DashArchivedStackType + "(dash) Archived a stack" + dash_changed_audience_of_shared_link_to_stack DashChangedAudienceOfSharedLinkToStackType + "(dash) Changed the audience of a shared link to a stack" + dash_cloned_stack DashClonedStackType + "(dash) Cloned stack" + dash_connector_tools_call DashConnectorToolsCallType + "(dash) Called a tool on a connector" + dash_created_stack DashCreatedStackType + "(dash) Created a stack" + dash_deleted_comment_from_stack DashDeletedCommentFromStackType + "(dash) Deleted a comment from a stack" + dash_deleted_stack DashDeletedStackType + "(dash) Deleted a stack" + dash_edited_comment_in_stack DashEditedCommentInStackType + "(dash) Edited a comment in a stack" + dash_external_user_opened_stack DashExternalUserOpenedStackType + "(dash) External user opened a stack" + dash_first_launched_desktop DashFirstLaunchedDesktopType + "(dash) Opened the desktop app for the first time" + dash_first_launched_extension DashFirstLaunchedExtensionType + "(dash) Opened the extension for the first time" + dash_first_launched_web_start_page DashFirstLaunchedWebStartPageType + "(dash) Opened the web Start Page for the first time" + dash_opened_shared_link_to_stack DashOpenedSharedLinkToStackType + "(dash) Checked access permissions to a stack" + dash_opened_stack DashOpenedStackType + "(dash) Opened a stack" + dash_preview_opt_out_status_changed DashPreviewOptOutStatusChangedType + "(dash) Changed the preview opt-out status" + dash_removed_connector DashRemovedConnectorType + "(dash) Disconnected a user connector" + dash_removed_link_from_stack DashRemovedLinkFromStackType + "(dash) Removed a link from a stack" + dash_removed_shared_link_to_stack DashRemovedSharedLinkToStackType + "(dash) Removed a shared link to a stack" + dash_removed_team_email_domain_allowlist DashRemovedTeamEmailDomainAllowlistType + "(dash) Admin removed an email domain from the team allowlist" + dash_renamed_stack DashRenamedStackType + "(dash) Renamed a stack" + dash_shared_link_to_stack DashSharedLinkToStackType + "(dash) Shared a link to a stack" + dash_unarchived_stack DashUnarchivedStackType + "(dash) Unarchived a stack" + dash_viewed_company_stack DashViewedCompanyStackType + "(dash) Member viewed a company stack" + dash_viewed_external_ai_activity_report DashViewedExternalAiActivityReportType + "(dash) Admin viewed the external AI activity report" governance_policy_add_folders GovernancePolicyAddFoldersType "(data_governance) Added folders to policy" governance_policy_add_folder_failed GovernancePolicyAddFolderFailedType @@ -10597,10 +12080,34 @@ union EventType "(domains) Removed domain from list of verified team domains" enabled_domain_invites EnabledDomainInvitesType "(domains) Enabled domain invites (deprecated, no longer logged)" + encrypted_folder_cancel_team_key_rotation EncryptedFolderCancelTeamKeyRotationType + "(encryption) Canceled team key rotation" + encrypted_folder_enroll_backup_key EncryptedFolderEnrollBackupKeyType + "(encryption) Added recovery key" + encrypted_folder_enroll_client EncryptedFolderEnrollClientType + "(encryption) Enrolled device" + encrypted_folder_enroll_team EncryptedFolderEnrollTeamType + "(encryption) Activated team folder encryption" + encrypted_folder_finish_team_unenrollment EncryptedFolderFinishTeamUnenrollmentType + "(encryption) Deactivated team folder encryption" + encrypted_folder_init_team_key_rotation EncryptedFolderInitTeamKeyRotationType + "(encryption) Initiated team key rotation" + encrypted_folder_init_team_unenrollment EncryptedFolderInitTeamUnenrollmentType + "(encryption) Initiated deactivation of team folder encryption" + encrypted_folder_remove_backup_key EncryptedFolderRemoveBackupKeyType + "(encryption) Removed recovery key" + encrypted_folder_rotate_team_key EncryptedFolderRotateTeamKeyType + "(encryption) Rotated team key" + encrypted_folder_unenroll_client EncryptedFolderUnenrollClientType + "(encryption) Unenrolled device" + team_encryption_key_activate_key TeamEncryptionKeyActivateKeyType + "(encryption) Activated team encryption key" team_encryption_key_cancel_key_deletion TeamEncryptionKeyCancelKeyDeletionType "(encryption) Canceled team encryption key deletion" team_encryption_key_create_key TeamEncryptionKeyCreateKeyType "(encryption) Created team encryption key" + team_encryption_key_deactivate_key TeamEncryptionKeyDeactivateKeyType + "(encryption) Deactivated team encryption key" team_encryption_key_delete_key TeamEncryptionKeyDeleteKeyType "(encryption) Deleted team encryption key" team_encryption_key_disable_key TeamEncryptionKeyDisableKeyType @@ -10663,6 +12170,10 @@ union EventType "(file_operations) Organized a folder with multi-file organize" replay_file_delete ReplayFileDeleteType "(file_operations) Deleted files in Replay" + replay_file_downloaded ReplayFileDownloadedType + "(file_operations) Downloaded files in Replay" + replay_team_project_created ReplayTeamProjectCreatedType + "(file_operations) Created a team project in Replay" rewind_folder RewindFolderType "(file_operations) Rewound a folder" undo_naming_convention UndoNamingConventionType @@ -10675,6 +12186,8 @@ union EventType "(file_operations) Removed tags" email_ingest_receive_file EmailIngestReceiveFileType "(file_requests) Received files via Email to Dropbox" + file_request_auto_close FileRequestAutoCloseType + "(file_requests) Auto closed file request" file_request_change FileRequestChangeType "(file_requests) Changed file request" file_request_close FileRequestCloseType @@ -10701,6 +12214,8 @@ union EventType "(groups) Deleted group" group_description_updated GroupDescriptionUpdatedType "(groups) Updated group (deprecated, no longer logged)" + group_external_sharing_setting_override_changed GroupExternalSharingSettingOverrideChangedType + "(groups) Changed group's external sharing setting" group_join_policy_updated GroupJoinPolicyUpdatedType "(groups) Updated group join policy (deprecated, no longer logged)" group_moved GroupMovedType @@ -10735,6 +12250,10 @@ union EventType "(logins) Started admin sign-in-as session" sso_error SsoErrorType "(logins) Failed to sign in via SSO (deprecated, replaced by 'Failed to sign in')" + addon_assigned AddonAssignedType + "(members) Add-on Assigned" + addon_removed AddonRemovedType + "(members) Add-on Removed" backup_admin_invitation_sent BackupAdminInvitationSentType "(members) Invited members to activate Backup" backup_invitation_opened BackupInvitationOpenedType @@ -10785,6 +12304,10 @@ union EventType "(members) Transferred contents of deleted member account to another member" pending_secondary_email_added PendingSecondaryEmailAddedType "(members) Added pending secondary email" + product_assigned_to_member ProductAssignedToMemberType + "(members) Product assigned to team member" + product_removed_from_member ProductRemovedFromMemberType + "(members) Product removed from team member" secondary_email_deleted SecondaryEmailDeletedType "(members) Deleted secondary email" secondary_email_verified SecondaryEmailVerifiedType @@ -10911,6 +12434,10 @@ union EventType "(reports) Created External sharing report" external_sharing_report_failed ExternalSharingReportFailedType "(reports) Couldn't create External sharing report" + member_access_details_create_report MemberAccessDetailsCreateReportType + "(reports) Created member access report" + member_access_details_create_report_failed MemberAccessDetailsCreateReportFailedType + "(reports) Couldn't generate member access report" no_expiration_link_gen_create_report NoExpirationLinkGenCreateReportType "(reports) Report created: Links created with no expiration" no_expiration_link_gen_report_failed NoExpirationLinkGenReportFailedType @@ -10933,12 +12460,24 @@ union EventType "(reports) Created ransomware report" ransomware_alert_create_report_failed RansomwareAlertCreateReportFailedType "(reports) Couldn't generate ransomware report" + shared_folders_create_report SharedFoldersCreateReportType + "(reports) Created shared folders report" + shared_folders_create_report_failed SharedFoldersCreateReportFailedType + "(reports) Couldn't generate shared folders report" smart_sync_create_admin_privilege_report SmartSyncCreateAdminPrivilegeReportType "(reports) Created Smart Sync non-admin devices report" team_activity_create_report TeamActivityCreateReportType "(reports) Created team activity report" team_activity_create_report_fail TeamActivityCreateReportFailType "(reports) Couldn't generate team activity report" + team_folders_create_report TeamFoldersCreateReportType + "(reports) Created team folders report" + team_folders_create_report_failed TeamFoldersCreateReportFailedType + "(reports) Couldn't generate team folders report" + team_storage_create_report TeamStorageCreateReportType + "(reports) Created team storage report" + team_storage_create_report_failed TeamStorageCreateReportFailedType + "(reports) Couldn't generate team storage report" collection_share CollectionShareType "(sharing) Shared album" file_transfers_file_add FileTransfersFileAddType @@ -10966,11 +12505,27 @@ union EventType replay_file_shared_link_created ReplayFileSharedLinkCreatedType "(sharing) Created shared link in Replay" replay_file_shared_link_modified ReplayFileSharedLinkModifiedType - "(sharing) Modified shared link in Replay" + "(sharing) Changed shared link in Replay" replay_project_team_add ReplayProjectTeamAddType "(sharing) Added member to Replay Project" replay_project_team_delete ReplayProjectTeamDeleteType "(sharing) Removed member from Replay Project" + send_and_track_file_added SendAndTrackFileAddedType + "(sharing) File added to Send and Track" + send_and_track_file_renamed SendAndTrackFileRenamedType + "(sharing) File renamed in Send and Track" + send_and_track_file_updated SendAndTrackFileUpdatedType + "(sharing) File updated in Send and Track" + send_and_track_link_created SendAndTrackLinkCreatedType + "(sharing) Link created in Send and Track" + send_and_track_link_deleted SendAndTrackLinkDeletedType + "(sharing) Link deleted in Send and Track" + send_and_track_link_updated SendAndTrackLinkUpdatedType + "(sharing) Send and Track Link Updated" + send_and_track_link_viewed SendAndTrackLinkViewedType + "(sharing) Send and Track Link Visited" + send_and_track_removed_file_and_associated_links SendAndTrackRemovedFileAndAssociatedLinksType + "(sharing) Send and Track file and associated links deleted" sf_add_group SfAddGroupType "(sharing) Added team to shared folder (deprecated, no longer logged)" sf_allow_non_members_to_view_shared_links SfAllowNonMembersToViewSharedLinksType @@ -11081,6 +12636,8 @@ union EventType "(sharing) Downloaded file/folder from shared link" shared_link_remove_expiry SharedLinkRemoveExpiryType "(sharing) Removed shared link expiration date" + shared_link_remove_visitor SharedLinkRemoveVisitorType + "(sharing) Removed link visitor" shared_link_settings_add_expiration SharedLinkSettingsAddExpirationType "(sharing) Added an expiration date to the shared link" shared_link_settings_add_password SharedLinkSettingsAddPasswordType @@ -11159,6 +12716,24 @@ union EventType "(showcase) Restored showcase (old version) (deprecated, replaced by 'Restored showcase')" showcase_view ShowcaseViewType "(showcase) Viewed showcase" + sign_signature_request_canceled SignSignatureRequestCanceledType + "(signatures) Canceled signature request" + sign_signature_request_completed SignSignatureRequestCompletedType + "(signatures) Completed signature request" + sign_signature_request_declined SignSignatureRequestDeclinedType + "(signatures) Declined signature request" + sign_signature_request_opened SignSignatureRequestOpenedType + "(signatures) Opened signature request" + sign_signature_request_reminder_sent SignSignatureRequestReminderSentType + "(signatures) Sent signature request reminder" + sign_signature_request_sent SignSignatureRequestSentType + "(signatures) Sent signature request" + sign_template_created SignTemplateCreatedType + "(signatures) Created template" + sign_template_shared SignTemplateSharedType + "(signatures) Shared template" + risc_security_event RiscSecurityEventType + "(sso) RISC security event received from external provider" sso_add_cert SsoAddCertType "(sso) Added X.509 certificate for SSO" sso_add_login_url SsoAddLoginUrlType @@ -11195,14 +12770,20 @@ union EventType "(team_policies) Changed account capture setting on team domain" admin_email_reminders_changed AdminEmailRemindersChangedType "(team_policies) Changed admin reminder settings for requests to join the team" + ai_third_party_sharing_dropbox_base_policy_changed AiThirdPartySharingDropboxBasePolicyChangedType + "(team_policies) Changed AI third party sharing policy for team" allow_download_disabled AllowDownloadDisabledType "(team_policies) Disabled downloads (deprecated, no longer logged)" allow_download_enabled AllowDownloadEnabledType "(team_policies) Enabled downloads (deprecated, no longer logged)" + apple_login_change_policy AppleLoginChangePolicyType + "(team_policies) Enabled/disabled Apple login for team" app_permissions_changed AppPermissionsChangedType "(team_policies) Changed app permissions" camera_uploads_policy_changed CameraUploadsPolicyChangedType "(team_policies) Changed camera uploads setting for team" + capture_team_space_policy_changed CaptureTeamSpacePolicyChangedType + "(team_policies) Changed Capture team space policy for team" capture_transcript_policy_changed CaptureTranscriptPolicyChangedType "(team_policies) Changed Capture transcription policy for team" classification_change_policy ClassificationChangePolicyType @@ -11211,6 +12792,10 @@ union EventType "(team_policies) Changed computer backup policy for team" content_administration_policy_changed ContentAdministrationPolicyChangedType "(team_policies) Changed content management setting" + content_deletion_protection_change_policy ContentDeletionProtectionChangePolicyType + "(team_policies) Changed content deletion protection policy for team" + dash_external_sharing_policy_changed DashExternalSharingPolicyChangedType + "(team_policies) Changed Dash external sharing policy for team" data_placement_restriction_change_policy DataPlacementRestrictionChangePolicyType "(team_policies) Set restrictions on data center locations where team data resides" data_placement_restriction_satisfy_policy DataPlacementRestrictionSatisfyPolicyType @@ -11259,6 +12844,8 @@ union EventType "(team_policies) Enabled file request emails for team (deprecated, no longer logged)" file_transfers_policy_changed FileTransfersPolicyChangedType "(team_policies) Changed file transfers policy for team" + flexible_file_names_policy_changed FlexibleFileNamesPolicyChangedType + "(team_policies) Changed flexible file names policy for team" folder_link_restriction_policy_changed FolderLinkRestrictionPolicyChangedType "(team_policies) Changed folder link restrictions policy for team" google_sso_change_policy GoogleSsoChangePolicyType @@ -11283,6 +12870,8 @@ union EventType "(team_policies) Removed members from member space limit exception list" member_suggestions_change_policy MemberSuggestionsChangePolicyType "(team_policies) Enabled/disabled option for team members to suggest people to add to team" + microsoft_login_change_policy MicrosoftLoginChangePolicyType + "(team_policies) Enabled/disabled Microsoft login for team" microsoft_office_addin_change_policy MicrosoftOfficeAddinChangePolicyType "(team_policies) Enabled/disabled Microsoft Office add-in" network_control_change_policy NetworkControlChangePolicyType @@ -11303,16 +12892,30 @@ union EventType "(team_policies) Added users to Paper-enabled users list" paper_enabled_users_group_removal PaperEnabledUsersGroupRemovalType "(team_policies) Removed users from Paper-enabled users list" + passkey_login_policy_changed PasskeyLoginPolicyChangedType + "(team_policies) Changed passkey login policy for team" password_strength_requirements_change_policy PasswordStrengthRequirementsChangePolicyType "(team_policies) Changed team password strength requirements" permanent_delete_change_policy PermanentDeleteChangePolicyType "(team_policies) Enabled/disabled ability of team members to permanently delete content" + previews_ai_policy_changed PreviewsAiPolicyChangedType + "(team_policies) Changed Dropbox AI policy for team" + replay_adding_people_policy_changed ReplayAddingPeoplePolicyChangedType + "(team_policies) Changed the policy for adding people to Replay content" + replay_sharing_policy_changed ReplaySharingPolicyChangedType + "(team_policies) Changed the policy for sharing Replay content" reseller_support_change_policy ResellerSupportChangePolicyType "(team_policies) Enabled/disabled reseller support" rewind_policy_changed RewindPolicyChangedType "(team_policies) Changed Rewind policy for team" + send_and_track_policy_changed SendAndTrackPolicyChangedType + "(team_policies) Changed “Send and track” policy for team" + send_external_sharing_policy_changed SendExternalSharingPolicyChangedType + "(team_policies) Changed “Send and track” external sharing policy for team" send_for_signature_policy_changed SendForSignaturePolicyChangedType "(team_policies) Changed send for signature policy for team" + shared_link_default_permissions_policy_changed SharedLinkDefaultPermissionsPolicyChangedType + "(team_policies) Changed shared link default permissions policy for team" sharing_change_folder_join_policy SharingChangeFolderJoinPolicyType "(team_policies) Changed whether team members can join shared folders owned outside team" sharing_change_link_allow_change_expiration_policy SharingChangeLinkAllowChangeExpirationPolicyType @@ -11331,6 +12934,10 @@ union EventType "(team_policies) Enabled/disabled Dropbox Showcase for team" showcase_change_external_sharing_policy ShowcaseChangeExternalSharingPolicyType "(team_policies) Enabled/disabled sharing Dropbox Showcase externally for team" + sign_external_sharing_policy_changed SignExternalSharingPolicyChangedType + "(team_policies) Changed Signatures external sharing policy for team" + sign_template_creation_permission_changed SignTemplateCreationPermissionChangedType + "(team_policies) Changed template creation permission" smarter_smart_sync_policy_changed SmarterSmartSyncPolicyChangedType "(team_policies) Changed automatic Smart Sync setting for team" smart_sync_change_policy SmartSyncChangePolicyType @@ -11341,10 +12948,14 @@ union EventType "(team_policies) Opted team out of Smart Sync" sso_change_policy SsoChangePolicyType "(team_policies) Changed single sign-on setting for team" + stack_cross_team_access_policy_changed StackCrossTeamAccessPolicyChangedType + "(team_policies) Changed cross-team Stack access policy for team" team_branding_policy_changed TeamBrandingPolicyChangedType "(team_policies) Changed team branding policy for team" team_extensions_policy_changed TeamExtensionsPolicyChangedType "(team_policies) Changed App Integrations setting for team" + team_member_storage_request_policy_changed TeamMemberStorageRequestPolicyChangedType + "(team_policies) Changed team member storage request policy for team" team_selective_sync_policy_changed TeamSelectiveSyncPolicyChangedType "(team_policies) Enabled/disabled Team Selective Sync for team" team_sharing_whitelist_subjects_changed TeamSharingWhitelistSubjectsChangedType @@ -11352,9 +12963,11 @@ union EventType tfa_add_exception TfaAddExceptionType "(team_policies) Added members to two factor authentication exception list" tfa_change_policy TfaChangePolicyType - "(team_policies) Changed two-step verification setting for team" + "(team_policies) Changed two-factor authentication setting for team" tfa_remove_exception TfaRemoveExceptionType "(team_policies) Removed members from two factor authentication exception list" + top_level_content_policy_changed TopLevelContentPolicyChangedType + "(team_policies) Changed top level content setting for team" two_account_change_policy TwoAccountChangePolicyType "(team_policies) Enabled/disabled option for members to link personal Dropbox account and team account to same computer" viewer_info_policy_changed ViewerInfoPolicyChangedType @@ -11391,20 +13004,24 @@ union EventType "(team_profile) Removed team background displayed on shared link headers" team_profile_remove_logo TeamProfileRemoveLogoType "(team_profile) Removed team logo displayed on shared link headers" + passkey_add PasskeyAddType + "(tfa) Added passkey for login" + passkey_remove PasskeyRemoveType + "(tfa) Removed passkey for login" tfa_add_backup_phone TfaAddBackupPhoneType - "(tfa) Added backup phone for two-step verification" + "(tfa) Added backup phone for two-factor authentication" tfa_add_security_key TfaAddSecurityKeyType - "(tfa) Added security key for two-step verification" + "(tfa) Added security key for two-factor authentication" tfa_change_backup_phone TfaChangeBackupPhoneType - "(tfa) Changed backup phone for two-step verification" + "(tfa) Changed backup phone for two-factor authentication" tfa_change_status TfaChangeStatusType - "(tfa) Enabled/disabled/changed two-step verification setting" + "(tfa) Enabled/disabled/changed two-factor authentication setting" tfa_remove_backup_phone TfaRemoveBackupPhoneType - "(tfa) Removed backup phone for two-step verification" + "(tfa) Removed backup phone for two-factor authentication" tfa_remove_security_key TfaRemoveSecurityKeyType - "(tfa) Removed security key for two-step verification" + "(tfa) Removed security key for two-factor authentication" tfa_reset TfaResetType - "(tfa) Reset two-step verification for team member" + "(tfa) Reset two-factor authentication for team member" changed_enterprise_admin_role ChangedEnterpriseAdminRoleType "(trusted_teams) Changed enterprise admin role" changed_enterprise_connected_team_status ChangedEnterpriseConnectedTeamStatusType @@ -11459,10 +13076,8 @@ union EventType example default shared_content_download = default - union EventTypeArg "The type of the event." - admin_alerting_alert_state_changed "(admin_alerting) Changed an alert state" admin_alerting_changed_alert_config @@ -11503,6 +13118,70 @@ union EventTypeArg "(comments) Unliked file comment (deprecated, no longer logged)" file_unresolve_comment "(comments) Unresolved file comment" + dash_added_comment_to_stack + "(dash) Added a comment to a stack" + dash_added_connector + "(dash) Connected to a user connector" + dash_added_link_to_stack + "(dash) Added a link to a stack" + dash_added_team_email_domain_allowlist + "(dash) Admin added an email domain to the team allowlist" + dash_admin_added_org_wide_connector + "(dash) Admin added an admin connector" + dash_admin_disabled_connector + "(dash) Admin disabled a user connector" + dash_admin_enabled_connector + "(dash) Admin enabled a user connector" + dash_admin_removed_org_wide_connector + "(dash) Admin removed an admin connector" + dash_archived_stack + "(dash) Archived a stack" + dash_changed_audience_of_shared_link_to_stack + "(dash) Changed the audience of a shared link to a stack" + dash_cloned_stack + "(dash) Cloned stack" + dash_connector_tools_call + "(dash) Called a tool on a connector" + dash_created_stack + "(dash) Created a stack" + dash_deleted_comment_from_stack + "(dash) Deleted a comment from a stack" + dash_deleted_stack + "(dash) Deleted a stack" + dash_edited_comment_in_stack + "(dash) Edited a comment in a stack" + dash_external_user_opened_stack + "(dash) External user opened a stack" + dash_first_launched_desktop + "(dash) Opened the desktop app for the first time" + dash_first_launched_extension + "(dash) Opened the extension for the first time" + dash_first_launched_web_start_page + "(dash) Opened the web Start Page for the first time" + dash_opened_shared_link_to_stack + "(dash) Checked access permissions to a stack" + dash_opened_stack + "(dash) Opened a stack" + dash_preview_opt_out_status_changed + "(dash) Changed the preview opt-out status" + dash_removed_connector + "(dash) Disconnected a user connector" + dash_removed_link_from_stack + "(dash) Removed a link from a stack" + dash_removed_shared_link_to_stack + "(dash) Removed a shared link to a stack" + dash_removed_team_email_domain_allowlist + "(dash) Admin removed an email domain from the team allowlist" + dash_renamed_stack + "(dash) Renamed a stack" + dash_shared_link_to_stack + "(dash) Shared a link to a stack" + dash_unarchived_stack + "(dash) Unarchived a stack" + dash_viewed_company_stack + "(dash) Member viewed a company stack" + dash_viewed_external_ai_activity_report + "(dash) Admin viewed the external AI activity report" governance_policy_add_folders "(data_governance) Added folders to policy" governance_policy_add_folder_failed @@ -11611,10 +13290,34 @@ union EventTypeArg "(domains) Removed domain from list of verified team domains" enabled_domain_invites "(domains) Enabled domain invites (deprecated, no longer logged)" + encrypted_folder_cancel_team_key_rotation + "(encryption) Canceled team key rotation" + encrypted_folder_enroll_backup_key + "(encryption) Added recovery key" + encrypted_folder_enroll_client + "(encryption) Enrolled device" + encrypted_folder_enroll_team + "(encryption) Activated team folder encryption" + encrypted_folder_finish_team_unenrollment + "(encryption) Deactivated team folder encryption" + encrypted_folder_init_team_key_rotation + "(encryption) Initiated team key rotation" + encrypted_folder_init_team_unenrollment + "(encryption) Initiated deactivation of team folder encryption" + encrypted_folder_remove_backup_key + "(encryption) Removed recovery key" + encrypted_folder_rotate_team_key + "(encryption) Rotated team key" + encrypted_folder_unenroll_client + "(encryption) Unenrolled device" + team_encryption_key_activate_key + "(encryption) Activated team encryption key" team_encryption_key_cancel_key_deletion "(encryption) Canceled team encryption key deletion" team_encryption_key_create_key "(encryption) Created team encryption key" + team_encryption_key_deactivate_key + "(encryption) Deactivated team encryption key" team_encryption_key_delete_key "(encryption) Deleted team encryption key" team_encryption_key_disable_key @@ -11677,6 +13380,10 @@ union EventTypeArg "(file_operations) Organized a folder with multi-file organize" replay_file_delete "(file_operations) Deleted files in Replay" + replay_file_downloaded + "(file_operations) Downloaded files in Replay" + replay_team_project_created + "(file_operations) Created a team project in Replay" rewind_folder "(file_operations) Rewound a folder" undo_naming_convention @@ -11689,6 +13396,8 @@ union EventTypeArg "(file_operations) Removed tags" email_ingest_receive_file "(file_requests) Received files via Email to Dropbox" + file_request_auto_close + "(file_requests) Auto closed file request" file_request_change "(file_requests) Changed file request" file_request_close @@ -11715,6 +13424,8 @@ union EventTypeArg "(groups) Deleted group" group_description_updated "(groups) Updated group (deprecated, no longer logged)" + group_external_sharing_setting_override_changed + "(groups) Changed group's external sharing setting" group_join_policy_updated "(groups) Updated group join policy (deprecated, no longer logged)" group_moved @@ -11749,6 +13460,10 @@ union EventTypeArg "(logins) Started admin sign-in-as session" sso_error "(logins) Failed to sign in via SSO (deprecated, replaced by 'Failed to sign in')" + addon_assigned + "(members) Add-on Assigned" + addon_removed + "(members) Add-on Removed" backup_admin_invitation_sent "(members) Invited members to activate Backup" backup_invitation_opened @@ -11799,6 +13514,10 @@ union EventTypeArg "(members) Transferred contents of deleted member account to another member" pending_secondary_email_added "(members) Added pending secondary email" + product_assigned_to_member + "(members) Product assigned to team member" + product_removed_from_member + "(members) Product removed from team member" secondary_email_deleted "(members) Deleted secondary email" secondary_email_verified @@ -11925,6 +13644,10 @@ union EventTypeArg "(reports) Created External sharing report" external_sharing_report_failed "(reports) Couldn't create External sharing report" + member_access_details_create_report + "(reports) Created member access report" + member_access_details_create_report_failed + "(reports) Couldn't generate member access report" no_expiration_link_gen_create_report "(reports) Report created: Links created with no expiration" no_expiration_link_gen_report_failed @@ -11947,12 +13670,24 @@ union EventTypeArg "(reports) Created ransomware report" ransomware_alert_create_report_failed "(reports) Couldn't generate ransomware report" + shared_folders_create_report + "(reports) Created shared folders report" + shared_folders_create_report_failed + "(reports) Couldn't generate shared folders report" smart_sync_create_admin_privilege_report "(reports) Created Smart Sync non-admin devices report" team_activity_create_report "(reports) Created team activity report" team_activity_create_report_fail "(reports) Couldn't generate team activity report" + team_folders_create_report + "(reports) Created team folders report" + team_folders_create_report_failed + "(reports) Couldn't generate team folders report" + team_storage_create_report + "(reports) Created team storage report" + team_storage_create_report_failed + "(reports) Couldn't generate team storage report" collection_share "(sharing) Shared album" file_transfers_file_add @@ -11980,11 +13715,27 @@ union EventTypeArg replay_file_shared_link_created "(sharing) Created shared link in Replay" replay_file_shared_link_modified - "(sharing) Modified shared link in Replay" + "(sharing) Changed shared link in Replay" replay_project_team_add "(sharing) Added member to Replay Project" replay_project_team_delete "(sharing) Removed member from Replay Project" + send_and_track_file_added + "(sharing) File added to Send and Track" + send_and_track_file_renamed + "(sharing) File renamed in Send and Track" + send_and_track_file_updated + "(sharing) File updated in Send and Track" + send_and_track_link_created + "(sharing) Link created in Send and Track" + send_and_track_link_deleted + "(sharing) Link deleted in Send and Track" + send_and_track_link_updated + "(sharing) Send and Track Link Updated" + send_and_track_link_viewed + "(sharing) Send and Track Link Visited" + send_and_track_removed_file_and_associated_links + "(sharing) Send and Track file and associated links deleted" sf_add_group "(sharing) Added team to shared folder (deprecated, no longer logged)" sf_allow_non_members_to_view_shared_links @@ -12095,6 +13846,8 @@ union EventTypeArg "(sharing) Downloaded file/folder from shared link" shared_link_remove_expiry "(sharing) Removed shared link expiration date" + shared_link_remove_visitor + "(sharing) Removed link visitor" shared_link_settings_add_expiration "(sharing) Added an expiration date to the shared link" shared_link_settings_add_password @@ -12173,6 +13926,24 @@ union EventTypeArg "(showcase) Restored showcase (old version) (deprecated, replaced by 'Restored showcase')" showcase_view "(showcase) Viewed showcase" + sign_signature_request_canceled + "(signatures) Canceled signature request" + sign_signature_request_completed + "(signatures) Completed signature request" + sign_signature_request_declined + "(signatures) Declined signature request" + sign_signature_request_opened + "(signatures) Opened signature request" + sign_signature_request_reminder_sent + "(signatures) Sent signature request reminder" + sign_signature_request_sent + "(signatures) Sent signature request" + sign_template_created + "(signatures) Created template" + sign_template_shared + "(signatures) Shared template" + risc_security_event + "(sso) RISC security event received from external provider" sso_add_cert "(sso) Added X.509 certificate for SSO" sso_add_login_url @@ -12209,14 +13980,20 @@ union EventTypeArg "(team_policies) Changed account capture setting on team domain" admin_email_reminders_changed "(team_policies) Changed admin reminder settings for requests to join the team" + ai_third_party_sharing_dropbox_base_policy_changed + "(team_policies) Changed AI third party sharing policy for team" allow_download_disabled "(team_policies) Disabled downloads (deprecated, no longer logged)" allow_download_enabled "(team_policies) Enabled downloads (deprecated, no longer logged)" + apple_login_change_policy + "(team_policies) Enabled/disabled Apple login for team" app_permissions_changed "(team_policies) Changed app permissions" camera_uploads_policy_changed "(team_policies) Changed camera uploads setting for team" + capture_team_space_policy_changed + "(team_policies) Changed Capture team space policy for team" capture_transcript_policy_changed "(team_policies) Changed Capture transcription policy for team" classification_change_policy @@ -12225,6 +14002,10 @@ union EventTypeArg "(team_policies) Changed computer backup policy for team" content_administration_policy_changed "(team_policies) Changed content management setting" + content_deletion_protection_change_policy + "(team_policies) Changed content deletion protection policy for team" + dash_external_sharing_policy_changed + "(team_policies) Changed Dash external sharing policy for team" data_placement_restriction_change_policy "(team_policies) Set restrictions on data center locations where team data resides" data_placement_restriction_satisfy_policy @@ -12273,6 +14054,8 @@ union EventTypeArg "(team_policies) Enabled file request emails for team (deprecated, no longer logged)" file_transfers_policy_changed "(team_policies) Changed file transfers policy for team" + flexible_file_names_policy_changed + "(team_policies) Changed flexible file names policy for team" folder_link_restriction_policy_changed "(team_policies) Changed folder link restrictions policy for team" google_sso_change_policy @@ -12297,6 +14080,8 @@ union EventTypeArg "(team_policies) Removed members from member space limit exception list" member_suggestions_change_policy "(team_policies) Enabled/disabled option for team members to suggest people to add to team" + microsoft_login_change_policy + "(team_policies) Enabled/disabled Microsoft login for team" microsoft_office_addin_change_policy "(team_policies) Enabled/disabled Microsoft Office add-in" network_control_change_policy @@ -12317,16 +14102,30 @@ union EventTypeArg "(team_policies) Added users to Paper-enabled users list" paper_enabled_users_group_removal "(team_policies) Removed users from Paper-enabled users list" + passkey_login_policy_changed + "(team_policies) Changed passkey login policy for team" password_strength_requirements_change_policy "(team_policies) Changed team password strength requirements" permanent_delete_change_policy "(team_policies) Enabled/disabled ability of team members to permanently delete content" + previews_ai_policy_changed + "(team_policies) Changed Dropbox AI policy for team" + replay_adding_people_policy_changed + "(team_policies) Changed the policy for adding people to Replay content" + replay_sharing_policy_changed + "(team_policies) Changed the policy for sharing Replay content" reseller_support_change_policy "(team_policies) Enabled/disabled reseller support" rewind_policy_changed "(team_policies) Changed Rewind policy for team" + send_and_track_policy_changed + "(team_policies) Changed “Send and track” policy for team" + send_external_sharing_policy_changed + "(team_policies) Changed “Send and track” external sharing policy for team" send_for_signature_policy_changed "(team_policies) Changed send for signature policy for team" + shared_link_default_permissions_policy_changed + "(team_policies) Changed shared link default permissions policy for team" sharing_change_folder_join_policy "(team_policies) Changed whether team members can join shared folders owned outside team" sharing_change_link_allow_change_expiration_policy @@ -12345,6 +14144,10 @@ union EventTypeArg "(team_policies) Enabled/disabled Dropbox Showcase for team" showcase_change_external_sharing_policy "(team_policies) Enabled/disabled sharing Dropbox Showcase externally for team" + sign_external_sharing_policy_changed + "(team_policies) Changed Signatures external sharing policy for team" + sign_template_creation_permission_changed + "(team_policies) Changed template creation permission" smarter_smart_sync_policy_changed "(team_policies) Changed automatic Smart Sync setting for team" smart_sync_change_policy @@ -12355,10 +14158,14 @@ union EventTypeArg "(team_policies) Opted team out of Smart Sync" sso_change_policy "(team_policies) Changed single sign-on setting for team" + stack_cross_team_access_policy_changed + "(team_policies) Changed cross-team Stack access policy for team" team_branding_policy_changed "(team_policies) Changed team branding policy for team" team_extensions_policy_changed "(team_policies) Changed App Integrations setting for team" + team_member_storage_request_policy_changed + "(team_policies) Changed team member storage request policy for team" team_selective_sync_policy_changed "(team_policies) Enabled/disabled Team Selective Sync for team" team_sharing_whitelist_subjects_changed @@ -12366,9 +14173,11 @@ union EventTypeArg tfa_add_exception "(team_policies) Added members to two factor authentication exception list" tfa_change_policy - "(team_policies) Changed two-step verification setting for team" + "(team_policies) Changed two-factor authentication setting for team" tfa_remove_exception "(team_policies) Removed members from two factor authentication exception list" + top_level_content_policy_changed + "(team_policies) Changed top level content setting for team" two_account_change_policy "(team_policies) Enabled/disabled option for members to link personal Dropbox account and team account to same computer" viewer_info_policy_changed @@ -12405,20 +14214,24 @@ union EventTypeArg "(team_profile) Removed team background displayed on shared link headers" team_profile_remove_logo "(team_profile) Removed team logo displayed on shared link headers" + passkey_add + "(tfa) Added passkey for login" + passkey_remove + "(tfa) Removed passkey for login" tfa_add_backup_phone - "(tfa) Added backup phone for two-step verification" + "(tfa) Added backup phone for two-factor authentication" tfa_add_security_key - "(tfa) Added security key for two-step verification" + "(tfa) Added security key for two-factor authentication" tfa_change_backup_phone - "(tfa) Changed backup phone for two-step verification" + "(tfa) Changed backup phone for two-factor authentication" tfa_change_status - "(tfa) Enabled/disabled/changed two-step verification setting" + "(tfa) Enabled/disabled/changed two-factor authentication setting" tfa_remove_backup_phone - "(tfa) Removed backup phone for two-step verification" + "(tfa) Removed backup phone for two-factor authentication" tfa_remove_security_key - "(tfa) Removed security key for two-step verification" + "(tfa) Removed security key for two-factor authentication" tfa_reset - "(tfa) Reset two-step verification for team member" + "(tfa) Reset two-factor authentication for team member" changed_enterprise_admin_role "(trusted_teams) Changed enterprise admin role" changed_enterprise_connected_team_status @@ -12473,22 +14286,20 @@ union EventTypeArg example default shared_content_download = null - struct TeamEvent "An audit log event." - timestamp common.DropboxTimestamp "The Dropbox timestamp representing when the action was taken." event_category EventCategory "The category that this type of action belongs to." actor ActorLogInfo? - "The entity who actually performed the action. Might be missing due to historical data gap." + "The entity who actually performed the action." origin OriginLogInfo? "The origin from which the actor performed the action including information about host, ip address, location, session, etc. If the action was performed programmatically via the API the origin represents the API client." involve_non_team_member Boolean? - "True if the action involved a non team member either as the actor or as one of the affected users. Might be missing due to historical data gap." + "True if the action involved a non team member either as the actor or as one of the affected users." context ContextLogInfo? - "The user or team on whose behalf the actor performed the action. Might be missing due to historical data gap." + "The user or team on whose behalf the actor performed the action." participants List(ParticipantLogInfo)? "Zero or more users and/or groups that are affected by the action. Note that this list doesn't include any actors or users in context." assets List(AssetLogInfo)? @@ -12509,3 +14320,4 @@ struct TeamEvent context = default participants = [default2] assets = [default2] + diff --git a/team_namespaces.stone b/team_namespaces_apiv2_team_namespaces.stone similarity index 85% rename from team_namespaces.stone rename to team_namespaces_apiv2_team_namespaces.stone index 6b0da23..a02e961 100644 --- a/team_namespaces.stone +++ b/team_namespaces_apiv2_team_namespaces.stone @@ -3,10 +3,6 @@ namespace team import common import team_common -# -# Route namespaces/list -# - union NamespaceType app_folder "App sandbox folder." @@ -16,10 +12,19 @@ union NamespaceType "Top-level team-owned folder." team_member_folder "Team member's home folder." + team_member_root + "Team member's root folder." + +union TeamNamespacesListContinueError extends TeamNamespacesListError + invalid_cursor + "The cursor is invalid." + +union TeamNamespacesListError + invalid_arg + "Argument passed in is invalid." struct NamespaceMetadata "Properties of a namespace." - name String "The name of this namespace." namespace_id common.SharedFolderId @@ -34,7 +39,7 @@ struct NamespaceMetadata name = "Marketing" namespace_id = "123456789" namespace_type = shared_folder - + example team_member_folder name = "Franz Ferdinand" namespace_id = "123456789" @@ -43,7 +48,6 @@ struct NamespaceMetadata struct TeamNamespacesListResult "Result for :route:`namespaces/list`." - namespaces List(NamespaceMetadata) "List of all namespaces the team can access." cursor String @@ -57,7 +61,27 @@ struct TeamNamespacesListResult cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" has_more = false -route namespaces/list(TeamNamespacesListArg, TeamNamespacesListResult, TeamNamespacesListError) +struct TeamNamespacesListArg + limit UInt32(max_value=1000, min_value=1) = 1000 + "Specifying a value here has no effect." + + example default + limit = 1 + + example with_filter + limit = 1 + +struct TeamNamespacesListContinueArg + cursor String + "Indicates from what point to get the next set of team-accessible namespaces." + + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + + example with_filter + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + +route namespaces/list (TeamNamespacesListArg, TeamNamespacesListResult, TeamNamespacesListError) "Returns a list of all team-accessible namespaces. This list includes team folders, shared folders containing team members, team members' home namespaces, and team members' app folders. Home namespaces and app folders are always owned by this team or members of the @@ -68,19 +92,7 @@ route namespaces/list(TeamNamespacesListArg, TeamNamespacesListResult, TeamNames auth = "team" scope = "team_data.member" -struct TeamNamespacesListArg - - limit UInt32(min_value=1, max_value=1000) = 1000 - "Specifying a value here has no effect." - - example default - limit = 1 - -# -# Route namespaces/list/continue -# - -route namespaces/list/continue(TeamNamespacesListContinueArg, TeamNamespacesListResult, TeamNamespacesListContinueError) +route namespaces/list/continue (TeamNamespacesListContinueArg, TeamNamespacesListResult, TeamNamespacesListContinueError) "Once a cursor has been retrieved from :route:`namespaces/list`, use this to paginate through all team-accessible namespaces. Duplicates may occur in the list." @@ -88,21 +100,3 @@ route namespaces/list/continue(TeamNamespacesListContinueArg, TeamNamespacesList auth = "team" scope = "team_data.member" -struct TeamNamespacesListContinueArg - cursor String - "Indicates from what point to get the next set of team-accessible namespaces." - - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - -union TeamNamespacesListContinueError extends TeamNamespacesListError - invalid_cursor - "The cursor is invalid." - - -# -# Generic Error -# -union TeamNamespacesListError - invalid_arg - "Argument passed in is invalid." diff --git a/team_policies.stone b/team_policies_team_policies.stone similarity index 72% rename from team_policies.stone rename to team_policies_team_policies.stone index 2c64b8c..98a85af 100644 --- a/team_policies.stone +++ b/team_policies_team_policies.stone @@ -2,7 +2,6 @@ namespace team_policies struct TeamMemberPolicies "Policies governing team members." - sharing TeamSharingPolicies "Policies governing sharing." emm_state EmmState @@ -16,16 +15,18 @@ struct TeamMemberPolicies "The admin policy around the Dropbox Office Add-In for this team." suggest_members_policy SuggestMembersPolicy "The team policy on if teammembers are allowed to suggest users for admins to invite to the team." + top_level_content_policy TopLevelContentPolicy + "Policy for deciding whether members can edit team folders at the top level of the team space." example default sharing = default emm_state = disabled office_addin = disabled suggest_members_policy = enabled + top_level_content_policy = admin_only struct TeamSharingPolicies "Policies governing sharing within and outside of the team." - shared_folder_member_policy SharedFolderMemberPolicy "Who can join folders shared by team members." shared_folder_join_policy SharedFolderJoinPolicy @@ -36,6 +37,12 @@ struct TeamSharingPolicies "Who can create groups." shared_folder_link_restriction_policy SharedFolderBlanketLinkRestrictionPolicy "Who can view links to content in shared folders." + enforce_link_password_policy EnforceLinkPasswordPolicy + "If passwords are required for new links shared outside the team." + default_link_expiration_days_policy DefaultLinkExpirationDaysPolicy + "Default expiration date for new links shared outside the team." + shared_link_default_permissions_policy SharedLinkDefaultPermissionsPolicy + "Default access level for new links shared by team members." example default shared_folder_member_policy = team @@ -43,20 +50,21 @@ struct TeamSharingPolicies shared_link_create_policy = team_only group_creation_policy = admins_only shared_folder_link_restriction_policy = anyone + enforce_link_password_policy = optional + default_link_expiration_days_policy = none + shared_link_default_permissions_policy = default -# NOTE: we do not reuse sharing.MemberPolicy here since we may want to enable folder-specific member -# policies that work on top of the broader team policies. union SharedFolderMemberPolicy "Policy governing who can be a member of a folder shared by a team member." - team "Only a teammate can be a member of a folder shared by a team member." anyone "Anyone can be a member of a folder shared by a team member." + team_and_approved + "Only a teammate and approved people can be a member of a folder shared by a team member." union SharedFolderJoinPolicy "Policy governing which shared folders a team member can join." - from_team_only "Team members can only join folders shared by teammates." from_anyone @@ -65,7 +73,6 @@ union SharedFolderJoinPolicy union SharedLinkCreatePolicy "Policy governing the visibility of shared links. This policy can apply to newly created shared links, or all shared links." - default_public "By default, anyone can access newly created shared links. No login will be required to access the shared links unless overridden." @@ -81,12 +88,37 @@ union SharedLinkCreatePolicy union SharedFolderBlanketLinkRestrictionPolicy "Policy governing whether shared folder membership is required to access shared links." - members "Only members of shared folders can access folder content via shared link." anyone "Anyone can access folder content via shared link." +union EnforceLinkPasswordPolicy + "Policy governing whether new links shared outside the team require passwords." + optional + "New links shared outside the team do not require passwords." + required + "New links shared outside the team require passwords." + +union DefaultLinkExpirationDaysPolicy + "Policy governing default expiration date for new links shared outside the team." + none + "New links shared outside the team default to no expiration date." + day_1 + "New links shared outside the team default to expire in one day." + day_3 + "New links shared outside the team default to expire in three days." + day_7 + "New links shared outside the team default to expire in seven days." + day_30 + "New links shared outside the team default to expire in 30 days." + day_90 + "New links shared outside the team default to expire in 90 days." + day_180 + "New links shared outside the team default to expire in 180 days." + year_1 + "New links shared outside the team default to expire in 365 days." + union EmmState disabled "Emm token is disabled." @@ -101,6 +133,12 @@ union OfficeAddInPolicy enabled "Office Add-In is enabled." +union TopLevelContentPolicy + admin_only + "Only admins can edit team folders at the top level of the team space." + everyone + "Everyone on the team can edit team folders at the top level of the team space." + union SsoPolicy disabled "Users will be able to sign in with their Dropbox credentials." @@ -140,11 +178,15 @@ union PasswordControlMode union PasswordStrengthPolicy minimal_requirements - "User passwords will adhere to the minimal password strength policy." + "User passwords will not adhere to a password strength policy." moderate_password - "User passwords will adhere to the moderate password strength policy." + "User passwords will adhere to the strong password strength policy. Note that product + surfaces refer to this as the strong policy but the value must be kept as is for + backwards compatability." strong_password - "User passwords will adhere to the very strong password strength policy." + "User passwords will adhere to the very strong password strength policy. Note that product + surfaces refer to this as the very strong policy but the value must be kept as is for + backwards compatability." union TwoStepVerificationPolicy require_tfa_enable @@ -249,3 +291,14 @@ union FileProviderMigrationPolicyState "Team admin has not opted out of File Provider Migration for team members." default "Team admin has default value based on team tier." + immediate + "Team admin has chosen to do File Provider Migration immediately for the team." + +union SharedLinkDefaultPermissionsPolicy + default + "No team default. Member defaults used instead." + edit + "Default to edit when creating new sharing links" + view + "Default to view-only when creating new sharing links" + diff --git a/team_reports_apiv2_activity_page_team_reports.stone b/team_reports_apiv2_activity_page_team_reports.stone new file mode 100644 index 0000000..c9d84bb --- /dev/null +++ b/team_reports_apiv2_activity_page_team_reports.stone @@ -0,0 +1,10 @@ +namespace team + +route reports/get_activity (DateRange, GetActivityReport, DateRangeError) deprecated + "Retrieves reporting data about a team's user activity. + Deprecated: Will be removed on July 1st 2021." + + attrs + auth = "team" + scope = "team_info.read" + diff --git a/team_reports_apiv2_identity_team_reports.stone b/team_reports_apiv2_identity_team_reports.stone new file mode 100644 index 0000000..d0faf00 --- /dev/null +++ b/team_reports_apiv2_identity_team_reports.stone @@ -0,0 +1,10 @@ +namespace team + +route reports/get_storage (DateRange, GetStorageReport, DateRangeError) deprecated + "Retrieves reporting data about a team's storage usage. + Deprecated: Will be removed on July 1st 2021." + + attrs + auth = "team" + scope = "team_info.read" + diff --git a/team_reports_apiv2_super_admin_team_reports.stone b/team_reports_apiv2_super_admin_team_reports.stone new file mode 100644 index 0000000..d724107 --- /dev/null +++ b/team_reports_apiv2_super_admin_team_reports.stone @@ -0,0 +1,10 @@ +namespace team + +route reports/get_devices (DateRange, GetDevicesReport, DateRangeError) deprecated + "Retrieves reporting data about a team's linked devices. + Deprecated: Will be removed on July 1st 2021." + + attrs + auth = "team" + scope = "team_info.read" + diff --git a/team_reports_apiv2_team_lifecycle_team_reports.stone b/team_reports_apiv2_team_lifecycle_team_reports.stone new file mode 100644 index 0000000..7526fd1 --- /dev/null +++ b/team_reports_apiv2_team_lifecycle_team_reports.stone @@ -0,0 +1,10 @@ +namespace team + +route reports/get_membership (DateRange, GetMembershipReport, DateRangeError) deprecated + "Retrieves reporting data about a team's membership. + Deprecated: Will be removed on July 1st 2021." + + attrs + auth = "team" + scope = "team_info.read" + diff --git a/team_reports.stone b/team_reports_apiv2_team_reports_types.stone similarity index 85% rename from team_reports.stone rename to team_reports_apiv2_team_reports_types.stone index 6a7ba6f..59f1c3a 100644 --- a/team_reports.stone +++ b/team_reports_apiv2_team_reports_types.stone @@ -15,18 +15,17 @@ union TeamReportFailureReason example default many_reports_at_once = null +union DateRangeError + "Errors that can originate from problems in input arguments to reports." struct DateRange "Input arguments that can be provided for most reports." start_date common.Date? "Optional starting date (inclusive). If start_date is None or too long ago, this field will - be set to 6 months ago." + be set to 6 months ago." end_date common.Date? "Optional ending date (exclusive)." -union DateRangeError - "Errors that can originate from problems in input arguments to reports." - struct StorageBucket "Describes the number of users in a specific storage bucket." bucket String @@ -39,21 +38,15 @@ struct StorageBucket bucket = "1G" users = 21 - struct BaseDfbReport "Base report structure." start_date String "First date present in the results as 'YYYY-MM-DD' or None." -# -# get_storage -# - struct GetStorageReport extends BaseDfbReport "Storage Report Result. Each of the items in the storage report is an array of values, one value per day. If there is no data for a day, then the value will be None." - total_usage NumberPerDay "Sum of the shared, unshared, and datastore usages, for each day." shared_usage NumberPerDay @@ -70,22 +63,10 @@ struct GetStorageReport extends BaseDfbReport number of users in that bucket. There is one such summary per day. If there is no data for a day, the storage summary will be empty." -route reports/get_storage(DateRange, GetStorageReport, DateRangeError) deprecated - "Retrieves reporting data about a team's storage usage. - Deprecated: Will be removed on July 1st 2021." - attrs - auth = "team" - scope = "team_info.read" - -# -# get_activity -# - struct GetActivityReport extends BaseDfbReport "Activity Report Result. Each of the items in the storage report is an array of values, one value per day. If there is no data for a day, then the value will be None." - adds NumberPerDay "Array of total number of adds by team members." edits NumberPerDay @@ -116,22 +97,10 @@ struct GetActivityReport extends BaseDfbReport shared_links_viewed_total NumberPerDay "Array of the total number of views to shared links created by the team." -route reports/get_activity(DateRange, GetActivityReport, DateRangeError) deprecated - "Retrieves reporting data about a team's user activity. - Deprecated: Will be removed on July 1st 2021." - attrs - auth = "team" - scope = "team_info.read" - -# -# get_membership -# - struct GetMembershipReport extends BaseDfbReport "Membership Report Result. Each of the items in the storage report is an array of values, one value per day. If there is no data for a day, then the value will be None." - team_size NumberPerDay "Team size, for each day." pending_invites NumberPerDay @@ -143,26 +112,10 @@ struct GetMembershipReport extends BaseDfbReport licenses NumberPerDay "The total number of licenses the team has, for each day." - - -route reports/get_membership(DateRange, GetMembershipReport, DateRangeError) deprecated - "Retrieves reporting data about a team's membership. - Deprecated: Will be removed on July 1st 2021." - attrs - auth = "team" - scope = "team_info.read" - -# -# get_devices -# - - struct DevicesActive "Each of the items is an array of values, one value per day. The value is the number of devices active within a time window, ending with that day. - If there is no data for a day, then the value will be None." - windows NumberPerDay "Array of number of linked windows (desktop) clients with activity." macos NumberPerDay @@ -175,7 +128,7 @@ struct DevicesActive "Array of number of linked android devices with activity." other NumberPerDay "Array of number of other linked devices (blackberry, windows phone, etc) - with activity." + with activity." total NumberPerDay "Array of total number of linked clients with activity." @@ -184,7 +137,6 @@ struct GetDevicesReport extends BaseDfbReport Each of the items in each subsection of the storage report is an array of values, one value per day. If there is no data for a day, then the value will be None." - active_1_day DevicesActive "Report of the number of devices active in the last day." active_7_day DevicesActive @@ -192,11 +144,3 @@ struct GetDevicesReport extends BaseDfbReport active_28_day DevicesActive "Report of the number of devices active in the last 28 days." - -route reports/get_devices(DateRange, GetDevicesReport, DateRangeError) deprecated - "Retrieves reporting data about a team's linked devices. - Deprecated: Will be removed on July 1st 2021." - - attrs - auth = "team" - scope = "team_info.read" diff --git a/team_team_common.stone b/team_team_common.stone new file mode 100644 index 0000000..f66e255 --- /dev/null +++ b/team_team_common.stone @@ -0,0 +1,110 @@ +namespace team + +import common +import secondary_emails +import team_common +import users +import users_common + +union_closed TeamMembershipType + full + "User uses a license and has full access to team resources like the shared quota." + limited + "User does not have access to the shared quota and team admins have restricted administrative control." + +struct RemovedStatus + is_recoverable Boolean + "True if the removed team member is recoverable." + is_disconnected Boolean + "True if the team member's account was converted to individual account." + + example default + is_recoverable = false + is_disconnected = false + +union_closed TeamMemberStatus + "The user's status as a member of a specific team." + active + "User has successfully joined the team." + invited + "User has been invited to a team, but has not joined the team yet." + suspended + "User is no longer a member of the team, but the account can be un-suspended, + re-establishing the user as a team member." + removed RemovedStatus + "User is no longer a member of the team. + Removed users are only listed when include_removed is true in members/list." + +struct MemberProfile + "Basic member profile." + team_member_id team_common.TeamMemberId + "ID of user as a member of a team." + external_id String? + "External ID that a team can attach to the user. + An application using the API may find it easier to use their + own IDs instead of Dropbox IDs like account_id or team_member_id." + account_id users_common.AccountId? + "A user's account identifier." + email String + "Email address of user." + email_verified Boolean + "Is true if the user's email is verified to be owned by the user." + secondary_emails List(secondary_emails.SecondaryEmail)? + "Secondary emails of a user." + status TeamMemberStatus + "The user's status as a member of a specific team." + name users.Name + "Representations for a person's name." + membership_type TeamMembershipType + "The user's membership type: full (normal team member) vs limited (does not use a license; no access to the team's shared quota)." + invited_on common.DropboxTimestamp? + "The date and time the user was invited to the team (contains value only when the member's status matches :field:`TeamMemberStatus.invited`)." + joined_on common.DropboxTimestamp? + "The date and time the user joined as a member of a specific team." + suspended_on common.DropboxTimestamp? + "The date and time the user was suspended from the team (contains value only when the member's status matches :field:`TeamMemberStatus.suspended`)." + persistent_id String? + "Persistent ID that a team can attach to the user. + The persistent ID is unique ID to be used for SAML authentication." + is_directory_restricted Boolean? + "Whether the user is a directory restricted user." + profile_photo_url String? + "URL for the photo representing the user, if one is set." + + example default + team_member_id = "dbmid:1234567" + account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" + email = "mary@lamb.com" + email_verified = true + secondary_emails = [default, second_sec_email, third_sec_email] + status = active + name = default + membership_type = full + joined_on = "2015-05-12T15:50:38Z" + profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128" + +struct TeamMemberProfile extends MemberProfile + "Profile of a user as a member of a team." + groups List(team_common.GroupId) + "List of group IDs of groups that the user belongs to." + member_folder_id common.NamespaceId + "The namespace id of the user's member folder." + root_folder_id common.NamespaceId + "The namespace id of the user's root folder." + + example default + team_member_id = "dbmid:FDFSVF-DFSDF" + account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" + external_id = "244423" + email = "tami@seagull.com" + email_verified = false + secondary_emails = [third_sec_email, default] + status = active + name = default + groups = ["g:e2db7665347abcd600000000001a2b3c"] + membership_type = full + joined_on = "2015-05-12T15:50:38Z" + member_folder_id = "20" + root_folder_id = "30" + profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128" + diff --git a/team_devices.stone b/team_team_devices.stone similarity index 88% rename from team_devices.stone rename to team_team_devices.stone index efb0706..88fc9eb 100644 --- a/team_devices.stone +++ b/team_team_devices.stone @@ -2,9 +2,78 @@ namespace team import common -# -# Structs for devices/list_member_devices -# +union DesktopPlatform + windows + "Official Windows Dropbox desktop client." + mac + "Official Mac Dropbox desktop client." + linux + "Official Linux Dropbox desktop client." + +union MobileClientPlatform + iphone + "Official Dropbox iPhone client." + ipad + "Official Dropbox iPad client." + android + "Official Dropbox Android client." + windows_phone + "Official Dropbox Windows phone client." + blackberry + "Official Dropbox Blackberry client." + +union ListMemberDevicesError + member_not_found + "Member not found." + +union ListMembersDevicesError + reset + "Indicates that the cursor has been invalidated. Call + :route:`devices/list_members_devices` again with an empty cursor to obtain a new cursor." + +union_closed RevokeDeviceSessionArg + web_session DeviceSessionArg + "End an active session." + desktop_client RevokeDesktopClientArg + "Unlink a linked desktop device." + mobile_client DeviceSessionArg + "Unlink a linked mobile device." + + example default + web_session = default + +union RevokeDeviceSessionError + device_session_not_found + "Device session not found." + member_not_found + "Member not found." + +union RevokeDeviceSessionBatchError + "" + +union ListTeamDevicesError + reset + "Indicates that the cursor has been invalidated. Call + :route:`devices/list_team_devices` again with an empty cursor to obtain a new cursor." + +struct DeviceSessionArg + session_id String + "The session id." + team_member_id String + "The unique id of the member owning the device." + + example default + session_id = "1234faaf0678bcde" + team_member_id = "dbmid:AAHhy7WsR0x-u4ZCqiDl5Fz5zvuL3kmspwU" + +struct RevokeDesktopClientArg extends DeviceSessionArg + delete_on_unlink Boolean = false + "Whether to delete all files of the account (this is possible only if supported by + the desktop client and will be made the next time the client access the account)." + + example default + session_id = "1234faaf0678bcde" + team_member_id = "dbmid:AAHhy7WsR0x-u4ZCqiDl5Fz5zvuL3kmspwU" struct ListMemberDevicesArg team_member_id String @@ -17,39 +86,28 @@ struct ListMemberDevicesArg "Whether to list linked mobile devices of the team's member." example default - team_member_id="dbmid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" + team_member_id = "dbmid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" struct DeviceSession session_id String "The session id." - ip_address String? "The IP address of the last activity from this session." - country String? "The country from which the last activity from this session was made." - created common.DropboxTimestamp? "The time this session was created." - updated common.DropboxTimestamp? "The time of the last activity from this session." -# TODO(gal) - for mobile, camera uploads don't count for updated activity (See T25556 -# for more context). This needs to be documented somewhere. - struct ActiveWebSession extends DeviceSession "Information on active web sessions." - user_agent String "Information on the hosting device." - os String "Information on the hosting operating system." - browser String "Information on the browser used for this web session." - expires common.DropboxTimestamp? "The time this session expires." @@ -64,34 +122,21 @@ struct ActiveWebSession extends DeviceSession browser = "Chrome" expires = "2015-05-13T15:51:22Z" -union DesktopPlatform - windows - "Official Windows Dropbox desktop client." - mac - "Official Mac Dropbox desktop client." - linux - "Official Linux Dropbox desktop client." - struct DesktopClientSession extends DeviceSession "Information about linked Dropbox desktop client sessions." - host_name String "Name of the hosting desktop." - client_type DesktopPlatform "The Dropbox desktop client type." - client_version String "The Dropbox client version." - platform String "Information on the hosting platform." - is_delete_on_unlink_supported Boolean "Whether it's possible to delete all of the account files upon unlinking." example default - session_id= "dbdsid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" + session_id = "dbdsid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" ip_address = "3.3.3.3" country = "United States" created = "2015-05-12T15:50:38Z" @@ -102,33 +147,16 @@ struct DesktopClientSession extends DeviceSession platform = "Mac OS X 10.10.3" is_delete_on_unlink_supported = true -union MobileClientPlatform - iphone - "Official Dropbox iPhone client." - ipad - "Official Dropbox iPad client." - android - "Official Dropbox Android client." - windows_phone - "Official Dropbox Windows phone client." - blackberry - "Official Dropbox Blackberry client." - struct MobileClientSession extends DeviceSession "Information about linked Dropbox mobile client sessions." - device_name String "The device name." - client_type MobileClientPlatform "The mobile application type." - client_version String? "The dropbox client version." - os_version String? "The hosting OS version." - last_carrier String? "last carrier used by the device." @@ -152,25 +180,6 @@ struct ListMemberDevicesResult mobile_client_sessions List(MobileClientSession)? "List of mobile client used by this team member." -union ListMemberDevicesError - member_not_found - "Member not found." - -# -# Route: devices/list_member_devices -# - -route devices/list_member_devices(ListMemberDevicesArg, ListMemberDevicesResult, ListMemberDevicesError) - "List all device sessions of a team's member." - - attrs - auth = "team" - scope = "sessions.list" - -# -# Structs for devices/list_members_devices -# - struct ListMembersDevicesArg cursor String? "At the first call to the :route:`devices/list_members_devices` the cursor shouldn't be passed. @@ -185,7 +194,6 @@ struct ListMembersDevicesArg struct MemberDevices "Information on devices of a team's member." - team_member_id String "The member unique Id." web_sessions List(ActiveWebSession)? @@ -208,78 +216,6 @@ struct ListMembersDevicesResult "Pass the cursor into :route:`devices/list_members_devices` to receive the next sub list of team's devices." -union ListMembersDevicesError - reset - "Indicates that the cursor has been invalidated. Call - :route:`devices/list_members_devices` again with an empty cursor to obtain a new cursor." - -# -# Route: devices/list_members_devices -# -route devices/list_members_devices(ListMembersDevicesArg, ListMembersDevicesResult, ListMembersDevicesError) - "List all device sessions of a team. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "sessions.list" - -# -# Structs for devices/revoke_device_session -# - -struct DeviceSessionArg - session_id String - "The session id." - team_member_id String - "The unique id of the member owning the device." - - example default - session_id = "1234faaf0678bcde" - team_member_id = "dbmid:AAHhy7WsR0x-u4ZCqiDl5Fz5zvuL3kmspwU" - -struct RevokeDesktopClientArg extends DeviceSessionArg - delete_on_unlink Boolean = false - "Whether to delete all files of the account (this is possible only if supported by - the desktop client and will be made the next time the client access the account)." - - example default - session_id = "1234faaf0678bcde" - team_member_id = "dbmid:AAHhy7WsR0x-u4ZCqiDl5Fz5zvuL3kmspwU" - -union_closed RevokeDeviceSessionArg - web_session DeviceSessionArg - "End an active session." - desktop_client RevokeDesktopClientArg - "Unlink a linked desktop device." - mobile_client DeviceSessionArg - "Unlink a linked mobile device." - - example default - web_session = default - -union RevokeDeviceSessionError - device_session_not_found - "Device session not found." - member_not_found - "Member not found." - -# -# Route: devices/revoke_device_session -# - -route devices/revoke_device_session(RevokeDeviceSessionArg, Void, RevokeDeviceSessionError) - "Revoke a device session of a team's member." - - attrs - auth = "team" - scope = "sessions.modify" - -# -# structs for devices/revoke_device_session_batch -# - struct RevokeDeviceSessionBatchArg revoke_devices List(RevokeDeviceSessionArg) @@ -287,7 +223,6 @@ struct RevokeDeviceSessionBatchArg revoke_devices = [default] struct RevokeDeviceSessionStatus - success Boolean "Result of the revoking request." error_type RevokeDeviceSessionError? @@ -296,25 +231,6 @@ struct RevokeDeviceSessionStatus struct RevokeDeviceSessionBatchResult revoke_devices_status List(RevokeDeviceSessionStatus) -union RevokeDeviceSessionBatchError - "" - -# -# Route: devices/revoke_device_session_batch -# - -route devices/revoke_device_session_batch(RevokeDeviceSessionBatchArg, RevokeDeviceSessionBatchResult, RevokeDeviceSessionBatchError) - "Revoke a list of device sessions of team members." - - attrs - auth = "team" - scope = "sessions.modify" - - -# -# Deprecated endpoints -# - struct ListTeamDevicesArg cursor String? "At the first call to the :route:`devices/list_team_devices` the cursor shouldn't be passed. @@ -344,16 +260,40 @@ struct ListTeamDevicesResult devices = [default] has_more = false -union ListTeamDevicesError - reset - "Indicates that the cursor has been invalidated. Call - :route:`devices/list_team_devices` again with an empty cursor to obtain a new cursor." +route devices/list_member_devices (ListMemberDevicesArg, ListMemberDevicesResult, ListMemberDevicesError) + "List all device sessions of a team's member." + + attrs + auth = "team" + scope = "sessions.list" -route devices/list_team_devices(ListTeamDevicesArg, ListTeamDevicesResult, ListTeamDevicesError) deprecated by devices/list_members_devices +route devices/list_members_devices (ListMembersDevicesArg, ListMembersDevicesResult, ListMembersDevicesError) "List all device sessions of a team. + Permission : Team member file access." + attrs + auth = "team" + scope = "sessions.list" + +route devices/revoke_device_session (RevokeDeviceSessionArg, Void, RevokeDeviceSessionError) + "Revoke a device session of a team's member." + + attrs + auth = "team" + scope = "sessions.modify" + +route devices/revoke_device_session_batch (RevokeDeviceSessionBatchArg, RevokeDeviceSessionBatchResult, RevokeDeviceSessionBatchError) + "Revoke a list of device sessions of team members." + + attrs + auth = "team" + scope = "sessions.modify" + +route devices/list_team_devices (ListTeamDevicesArg, ListTeamDevicesResult, ListTeamDevicesError) deprecated + "List all device sessions of a team. Permission : Team member file access." attrs auth = "team" scope = "sessions.list" + diff --git a/team_folders.stone b/team_team_folders.stone similarity index 78% rename from team_folders.stone rename to team_team_folders.stone index 5ba9418..967a6d1 100644 --- a/team_folders.stone +++ b/team_team_folders.stone @@ -4,15 +4,15 @@ import async import common import files -# Common structs - union TeamFolderStatus active "The team folder and sub-folders are available to all members." archived - "The team folder is not accessible outside of the team folder manager." + "The team folder is archived and is not accessible outside of the team folder manager." archive_in_progress - "The team folder is not accessible outside of the team folder manager." + "The team folder is in the process of being archived and is not accessible outside of the team folder manager." + inactive + "The team folder is unmounted and can be restored." struct TeamFolderIdArg team_folder_id common.SharedFolderId @@ -30,24 +30,20 @@ struct TeamFolderIdListArg struct TeamFolderMetadata "Properties of a team folder." - team_folder_id common.SharedFolderId "The ID of the team folder." - name String "The name of the team folder." - status TeamFolderStatus "The status of the team folder." - is_team_shared_dropbox Boolean "True if this team folder is a shared team root." - sync_setting files.SyncSetting "The sync setting applied to this team folder." - content_sync_settings List(files.ContentSyncSetting) "Sync settings applied to contents of this team folder." + quota_limit Int64 = 0 + "The quota limit in bytes for this team folder namespace tree." example default name = "Marketing" @@ -56,6 +52,7 @@ struct TeamFolderMetadata is_team_shared_dropbox = false sync_setting = default content_sync_settings = [default] + quota_limit = 123456789 union TeamFolderAccessError invalid_team_folder_id @@ -81,24 +78,9 @@ union BaseTeamFolderError status_error TeamFolderInvalidStatusError team_shared_dropbox_error TeamFolderTeamSharedDropboxError -# -# Team folder create -# - -route team_folder/create(TeamFolderCreateArg, TeamFolderMetadata, TeamFolderCreateError) - "Creates a new, active, team folder with no members. This endpoint can only be used for teams - that do not already have a shared team space. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.content.write" - struct TeamFolderCreateArg name String "Name for the new team folder." - sync_setting files.SyncSettingArg? "The sync setting to apply to this team folder. Only permitted if the team has team selective sync enabled." @@ -116,19 +98,6 @@ union TeamFolderCreateError sync_settings_error files.SyncSettingsError "An error occurred setting the sync settings." -# -# Team folder rename -# - -route team_folder/rename(TeamFolderRenameArg, TeamFolderMetadata, TeamFolderRenameError) - "Changes an active team folder's name. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.content.write" - struct TeamFolderRenameArg extends TeamFolderIdArg name String "New team folder name." @@ -145,20 +114,8 @@ union TeamFolderRenameError extends BaseTeamFolderError folder_name_reserved "The provided name cannot be used because it is reserved." -# -# Team folder list -# - -route team_folder/list(TeamFolderListArg, TeamFolderListResult, TeamFolderListError) - "Lists all team folders. - - Permission : Team member file access." - attrs - auth = "team" - scope = "team_data.content.read" - struct TeamFolderListArg - limit UInt32(min_value=1, max_value=1000) = 1000 + limit UInt32(max_value=1000, min_value=1) = 1000 "The maximum number of results to return per request." example default @@ -166,7 +123,6 @@ struct TeamFolderListArg struct TeamFolderListResult "Result for :route:`team_folder/list` and :route:`team_folder/list/continue`." - team_folders List(TeamFolderMetadata) "List of all team folders in the authenticated team." cursor String @@ -183,20 +139,6 @@ struct TeamFolderListResult struct TeamFolderListError access_error TeamFolderAccessError -# -# Team folder list/continue -# - -route team_folder/list/continue(TeamFolderListContinueArg, TeamFolderListResult, TeamFolderListContinueError) - "Once a cursor has been retrieved from :route:`team_folder/list`, use this to paginate - through all team folders. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.content.read" - struct TeamFolderListContinueArg cursor String "Indicates from what point to get the next set of team folders." @@ -208,55 +150,18 @@ union TeamFolderListContinueError invalid_cursor "The cursor is invalid." -# -# Team folder get info -# - -route team_folder/get_info(TeamFolderIdListArg, List(TeamFolderGetInfoItem), Void) - "Retrieves metadata for team folders. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.content.read" - union_closed TeamFolderGetInfoItem - id_not_found String + id_not_found String = "" "An ID that was provided as a parameter to :route:`team_folder/get_info` did not match any of the team's team folders." team_folder_metadata TeamFolderMetadata "Properties of a team folder." -# -# Team folder activate -# - -route team_folder/activate(TeamFolderIdArg, TeamFolderMetadata, TeamFolderActivateError) - "Sets an archived team folder's status to active. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.content.write" - union TeamFolderActivateError extends BaseTeamFolderError "" -# -# Team folder archive -# - -route team_folder/archive(TeamFolderArchiveArg, TeamFolderArchiveLaunch, TeamFolderArchiveError) - "Sets an active team folder's status to archived and removes all folder and file members. - This endpoint cannot be used for teams that have a shared team space. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.content.write" +union TeamFolderRestoreError extends BaseTeamFolderError + "" struct TeamFolderArchiveArg extends TeamFolderIdArg force_async_off Boolean = false @@ -271,22 +176,13 @@ union_closed TeamFolderArchiveLaunch extends async.LaunchResultBase example default complete = default - + example async_job_id async_job_id = "34g93hh34h04y384084" union TeamFolderArchiveError extends BaseTeamFolderError "" -route team_folder/archive/check(async.PollArg, TeamFolderArchiveJobStatus, async.PollError) - "Returns the status of an asynchronous job for archiving a team folder. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.content.write" - union_closed TeamFolderArchiveJobStatus extends async.PollResultBase complete TeamFolderMetadata "The archive job has finished. The value is the metadata for the resulting team folder." @@ -296,31 +192,12 @@ union_closed TeamFolderArchiveJobStatus extends async.PollResultBase example default complete = default -# -# Team folder permanently delete -# - -route team_folder/permanently_delete(TeamFolderIdArg, Void, TeamFolderPermanentlyDeleteError) - "Permanently deletes an archived team folder. This endpoint cannot be used for teams - that have a shared team space. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.content.write" - union TeamFolderPermanentlyDeleteError extends BaseTeamFolderError "" -# -# Team folder update_sync_settings -# - struct TeamFolderUpdateSyncSettingsArg extends TeamFolderIdArg sync_setting files.SyncSettingArg? "Sync setting to apply to the team folder itself. Only meaningful if the team folder is not a shared team root." - content_sync_settings List(files.ContentSyncSettingArg)? "Sync settings to apply to contents of this team folder." @@ -333,9 +210,101 @@ union TeamFolderUpdateSyncSettingsError extends BaseTeamFolderError sync_settings_error files.SyncSettingsError "An error occurred setting the sync settings." -route team_folder/update_sync_settings(TeamFolderUpdateSyncSettingsArg, TeamFolderMetadata, TeamFolderUpdateSyncSettingsError) +route team_folder/create (TeamFolderCreateArg, TeamFolderMetadata, TeamFolderCreateError) + "Creates a new, active, team folder with no members. This endpoint can only be used for teams + that do not already have a shared team space. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.write" + +route team_folder/rename (TeamFolderRenameArg, TeamFolderMetadata, TeamFolderRenameError) + "Changes an active team folder's name. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.write" + +route team_folder/list (TeamFolderListArg, TeamFolderListResult, TeamFolderListError) + "Lists all team folders. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.read" + +route team_folder/list/continue (TeamFolderListContinueArg, TeamFolderListResult, TeamFolderListContinueError) + "Once a cursor has been retrieved from :route:`team_folder/list`, use this to paginate + through all team folders. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.read" + +route team_folder/get_info (TeamFolderIdListArg, List(TeamFolderGetInfoItem), Void) + "Retrieves metadata for team folders. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.read" + +route team_folder/activate (TeamFolderIdArg, TeamFolderMetadata, TeamFolderActivateError) + "Sets an archived team folder's status to active. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.write" + +route team_folder/restore (TeamFolderIdArg, TeamFolderMetadata, TeamFolderRestoreError) + "Sets an inactive team folder's status to active. + Permission: Team member file access." + + attrs + auth = "team" + is_preview = true + scope = "team_data.content.write" + +route team_folder/archive (TeamFolderArchiveArg, TeamFolderArchiveLaunch, TeamFolderArchiveError) + "Sets an active team folder's status to archived and removes all folder and file members. + This endpoint cannot be used for teams that have a shared team space. This route will + either finish synchronously, or return a job ID and do the async archive job in + background. Please use team_folder/archive/check to check the job status. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.write" + +route team_folder/archive/check (async.PollArg, TeamFolderArchiveJobStatus, async.PollError) + "Returns the status of an asynchronous job for archiving a team folder. + The job may show '.tag' as complete, but the team folder could still be in the process of archiving (indicated by + :field:`TeamFolderMetadata.status` with 'archive_in_progress'). + To confirm that the team folder is fully archived, check the field :field:`TeamFolderMetadata.status` in the response + for the value 'archived'. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.write" + +route team_folder/permanently_delete (TeamFolderIdArg, Void, TeamFolderPermanentlyDeleteError) + "Permanently deletes an archived team folder. This endpoint cannot be used for teams + that have a shared team space. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.content.write" + +route team_folder/update_sync_settings (TeamFolderUpdateSyncSettingsArg, TeamFolderMetadata, TeamFolderUpdateSyncSettingsError) "Updates the sync settings on a team folder or its contents. Use of this endpoint requires that the team has team selective sync enabled." attrs auth = "team" scope = "team_data.content.write" + diff --git a/team_legal_holds.stone b/team_team_legal_holds.stone similarity index 90% rename from team_legal_holds.stone rename to team_team_legal_holds.stone index c673a98..1fff4e6 100644 --- a/team_legal_holds.stone +++ b/team_team_legal_holds.stone @@ -1,14 +1,25 @@ namespace team import common -import team_common import files +import team_common alias LegalHoldId = String(pattern="^pid_dbhid:.+") + alias LegalHoldPolicyName = String(max_length=140) + alias LegalHoldPolicyDescription = String(max_length=501) + alias Path = String(pattern="(/(.|[\\r\\n])*)?") +alias LegalHoldsPolicyCreateResult = LegalHoldPolicy + +alias LegalHoldsGetPolicyResult = LegalHoldPolicy + +alias ListHeldRevisionCursor = String(min_length=1) + +alias LegalHoldsPolicyUpdateResult = LegalHoldPolicy + union LegalHoldStatus active "The legal hold policy is active." @@ -23,6 +34,81 @@ union LegalHoldStatus releasing "The legal hold policy is releasing." +union LegalHoldsError + unknown_legal_hold_error + "There has been an unknown legal hold error." + insufficient_permissions + "You don't have permissions to perform this action." + +union LegalHoldsPolicyCreateError extends LegalHoldsError + start_date_is_later_than_end_date + "Start date must be earlier than end date." + empty_members_list + "The users list must have at least one user." + invalid_members + "Some members in the members list are not valid to be placed under legal hold." + number_of_users_on_hold_is_greater_than_hold_limitation + "You cannot add more than 5 users in a legal hold." + transient_error + "Temporary infrastructure failure, please retry." + name_must_be_unique + "The name provided is already in use by another legal hold." + team_exceeded_legal_hold_quota + "Team exceeded legal hold quota." + invalid_date + "The provided date is invalid." + +union LegalHoldsGetPolicyError extends LegalHoldsError + legal_hold_policy_not_found + "Legal hold policy does not exist for :field:`LegalHoldsGetPolicyArg.id`." + +union LegalHoldsListPoliciesError extends LegalHoldsError + transient_error + "Temporary infrastructure failure, please retry." + +union LegalHoldsListHeldRevisionsError extends LegalHoldsError + transient_error + "Temporary infrastructure failure, please retry." + legal_hold_still_empty + "The legal hold is not holding any revisions yet." + inactive_legal_hold + "Trying to list revisions for an inactive legal hold." + +union LegalHoldsListHeldRevisionsContinueError + unknown_legal_hold_error + "There has been an unknown legal hold error." + transient_error + "Temporary infrastructure failure, please retry." + reset + "Indicates that the cursor has been invalidated. Call + :route:`legal_holds/list_held_revisions_continue` again with an empty cursor to obtain a new cursor." + +union LegalHoldsPolicyUpdateError extends LegalHoldsError + transient_error + "Temporary infrastructure failure, please retry." + inactive_legal_hold + "Trying to release an inactive legal hold." + legal_hold_performing_another_operation + "Legal hold is currently performing another operation." + invalid_members + "Some members in the members list are not valid to be placed under legal hold." + number_of_users_on_hold_is_greater_than_hold_limitation + "You cannot add more than 5 users in a legal hold." + empty_members_list + "The users list must have at least one user." + name_must_be_unique + "The name provided is already in use by another legal hold." + legal_hold_policy_not_found + "Legal hold policy does not exist for :field:`LegalHoldsPolicyUpdateArg.id`." + +union LegalHoldsPolicyReleaseError extends LegalHoldsError + legal_hold_performing_another_operation + "Legal hold is currently performing another operation." + legal_hold_already_releasing + "Legal hold is currently performing a release or is already released." + legal_hold_policy_not_found + "Legal hold policy does not exist for :field:`LegalHoldsPolicyReleaseArg.id`." + struct MembersInfo team_member_ids List(team_common.TeamMemberId) "Team member IDs of the users under this hold." @@ -33,12 +119,6 @@ struct MembersInfo team_member_ids = ["dbmid:efgh5678"] permanently_deleted_users = 2 -union LegalHoldsError - unknown_legal_hold_error - "There has been an unknown legal hold error." - insufficient_permissions - "You don't have permissions to perform this action." - struct LegalHoldPolicy id LegalHoldId "The legal hold id." @@ -66,10 +146,6 @@ struct LegalHoldPolicy start_date = "2016-01-01T00:00:00Z" end_date = "2017-12-31T00:00:00Z" -# -# route legal_holds/create_policy -# - struct LegalHoldsPolicyCreateArg name LegalHoldPolicyName "Policy name." @@ -88,66 +164,13 @@ struct LegalHoldsPolicyCreateArg start_date = "2016-01-01T00:00:00Z" end_date = "2017-12-31T00:00:00Z" -union LegalHoldsPolicyCreateError extends LegalHoldsError - start_date_is_later_than_end_date - "Start date must be earlier than end date." - empty_members_list - "The users list must have at least one user." - invalid_members - "Some members in the members list are not valid to be placed under legal hold." - number_of_users_on_hold_is_greater_than_hold_limitation - "You cannot add more than 5 users in a legal hold." - transient_error - "Temporary infrastructure failure, please retry." - name_must_be_unique - "The name provided is already in use by another legal hold." - team_exceeded_legal_hold_quota - "Team exceeded legal hold quota." - invalid_date - "The provided date is invalid." - -alias LegalHoldsPolicyCreateResult = LegalHoldPolicy - -route legal_holds/create_policy(LegalHoldsPolicyCreateArg, LegalHoldsPolicyCreateResult, LegalHoldsPolicyCreateError) - "Creates new legal hold policy. - Note: Legal Holds is a paid add-on. Not all teams have the feature. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.governance.write" - -# -# route legal_holds/get_policy -# - struct LegalHoldsGetPolicyArg id LegalHoldId "The legal hold Id." + example default id = "pid_dbhid:abcd1234" -alias LegalHoldsGetPolicyResult = LegalHoldPolicy - -union LegalHoldsGetPolicyError extends LegalHoldsError - legal_hold_policy_not_found - "Legal hold policy does not exist for :field:`LegalHoldsGetPolicyArg.id`." - -route legal_holds/get_policy(LegalHoldsGetPolicyArg, LegalHoldsGetPolicyResult, LegalHoldsGetPolicyError) - "Gets a legal hold by Id. - Note: Legal Holds is a paid add-on. Not all teams have the feature. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.governance.write" - - -# -# route legal_holds/list_policies -# struct LegalHoldsListPoliciesArg include_released Boolean = false "Whether to return holds that were released." @@ -161,39 +184,13 @@ struct LegalHoldsListPoliciesResult example default policies = [default] -union LegalHoldsListPoliciesError extends LegalHoldsError - transient_error - "Temporary infrastructure failure, please retry." - -route legal_holds/list_policies(LegalHoldsListPoliciesArg, LegalHoldsListPoliciesResult, LegalHoldsListPoliciesError) - "Lists legal holds on a team. - Note: Legal Holds is a paid add-on. Not all teams have the feature. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.governance.write" - - -# -# route legal_holds/list_held_revisions -# - struct LegalHoldsListHeldRevisionsArg id LegalHoldId "The legal hold Id." + example default id = "pid_dbhid:abcd1234" -union LegalHoldsListHeldRevisionsError extends LegalHoldsError - transient_error - "Temporary infrastructure failure, please retry." - legal_hold_still_empty - "The legal hold is not holding any revisions yet." - inactive_legal_hold - "Trying to list revisions for an inactive legal hold." - struct LegalHoldHeldRevisionMetadata new_filename String "The held revision filename." @@ -229,14 +226,11 @@ struct LegalHoldHeldRevisionMetadata size = 3 content_hash = "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234" -alias ListHeldRevisionCursor = String(min_length=1) - struct LegalHoldsListHeldRevisionResult entries List(LegalHoldHeldRevisionMetadata) "List of file entries that under the hold." cursor ListHeldRevisionCursor? "The cursor idicates where to continue reading file metadata entries for the next API call. When there are no more entries, the cursor will return none. - Pass the cursor into /2/team/legal_holds/list_held_revisions/continue." has_more Boolean @@ -246,52 +240,15 @@ struct LegalHoldsListHeldRevisionResult entries = [default] has_more = false -route legal_holds/list_held_revisions(LegalHoldsListHeldRevisionsArg, LegalHoldsListHeldRevisionResult, LegalHoldsListHeldRevisionsError) - "List the file metadata that's under the hold. - Note: Legal Holds is a paid add-on. Not all teams have the feature. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.governance.write" - - -# -# route legal_holds/list_held_revisions_continue -# - struct LegalHoldsListHeldRevisionsContinueArg id LegalHoldId "The legal hold Id." cursor ListHeldRevisionCursor? "The cursor idicates where to continue reading file metadata entries for the next API call. When there are no more entries, the cursor will return none." + example default id = "pid_dbhid:abcd1234" -union LegalHoldsListHeldRevisionsContinueError - unknown_legal_hold_error - "There has been an unknown legal hold error." - transient_error - "Temporary infrastructure failure, please retry." - reset - "Indicates that the cursor has been invalidated. Call - :route:`legal_holds/list_held_revisions_continue` again with an empty cursor to obtain a new cursor." - -route legal_holds/list_held_revisions_continue(LegalHoldsListHeldRevisionsContinueArg, LegalHoldsListHeldRevisionResult, LegalHoldsListHeldRevisionsError) - "Continue listing the file metadata that's under the hold. - Note: Legal Holds is a paid add-on. Not all teams have the feature. - - Permission : Team member file access." - - attrs - auth = "team" - scope = "team_data.governance.write" - -# -# route legal_holds/update_policy -# - struct LegalHoldsPolicyUpdateArg id LegalHoldId "The legal hold Id." @@ -301,65 +258,78 @@ struct LegalHoldsPolicyUpdateArg "Policy new description." members List(team_common.TeamMemberId)? "List of team member IDs to apply the policy on." + example default id = "pid_dbhid:abcd1234" members = ["dbmid:FDFSVF-DFSDF"] -union LegalHoldsPolicyUpdateError extends LegalHoldsError - transient_error - "Temporary infrastructure failure, please retry." - inactive_legal_hold - "Trying to release an inactive legal hold." - legal_hold_performing_another_operation - "Legal hold is currently performing another operation." - invalid_members - "Some members in the members list are not valid to be placed under legal hold." - number_of_users_on_hold_is_greater_than_hold_limitation - "You cannot add more than 5 users in a legal hold." - empty_members_list - "The users list must have at least one user." - name_must_be_unique - "The name provided is already in use by another legal hold." - legal_hold_policy_not_found - "Legal hold policy does not exist for :field:`LegalHoldsPolicyUpdateArg.id`." +struct LegalHoldsPolicyReleaseArg + id LegalHoldId + "The legal hold Id." + example default + id = "pid_dbhid:abcd1234" -alias LegalHoldsPolicyUpdateResult = LegalHoldPolicy +route legal_holds/create_policy (LegalHoldsPolicyCreateArg, LegalHoldsPolicyCreateResult, LegalHoldsPolicyCreateError) + "Creates new legal hold policy. + Note: Legal Holds is a paid add-on. Not all teams have the feature. + Permission : Team member file access." -route legal_holds/update_policy(LegalHoldsPolicyUpdateArg, LegalHoldsPolicyUpdateResult, LegalHoldsPolicyUpdateError) - "Updates a legal hold. + attrs + auth = "team" + scope = "team_data.governance.write" + +route legal_holds/get_policy (LegalHoldsGetPolicyArg, LegalHoldsGetPolicyResult, LegalHoldsGetPolicyError) + "Gets a legal hold by Id. + Note: Legal Holds is a paid add-on. Not all teams have the feature. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.governance.write" + +route legal_holds/list_policies (LegalHoldsListPoliciesArg, LegalHoldsListPoliciesResult, LegalHoldsListPoliciesError) + "Lists legal holds on a team. Note: Legal Holds is a paid add-on. Not all teams have the feature. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.governance.write" +route legal_holds/list_held_revisions (LegalHoldsListHeldRevisionsArg, LegalHoldsListHeldRevisionResult, LegalHoldsListHeldRevisionsError) + "List the file metadata that's under the hold. + Note: Legal Holds is a paid add-on. Not all teams have the feature. Permission : Team member file access." attrs auth = "team" scope = "team_data.governance.write" -# -# route legal_holds/release_policy -# +route legal_holds/list_held_revisions_continue (LegalHoldsListHeldRevisionsContinueArg, LegalHoldsListHeldRevisionResult, LegalHoldsListHeldRevisionsError) + "Continue listing the file metadata that's under the hold. + Note: Legal Holds is a paid add-on. Not all teams have the feature. + Permission : Team member file access." -struct LegalHoldsPolicyReleaseArg - id LegalHoldId - "The legal hold Id." - example default - id = "pid_dbhid:abcd1234" + attrs + auth = "team" + scope = "team_data.governance.write" -union LegalHoldsPolicyReleaseError extends LegalHoldsError - legal_hold_performing_another_operation - "Legal hold is currently performing another operation." - legal_hold_already_releasing - "Legal hold is currently performing a release or is already released." - legal_hold_policy_not_found - "Legal hold policy does not exist for :field:`LegalHoldsPolicyReleaseArg.id`." +route legal_holds/update_policy (LegalHoldsPolicyUpdateArg, LegalHoldsPolicyUpdateResult, LegalHoldsPolicyUpdateError) + "Updates a legal hold. + Note: Legal Holds is a paid add-on. Not all teams have the feature. + Permission : Team member file access." + + attrs + auth = "team" + scope = "team_data.governance.write" -route legal_holds/release_policy(LegalHoldsPolicyReleaseArg, Void, LegalHoldsPolicyReleaseError) +route legal_holds/release_policy (LegalHoldsPolicyReleaseArg, Void, LegalHoldsPolicyReleaseError) "Releases a legal hold by Id. Note: Legal Holds is a paid add-on. Not all teams have the feature. - Permission : Team member file access." attrs auth = "team" scope = "team_data.governance.write" + diff --git a/team_team_members.stone b/team_team_members.stone new file mode 100644 index 0000000..a801ea1 --- /dev/null +++ b/team_team_members.stone @@ -0,0 +1,155 @@ +namespace team + +import async + +route members/delete_former_member_files (MembersFormerMemberArg, Void, MembersDeleteFormerMemberFilesError) + "Permanently delete the files of a user who has been removed from the team. After permanent + deletion, those files will not be available to be transferred to another team member. + Permission : Team member management + Exactly one of team_member_id, email, or external_id must be provided to identify the user account." + + attrs + auth = "team" + scope = "members.write" + +route members/get_available_team_member_roles (Void, MembersGetAvailableTeamMemberRolesResult, Void) + "Get available TeamMemberRoles for the connected team. To be used with :route:`members/set_admin_permissions:2`. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.read" + +route members/get_info (MembersGetInfoArgs, MembersGetInfoResult, MembersGetInfoError) + "Returns information about multiple team members. + Permission : Team information + This endpoint will return :field:`MembersGetInfoItem.id_not_found`, + for IDs (or emails) that cannot be matched to a valid team member." + + attrs + auth = "team" + scope = "members.read" + +route members/get_info:2 (MembersGetInfoV2Arg, MembersGetInfoV2Result, MembersGetInfoError) + "Returns information about multiple team members. + Permission : Team information + This endpoint will return :field:`MembersGetInfoItem.id_not_found`, + for IDs (or emails) that cannot be matched to a valid team member." + + attrs + auth = "team" + scope = "members.read" + +route members/list (MembersListArg, MembersListResult, MembersListError) + "Lists members of a team. + Permission : Team information." + + attrs + auth = "team" + scope = "members.read" + +route members/list/continue (MembersListContinueArg, MembersListResult, MembersListContinueError) + "Once a cursor has been retrieved from :route:`members/list`, use this to paginate + through all team members. + Permission : Team information." + + attrs + auth = "team" + scope = "members.read" + +route members/list/continue:2 (MembersListContinueArg, MembersListV2Result, MembersListContinueError) + "Once a cursor has been retrieved from :route:`members/list:2`, use this to paginate + through all team members. + Permission : Team information." + + attrs + auth = "team" + scope = "members.read" + +route members/list:2 (MembersListArg, MembersListV2Result, MembersListError) + "Lists members of a team. + Permission : Team information." + + attrs + auth = "team" + scope = "members.read" + +route members/move_former_member_files (MembersDataTransferArg, async.LaunchEmptyResult, MembersTransferFormerMembersFilesError) + "Moves removed member's files to a different member. This endpoint initiates an asynchronous job. To obtain the final result + of the job, the client should periodically poll :route:`members/move_former_member_files/job_status/check`. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/move_former_member_files/job_status/check (async.PollArg, async.PollEmptyResult, async.PollError) + "Once an async_job_id is returned from :route:`members/move_former_member_files` , + use this to poll the status of the asynchronous request. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/remove (MembersRemoveArg, async.LaunchEmptyResult, MembersRemoveError) + "Removes a member from a team. + Permission : Team member management + Exactly one of team_member_id, email, or external_id must be provided to identify the user account. + Accounts can be recovered via :route:`members/recover` for a 7 day period + or until the account has been permanently deleted or transferred to another account + (whichever comes first). Calling :route:`members/add` while a user is still recoverable + on your team will return with :field:`MemberAddResult.user_already_on_team`. + Accounts can have their files transferred via the admin console for a limited time, based on the version history + length associated with the team (180 days for most teams). + Accounts can have their stacks transferred through the admin console. This only transfers stacks that they have created. + This endpoint may initiate an asynchronous job. To obtain the final result + of the job, the client should periodically poll :route:`members/remove/job_status/get`." + + attrs + auth = "team" + scope = "members.delete" + +route members/remove/job_status/get (async.PollArg, async.PollEmptyResult, async.PollError) + "Once an async_job_id is returned from :route:`members/remove` , + use this to poll the status of the asynchronous request. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.delete" + +route members/set_admin_permissions (MembersSetPermissionsArg, MembersSetPermissionsResult, MembersSetPermissionsError) + "Updates a team member's permissions. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/set_admin_permissions:2 (MembersSetPermissions2Arg, MembersSetPermissions2Result, MembersSetPermissions2Error) + "Updates a team member's permissions. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/suspend (MembersDeactivateArg, Void, MembersSuspendError) + "Suspend a member from a team. + Permission : Team member management + Exactly one of team_member_id, email, or external_id must be provided to identify the user account." + + attrs + auth = "team" + scope = "members.write" + +route members/unsuspend (MembersUnsuspendArg, Void, MembersUnsuspendError) + "Unsuspend a member from a team. + Permission : Team member management + Exactly one of team_member_id, email, or external_id must be provided to identify the user account." + + attrs + auth = "team" + scope = "members.write" + diff --git a/team_team_members_identity.stone b/team_team_members_identity.stone new file mode 100644 index 0000000..5b3f2f8 --- /dev/null +++ b/team_team_members_identity.stone @@ -0,0 +1,50 @@ +namespace team + +route members/delete_profile_photo (MembersDeleteProfilePhotoArg, TeamMemberInfo, MembersDeleteProfilePhotoError) + "Deletes a team member's profile photo. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/delete_profile_photo:2 (MembersDeleteProfilePhotoArg, TeamMemberInfoV2Result, MembersDeleteProfilePhotoError) + "Deletes a team member's profile photo. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/set_profile (MembersSetProfileArg, TeamMemberInfo, MembersSetProfileError) + "Updates a team member's profile. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/set_profile:2 (MembersSetProfileArg, TeamMemberInfoV2Result, MembersSetProfileError) + "Updates a team member's profile. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/set_profile_photo (MembersSetProfilePhotoArg, TeamMemberInfo, MembersSetProfilePhotoError) + "Updates a team member's profile photo. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/set_profile_photo:2 (MembersSetProfilePhotoArg, TeamMemberInfoV2Result, MembersSetProfilePhotoError) + "Updates a team member's profile photo. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + diff --git a/team_team_members_super_admin.stone b/team_team_members_super_admin.stone new file mode 100644 index 0000000..151d34d --- /dev/null +++ b/team_team_members_super_admin.stone @@ -0,0 +1,11 @@ +namespace team + +route members/recover (MembersRecoverArg, Void, MembersRecoverError) + "Recover a deleted member. + Permission : Team member management + Exactly one of team_member_id, email, or external_id must be provided to identify the user account." + + attrs + auth = "team" + scope = "members.delete" + diff --git a/team_team_members_team_bip.stone b/team_team_members_team_bip.stone new file mode 100644 index 0000000..d0097d1 --- /dev/null +++ b/team_team_members_team_bip.stone @@ -0,0 +1,63 @@ +namespace team + +import async + +route members/add (MembersAddArg, MembersAddLaunch, Void) + "Adds members to a team. + Permission : Team member management + A maximum of 20 members can be specified in a single call. + If no Dropbox account exists with the email address specified, a new Dropbox account will + be created with the given email address, and that account will be invited to the team. + If a personal Dropbox account exists with the email address specified in the call, + this call will create a placeholder Dropbox account for the user on the team and send an + email inviting the user to migrate their existing personal account onto the team. + Team member management apps are required to set an initial given_name and surname for a + user to use in the team invitation and for 'Perform as team member' actions taken on + the user before they become 'active'." + + attrs + auth = "team" + scope = "members.write" + +route members/add/job_status/get (async.PollArg, MembersAddJobStatus, async.PollError) + "Once an async_job_id is returned from :route:`members/add` , + use this to poll the status of the asynchronous request. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/add/job_status/get:2 (async.PollArg, MembersAddJobStatusV2Result, async.PollError) + "Once an async_job_id is returned from :route:`members/add:2` , + use this to poll the status of the asynchronous request. + Permission : Team member management." + + attrs + auth = "team" + scope = "members.write" + +route members/add:2 (MembersAddV2Arg, MembersAddLaunchV2Result, Void) + "Adds members to a team. + Permission : Team member management + A maximum of 20 members can be specified in a single call. + If no Dropbox account exists with the email address specified, a new Dropbox account will + be created with the given email address, and that account will be invited to the team. + If a personal Dropbox account exists with the email address specified in the call, + this call will create a placeholder Dropbox account for the user on the team and send an + email inviting the user to migrate their existing personal account onto the team." + + attrs + auth = "team" + scope = "members.write" + +route members/send_welcome_email (UserSelectorArg, Void, MembersSendWelcomeError) + "Sends welcome email to pending team member. + Permission : Team member management + Exactly one of team_member_id, email, or external_id must be provided to identify the user account. + No-op if team member is not pending." + + attrs + auth = "team" + scope = "members.write" + diff --git a/team_members.stone b/team_team_members_types.stone similarity index 65% rename from team_members.stone rename to team_team_members_types.stone index b430761..c74fdfb 100644 --- a/team_members.stone +++ b/team_team_members_types.stone @@ -2,46 +2,15 @@ namespace team import account import async -import users import common import team_common -alias TeamMemberRoleId = String(pattern="pid_dbtmr:.*", max_length=128) - -struct TeamMemberRole - "A role which can be attached to a team member. This replaces AdminTier; each AdminTier corresponds to a new TeamMemberRole with a matching name." - - role_id TeamMemberRoleId - "A string containing encoded role ID. For roles defined by Dropbox, this is the same across all teams." - name String(max_length=32) - "The role display name." - description String(max_length=256) - "Role description. Describes which permissions come with this role." - - example team_member_role_super - role_id = "pid_dbtmr:2345" - name = "Team admin" - description = "User can do most user provisioning, de-provisioning and management." - - example team_member_role_user_management - role_id = "pid_dbtmr:3456" - name = "User management admin" - description = "Add, remove, and manage member accounts." - - example team_member_role_support - role_id = "pid_dbtmr:4567" - name = "Support admin" - description = "Help members with limited tasks, including password reset." - - example team_member_role_billing - role_id = "pid_dbtmr:5678" - name = "Billing admin" - description = "Make payments and renew contracts." +alias MembersGetInfoResult = List(MembersGetInfoItem) +alias TeamMemberRoleId = String(max_length=128, pattern="pid_dbtmr:.*") union_closed AdminTier "Describes which team-related admin permissions a user has." - team_admin "User is an administrator of the team - has all permissions." user_management_admin @@ -54,343 +23,16 @@ union_closed AdminTier example default member_only = null -# -# Common structs -# - -struct TeamMemberProfile extends MemberProfile - "Profile of a user as a member of a team." - - groups List(team_common.GroupId) - "List of group IDs of groups that the user belongs to." - member_folder_id common.NamespaceId - "The namespace id of the user's root folder." - - example default - team_member_id = "dbmid:FDFSVF-DFSDF" - account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" - external_id = "244423" - email = "tami@seagull.com" - email_verified = false - secondary_emails = [third_sec_email, default] - status = active - name = default - groups = ["g:e2db7665347abcd600000000001a2b3c"] - membership_type = full - joined_on = "2015-05-12T15:50:38Z" - member_folder_id = "20" - profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128" - -union_closed MemberSelectorError extends UserSelectorError - user_not_in_team - "The user is not a member of the team." - - -######################## -# Member info routes -######################## - -# -# Route: members/list -# - -struct MembersListArg - limit UInt32(min_value=1, max_value=1000) = 1000 - "Number of results to return per call." - include_removed Boolean = false - "Whether to return removed members." - - example default - limit = 100 - include_removed = false - - -struct TeamMemberInfoV2 - "Information about a team member." - - profile TeamMemberProfile - "Profile of a user as a member of a team." - roles List(TeamMemberRole)? - "The user's roles in the team." - - example default - profile = default - roles = [team_member_role_user_management] - - -struct TeamMemberInfoV2Result - "Information about a team member, after the change, like at :route:`members/set_profile:2`." - - member_info TeamMemberInfoV2 - "Member info, after the change." - - example default - member_info = default - - -struct TeamMemberInfo - "Information about a team member." - - profile TeamMemberProfile - "Profile of a user as a member of a team." - role AdminTier - "The user's role in the team." - - example default - profile = default - role = member_only - -struct MembersListV2Result - members List(TeamMemberInfoV2) - "List of team members." - cursor String - "Pass the cursor into :route:`members/list/continue:2` to obtain the additional members." - has_more Boolean - "Is true if there are additional team members that have not been returned - yet. An additional call to :route:`members/list/continue:2` can retrieve them." - - example default - members = [default] - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - has_more = true - - -struct MembersListResult - members List(TeamMemberInfo) - "List of team members." - cursor String - "Pass the cursor into :route:`members/list/continue` to obtain the additional members." - has_more Boolean - "Is true if there are additional team members that have not been returned - yet. An additional call to :route:`members/list/continue` can retrieve them." - - example default - members = [default] - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - has_more = true - - -union MembersListError - "" - - -route members/list:2(MembersListArg, MembersListV2Result, MembersListError) - "Lists members of a team. - - Permission : Team information." - - attrs - auth = "team" - scope = "members.read" - - - -route members/list(MembersListArg, MembersListResult, MembersListError) - "Lists members of a team. - - Permission : Team information." - - attrs - auth = "team" - scope = "members.read" - - -# -# Route: members/list/continue -# - -struct MembersListContinueArg - cursor String - "Indicates from what point to get the next set of members." - - example default - cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - -union MembersListContinueError - invalid_cursor - "The cursor is invalid." - -route members/list/continue:2(MembersListContinueArg, MembersListV2Result, MembersListContinueError) - "Once a cursor has been retrieved from :route:`members/list:2`, use this to paginate - through all team members. - - Permission : Team information." - - attrs - auth = "team" - scope = "members.read" - -route members/list/continue(MembersListContinueArg, MembersListResult, MembersListContinueError) - "Once a cursor has been retrieved from :route:`members/list`, use this to paginate - through all team members. - - Permission : Team information." - - attrs - auth = "team" - scope = "members.read" - - -# -# Route: members/get_info -# - -struct MembersGetInfoV2Arg - members List(UserSelectorArg) - "List of team members." - - example default - members = [default] - -struct MembersGetInfoArgs - members List(UserSelectorArg) - "List of team members." - - example default - members = [default] - -union_closed MembersGetInfoItemBase - id_not_found String - "An ID that was provided as a parameter to :route:`members/get_info` or :route:`members/get_info:2`, - and did not match a corresponding user. This might be a team_member_id, an - email, or an external ID, depending on how the method was called." - -union MembersGetInfoItemV2 extends MembersGetInfoItemBase - "Describes a result obtained for a single user whose id was specified in the - parameter of :route:`members/get_info:2`." - - member_info TeamMemberInfoV2 - "Info about a team member." - - example default - member_info = default - - -union_closed MembersGetInfoItem extends MembersGetInfoItemBase - "Describes a result obtained for a single user whose id was specified in the - parameter of :route:`members/get_info`." - - member_info TeamMemberInfo - "Info about a team member." - - example default - member_info = default - - -# Information returned by :route:`members/get_info`. -# describing multiple team members." -alias MembersGetInfoResult = List(MembersGetInfoItem) - -struct MembersGetInfoV2Result - members_info List(MembersGetInfoItemV2) - "List of team members info." - - example default - members_info = [default] - - -union MembersGetInfoError - "" - -route members/get_info:2(MembersGetInfoV2Arg, MembersGetInfoV2Result, MembersGetInfoError) - "Returns information about multiple team members. - - Permission : Team information - - This endpoint will return :field:`MembersGetInfoItem.id_not_found`, - for IDs (or emails) that cannot be matched to a valid team member." - - attrs - auth = "team" - scope = "members.read" - - -route members/get_info(MembersGetInfoArgs, MembersGetInfoResult, MembersGetInfoError) - "Returns information about multiple team members. - - Permission : Team information - - This endpoint will return :field:`MembersGetInfoItem.id_not_found`, - for IDs (or emails) that cannot be matched to a valid team member." - - attrs - auth = "team" - scope = "members.read" - - -########################## -# Member management routes -########################## - - -# -# Route members/add -# - -struct MemberAddArgBase - member_email common.EmailAddress - member_given_name common.OptionalNamePart? - "Member's first name." - member_surname common.OptionalNamePart? - "Member's last name." - member_external_id team_common.MemberExternalId? - "External ID for member." - member_persistent_id String? - "Persistent ID for member. This field is only available to teams using persistent ID SAML configuration." - send_welcome_email Boolean = true - "Whether to send a welcome email to the member. - If send_welcome_email is false, no email invitation will be sent to the user. - This may be useful for apps using single sign-on (SSO) flows for onboarding that - want to handle announcements themselves." - is_directory_restricted Boolean? - "Whether a user is directory restricted." - - example default - member_email = "tom.s@company.com" - member_given_name = "Tom" - member_surname = "Silverstone" - member_external_id = "company_id:342432" - -struct MemberAddArg extends MemberAddArgBase - role AdminTier = member_only - - example default - member_email = "tom.s@company.com" - member_given_name = "Tom" - member_surname = "Silverstone" - member_external_id = "company_id:342432" - role = default - -struct MemberAddV2Arg extends MemberAddArgBase - role_ids List(TeamMemberRoleId, max_items=1)? - - example default - member_email = "tom.s@company.com" - member_given_name = "Tom" - member_surname = "Silverstone" - member_external_id = "company_id:342432" - role_ids = ["pid_dbtmr:2345"] - -struct MembersAddArgBase - force_async Boolean = false - "Whether to force the add to happen asynchronously." - - example default - force_async = true - -struct MembersAddV2Arg extends MembersAddArgBase - new_members List(MemberAddV2Arg) - "Details of new members to be added to the team." - - example default - new_members = [default] - -struct MembersAddArg extends MembersAddArgBase - new_members List(MemberAddArg) - "Details of new members to be added to the team." +union_closed MemberAddResult extends MemberAddResultBase + "Describes the result of attempting to add a single user to the team. + 'success' is the only value indicating that a user was indeed added to the team - + the other values explain the type of failure that occurred, and include the email + of the user for which the operation has failed." + success TeamMemberInfo + "Describes a user that was successfully added to the team." example default - new_members = [default] + success = default union_closed MemberAddResultBase team_license_limit common.EmailAddress @@ -419,33 +61,39 @@ union_closed MemberAddResultBase example default team_license_limit = "apple@orange.com" - union MemberAddV2Result extends MemberAddResultBase "Describes the result of attempting to add a single user to the team. 'success' is the only value indicating that a user was indeed added to the team - the other values explain the type of failure that occurred, and include the email of the user for which the operation has failed." - success TeamMemberInfoV2 "Describes a user that was successfully added to the team." example default success = default -union_closed MemberAddResult extends MemberAddResultBase - "Describes the result of attempting to add a single user to the team. - 'success' is the only value indicating that a user was indeed added to the team - - the other values explain the type of failure that occurred, and include the email - of the user for which the operation has failed." +union_closed MemberSelectorError extends UserSelectorError + user_not_in_team + "The user is not a member of the team." - success TeamMemberInfo - "Describes a user that was successfully added to the team." +union_closed MembersAddJobStatus extends async.PollResultBase + complete List(MemberAddResult) + "The asynchronous job has finished. For each member that was specified in the + parameter :type:`MembersAddArg` that was provided to :route:`members/add`, a + corresponding item is returned in this list." + failed String = "" + "The asynchronous job returned an error. The string contains an error message." example default - success = default + complete = [default] -union MembersAddLaunchV2Result extends async.LaunchResultBase +union MembersAddJobStatusV2Result extends async.PollResultBase complete List(MemberAddV2Result) + "The asynchronous job has finished. For each member that was specified in the + parameter :type:`MembersAddArg` that was provided to :route:`members/add:2`, a + corresponding item is returned in this list." + failed String = "" + "The asynchronous job returned an error. The string contains an error message." example default complete = [default] @@ -456,127 +104,126 @@ union_closed MembersAddLaunch extends async.LaunchResultBase example default complete = [default] -route members/add:2(MembersAddV2Arg, MembersAddLaunchV2Result, Void) - "Adds members to a team. - - Permission : Team member management - - A maximum of 20 members can be specified in a single call. - - If no Dropbox account exists with the email address specified, a new Dropbox account will - be created with the given email address, and that account will be invited to the team. - - If a personal Dropbox account exists with the email address specified in the call, - this call will create a placeholder Dropbox account for the user on the team and send an - email inviting the user to migrate their existing personal account onto the team. - - Team member management apps are required to set an initial given_name and surname for a - user to use in the team invitation and for 'Perform as team member' actions taken on - the user before they become 'active'." - - attrs - auth = "team" - scope = "members.write" - -route members/add(MembersAddArg, MembersAddLaunch, Void) - "Adds members to a team. - - Permission : Team member management - - A maximum of 20 members can be specified in a single call. - - If no Dropbox account exists with the email address specified, a new Dropbox account will - be created with the given email address, and that account will be invited to the team. - - If a personal Dropbox account exists with the email address specified in the call, - this call will create a placeholder Dropbox account for the user on the team and send an - email inviting the user to migrate their existing personal account onto the team. +union MembersAddLaunchV2Result extends async.LaunchResultBase + complete List(MemberAddV2Result) - Team member management apps are required to set an initial given_name and surname for a - user to use in the team invitation and for 'Perform as team member' actions taken on - the user before they become 'active'." + example default + complete = [default] - attrs - auth = "team" - scope = "members.write" +union MembersDeactivateError extends UserSelectorError + user_not_in_team + "The user is not a member of the team." -# -# Route members/add/job_status/get -# +union MembersDeleteFormerMemberFilesError extends MembersPermanentlyDeleteFilesError + user_not_removed + "User has not been removed from the team." -union MembersAddJobStatusV2Result extends async.PollResultBase - complete List(MemberAddV2Result) - "The asynchronous job has finished. For each member that was specified in the - parameter :type:`MembersAddArg` that was provided to :route:`members/add:2`, a - corresponding item is returned in this list." - failed String - "The asynchronous job returned an error. The string contains an error message." +union MembersDeleteProfilePhotoError extends MemberSelectorError + set_profile_disallowed + "Modifying deleted users is not allowed." - example default - complete = [default] +union MembersGetInfoError + "" -union_closed MembersAddJobStatus extends async.PollResultBase - complete List(MemberAddResult) - "The asynchronous job has finished. For each member that was specified in the - parameter :type:`MembersAddArg` that was provided to :route:`members/add`, a - corresponding item is returned in this list." - failed String - "The asynchronous job returned an error. The string contains an error message." +union_closed MembersGetInfoItem extends MembersGetInfoItemBase + "Describes a result obtained for a single user whose id was specified in the + parameter of :route:`members/get_info`." + member_info TeamMemberInfo + "Info about a team member." example default - complete = [default] - -route members/add/job_status/get:2(async.PollArg, MembersAddJobStatusV2Result, async.PollError) - "Once an async_job_id is returned from :route:`members/add:2` , - use this to poll the status of the asynchronous request. + member_info = default - Permission : Team member management." +union_closed MembersGetInfoItemBase + id_not_found String = "" + "An ID that was provided as a parameter to :route:`members/get_info` or :route:`members/get_info:2`, + and did not match a corresponding user. This might be a team_member_id, an + email, or an external ID, depending on how the method was called." - attrs - auth = "team" - scope = "members.write" +union MembersGetInfoItemV2 extends MembersGetInfoItemBase + "Describes a result obtained for a single user whose id was specified in the + parameter of :route:`members/get_info:2`." + member_info TeamMemberInfoV2 + "Info about a team member." + example default + member_info = default -route members/add/job_status/get(async.PollArg, MembersAddJobStatus, async.PollError) - "Once an async_job_id is returned from :route:`members/add` , - use this to poll the status of the asynchronous request. +union MembersListContinueError + invalid_cursor + "The cursor is invalid." - Permission : Team member management." +union MembersListError + "" - attrs - auth = "team" - scope = "members.write" +union MembersPermanentlyDeleteFilesError extends MembersDeactivateError + transfer_in_progress + "Cannot permanently delete files while it's being transferred." + already_transferred + "Cannot permanently delete files that have already been transferred." + already_transferred_or_deleted + "Cannot permanently delete files that have already been transferred or deleted." -# -# Route members/set_profile -# +union MembersRecoverError extends UserSelectorError + user_unrecoverable + "The user is not recoverable." + user_not_in_team + "The user is not a member of the team." + team_license_limit + "Team is full. The organization has no available licenses." -# Note that we do not allow changing 'familiar_name' and 'display_name from users.Name, since they -# are derived from the given_name, surname and locale. -struct MembersSetProfileArg - "Exactly one of team_member_id, email, or external_id must be provided to identify the user account. +union MembersRemoveError extends MembersTransferFilesError + remove_last_admin + "The user is the last admin of the team, so it cannot be removed from it." + cannot_keep_account_and_transfer + "Cannot keep account and transfer the data to another user at the same time." + cannot_keep_account_and_delete_data + "Cannot keep account and delete the data at the same time. To keep the account the argument wipe_data should be set to :val:`false`." + cannot_keep_account_and_permanently_delete + "Cannot keep account and permanently delete the data at the same time. To keep the account the argument permanently_delete_files should be set to :val:`false`." + email_address_too_long_to_be_disabled + "The email address of the user is too long to be disabled." + cannot_keep_invited_user_account + "Cannot keep account of an invited user." + cannot_retain_shares_when_data_wiped + "Cannot retain team shares when the user's data is marked for deletion on their linked devices. The argument wipe_data should be set to :val:`false`." + cannot_retain_shares_when_no_account_kept + "The user's account must be kept in order to retain team shares. The argument keep_account should be set to :val:`true`." + cannot_retain_shares_when_team_external_sharing_off + "Externally sharing files, folders, and links must be enabled in team settings in order to retain team shares for the user." + cannot_keep_account + "Only a team admin, can convert this account to a Basic account." + cannot_keep_account_under_legal_hold + "This user content is currently being held. To convert this member's account to a Basic account, you'll first need to remove them from the hold." + cannot_keep_account_required_to_sign_tos + "To convert this member to a Basic account, they'll first need to sign in to Dropbox and agree to the terms of service." + cannot_permanently_delete_and_transfer + "Cannot permanently delete files and transfer the data to another user at the same time." + member_is_transfer_destination + "This user is the active destination of an in-progress file transfer. Wait for the transfer to complete before removing this member." - At least one of new_email, new_external_id, new_given_name, and/or new_surname must be provided." +union MembersSendWelcomeError extends MemberSelectorError + "" - user UserSelectorArg - "Identity of user whose profile will be set." - new_email common.EmailAddress? - "New email for member." - new_external_id team_common.MemberExternalId? - "New external ID for member." - new_given_name common.OptionalNamePart? - "New given name for member." - new_surname common.OptionalNamePart? - "New surname for member." - new_persistent_id String? - "New persistent ID. This field only available to teams using persistent ID SAML configuration." - new_is_directory_restricted Boolean? - "New value for whether the user is a directory restricted user." +union MembersSetPermissions2Error extends UserSelectorError + last_admin + "Cannot remove the admin setting of the last admin." + user_not_in_team + "The user is not a member of the team." + cannot_set_permissions + "Cannot remove/grant permissions. This can happen if the team member is suspended." + role_not_found + "No matching role found. At least one of the provided new_roles does not exist on this team." - example default - user = default - new_email = "t.smith@domain.com" - new_surname = "Smith" +union MembersSetPermissionsError extends UserSelectorError + last_admin + "Cannot remove the admin setting of the last admin." + user_not_in_team + "The user is not a member of the team." + cannot_set_permissions + "Cannot remove/grant permissions." + team_license_limit + "Team is full. The organization has no available licenses." union MembersSetProfileError extends MemberSelectorError external_id_and_new_external_id_unsafe @@ -598,71 +245,144 @@ union MembersSetProfileError extends MemberSelectorError directory_restricted_off "Directory Restrictions option is not available." +union MembersSetProfilePhotoError extends MemberSelectorError + set_profile_disallowed + "Modifying deleted users is not allowed." + photo_error account.SetProfilePhotoError -route members/set_profile:2(MembersSetProfileArg, TeamMemberInfoV2Result, MembersSetProfileError) - "Updates a team member's profile. - - Permission : Team member management." +union MembersSuspendError extends MembersDeactivateError + suspend_inactive_user + "The user is not active, so it cannot be suspended." + suspend_last_admin + "The user is the last admin of the team, so it cannot be suspended." + team_license_limit + "Team is full. The organization has no available licenses." - attrs - auth = "team" - scope = "members.write" +union MembersTransferFilesError extends MembersPermanentlyDeleteFilesError + removed_and_transfer_dest_should_differ + "Expected removed user and transfer_dest user to be different." + removed_and_transfer_admin_should_differ + "Expected removed user and transfer_admin user to be different." + transfer_dest_user_not_found + "No matching user found for the argument transfer_dest_id." + transfer_dest_user_not_in_team + "The provided transfer_dest_id does not exist on this team." + transfer_admin_user_not_in_team + "The provided transfer_admin_id does not exist on this team." + transfer_admin_user_not_found + "No matching user found for the argument transfer_admin_id." + unspecified_transfer_admin_id + "The transfer_admin_id argument must be provided when file transfer is requested." + transfer_admin_is_not_admin + "Specified transfer_admin user is not a team admin." + recipient_not_verified + "The recipient user's email is not verified." +union MembersTransferFormerMembersFilesError extends MembersTransferFilesError + user_data_is_being_transferred + "The user's data is being transferred. Please wait some time before retrying." + user_not_removed + "No matching removed user found for the argument user." + user_data_cannot_be_transferred + "User files aren't transferable anymore." + user_data_already_transferred + "User's data has already been transferred to another user." -route members/set_profile(MembersSetProfileArg, TeamMemberInfo, MembersSetProfileError) - "Updates a team member's profile. +union MembersUnsuspendError extends MembersDeactivateError + unsuspend_non_suspended_member + "The user is unsuspended, so it cannot be unsuspended again." + team_license_limit + "Team is full. The organization has no available licenses." - Permission : Team member management." +struct MemberAddArg extends MemberAddArgBase + role AdminTier = member_only - attrs - auth = "team" - scope = "members.write" + example default + member_email = "tom.s@company.com" + member_given_name = "Tom" + member_surname = "Silverstone" + member_external_id = "company_id:342432" + role = default +struct MemberAddArgBase + member_email common.EmailAddress + member_given_name common.OptionalNamePart? + "Member's first name." + member_surname common.OptionalNamePart? + "Member's last name." + member_external_id team_common.MemberExternalId? + "External ID for member." + member_persistent_id String? + "Persistent ID for member. This field is only available to teams using persistent ID SAML configuration." + send_welcome_email Boolean = true + "Whether to send a welcome email to the member. + If send_welcome_email is false, no email invitation will be sent to the user. + This may be useful for apps using single sign-on (SSO) flows for onboarding that + want to handle announcements themselves." + is_directory_restricted Boolean? + "Whether a user is directory restricted." -# -# Route members/set_profile_photo -# + example default + member_email = "tom.s@company.com" + member_given_name = "Tom" + member_surname = "Silverstone" + member_external_id = "company_id:342432" -struct MembersSetProfilePhotoArg - user UserSelectorArg - "Identity of the user whose profile photo will be set." - photo account.PhotoSourceArg - "Image to set as the member's new profile photo." +struct MemberAddV2Arg extends MemberAddArgBase + role_ids List(TeamMemberRoleId, max_items=1)? example default - user = default - photo = default - + member_email = "tom.s@company.com" + member_given_name = "Tom" + member_surname = "Silverstone" + member_external_id = "company_id:342432" + role_ids = ["pid_dbtmr:2345"] -union MembersSetProfilePhotoError extends MemberSelectorError - set_profile_disallowed - "Modifying deleted users is not allowed." - photo_error account.SetProfilePhotoError +struct MembersAddArg extends MembersAddArgBase + new_members List(MemberAddArg) + "Details of new members to be added to the team." + example default + new_members = [default] -route members/set_profile_photo:2(MembersSetProfilePhotoArg, TeamMemberInfoV2Result, MembersSetProfilePhotoError) - "Updates a team member's profile photo. +struct MembersAddArgBase + force_async Boolean = false + "Whether to force the add to happen asynchronously." - Permission : Team member management." + example default + force_async = true - attrs - auth = "team" - scope = "members.write" +struct MembersAddV2Arg extends MembersAddArgBase + new_members List(MemberAddV2Arg) + "Details of new members to be added to the team." + example default + new_members = [default] -route members/set_profile_photo(MembersSetProfilePhotoArg, TeamMemberInfo, MembersSetProfilePhotoError) - "Updates a team member's profile photo. +struct MembersDataTransferArg extends MembersDeactivateBaseArg + transfer_dest_id UserSelectorArg + "Files from the deleted member account will be transferred to this user." + transfer_admin_id UserSelectorArg + "Errors during the transfer process will be sent via + email to this user." - Permission : Team member management." + example default + user = default + transfer_dest_id = default + transfer_admin_id = default - attrs - auth = "team" - scope = "members.write" +struct MembersDeactivateArg extends MembersDeactivateBaseArg + wipe_data Boolean = true + "If provided, controls if the user's data will be deleted on their linked devices." + example default + user = default + wipe_data = false -# -# Route members/delete_profile_photo -# +struct MembersDeactivateBaseArg + "Exactly one of team_member_id, email, or external_id must be provided to identify the user account." + user UserSelectorArg + "Identity of user to remove/suspend/have their files moved." struct MembersDeleteProfilePhotoArg user UserSelectorArg @@ -671,187 +391,92 @@ struct MembersDeleteProfilePhotoArg example default user = default - -union MembersDeleteProfilePhotoError extends MemberSelectorError - set_profile_disallowed - "Modifying deleted users is not allowed." - - -route members/delete_profile_photo:2(MembersDeleteProfilePhotoArg, TeamMemberInfoV2Result, MembersDeleteProfilePhotoError) - "Deletes a team member's profile photo. - - Permission : Team member management." - - attrs - auth = "team" - scope = "members.write" - -route members/delete_profile_photo(MembersDeleteProfilePhotoArg, TeamMemberInfo, MembersDeleteProfilePhotoError) - "Deletes a team member's profile photo. - - Permission : Team member management." - - attrs - auth = "team" - scope = "members.write" - - -# -# Route members/get_available_team_member_roles -# +struct MembersFormerMemberArg + "Exactly one of team_member_id, email, or external_id must be provided to identify a former team member." + user UserSelectorArg + "Identity of user whose files will be permanently deleted." struct MembersGetAvailableTeamMemberRolesResult "Available TeamMemberRole for the connected team. To be used with :route:`members/set_admin_permissions:2`." - roles List(TeamMemberRole) "Available roles." example default roles = [team_member_role_super, team_member_role_billing, team_member_role_user_management, team_member_role_support] - -route members/get_available_team_member_roles(Void, MembersGetAvailableTeamMemberRolesResult, Void) - "Get available TeamMemberRoles for the connected team. To be used with :route:`members/set_admin_permissions:2`. - - Permission : Team member management." - - attrs - auth = "team" - scope = "members.read" - -# -# Route members/set_admin_permissions:2 -# - -struct MembersSetPermissions2Arg - "Exactly one of team_member_id, email, or external_id must be provided to identify the user account." - - user UserSelectorArg - "Identity of user whose role will be set." - new_roles List(TeamMemberRoleId, max_items=1)? - "The new roles for the member. Send empty list to make user member only. For now, only up to one role is allowed." +struct MembersGetInfoArgs + members List(UserSelectorArg) + "List of team members." example default - user = default - new_roles = ["pid_dbtmr:1234"] + members = [default] -struct MembersSetPermissions2Result - team_member_id team_common.TeamMemberId - "The member ID of the user to which the change was applied." - roles List(TeamMemberRole)? - "The roles after the change. Empty in case the user become a non-admin." +struct MembersGetInfoV2Arg + members List(UserSelectorArg) + "List of team members." example default - team_member_id = "dbmid:9978889" - roles = [team_member_role_user_management] - -union MembersSetPermissions2Error extends UserSelectorError - last_admin - "Cannot remove the admin setting of the last admin." - user_not_in_team - "The user is not a member of the team." - cannot_set_permissions - "Cannot remove/grant permissions. This can happen if the team member is suspended." - role_not_found - "No matching role found. At least one of the provided new_roles does not exist on this team." - - -route members/set_admin_permissions:2(MembersSetPermissions2Arg, MembersSetPermissions2Result, MembersSetPermissions2Error) - "Updates a team member's permissions. - - Permission : Team member management." - - attrs - auth = "team" - scope = "members.write" - - -# -# Route members/set_admin_permissions -# - -struct MembersSetPermissionsArg - "Exactly one of team_member_id, email, or external_id must be provided to identify the user account." + members = [default] - user UserSelectorArg - "Identity of user whose role will be set." - new_role AdminTier - "The new role of the member." +struct MembersGetInfoV2Result + members_info List(MembersGetInfoItemV2) + "List of team members info." example default - user = default - new_role = default - + members_info = [default] -struct MembersSetPermissionsResult - team_member_id team_common.TeamMemberId - "The member ID of the user to which the change was applied." - role AdminTier - "The role after the change." +struct MembersListArg + limit UInt32(max_value=1000, min_value=1) = 1000 + "Number of results to return per call." + include_removed Boolean = false + "Whether to return removed members." example default - team_member_id = "dbmid:9978889" - role = default - - -union MembersSetPermissionsError extends UserSelectorError - last_admin - "Cannot remove the admin setting of the last admin." - user_not_in_team - "The user is not a member of the team." - cannot_set_permissions - "Cannot remove/grant permissions." - team_license_limit - "Team is full. The organization has no available licenses." - -route members/set_admin_permissions(MembersSetPermissionsArg, MembersSetPermissionsResult, MembersSetPermissionsError) - "Updates a team member's permissions. - - Permission : Team member management." - - attrs - auth = "team" - scope = "members.write" - - -# -# Route members/send_welcome_email -# - -union MembersSendWelcomeError extends MemberSelectorError - "" - -route members/send_welcome_email(UserSelectorArg, Void, MembersSendWelcomeError) - "Sends welcome email to pending team member. + limit = 100 + include_removed = false - Permission : Team member management +struct MembersListContinueArg + cursor String + "Indicates from what point to get the next set of members." - Exactly one of team_member_id, email, or external_id must be provided to identify the user account. + example default + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" - No-op if team member is not pending." +struct MembersListResult + members List(TeamMemberInfo) + "List of team members." + cursor String + "Pass the cursor into :route:`members/list/continue` to obtain the additional members." + has_more Boolean + "Is true if there are additional team members that have not been returned + yet. An additional call to :route:`members/list/continue` can retrieve them." - attrs - auth = "team" - scope = "members.write" + example default + members = [default] + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + has_more = true +struct MembersListV2Result + members List(TeamMemberInfoV2) + "List of team members." + cursor String + "Pass the cursor into :route:`members/list/continue:2` to obtain the additional members." + has_more Boolean + "Is true if there are additional team members that have not been returned + yet. An additional call to :route:`members/list/continue:2` can retrieve them." -# -# Route members/remove -# + example default + members = [default] + cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu" + has_more = true -struct MembersDeactivateBaseArg +struct MembersRecoverArg "Exactly one of team_member_id, email, or external_id must be provided to identify the user account." - user UserSelectorArg - "Identity of user to remove/suspend/have their files moved." - -struct MembersDeactivateArg extends MembersDeactivateBaseArg - wipe_data Boolean = true - "If provided, controls if the user's data will be deleted on their linked devices." + "Identity of user to recover." example default user = default - wipe_data = false struct MembersRemoveArg extends MembersDeactivateArg transfer_dest_id UserSelectorArg? @@ -863,11 +488,14 @@ struct MembersRemoveArg extends MembersDeactivateArg then this argument must be provided as well." keep_account Boolean = false "Downgrade the member to a Basic account. The user will retain the email address associated with their Dropbox - account and data in their account that is not restricted to team members. In order to keep the account the argument :field:`wipe_data` should be set to :val:`false`." + account and data in their account that is not restricted to team members. In order to keep the account the argument :field:`wipe_data` should be set to :val:`false`." retain_team_shares Boolean = false "If provided, allows removed users to keep access to Dropbox folders (not Dropbox Paper folders) already explicitly shared with them (not via a group) when they are downgraded to a Basic account. Users will not retain access to folders that do not allow external sharing. In order to keep the sharing relationships, the arguments :field:`wipe_data` should be set to :val:`false` and :field:`keep_account` should be set to :val:`true`." + permanently_delete_files Boolean = false + "Permanently delete the data in the deleted member's account. After permanent + deletion, the data is no longer available to be transferred to a different user." example default user = default @@ -876,223 +504,147 @@ struct MembersRemoveArg extends MembersDeactivateArg transfer_admin_id = default keep_account = false retain_team_shares = false + permanently_delete_files = false -union MembersDeactivateError extends UserSelectorError - user_not_in_team - "The user is not a member of the team." - -union MembersTransferFilesError extends MembersDeactivateError - removed_and_transfer_dest_should_differ - "Expected removed user and transfer_dest user to be different." - removed_and_transfer_admin_should_differ - "Expected removed user and transfer_admin user to be different." - transfer_dest_user_not_found - "No matching user found for the argument transfer_dest_id." - transfer_dest_user_not_in_team - "The provided transfer_dest_id does not exist on this team." - transfer_admin_user_not_in_team - "The provided transfer_admin_id does not exist on this team." - transfer_admin_user_not_found - "No matching user found for the argument transfer_admin_id." - unspecified_transfer_admin_id - "The transfer_admin_id argument must be provided when file transfer is requested." - transfer_admin_is_not_admin - "Specified transfer_admin user is not a team admin." - recipient_not_verified - "The recipient user's email is not verified." - -union MembersRemoveError extends MembersTransferFilesError - remove_last_admin - "The user is the last admin of the team, so it cannot be removed from it." - cannot_keep_account_and_transfer - "Cannot keep account and transfer the data to another user at the same time." - cannot_keep_account_and_delete_data - "Cannot keep account and delete the data at the same time. To keep the account the argument wipe_data should be set to :val:`false`." - email_address_too_long_to_be_disabled - # Added value in order to handle task T82902. - "The email address of the user is too long to be disabled." - cannot_keep_invited_user_account - "Cannot keep account of an invited user." - cannot_retain_shares_when_data_wiped - "Cannot retain team shares when the user's data is marked for deletion on their linked devices. The argument wipe_data should be set to :val:`false`." - cannot_retain_shares_when_no_account_kept - "The user's account must be kept in order to retain team shares. The argument keep_account should be set to :val:`true`." - cannot_retain_shares_when_team_external_sharing_off - "Externally sharing files, folders, and links must be enabled in team settings in order to retain team shares for the user." - cannot_keep_account - "Only a team admin, can convert this account to a Basic account." - cannot_keep_account_under_legal_hold - "This user content is currently being held. To convert this member's account to a Basic account, you'll first need to remove them from the hold." - cannot_keep_account_required_to_sign_tos - "To convert this member to a Basic account, they'll first need to sign in to Dropbox and agree to the terms of service." - -route members/remove(MembersRemoveArg, async.LaunchEmptyResult, MembersRemoveError) - "Removes a member from a team. - - Permission : Team member management - - Exactly one of team_member_id, email, or external_id must be provided to identify the user account. - - Accounts can be recovered via :route:`members/recover` for a 7 day period - or until the account has been permanently deleted or transferred to another account - (whichever comes first). Calling :route:`members/add` while a user is still recoverable - on your team will return with :field:`MemberAddResult.user_already_on_team`. - - Accounts can have their files transferred via the admin console for a limited time, based on the version history - length associated with the team (180 days for most teams). - - This endpoint may initiate an asynchronous job. To obtain the final result - of the job, the client should periodically poll :route:`members/remove/job_status/get`." - - attrs - auth = "team" - scope = "members.delete" - -# -# Route members/remove/job_status/get -# - -route members/remove/job_status/get(async.PollArg, async.PollEmptyResult, async.PollError) - "Once an async_job_id is returned from :route:`members/remove` , - use this to poll the status of the asynchronous request. - - Permission : Team member management." - - attrs - auth = "team" - scope = "members.delete" - -# -# Route members/suspend -# - -union MembersSuspendError extends MembersDeactivateError - suspend_inactive_user - "The user is not active, so it cannot be suspended." - suspend_last_admin - "The user is the last admin of the team, so it cannot be suspended." - team_license_limit - "Team is full. The organization has no available licenses." - -route members/suspend(MembersDeactivateArg, Void, MembersSuspendError) - "Suspend a member from a team. - - Permission : Team member management - - Exactly one of team_member_id, email, or external_id must be provided to identify the user account." - - attrs - auth = "team" - scope = "members.write" - -# -# Route members/unsuspend -# - -struct MembersUnsuspendArg +struct MembersSetPermissions2Arg "Exactly one of team_member_id, email, or external_id must be provided to identify the user account." - user UserSelectorArg - "Identity of user to unsuspend." + "Identity of user whose role will be set." + new_roles List(TeamMemberRoleId, max_items=1)? + "The new roles for the member. Send empty list to make user member only. For now, only up to one role is allowed." example default user = default + new_roles = ["pid_dbtmr:1234"] +struct MembersSetPermissions2Result + team_member_id team_common.TeamMemberId + "The member ID of the user to which the change was applied." + roles List(TeamMemberRole)? + "The roles after the change. Empty in case the user become a non-admin." -union MembersUnsuspendError extends MembersDeactivateError - unsuspend_non_suspended_member - "The user is unsuspended, so it cannot be unsuspended again." - team_license_limit - "Team is full. The organization has no available licenses." - -route members/unsuspend(MembersUnsuspendArg, Void, MembersUnsuspendError) - "Unsuspend a member from a team. - - Permission : Team member management - - Exactly one of team_member_id, email, or external_id must be provided to identify the user account." - - attrs - auth = "team" - scope = "members.write" - -# -# Route members/recover -# + example default + team_member_id = "dbmid:9978889" + roles = [team_member_role_user_management] -struct MembersRecoverArg +struct MembersSetPermissionsArg "Exactly one of team_member_id, email, or external_id must be provided to identify the user account." - user UserSelectorArg - "Identity of user to recover." + "Identity of user whose role will be set." + new_role AdminTier + "The new role of the member." example default user = default + new_role = default +struct MembersSetPermissionsResult + team_member_id team_common.TeamMemberId + "The member ID of the user to which the change was applied." + role AdminTier + "The role after the change." -union MembersRecoverError extends UserSelectorError - user_unrecoverable - "The user is not recoverable." - user_not_in_team - "The user is not a member of the team." - team_license_limit - "Team is full. The organization has no available licenses." - -route members/recover(MembersRecoverArg, Void, MembersRecoverError) - "Recover a deleted member. - - Permission : Team member management + example default + team_member_id = "dbmid:9978889" + role = default - Exactly one of team_member_id, email, or external_id must be provided to identify the user account." +struct MembersSetProfileArg + "Exactly one of team_member_id, email, or external_id must be provided to identify the user account. + At least one of new_email, new_external_id, new_given_name, and/or new_surname must be provided." + user UserSelectorArg + "Identity of user whose profile will be set." + new_email common.EmailAddress? + "New email for member." + new_external_id team_common.MemberExternalId? + "New external ID for member." + new_given_name common.OptionalNamePart? + "New given name for member." + new_surname common.OptionalNamePart? + "New surname for member." + new_persistent_id String? + "New persistent ID. This field only available to teams using persistent ID SAML configuration." + new_is_directory_restricted Boolean? + "New value for whether the user is a directory restricted user." - attrs - auth = "team" - scope = "members.delete" + example default + user = default + new_email = "t.smith@domain.com" + new_surname = "Smith" -# manage_former_member_files +struct MembersSetProfilePhotoArg + user UserSelectorArg + "Identity of the user whose profile photo will be set." + photo account.PhotoSourceArg + "Image to set as the member's new profile photo." -union MembersTransferFormerMembersFilesError extends MembersTransferFilesError - user_data_is_being_transferred - "The user's data is being transferred. Please wait some time before retrying." - user_not_removed - "No matching removed user found for the argument user." - user_data_cannot_be_transferred - "User files aren't transferable anymore." - user_data_already_transferred - "User's data has already been transferred to another user." + example default + user = default + photo = default -struct MembersDataTransferArg extends MembersDeactivateBaseArg - transfer_dest_id UserSelectorArg - "Files from the deleted member account will be transferred to this user." - transfer_admin_id UserSelectorArg - "Errors during the transfer process will be sent via - email to this user." +struct MembersUnsuspendArg + "Exactly one of team_member_id, email, or external_id must be provided to identify the user account." + user UserSelectorArg + "Identity of user to unsuspend." example default user = default - transfer_dest_id = default - transfer_admin_id = default -# Routes - moving removed user's files +struct TeamMemberInfo + "Information about a team member." + profile TeamMemberProfile + "Profile of a user as a member of a team." + role AdminTier + "The user's role in the team." + + example default + profile = default + role = member_only -route members/move_former_member_files(MembersDataTransferArg, async.LaunchEmptyResult, MembersTransferFormerMembersFilesError) - "Moves removed member's files to a different member. This endpoint initiates an asynchronous job. To obtain the final result - of the job, the client should periodically poll :route:`members/move_former_member_files/job_status/check`. +struct TeamMemberInfoV2 + "Information about a team member." + profile TeamMemberProfile + "Profile of a user as a member of a team." + roles List(TeamMemberRole)? + "The user's roles in the team." - Permission : Team member management." + example default + profile = default + roles = [team_member_role_user_management] - attrs - auth = "team" - scope = "members.write" +struct TeamMemberInfoV2Result + "Information about a team member, after the change, like at :route:`members/set_profile:2`." + member_info TeamMemberInfoV2 + "Member info, after the change." -# This is a duplicate of route members/remove/job_status/get + example default + member_info = default -route members/move_former_member_files/job_status/check(async.PollArg, async.PollEmptyResult, async.PollError) - "Once an async_job_id is returned from :route:`members/move_former_member_files` , - use this to poll the status of the asynchronous request. +struct TeamMemberRole + "A role which can be attached to a team member. This replaces AdminTier; each AdminTier corresponds to a new TeamMemberRole with a matching name." + role_id TeamMemberRoleId + "A string containing encoded role ID. For roles defined by Dropbox, this is the same across all teams." + name String(max_length=32) + "The role display name." + description String(max_length=256) + "Role description. Describes which permissions come with this role." - Permission : Team member management." + example team_member_role_super + role_id = "pid_dbtmr:2345" + name = "Team admin" + description = "User can do most user provisioning, de-provisioning and management." + + example team_member_role_user_management + role_id = "pid_dbtmr:3456" + name = "User management admin" + description = "Add, remove, and manage member accounts." + + example team_member_role_support + role_id = "pid_dbtmr:4567" + name = "Support admin" + description = "Help members with limited tasks, including password reset." + + example team_member_role_billing + role_id = "pid_dbtmr:5678" + name = "Billing admin" + description = "Make payments and renew contracts." - attrs - auth = "team" - scope = "members.write" diff --git a/team_team_types.stone b/team_team_types.stone new file mode 100644 index 0000000..8577ced --- /dev/null +++ b/team_team_types.stone @@ -0,0 +1,170 @@ +namespace team + +import common +import team_common +import team_policies + +union Feature + "A set of features that a Dropbox Business account may support." + upload_api_rate_limit + "The number of upload API calls allowed per month." + has_team_shared_dropbox + "Does this team have a shared team root." + has_team_file_events + "Does this team have file events." + has_team_selective_sync + "Does this team have team selective sync enabled." + has_distinct_member_homes + "Does this team have team member folder." + +union FeatureValue + "The values correspond to entries in :type:`Feature`. You may get different value according + to your Dropbox Business plan." + upload_api_rate_limit UploadApiRateLimitValue + has_team_shared_dropbox HasTeamSharedDropboxValue + has_team_file_events HasTeamFileEventsValue + has_team_selective_sync HasTeamSelectiveSyncValue + has_distinct_member_homes HasDistinctMemberHomesValue + + example uploadRateLimited + upload_api_rate_limit = limited + + example hasTeamSharedDropbox + has_team_shared_dropbox = default + + example hasTeamFileEvents + has_team_file_events = ex_no_file_events + + example HasTeamSelectiveSync + has_team_selective_sync = default + + example hasDistinctMemberHomes + has_distinct_member_homes = default + +union FeaturesGetValuesBatchError + empty_features_list + "At least one :type:`Feature` must be included in the + :type:`FeaturesGetValuesBatchArg`.features list." + +union HasDistinctMemberHomesValue + "The value for :field:`Feature.has_distinct_member_homes`." + has_distinct_member_homes Boolean = false + "Does this team have distinct team member homes." + + example default + has_distinct_member_homes = true + +union HasTeamFileEventsValue + "The value for :field:`Feature.has_team_file_events`." + enabled Boolean = false + "Does this team have file events." + + example ex_no_file_events + enabled = false + +union HasTeamSelectiveSyncValue + "The value for :field:`Feature.has_team_selective_sync`." + has_team_selective_sync Boolean = false + "Does this team have team selective sync enabled." + + example default + has_team_selective_sync = true + +union HasTeamSharedDropboxValue + "The value for :field:`Feature.has_team_shared_dropbox`." + has_team_shared_dropbox Boolean = false + "Does this team have a shared team root." + + example default + has_team_shared_dropbox = false + +union TokenGetAuthenticatedAdminError + "Error returned by :route:`token/get_authenticated_admin`." + mapping_not_found + "The current token is not associated with a team admin, because mappings were not + recorded when the token was created. Consider re-authorizing a new access token + to record its authenticating admin." + admin_not_active + "Either the team admin that authorized this token is no longer an active member of the + team or no longer a team admin." + +union UploadApiRateLimitValue + "The value for :field:`Feature.upload_api_rate_limit`." + unlimited + "This team has unlimited upload API quota. So far both server version account and legacy + account type have unlimited monthly upload api quota." + limit UInt32 = 0 + "The number of upload API calls allowed per month." + + example limited + limit = 25000 + +union_closed UserSelectorArg + "Argument for selecting a single user, either by team_member_id, external_id or email." + team_member_id team_common.TeamMemberId + external_id team_common.MemberExternalId + email common.EmailAddress + + example default + team_member_id = "dbmid:efgh5678" + + example email + email = "dan@hotmail.com" + +union_closed UserSelectorError + "Error that can be returned whenever a struct derived from :type:`UserSelectorArg` is used." + user_not_found + "No matching user found. The provided team_member_id, email, or external_id does not exist on this team." + +union_closed UsersSelectorArg + "Argument for selecting a list of users, either by team_member_ids, external_ids or emails." + team_member_ids List(team_common.TeamMemberId) + "List of member IDs." + external_ids List(team_common.MemberExternalId) + "List of external user IDs." + emails List(common.EmailAddress) + "List of email addresses." + +struct FeaturesGetValuesBatchArg + features List(Feature) + "A list of features in :type:`Feature`. If the list is empty, + this route will return :type:`FeaturesGetValuesBatchError`." + + example listOfValues + features = [upload_api_rate_limit, has_team_shared_dropbox] + +struct FeaturesGetValuesBatchResult + values List(FeatureValue) + + example listOfResults + values = [uploadRateLimited, hasTeamSharedDropbox] + +struct TeamGetInfoResult + name String + "The name of the team." + team_id String + "The ID of the team." + num_licensed_users UInt32 + "The number of licenses available to the team." + num_provisioned_users UInt32 + "The number of accounts that have been invited or are already active members of the team." + num_used_licenses UInt32 = 0 + "The number of licenses used on the team." + policies team_policies.TeamMemberPolicies + + example default + name = "Dropbox Inc." + team_id = "dbtid:1234abcd" + num_licensed_users = 5 + num_provisioned_users = 2 + num_used_licenses = 1 + policies = default + +struct TokenGetAuthenticatedAdminResult + "Results for :route:`token/get_authenticated_admin`." + admin_profile TeamMemberProfile + "The admin who authorized the token." + + example default + admin_profile = default + diff --git a/users_apiv2_users_api_auth.stone b/users_apiv2_users_api_auth.stone new file mode 100644 index 0000000..16d1704 --- /dev/null +++ b/users_apiv2_users_api_auth.stone @@ -0,0 +1,27 @@ +namespace users + +route get_account (GetAccountArg, BasicAccount, GetAccountError) + "Get information about a user's account." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "sharing.read" + +route get_account_batch (GetAccountBatchArg, GetAccountBatchResult, GetAccountBatchError) + "Get information about multiple user accounts. At most 300 accounts may be queried per request." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "sharing.read" + +route get_current_account (Void, FullAccount, Void) + "Get information about the current user's account." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "account_info.read" + select_admin_mode = "whole_team" + diff --git a/users_apiv2_users_features.stone b/users_apiv2_users_features.stone new file mode 100644 index 0000000..acead45 --- /dev/null +++ b/users_apiv2_users_features.stone @@ -0,0 +1,10 @@ +namespace users + +route features/get_values (UserFeaturesGetValuesBatchArg, UserFeaturesGetValuesBatchResult, UserFeaturesGetValuesBatchError) + "Get a list of feature values that may be configured for the current account." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "account_info.read" + diff --git a/users_apiv2_users_identity.stone b/users_apiv2_users_identity.stone new file mode 100644 index 0000000..3e7cd93 --- /dev/null +++ b/users_apiv2_users_identity.stone @@ -0,0 +1,10 @@ +namespace users + +route get_space_usage (Void, SpaceUsage, Void) + "Get the space usage information for the current user's account." + + attrs + allow_app_folder_app = true + auth = "user" + scope = "account_info.read" + diff --git a/users_common.stone b/users_common_users_common.stone similarity index 85% rename from users_common.stone rename to users_common_users_common.stone index 6ab2d97..f0f4593 100644 --- a/users_common.stone +++ b/users_common_users_common.stone @@ -1,13 +1,14 @@ namespace users_common "This namespace contains common data types used within the users namespace." +import account_id import common -alias AccountId = String(min_length=40, max_length=40) + +alias AccountId = String(max_length=40, min_length=40) union_closed AccountType "What type of account this user has." - basic "The basic account type." pro @@ -17,6 +18,6 @@ union_closed AccountType example default basic = null - example business business = null + diff --git a/users_users_base.stone b/users_users_base.stone new file mode 100644 index 0000000..1914141 --- /dev/null +++ b/users_users_base.stone @@ -0,0 +1,35 @@ +namespace users + "This namespace contains endpoints and data types for user management." + +import common + +struct Name + "Representations for a person's name to assist with internationalization." + given_name String + "Also known as a first name." + surname String + "Also known as a last name or family name." + familiar_name String + "Locale-dependent name. In the US, a person's familiar name is their + :field:`given_name`, but elsewhere, it could be any combination of a + person's :field:`given_name` and :field:`surname`." + display_name String + "A name that can be used directly to represent the name of a user's + Dropbox account." + abbreviated_name String + "An abbreviated form of the person's name. Their initials in most locales." + + example default + given_name = "Franz" + surname = "Ferdinand" + familiar_name = "Franz" + display_name = "Franz Ferdinand (Personal)" + abbreviated_name = "FF" + + example second_name + given_name = "Zexy Desperado" + surname = "Desperado" + familiar_name = "Zexy" + display_name = "Zexy Desperado (Personal)" + abbreviated_name = "ZD" + diff --git a/users.stone b/users_users_types.stone similarity index 77% rename from users.stone rename to users_users_types.stone index 3c88bbb..ae5d713 100644 --- a/users.stone +++ b/users_users_types.stone @@ -1,57 +1,108 @@ namespace users - "This namespace contains endpoints and data types for user management." import common - import team_common - import team_policies - import users_common -# -# Route: get_account -# +alias GetAccountBatchResult = List(BasicAccount) -route get_account (GetAccountArg, BasicAccount, GetAccountError) - "Get information about a user's account." +union DistinctMemberHomeValue + "The value for :field:`UserFeature.distinct_member_home`." + enabled Boolean + "When this value is True, the user have distinct home and root ns. When the value is + False the user's home ns and root ns are the same." - attrs - allow_app_folder_app = true - scope = "sharing.read" +union FileLockingValue + "The value for :field:`UserFeature.file_locking`." + enabled Boolean + "When this value is True, the user can lock files in shared directories. When the value is + False the user can unlock the files they have locked or request to unlock files locked by + others." -struct GetAccountArg - account_id users_common.AccountId - "A user's account identifier." + example file_locking_enabled + enabled = true + +union GetAccountBatchError + no_account users_common.AccountId + "The value is an account ID specified in :field:`GetAccountBatchArg.account_ids` + that does not exist." example default - account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" + no_account = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" union GetAccountError no_account "The specified :field:`GetAccountArg.account_id` does not exist." +union PaperAsFilesValue + "The value for :field:`UserFeature.paper_as_files`." + enabled Boolean + "When this value is true, the user's Paper docs are accessible in Dropbox with the .paper + extension and must be accessed via the /files endpoints. When this value is + false, the user's Paper docs are stored separate from Dropbox files and folders and should + be accessed via the /paper endpoints." + + example paper_as_files_enabled + enabled = true + +union SpaceAllocation + "Space is allocated differently based on the type of account." + individual IndividualSpaceAllocation + "The user's space allocation applies only to their individual account." + team TeamSpaceAllocation + "The user shares space with other members of their team." + + example default + individual = default + +union TeamSharedDropboxValue + "The value for :field:`UserFeature.team_shared_dropbox`." + enabled Boolean + "When this value is True, the user have a shared team root. When the value is + False the user have distinct root." + +union UserFeature + "A set of features that a Dropbox User account may have configured." + paper_as_files + "This feature contains information about how the user's Paper files are stored." + file_locking + "This feature allows users to lock files in order to restrict other users from editing them." + team_shared_dropbox + "This feature contains information about whether or not the user is part of a team with a shared team root." + distinct_member_home + "This feature contains information about whether or not the user's home namespace is distinct from their root namespace." + +union UserFeatureValue + "Values that correspond to entries in :type:`UserFeature`." + paper_as_files PaperAsFilesValue + file_locking FileLockingValue + team_shared_dropbox TeamSharedDropboxValue + distinct_member_home DistinctMemberHomeValue + + example paper_as_files_enabled + paper_as_files = paper_as_files_enabled + +union UserFeaturesGetValuesBatchError + empty_features_list + "At least one :type:`UserFeature` must be included in the + :type:`UserFeaturesGetValuesBatchArg`.features list." + struct Account "The amount of detail revealed about an account depends on the user being queried and the user making the query." - account_id users_common.AccountId "The user's unique Dropbox ID." - name Name "Details of a user's name." - email String "The user's email address. Do not rely on this without checking the :field:`email_verified` field. Even then, it's possible that the user has since lost access to their email." - email_verified Boolean "Whether the user has verified their email address." - profile_photo_url String? "URL for the photo representing the user, if one is set." - disabled Boolean "Whether the user has been disabled." @@ -65,11 +116,9 @@ struct Account struct BasicAccount extends Account "Basic information about any account." - is_teammate Boolean "Whether this user is a teammate of the current user. If this account is the current user's account, then this will be :val:`true`." - team_member_id String? "The user's unique team member id. This field will only be present if the user is part of a team and :field:`is_teammate` is :val:`true`." @@ -82,7 +131,7 @@ struct BasicAccount extends Account profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128" is_teammate = false disabled = false - + example team account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" name = default @@ -92,22 +141,10 @@ struct BasicAccount extends Account is_teammate = true team_member_id = "dbmid:AAHhy7WsR0x-u4ZCqiDl5Fz5zvuL3kmspwU" disabled = false -# -# Route: get_current_account -# - -route get_current_account (Void, FullAccount, Void) - "Get information about the current user's account." - - attrs - allow_app_folder_app = true - select_admin_mode = "whole_team" - scope = "account_info.read" struct FullAccount extends Account "Detailed information about the current user's account." - - country String(min_length=2, max_length=2)? + country String(max_length=2, min_length=2)? "The user's two-letter country code, if available. Country codes are based on :link:`ISO 3166-1 http://en.wikipedia.org/wiki/ISO_3166-1`." locale String(min_length=2) @@ -130,7 +167,6 @@ struct FullAccount extends Account "The root info for this account." example default - "Paired account." account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" name = default email = "franz@dropbox.com" @@ -144,9 +180,8 @@ struct FullAccount extends Account account_type = business disabled = false root_info = default - + example unpaired - "A personal account that is not paired with a team." account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" name = default email = "franz@gmail.com" @@ -161,82 +196,45 @@ struct FullAccount extends Account disabled = false root_info = default -struct Team - "Information about a team." - - id String - "The team's unique ID." - name String - "The name of the team." - - example default - id = "dbtid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" - name = "Acme, Inc." - struct FullTeam extends Team "Detailed information about a team." - sharing_policies team_policies.TeamSharingPolicies "Team policies governing sharing." - office_addin_policy team_policies.OfficeAddInPolicy "Team policy governing the use of the Office Add-In." + top_level_content_policy team_policies.TopLevelContentPolicy + "Team policy governing whether members can edit team folders at the top level of the team space." example default id = "dbtid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" name = "Acme, Inc." sharing_policies = default office_addin_policy = disabled + top_level_content_policy = admin_only -struct Name - "Representations for a person's name to assist with internationalization." - - given_name String - "Also known as a first name." +struct GetAccountArg + account_id users_common.AccountId + "A user's account identifier." - surname String - "Also known as a last name or family name." + example default + account_id = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" - familiar_name String - "Locale-dependent name. In the US, a person's familiar name is their - :field:`given_name`, but elsewhere, it could be any combination of a - person's :field:`given_name` and :field:`surname`." +struct GetAccountBatchArg + account_ids List(users_common.AccountId, min_items=1) + "List of user account identifiers. Should not contain any duplicate account IDs." - display_name String - "A name that can be used directly to represent the name of a user's - Dropbox account." + example default + account_ids = ["dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc", "dbid:AAH1Vcz-DVoRDeixtr_OA8oUGgiqhs4XPOQ"] - abbreviated_name String - "An abbreviated form of the person's name. Their initials in most locales." +struct IndividualSpaceAllocation + allocated UInt64 + "The total space allocated to the user's account (bytes)." example default - given_name = "Franz" - surname = "Ferdinand" - familiar_name = "Franz" - display_name = "Franz Ferdinand (Personal)" - abbreviated_name = "FF" - - example second_name - given_name = "Zexy Desperado" - surname = "Desperado" - familiar_name = "Zexy" - display_name = "Zexy Desperado (Personal)" - abbreviated_name = "ZD" - -# -# Route: get_space_usage -# - -route get_space_usage(Void, SpaceUsage, Void) - "Get the space usage information for the current user's account." - - attrs - allow_app_folder_app = true - scope = "account_info.read" + allocated = 10000000000 struct SpaceUsage "Information about a user's space usage and quota." - used UInt64 "The user's total space usage (bytes)." allocation SpaceAllocation @@ -246,23 +244,16 @@ struct SpaceUsage used = 314159265 allocation = default -union SpaceAllocation - "Space is allocated differently based on the type of account." - - individual IndividualSpaceAllocation - "The user's space allocation applies only to their individual account." - team TeamSpaceAllocation - "The user shares space with other members of their team." - - example default - individual = default - -struct IndividualSpaceAllocation - allocated UInt64 - "The total space allocated to the user's account (bytes)." +struct Team + "Information about a team." + id String + "The team's unique ID." + name String + "The name of the team." example default - allocated = 10000000000 + id = "dbtid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" + name = "Acme, Inc." struct TeamSpaceAllocation used UInt64 @@ -284,84 +275,6 @@ struct TeamSpaceAllocation user_within_team_space_limit_type = stop_sync user_within_team_space_used_cached = 314159265 -# -# Route: get_account_batch -# - -route get_account_batch (GetAccountBatchArg, GetAccountBatchResult, GetAccountBatchError) - "Get information about multiple user accounts. At most 300 accounts may be queried - per request." - - attrs - allow_app_folder_app = true - scope = "sharing.read" - -struct GetAccountBatchArg - account_ids List(users_common.AccountId, min_items=1) - "List of user account identifiers. Should not contain any duplicate account IDs." - - example default - account_ids = ["dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc", "dbid:AAH1Vcz-DVoRDeixtr_OA8oUGgiqhs4XPOQ"] - -alias GetAccountBatchResult = List(BasicAccount) - -union GetAccountBatchError - no_account users_common.AccountId - "The value is an account ID specified in :field:`GetAccountBatchArg.account_ids` - that does not exist." - - example default - no_account = "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc" - -# -# User Features -# - -union UserFeature - "A set of features that a Dropbox User account may have configured." - - paper_as_files - "This feature contains information about how the user's Paper files are stored." - - file_locking - "This feature allows users to lock files in order to restrict other users from editing them." - - -union UserFeatureValue - "Values that correspond to entries in :type:`UserFeature`." - - paper_as_files PaperAsFilesValue - file_locking FileLockingValue - - example paper_as_files_enabled - paper_as_files = paper_as_files_enabled - -union PaperAsFilesValue - "The value for :field:`UserFeature.paper_as_files`. " - - enabled Boolean - "When this value is true, the user's Paper docs are accessible in Dropbox with the .paper - extension and must be accessed via the /files endpoints. When this value is - false, the user's Paper docs are stored separate from Dropbox files and folders and should - be accessed via the /paper endpoints." - - example paper_as_files_enabled - enabled = true - -union FileLockingValue - "The value for :field:`UserFeature.file_locking`. " - - enabled Boolean - "When this value is True, the user can lock files in shared directories. When the value is - False the user can unlock the files they have locked or request to unlock files locked by - others." - - example file_locking_enabled - enabled = true -# -# Route: feature/get_value_batch -# - struct UserFeaturesGetValuesBatchArg features List(UserFeature) "A list of features in :type:`UserFeature`. If the list is empty, @@ -376,14 +289,3 @@ struct UserFeaturesGetValuesBatchResult example listOfValues values = [paper_as_files_enabled] -union UserFeaturesGetValuesBatchError - empty_features_list - "At least one :type:`UserFeature` must be included in the - :type:`UserFeaturesGetValuesBatchArg`.features list." - -route features/get_values(UserFeaturesGetValuesBatchArg, UserFeaturesGetValuesBatchResult, UserFeaturesGetValuesBatchError) - "Get a list of feature values that may be configured for the current account." - - attrs - allow_app_folder_app = true - scope = "account_info.read"