From de3a7718946ee79f1a0d5ca499b9d22b41cc7c84 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Tue, 3 Nov 2020 13:47:58 -0500 Subject: [PATCH 01/48] Migrate references from master to main (#23) --- .github/workflows/dispatch_spec_update.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dispatch_spec_update.yml b/.github/workflows/dispatch_spec_update.yml index 2072bfb..13767fa 100644 --- a/.github/workflows/dispatch_spec_update.yml +++ b/.github/workflows/dispatch_spec_update.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: push: branches: - - master + - main jobs: Dispatch: diff --git a/README.md b/README.md index 690cb72..beb4e2d 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,6 @@ The API Spec is distributed under the MIT license, please see [LICENSE][license] [logo]: https://cfl.dropboxstatic.com/static/images/sdk/api_spec_banner.png [repo]: https://github.com/dropbox/dropbox-api-spec -[license]: https://github.com/dropbox/dropbox-api-spec/blobs/master/LICENSE -[contributing]: https://github.com/dropbox/dropbox-api-spec/blobs/master/CONTRIBUTING.md +[license]: https://github.com/dropbox/dropbox-api-spec/blobs/main/LICENSE +[contributing]: https://github.com/dropbox/dropbox-api-spec/blobs/main/CONTRIBUTING.md [support]: https://www.dropbox.com/developers/contact From ed6e389b2d16d19b21e68413ae8f4743dd9b9223 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Mon, 9 Nov 2020 13:26:43 -0800 Subject: [PATCH 02/48] Spec Update 11/06/2020 (#24) Change Notes: File Namespace: - Add UploadSessionStartError union - Add UploadSessionType union - Update UploadSessionFinishError union to include concurrent_sessions_data_not_allowed, concurrent_session_not_closed, concurrent_session_missing_data - Update UploadSessionType struct to include session_type - Update upload_session/start to include UploadSessionStartError - Update Comments Team Log Namespace: - Add AdminAlertingAlertConfiguration, AdminAlertingChangedAlertConfigDetails, MemberChangeResellerRoleDetails, TeamProfileAddBackgroundDetails, TeamProfileChangeBackgroundDetails, TeamProfileRemoveBackgroundDetails, AdminAlertingChangedAlertConfigType, MemberChangeResellerRoleType, TeamProfileAddBackgroundType, TeamProfileChangeBackgroundType, TeamProfileRemoveBackgroundType structs - Add AdminAlertingAlertStatePolicy, ResellerRole unions - Update EventCategory union to include admin_alerting - Update GovernancePolicyRemoveFoldersDetails struct to include reason - Update EventDetails union to include admin_alerting_changed_alert_config_details, member_change_reseller_role_details, team_profile_add_background_details, team_profile_change_background_details, team_profile_remove_background_details - Update EventType union to include admin_alerting_changed_alert_config, member_change_reseller_role, team_profile_add_background, team_profile_change_background, team_profile_remove_background - Update EventTypeArg to include admin_alerting_changed_alert_config, member_change_reseller_role, team_profile_add_background, team_profile_change_background, team_profile_remove_background - Update Examples Co-authored-by: Brent Bumann --- files.stone | 46 ++++++++++++++- team_log_generated.stone | 117 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 161 insertions(+), 2 deletions(-) diff --git a/files.stone b/files.stone index 3ba2924..2aa0d43 100644 --- a/files.stone +++ b/files.stone @@ -747,6 +747,12 @@ 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." + union UploadSessionLookupError not_found "The upload session ID was not found or has expired. Upload sessions are @@ -764,6 +770,10 @@ union UploadSessionLookupError 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." union UploadSessionFinishError lookup_failed UploadSessionLookupError @@ -780,15 +790,32 @@ union UploadSessionFinishError 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." # Req/Resp +union UploadSessionType + sequential + "Pieces of content 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`." + example with_close close = false @@ -801,7 +828,7 @@ struct UploadSessionStartResult example default session_id = "1234faaf0678bcde" -route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, Void) +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 @@ -820,7 +847,22 @@ route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, Voi 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`." + 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" diff --git a/team_log_generated.stone b/team_log_generated.stone index f0ffb9d..8303325 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -186,6 +186,23 @@ union MemberRemoveActionType offboard offboard_and_retain_team_folders +struct AdminAlertingAlertConfiguration + "Alert configurations" + + alert_state AdminAlertingAlertStatePolicy + "Alert state." + + example default + alert_state = off + + example default2 + alert_state = off + +union AdminAlertingAlertStatePolicy + "Policy for controlling whether an alert can be triggered or not" + off + on + union AdminRole limited_admin member_only @@ -600,6 +617,10 @@ struct RelocateAssetReferencesLogInfo src_asset_index = 4 dest_asset_index = 4 +union ResellerRole + not_reseller + reseller_admin + union ResellerSupportPolicy "Policy for controlling if reseller can access the admin console as administrator" disabled @@ -1681,6 +1702,8 @@ union ParticipantLogInfo 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 @@ -1731,6 +1754,21 @@ union EventCategory # Types for specific events ############################# +struct AdminAlertingChangedAlertConfigDetails + "Changed an alert setting." + + alert_name String + "Alert Name." + previous_alert_config AdminAlertingAlertConfiguration + "Previous alert configuration." + new_alert_config AdminAlertingAlertConfiguration + "New alert configuration." + + example default + alert_name = "abc" + previous_alert_config = default + new_alert_config = default + struct AppLinkTeamDetails "Linked app for team." @@ -1973,12 +2011,15 @@ struct GovernancePolicyRemoveFoldersDetails "Policy type." folders List(String)? "Folders." + reason String? + "Reason." example default governance_policy_id = "abc" name = "abc" policy_type = retention folders = ["abc"] + reason = "abc" struct LegalHoldsActivateAHoldDetails "Activated a hold." @@ -2898,6 +2939,18 @@ struct MemberChangeNameDetails new_value = default previous_value = default +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 + "Previous reseller role. This field is relevant when the reseller role is changed or when the reseller role is removed." + + example default + new_value = not_reseller + previous_value = not_reseller + struct MemberChangeStatusDetails "Changed member status (invited, joined, suspended, etc.)." @@ -5746,9 +5799,15 @@ struct TeamMergeToDetails example default team_name = "abc" +struct TeamProfileAddBackgroundDetails + "Added team background to display on shared link headers." + struct TeamProfileAddLogoDetails "Added team logo to display on shared link headers." +struct TeamProfileChangeBackgroundDetails + "Changed team background displayed on shared link headers." + struct TeamProfileChangeDefaultLanguageDetails "Changed default language for team." @@ -5776,6 +5835,9 @@ struct TeamProfileChangeNameDetails previous_value = default new_value = default +struct TeamProfileRemoveBackgroundDetails + "Removed team background displayed on shared link headers." + struct TeamProfileRemoveLogoDetails "Removed team logo displayed on shared link headers." @@ -6101,6 +6163,7 @@ struct TeamMergeRequestSentShownToSecondaryTeamDetails union EventDetails "Additional fields depending on the event type." + admin_alerting_changed_alert_config_details AdminAlertingChangedAlertConfigDetails app_link_team_details AppLinkTeamDetails app_link_user_details AppLinkUserDetails app_unlink_team_details AppUnlinkTeamDetails @@ -6220,6 +6283,7 @@ union EventDetails member_change_external_id_details MemberChangeExternalIdDetails member_change_membership_type_details MemberChangeMembershipTypeDetails member_change_name_details MemberChangeNameDetails + member_change_reseller_role_details MemberChangeResellerRoleDetails member_change_status_details MemberChangeStatusDetails member_delete_manual_contacts_details MemberDeleteManualContactsDetails member_delete_profile_photo_details MemberDeleteProfilePhotoDetails @@ -6506,10 +6570,13 @@ union EventDetails web_sessions_change_idle_length_policy_details WebSessionsChangeIdleLengthPolicyDetails team_merge_from_details TeamMergeFromDetails team_merge_to_details TeamMergeToDetails + team_profile_add_background_details TeamProfileAddBackgroundDetails team_profile_add_logo_details TeamProfileAddLogoDetails + team_profile_change_background_details TeamProfileChangeBackgroundDetails team_profile_change_default_language_details TeamProfileChangeDefaultLanguageDetails team_profile_change_logo_details TeamProfileChangeLogoDetails team_profile_change_name_details TeamProfileChangeNameDetails + team_profile_remove_background_details TeamProfileRemoveBackgroundDetails team_profile_remove_logo_details TeamProfileRemoveLogoDetails tfa_add_backup_phone_details TfaAddBackupPhoneDetails tfa_add_security_key_details TfaAddSecurityKeyDetails @@ -6554,6 +6621,12 @@ union EventDetails # Event Type ############## +struct AdminAlertingChangedAlertConfigType + description String + + example default + description = "(admin_alerting) Changed an alert setting" + struct AppLinkTeamType description String @@ -7268,6 +7341,12 @@ struct MemberChangeNameType example default description = "(members) Changed team member name" +struct MemberChangeResellerRoleType + description String + + example default + description = "(members) Changed team member reseller role" + struct MemberChangeStatusType description String @@ -8984,12 +9063,24 @@ struct TeamMergeToType example default description = "(team_profile) Merged this team into another team" +struct TeamProfileAddBackgroundType + description String + + example default + description = "(team_profile) Added team background to display on shared link headers" + struct TeamProfileAddLogoType description String example default description = "(team_profile) Added team logo to display on shared link headers" +struct TeamProfileChangeBackgroundType + description String + + example default + description = "(team_profile) Changed team background displayed on shared link headers" + struct TeamProfileChangeDefaultLanguageType description String @@ -9008,6 +9099,12 @@ struct TeamProfileChangeNameType example default description = "(team_profile) Changed team name" +struct TeamProfileRemoveBackgroundType + description String + + example default + description = "(team_profile) Removed team background displayed on shared link headers" + struct TeamProfileRemoveLogoType description String @@ -9210,6 +9307,8 @@ struct TeamMergeRequestSentShownToSecondaryTeamType union EventType "The type of the event with description." + admin_alerting_changed_alert_config AdminAlertingChangedAlertConfigType + "(admin_alerting) Changed an alert setting" app_link_team AppLinkTeamType "(apps) Linked app for team" app_link_user AppLinkUserType @@ -9448,6 +9547,8 @@ union EventType "(members) Changed membership type (limited/full) of member (deprecated, no longer logged)" member_change_name MemberChangeNameType "(members) Changed team member name" + member_change_reseller_role MemberChangeResellerRoleType + "(members) Changed team member reseller role" member_change_status MemberChangeStatusType "(members) Changed member status (invited, joined, suspended, etc.)" member_delete_manual_contacts MemberDeleteManualContactsType @@ -10020,14 +10121,20 @@ union EventType "(team_profile) Merged another team into this team" team_merge_to TeamMergeToType "(team_profile) Merged this team into another team" + team_profile_add_background TeamProfileAddBackgroundType + "(team_profile) Added team background to display on shared link headers" team_profile_add_logo TeamProfileAddLogoType "(team_profile) Added team logo to display on shared link headers" + team_profile_change_background TeamProfileChangeBackgroundType + "(team_profile) Changed team background displayed on shared link headers" team_profile_change_default_language TeamProfileChangeDefaultLanguageType "(team_profile) Changed default language for team" team_profile_change_logo TeamProfileChangeLogoType "(team_profile) Changed team logo displayed on shared link headers" team_profile_change_name TeamProfileChangeNameType "(team_profile) Changed team name" + team_profile_remove_background TeamProfileRemoveBackgroundType + "(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" tfa_add_backup_phone TfaAddBackupPhoneType @@ -10102,6 +10209,8 @@ union EventType union EventTypeArg "The type of the event." + admin_alerting_changed_alert_config + "(admin_alerting) Changed an alert setting" app_link_team "(apps) Linked app for team" app_link_user @@ -10340,6 +10449,8 @@ union EventTypeArg "(members) Changed membership type (limited/full) of member (deprecated, no longer logged)" member_change_name "(members) Changed team member name" + member_change_reseller_role + "(members) Changed team member reseller role" member_change_status "(members) Changed member status (invited, joined, suspended, etc.)" member_delete_manual_contacts @@ -10912,14 +11023,20 @@ union EventTypeArg "(team_profile) Merged another team into this team" team_merge_to "(team_profile) Merged this team into another team" + team_profile_add_background + "(team_profile) Added team background to display on shared link headers" team_profile_add_logo "(team_profile) Added team logo to display on shared link headers" + team_profile_change_background + "(team_profile) Changed team background displayed on shared link headers" team_profile_change_default_language "(team_profile) Changed default language for team" team_profile_change_logo "(team_profile) Changed team logo displayed on shared link headers" team_profile_change_name "(team_profile) Changed team name" + team_profile_remove_background + "(team_profile) Removed team background displayed on shared link headers" team_profile_remove_logo "(team_profile) Removed team logo displayed on shared link headers" tfa_add_backup_phone From f16378220aab09f7412206785b6bae0ab119a7c9 Mon Sep 17 00:00:00 2001 From: yuxiang-he Date: Thu, 12 Nov 2020 14:28:49 -0800 Subject: [PATCH 03/48] Spec update 11/12/2020 (#25) Change Notes: Common Namespace - DisplayName validation pattern is updated team_log_generated Namespace - Add ClassificationCreateReportDetails struct - Add ClassificationCreateReportFailDetails struct - Update EventDetails union to include ClassificationCreateReportDetails and ClassificationCreateReportFailDetails - Add ClassificationCreateReportType struct - Add ClassificationCreateReportFailType struct - Update EventType union to include ClassificationCreateReportType and ClassificationCreateReportFailType - Update EventTypeArg union to include classification_create_report and classification_create_report_fail --- api_proxy_dev_check_api_v2_service.stone | 4 +-- common.stone | 2 +- team_log_generated.stone | 34 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/api_proxy_dev_check_api_v2_service.stone b/api_proxy_dev_check_api_v2_service.stone index 2b1a927..08e5229 100644 --- a/api_proxy_dev_check_api_v2_service.stone +++ b/api_proxy_dev_check_api_v2_service.stone @@ -10,8 +10,8 @@ route user (EchoArg, EchoResult, Void) attrs allow_app_folder_app = true - is_preview = true auth = "user" + is_preview = true route app (EchoArg, EchoResult, Void) "This endpoint performs App Authentication, validating the supplied app key and secret, @@ -22,6 +22,6 @@ route app (EchoArg, EchoResult, Void) attrs allow_app_folder_app = true - is_preview = true auth = "app" + is_preview = true diff --git a/common.stone b/common.stone index 86e00f3..489282b 100644 --- a/common.stone +++ b/common.stone @@ -22,7 +22,7 @@ alias NamePart = String(pattern="[^\/:?*<>\"|]*", min_length=1, max_length=100) 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="[^\/:?*<>\"|]*", min_length=1) +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 diff --git a/team_log_generated.stone b/team_log_generated.stone index 8303325..5924e6b 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -3648,6 +3648,18 @@ struct PasswordResetDetails struct PasswordResetAllDetails "Reset all team member passwords." +struct ClassificationCreateReportDetails + "Created Classification report." + +struct ClassificationCreateReportFailDetails + "Couldn't create Classification report." + + failure_reason team.TeamReportFailureReason + "Failure reason." + + example default + failure_reason = temporary_error + struct EmmCreateExceptionsReportDetails "Created EMM-excluded users report." @@ -6352,6 +6364,8 @@ union EventDetails password_change_details PasswordChangeDetails password_reset_details PasswordResetDetails password_reset_all_details PasswordResetAllDetails + classification_create_report_details ClassificationCreateReportDetails + classification_create_report_fail_details ClassificationCreateReportFailDetails emm_create_exceptions_report_details EmmCreateExceptionsReportDetails emm_create_usage_report_details EmmCreateUsageReportDetails export_members_report_details ExportMembersReportDetails @@ -7755,6 +7769,18 @@ struct PasswordResetAllType example default description = "(passwords) Reset all team member passwords" +struct ClassificationCreateReportType + description String + + example default + description = "(reports) Created Classification report" + +struct ClassificationCreateReportFailType + description String + + example default + description = "(reports) Couldn't create Classification report" + struct EmmCreateExceptionsReportType description String @@ -9685,6 +9711,10 @@ union EventType "(passwords) Reset password" password_reset_all PasswordResetAllType "(passwords) Reset all team member passwords" + classification_create_report ClassificationCreateReportType + "(reports) Created Classification report" + classification_create_report_fail ClassificationCreateReportFailType + "(reports) Couldn't create Classification report" emm_create_exceptions_report EmmCreateExceptionsReportType "(reports) Created EMM-excluded users report" emm_create_usage_report EmmCreateUsageReportType @@ -10587,6 +10617,10 @@ union EventTypeArg "(passwords) Reset password" password_reset_all "(passwords) Reset all team member passwords" + classification_create_report + "(reports) Created Classification report" + classification_create_report_fail + "(reports) Couldn't create Classification report" emm_create_exceptions_report "(reports) Created EMM-excluded users report" emm_create_usage_report From 8f960cb69b5209b30f0007a95da4d7486c1a58d4 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Thu, 3 Dec 2020 17:28:14 -0600 Subject: [PATCH 04/48] Spec Update 12/03/2020 (#26) Change Notes: Common Namespace: - Update Comments - Update Examples Team Log Namespace: - Add AdminAlertCategoryEnum, AdminAlertSeverityEnum unions - Add AdminAlertingTriggeredAlertDetails, GovernancePolicyAddFolderFailedDetails, GovernancePolocyExportCreatedDetails, GovernancePolicyExportRemovedDetails, GovernancePolicyReportCreatedDetails, GovernancePolicyZipPartDownloadedDetails, AdminAlertingTriggeredAlertType, GovernancePolicyAddFolderFailedType, GovernancePolicyExportCreatedType, GovernancePolicyExportCreatedType, GovernancePolicyExportRemovedType, GovernancePolicyReportCreatedType, GovernancePolicyZipPartDownloadType structs - Update EventDetails union to add admin_alerting_triggered_alert_details, governance_policy_add_folder_failed_details, governance_policy_export_created_details, governance_policy_export_removed_details, governance_policy_report_created_details, governance_policy_zip_part_downloaded_details - Update EventType union to include admin_alerting_triggered_alert, governance_policy_add_folder_failed, governance_policy_export_created, governance_policy_export_removed, governance_policy_report_created, governance_policy_zip_part_downloaded, admin_alerting_triggered_alert, governance_policy_add_folder_failed, governance_policy_export_created, governance_policy_export_removed, governance_policy_report_created, governance_policy_zip_part_downloaded --- api_proxy_dev_check_api_v2_service.stone | 1 + common.stone | 2 +- files.stone | 19 ++- team_log_generated.stone | 194 +++++++++++++++++++++++ 4 files changed, 214 insertions(+), 2 deletions(-) diff --git a/api_proxy_dev_check_api_v2_service.stone b/api_proxy_dev_check_api_v2_service.stone index 08e5229..4f7dd0e 100644 --- a/api_proxy_dev_check_api_v2_service.stone +++ b/api_proxy_dev_check_api_v2_service.stone @@ -12,6 +12,7 @@ route user (EchoArg, EchoResult, Void) allow_app_folder_app = true auth = "user" is_preview = true + scope = "account_info.read" route app (EchoArg, EchoResult, Void) "This endpoint performs App Authentication, validating the supplied app key and secret, diff --git a/common.stone b/common.stone index 489282b..0e77155 100644 --- a/common.stone +++ b/common.stone @@ -87,7 +87,7 @@ union PathRoot union PathRootError invalid_root RootInfo "The root namespace id in Dropbox-API-Path-Root header is not valid. The value - of this error is use's latest root info." + 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/files.stone b/files.stone index 2aa0d43..66fbe6a 100644 --- a/files.stone +++ b/files.stone @@ -70,6 +70,9 @@ struct Metadata example folder_metadata folder = default + example search_metadata + file = search_file_metadata + union MetadataV2 "Metadata for a file, folder or other resource types." @@ -77,7 +80,7 @@ union MetadataV2 # new types can be added here in the future example default - metadata = default + metadata = search_metadata struct HighlightSpan @@ -314,6 +317,20 @@ struct FileMetadata extends Metadata 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." diff --git a/team_log_generated.stone b/team_log_generated.stone index 5924e6b..8e6fc39 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -186,6 +186,23 @@ union MemberRemoveActionType offboard offboard_and_retain_team_folders +union AdminAlertCategoryEnum + "Alert category" + account_takeover + data_loss_protection + malware_sharing + massive_file_operation + na + threat_management + +union AdminAlertSeverityEnum + "Alert severity" + high + info + low + medium + na + struct AdminAlertingAlertConfiguration "Alert configurations" @@ -1769,6 +1786,24 @@ struct AdminAlertingChangedAlertConfigDetails previous_alert_config = default new_alert_config = default +struct AdminAlertingTriggeredAlertDetails + "Triggered security alert." + + alert_name String + "Alert name." + alert_severity AdminAlertSeverityEnum + "Alert severity." + alert_category AdminAlertCategoryEnum + "Alert category." + alert_instance_id String + "Alert ID." + + example default + alert_name = "abc" + alert_severity = na + alert_category = na + alert_instance_id = "pid_admin_alert:AAgAAOVHYCEuavqE0v3Jj9VDogV4wG9q8F-XZKwYpuYTVBm5" + struct AppLinkTeamDetails "Linked app for team." @@ -1919,6 +1954,27 @@ struct GovernancePolicyAddFoldersDetails policy_type = retention folders = ["abc"] +struct GovernancePolicyAddFolderFailedDetails + "Couldn't add a folder to a policy." + + governance_policy_id String + "Policy ID." + name String + "Policy name." + policy_type PolicyType? + "Policy type." + folder String + "Folder." + reason String? + "Reason." + + example default + governance_policy_id = "abc" + name = "abc" + policy_type = retention + folder = "abc" + reason = "abc" + struct GovernancePolicyCreateDetails "Activated a new policy." @@ -2000,6 +2056,42 @@ struct GovernancePolicyEditDurationDetails previous_value = default new_value = default +struct GovernancePolicyExportCreatedDetails + "Created a policy download." + + governance_policy_id String + "Policy ID." + name String + "Policy name." + policy_type PolicyType? + "Policy type." + export_name String + "Export name." + + example default + governance_policy_id = "abc" + name = "abc" + policy_type = retention + export_name = "abc" + +struct GovernancePolicyExportRemovedDetails + "Removed a policy download." + + governance_policy_id String + "Policy ID." + name String + "Policy name." + policy_type PolicyType? + "Policy type." + export_name String + "Export name." + + example default + governance_policy_id = "abc" + name = "abc" + policy_type = retention + export_name = "abc" + struct GovernancePolicyRemoveFoldersDetails "Removed folders from policy." @@ -2021,6 +2113,42 @@ struct GovernancePolicyRemoveFoldersDetails folders = ["abc"] reason = "abc" +struct GovernancePolicyReportCreatedDetails + "Created a summary report for a policy." + + governance_policy_id String + "Policy ID." + name String + "Policy name." + policy_type PolicyType? + "Policy type." + + example default + governance_policy_id = "abc" + name = "abc" + policy_type = retention + +struct GovernancePolicyZipPartDownloadedDetails + "Downloaded content from a policy." + + governance_policy_id String + "Policy ID." + name String + "Policy name." + policy_type PolicyType? + "Policy type." + export_name String + "Export name." + part String? + "Part." + + example default + governance_policy_id = "abc" + name = "abc" + policy_type = retention + export_name = "abc" + part = "abc" + struct LegalHoldsActivateAHoldDetails "Activated a hold." @@ -6176,6 +6304,7 @@ union EventDetails "Additional fields depending on the event type." admin_alerting_changed_alert_config_details AdminAlertingChangedAlertConfigDetails + admin_alerting_triggered_alert_details AdminAlertingTriggeredAlertDetails app_link_team_details AppLinkTeamDetails app_link_user_details AppLinkUserDetails app_unlink_team_details AppUnlinkTeamDetails @@ -6191,11 +6320,16 @@ union EventDetails file_unlike_comment_details FileUnlikeCommentDetails file_unresolve_comment_details FileUnresolveCommentDetails governance_policy_add_folders_details GovernancePolicyAddFoldersDetails + governance_policy_add_folder_failed_details GovernancePolicyAddFolderFailedDetails governance_policy_create_details GovernancePolicyCreateDetails governance_policy_delete_details GovernancePolicyDeleteDetails governance_policy_edit_details_details GovernancePolicyEditDetailsDetails governance_policy_edit_duration_details GovernancePolicyEditDurationDetails + governance_policy_export_created_details GovernancePolicyExportCreatedDetails + governance_policy_export_removed_details GovernancePolicyExportRemovedDetails governance_policy_remove_folders_details GovernancePolicyRemoveFoldersDetails + governance_policy_report_created_details GovernancePolicyReportCreatedDetails + governance_policy_zip_part_downloaded_details GovernancePolicyZipPartDownloadedDetails legal_holds_activate_a_hold_details LegalHoldsActivateAHoldDetails legal_holds_add_members_details LegalHoldsAddMembersDetails legal_holds_change_hold_details_details LegalHoldsChangeHoldDetailsDetails @@ -6641,6 +6775,12 @@ struct AdminAlertingChangedAlertConfigType example default description = "(admin_alerting) Changed an alert setting" +struct AdminAlertingTriggeredAlertType + description String + + example default + description = "(admin_alerting) Triggered security alert" + struct AppLinkTeamType description String @@ -6731,6 +6871,12 @@ struct GovernancePolicyAddFoldersType example default description = "(data_governance) Added folders to policy" +struct GovernancePolicyAddFolderFailedType + description String + + example default + description = "(data_governance) Couldn't add a folder to a policy" + struct GovernancePolicyCreateType description String @@ -6755,12 +6901,36 @@ struct GovernancePolicyEditDurationType example default description = "(data_governance) Changed policy duration" +struct GovernancePolicyExportCreatedType + description String + + example default + description = "(data_governance) Created a policy download" + +struct GovernancePolicyExportRemovedType + description String + + example default + description = "(data_governance) Removed a policy download" + struct GovernancePolicyRemoveFoldersType description String example default description = "(data_governance) Removed folders from policy" +struct GovernancePolicyReportCreatedType + description String + + example default + description = "(data_governance) Created a summary report for a policy" + +struct GovernancePolicyZipPartDownloadedType + description String + + example default + description = "(data_governance) Downloaded content from a policy" + struct LegalHoldsActivateAHoldType description String @@ -9335,6 +9505,8 @@ union EventType admin_alerting_changed_alert_config AdminAlertingChangedAlertConfigType "(admin_alerting) Changed an alert setting" + admin_alerting_triggered_alert AdminAlertingTriggeredAlertType + "(admin_alerting) Triggered security alert" app_link_team AppLinkTeamType "(apps) Linked app for team" app_link_user AppLinkUserType @@ -9365,6 +9537,8 @@ union EventType "(comments) Unresolved file comment" governance_policy_add_folders GovernancePolicyAddFoldersType "(data_governance) Added folders to policy" + governance_policy_add_folder_failed GovernancePolicyAddFolderFailedType + "(data_governance) Couldn't add a folder to a policy" governance_policy_create GovernancePolicyCreateType "(data_governance) Activated a new policy" governance_policy_delete GovernancePolicyDeleteType @@ -9373,8 +9547,16 @@ union EventType "(data_governance) Edited policy" governance_policy_edit_duration GovernancePolicyEditDurationType "(data_governance) Changed policy duration" + governance_policy_export_created GovernancePolicyExportCreatedType + "(data_governance) Created a policy download" + governance_policy_export_removed GovernancePolicyExportRemovedType + "(data_governance) Removed a policy download" governance_policy_remove_folders GovernancePolicyRemoveFoldersType "(data_governance) Removed folders from policy" + governance_policy_report_created GovernancePolicyReportCreatedType + "(data_governance) Created a summary report for a policy" + governance_policy_zip_part_downloaded GovernancePolicyZipPartDownloadedType + "(data_governance) Downloaded content from a policy" legal_holds_activate_a_hold LegalHoldsActivateAHoldType "(data_governance) Activated a hold" legal_holds_add_members LegalHoldsAddMembersType @@ -10241,6 +10423,8 @@ union EventTypeArg admin_alerting_changed_alert_config "(admin_alerting) Changed an alert setting" + admin_alerting_triggered_alert + "(admin_alerting) Triggered security alert" app_link_team "(apps) Linked app for team" app_link_user @@ -10271,6 +10455,8 @@ union EventTypeArg "(comments) Unresolved file comment" governance_policy_add_folders "(data_governance) Added folders to policy" + governance_policy_add_folder_failed + "(data_governance) Couldn't add a folder to a policy" governance_policy_create "(data_governance) Activated a new policy" governance_policy_delete @@ -10279,8 +10465,16 @@ union EventTypeArg "(data_governance) Edited policy" governance_policy_edit_duration "(data_governance) Changed policy duration" + governance_policy_export_created + "(data_governance) Created a policy download" + governance_policy_export_removed + "(data_governance) Removed a policy download" governance_policy_remove_folders "(data_governance) Removed folders from policy" + governance_policy_report_created + "(data_governance) Created a summary report for a policy" + governance_policy_zip_part_downloaded + "(data_governance) Downloaded content from a policy" legal_holds_activate_a_hold "(data_governance) Activated a hold" legal_holds_add_members From d5bb651e5b0236ccacd3860d6ce04508d7fd2c28 Mon Sep 17 00:00:00 2001 From: Pranay Date: Thu, 14 Jan 2021 16:49:23 -0800 Subject: [PATCH 05/48] Change Notes (#27) files namespace: Update comments team_legal_holds namespace: Update union LegalHoldsPolicyUpdateError team_log_generated namespce: Update union PolicyType Update comments Co-authored-by: Pranay Sowdaboina --- files.stone | 3 +- team_legal_holds.stone | 2 + team_log_generated.stone | 131 ++++++++++++++++++++------------------- 3 files changed, 69 insertions(+), 67 deletions(-) diff --git a/files.stone b/files.stone index 66fbe6a..bcd7fdc 100644 --- a/files.stone +++ b/files.stone @@ -1272,8 +1272,7 @@ route search:2 (SearchV2Arg, SearchV2Result, SearchError) struct SearchV2Arg query String(max_length=1000) - "The string to search for. May match across multiple fields based on the request arguments. - Query string may be rewritten to improve relevance of results." + "The string to search for. May match across multiple fields based on the request arguments." options SearchOptions? "Options for more targeted search results." diff --git a/team_legal_holds.stone b/team_legal_holds.stone index be3cf5b..46aeceb 100644 --- a/team_legal_holds.stone +++ b/team_legal_holds.stone @@ -306,6 +306,8 @@ struct LegalHoldsPolicyUpdateArg 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 diff --git a/team_log_generated.stone b/team_log_generated.stone index 8e6fc39..b550e5a 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -320,7 +320,7 @@ struct FailureDetailsLogInfo "Provides details about a failure" user_friendly_message String? - "A user friendly explanation of the error. Might be missing due to historical data gap." + "A user friendly explanation of the error." technical_error_message String? "A technical explanation of the error. This is relevant for some errors." @@ -450,7 +450,7 @@ struct FileRequestDetails asset_index UInt64 "Asset position in the Assets list." deadline FileRequestDeadline? - "File request deadline. Might be missing due to historical data gap." + "File request deadline." example default asset_index = 3 @@ -466,7 +466,7 @@ struct FileRequestDeadline 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. Might be missing due to historical data gap." + "If set, allow uploads after the deadline has passed." example default deadline = "2017-01-25T15:51:30Z" @@ -616,6 +616,7 @@ union PlacementRestriction none union PolicyType + disposition retention struct RelocateAssetReferencesLogInfo @@ -1098,9 +1099,9 @@ struct AppLogInfo team_linked_app TeamLinkedAppLogInfo app_id AppId? - "App unique ID. Might be missing due to historical data gap." + "App unique ID." display_name String? - "App display name. Might be missing due to historical data gap." + "App display name." example default team_linked_app = default @@ -1126,11 +1127,11 @@ struct DeviceSessionLogInfo legacy_device_session LegacyDeviceSessionLogInfo ip_address IpAddress? - "The IP address of the last activity from this session. Might be missing due to historical data gap." + "The IP address of the last activity from this session." created common.DropboxTimestamp? - "The time this session was created. Might be missing due to historical data gap." + "The time this session was created." updated common.DropboxTimestamp? - "The time of the last activity from this session. Might be missing due to historical data gap." + "The time of the last activity from this session." example default desktop_device_session = default @@ -1142,7 +1143,7 @@ struct DesktopDeviceSessionLogInfo extends DeviceSessionLogInfo "Information about linked Dropbox desktop client sessions" session_info DesktopSessionLogInfo? - "Desktop session unique id. Might be missing due to historical data gap." + "Desktop session unique id." host_name String "Name of the hosting desktop." client_type team.DesktopPlatform @@ -1180,7 +1181,7 @@ struct MobileDeviceSessionLogInfo extends DeviceSessionLogInfo "Information about linked Dropbox mobile client sessions" session_info MobileSessionLogInfo? - "Mobile session unique id. Might be missing due to historical data gap." + "Mobile session unique id." device_name String "The device name." client_type team.MobileClientPlatform @@ -1218,7 +1219,7 @@ struct WebDeviceSessionLogInfo extends DeviceSessionLogInfo "Information on active web sessions" session_info WebSessionLogInfo? - "Web session unique id. Might be missing due to historical data gap." + "Web session unique id." user_agent String "Information on the hosting device." os String @@ -1248,7 +1249,7 @@ struct LegacyDeviceSessionLogInfo extends DeviceSessionLogInfo "Information on sessions, in legacy format" session_info SessionLogInfo? - "Session unique id. Might be missing due to historical data gap." + "Session unique id." display_name String? "The device name. Might be missing due to historical data gap." is_emm_managed Boolean? @@ -1302,7 +1303,7 @@ struct SessionLogInfo mobile MobileSessionLogInfo session_id common.SessionId? - "Session ID. Might be missing due to historical data gap." + "Session ID." example default desktop = default @@ -1318,11 +1319,11 @@ struct UserLogInfo non_team_member NonTeamMemberLogInfo account_id users_common.AccountId? - "User unique ID. Might be missing due to historical data gap." + "User unique ID." display_name common.DisplayNameLegacy? - "User display name. Might be missing due to historical data gap." + "User display name." email EmailAddress? - "User email address. Might be missing due to historical data gap." + "User email address." example default non_team_member = default @@ -1356,7 +1357,7 @@ struct TeamMemberLogInfo extends UserLogInfo "Team member's logged information." team_member_id team_common.TeamMemberId? - "Team member ID. Might be missing due to historical data gap." + "Team member ID." member_external_id team_common.MemberExternalId? "Team member external ID." team TeamLogInfo? @@ -1395,9 +1396,9 @@ struct FileOrFolderLogInfo path PathLogInfo "Path relative to event context." display_name String? - "Display name. Might be missing due to historical data gap." + "Display name." file_id String? - "Unique ID. Might be missing due to historical data gap." + "Unique ID." file_size UInt64? "File or folder size in bytes." @@ -1452,11 +1453,11 @@ struct GroupLogInfo "Group's logged information." group_id team_common.GroupId? - "The unique id of this group. Might be missing due to historical data gap." + "The unique id of this group." display_name String "The name of this group." external_id team_common.GroupExternalId? - "External group ID. Might be missing due to historical data gap." + "External group ID." example default group_id = "g:e2db7665347abcd600000000001a2b3c" @@ -1472,7 +1473,7 @@ struct PathLogInfo "Path's details." contextual FilePath? - "Fully qualified path relative to event's context. Might be missing due to historical data gap." + "Fully qualified path relative to event's context." namespace_relative NamespaceRelativePathLogInfo "Path relative to the namespace containing the content." @@ -1533,11 +1534,11 @@ struct NamespaceRelativePathLogInfo "Namespace relative path details." ns_id NamespaceId? - "Namespace ID. Might be missing due to historical data gap." + "Namespace ID." relative_path FilePath? - "A path relative to the specified namespace ID. Might be missing due to historical data gap." + "A path relative to the specified namespace ID." is_shared_namespace Boolean? - "True if the namespace is shared. Might be missing due to historical data gap." + "True if the namespace is shared." example default ns_id = "1234" @@ -1862,7 +1863,7 @@ struct FileAddCommentDetails "Added file comment." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default comment_text = "abc" @@ -1883,7 +1884,7 @@ struct FileDeleteCommentDetails "Deleted file comment." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default comment_text = "abc" @@ -1892,7 +1893,7 @@ struct FileEditCommentDetails "Edited file comment." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." previous_comment_text String "Previous comment text." @@ -1904,7 +1905,7 @@ struct FileLikeCommentDetails "Liked file comment." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default comment_text = "abc" @@ -1913,7 +1914,7 @@ struct FileResolveCommentDetails "Resolved file comment." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default comment_text = "abc" @@ -1922,7 +1923,7 @@ struct FileUnlikeCommentDetails "Unliked file comment." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default comment_text = "abc" @@ -1931,7 +1932,7 @@ struct FileUnresolveCommentDetails "Unresolved file comment." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default comment_text = "abc" @@ -2345,7 +2346,7 @@ struct DeviceDeleteOnUnlinkFailDetails "Failed to delete all files from unlinked device." session_info SessionLogInfo? - "Session unique id. Might be missing due to historical data gap." + "Session unique id." display_name String? "The device name. Might be missing due to historical data gap." num_failures Int64 @@ -2360,7 +2361,7 @@ struct DeviceDeleteOnUnlinkSuccessDetails "Deleted all files from unlinked device." session_info SessionLogInfo? - "Session unique id. Might be missing due to historical data gap." + "Session unique id." display_name String? "The device name. Might be missing due to historical data gap." @@ -2741,9 +2742,9 @@ struct FileRequestReceiveFileDetails submitted_file_names List(String) "Submitted file names." submitter_name common.DisplayNameLegacy? - "The name as provided by the submitter. Might be missing due to historical data gap." + "The name as provided by the submitter." submitter_email EmailAddress? - "The email as provided by the submitter. Might be missing due to historical data gap." + "The email as provided by the submitter." example default file_request_id = "oaCAVmEyrqYnkZX9955Y" @@ -2807,7 +2808,7 @@ struct GroupCreateDetails "Created group." is_company_managed Boolean? - "Is company managed group. Might be missing due to historical data gap." + "Is company managed group." join_policy GroupJoinPolicy? "Group join policy." @@ -2819,7 +2820,7 @@ struct GroupDeleteDetails "Deleted group." is_company_managed Boolean? - "Is company managed group. Might be missing due to historical data gap." + "Is company managed group." example default is_company_managed = true @@ -2831,7 +2832,7 @@ struct GroupJoinPolicyUpdatedDetails "Updated group join policy." is_company_managed Boolean? - "Is company managed group. Might be missing due to historical data gap." + "Is company managed group." join_policy GroupJoinPolicy? "Group join policy." @@ -3434,7 +3435,7 @@ struct PaperDocAddCommentDetails event_uuid String "Event unique identifier." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default event_uuid = "abc" @@ -3458,9 +3459,9 @@ struct PaperDocChangeSharingPolicyDetails event_uuid String "Event unique identifier." public_sharing_policy String? - "Sharing policy with external users. Might be missing due to historical data gap." + "Sharing policy with external users." team_sharing_policy String? - "Sharing policy with team. Might be missing due to historical data gap." + "Sharing policy with team." example default event_uuid = "abc" @@ -3497,7 +3498,7 @@ struct PaperDocDeleteCommentDetails event_uuid String "Event unique identifier." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default event_uuid = "abc" @@ -3530,7 +3531,7 @@ struct PaperDocEditCommentDetails event_uuid String "Event unique identifier." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default event_uuid = "abc" @@ -3584,7 +3585,7 @@ struct PaperDocResolveCommentDetails event_uuid String "Event unique identifier." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default event_uuid = "abc" @@ -3632,7 +3633,7 @@ struct PaperDocUnresolveCommentDetails event_uuid String "Event unique identifier." comment_text String? - "Comment text. Might be missing due to historical data gap." + "Comment text." example default event_uuid = "abc" @@ -4009,7 +4010,7 @@ struct SfAddGroupDetails original_folder_name String "Original shared folder name." sharing_permission String? - "Sharing permission. Might be missing due to historical data gap." + "Sharing permission." team_name String "Team name." @@ -4027,7 +4028,7 @@ struct SfAllowNonMembersToViewSharedLinksDetails original_folder_name String "Original shared folder name." shared_folder_type String? - "Shared folder type. Might be missing due to historical data gap." + "Shared folder type." example default target_asset_index = 3 @@ -4042,9 +4043,9 @@ struct SfExternalInviteWarnDetails original_folder_name String "Original shared folder name." new_sharing_permission String? - "New sharing permission. Might be missing due to historical data gap." + "New sharing permission." previous_sharing_permission String? - "Previous sharing permission. Might be missing due to historical data gap." + "Previous sharing permission." example default target_asset_index = 3 @@ -4060,7 +4061,7 @@ struct SfFbInviteDetails original_folder_name String "Original shared folder name." sharing_permission String? - "Sharing permission. Might be missing due to historical data gap." + "Sharing permission." example default target_asset_index = 3 @@ -4075,9 +4076,9 @@ struct SfFbInviteChangeRoleDetails original_folder_name String "Original shared folder name." previous_sharing_permission String? - "Previous sharing permission. Might be missing due to historical data gap." + "Previous sharing permission." new_sharing_permission String? - "New sharing permission. Might be missing due to historical data gap." + "New sharing permission." example default target_asset_index = 3 @@ -4126,7 +4127,7 @@ struct SfTeamInviteDetails original_folder_name String "Original shared folder name." sharing_permission String? - "Sharing permission. Might be missing due to historical data gap." + "Sharing permission." example default target_asset_index = 3 @@ -4141,9 +4142,9 @@ struct SfTeamInviteChangeRoleDetails original_folder_name String "Original shared folder name." new_sharing_permission String? - "New sharing permission. Might be missing due to historical data gap." + "New sharing permission." previous_sharing_permission String? - "Previous sharing permission. Might be missing due to historical data gap." + "Previous sharing permission." example default target_asset_index = 3 @@ -4173,7 +4174,7 @@ struct SfTeamJoinFromOobLinkDetails token_key String? "Shared link token key." sharing_permission String? - "Sharing permission. Might be missing due to historical data gap." + "Sharing permission." example default target_asset_index = 3 @@ -4298,7 +4299,7 @@ struct SharedContentChangeViewerInfoPolicyDetails new_value sharing.ViewerInfoPolicy "New viewer info policy." previous_value sharing.ViewerInfoPolicy? - "Previous view info policy. Might be missing due to historical data gap." + "Previous view info policy." example default new_value = disabled @@ -4479,7 +4480,7 @@ struct SharedFolderCreateDetails "Created shared folder." target_ns_id NamespaceId? - "Target namespace ID. Might be missing due to historical data gap." + "Target namespace ID." example default target_ns_id = "1234" @@ -4494,13 +4495,13 @@ struct SharedFolderNestDetails "Changed parent of shared folder." previous_parent_ns_id NamespaceId? - "Previous parent namespace ID. Might be missing due to historical data gap." + "Previous parent namespace ID." new_parent_ns_id NamespaceId? - "New parent namespace ID. Might be missing due to historical data gap." + "New parent namespace ID." previous_ns_path FilePath? - "Previous namespace path. Might be missing due to historical data gap." + "Previous namespace path." new_ns_path FilePath? - "New namespace path. Might be missing due to historical data gap." + "New namespace path." example default previous_parent_ns_id = "1234" @@ -5028,7 +5029,7 @@ struct SsoAddLogoutUrlDetails "Added sign-out URL for SSO." new_value String? - "New single sign-on logout URL. Might be missing due to historical data gap." + "New single sign-on logout URL." example default new_value = "abc" @@ -5063,7 +5064,7 @@ struct SsoChangeLogoutUrlDetails previous_value String? "Previous single sign-on logout URL. Might be missing due to historical data gap." new_value String? - "New single sign-on logout URL. Might be missing due to historical data gap." + "New single sign-on logout URL." example default previous_value = "abc" From cce31b9a2e810b260c4f9fa6250030d00e968533 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Fri, 22 Jan 2021 19:01:53 -0800 Subject: [PATCH 06/48] Spec Update 01/22/2021 (#28) Change Notes: Files Namespace: - Update Comments - Update Legacy Scopes Shared Links Namespace: - Update Comments - Update Legacy Scopes Sharing Files Namespace: - Update Comments - Update Legacy Scopes Team Namespace: - Update Comments - Update Legacy Scopes Team Devices Namespace: - Update Comments - Update Legacy Scopes Team Linked Apps Namespace: - Update Comments - Update Legacy Scopes --- files.stone | 20 ++++++++++++++++++++ shared_links.stone | 2 ++ sharing_files.stone | 3 +++ team.stone | 8 ++++++-- team_devices.stone | 1 + team_linked_apps.stone | 1 + 6 files changed, 33 insertions(+), 2 deletions(-) diff --git a/files.stone b/files.stone index bcd7fdc..5468efb 100644 --- a/files.stone +++ b/files.stone @@ -2748,6 +2748,7 @@ route alpha/get_metadata (AlphaGetMetadataArg, Metadata, AlphaGetMetadataError) attrs is_preview=true allow_app_folder_app = true + scope = "files.metadata.read" struct AlphaGetMetadataArg extends GetMetadataArg @@ -2785,6 +2786,7 @@ route alpha/upload (CommitInfoWithProperties, FileMetadata, UploadErrorWithPrope style="upload" is_preview=true allow_app_folder_app = true + scope = "files.content.write" struct CommitInfoWithProperties extends CommitInfo example default @@ -2800,11 +2802,29 @@ union UploadErrorWithProperties extends UploadError # 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 # diff --git a/shared_links.stone b/shared_links.stone index 4c67aea..92a5041 100644 --- a/shared_links.stone +++ b/shared_links.stone @@ -570,6 +570,7 @@ route get_shared_links(GetSharedLinksArg, GetSharedLinksResult, GetSharedLinksEr 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)." @@ -615,3 +616,4 @@ route create_shared_link(CreateSharedLinkArg, PathLinkMetadata, CreateSharedLink attrs allow_app_folder_app = true select_admin_mode = "team_admin" + scope = "sharing.write" diff --git a/sharing_files.stone b/sharing_files.stone index 86d213c..5f37dfe 100644 --- a/sharing_files.stone +++ b/sharing_files.stone @@ -289,6 +289,9 @@ struct AddFileMemberArgs route change_file_member_access(ChangeFileMemberAccessArgs, FileMemberActionResult, FileMemberActionError) deprecated by update_file_member "Identical to update_file_member but with less information returned." + attrs + scope = "sharing.write" + struct ChangeFileMemberAccessArgs "Arguments for :route:`change_file_member_access`." diff --git a/team.stone b/team.stone index daef493..4195ff6 100644 --- a/team.stone +++ b/team.stone @@ -329,18 +329,22 @@ route properties/template/add(file_properties.AddTemplateArg, file_properties.Ad 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." + "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." + "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_devices.stone b/team_devices.stone index 267906b..efb0706 100644 --- a/team_devices.stone +++ b/team_devices.stone @@ -356,3 +356,4 @@ route devices/list_team_devices(ListTeamDevicesArg, ListTeamDevicesResult, ListT attrs auth = "team" + scope = "sessions.list" diff --git a/team_linked_apps.stone b/team_linked_apps.stone index f9fda02..195f56d 100644 --- a/team_linked_apps.stone +++ b/team_linked_apps.stone @@ -215,3 +215,4 @@ route linked_apps/list_team_linked_apps(ListTeamAppsArg, ListTeamAppsResult, Lis attrs auth = "team" + scope = "sessions.list" From 0ba804f8549058d48474fb9f77638a2ee3889993 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Wed, 10 Feb 2021 10:59:57 -0800 Subject: [PATCH 07/48] Spec Update 02/10/2021 (#29) Change Notes: Files Namespace: - Update ExportInfo struct to include export_options - Update ExportError union to include invalid_export_format - Update ExportArg struct to include export_format - Update ExportMetadata to include paper_revision - Update GetTemporaryLinkError union to include not_allowed - Update Comments Team Log Generated Namespace: - Add RecipicientsConfiguration, ObjectLabelAddedDetails, ObjectLabelRemoveDetails, ObjectLabelUpdatedValueDetails, ObjectLabelAddedType, ObjectLabelRemoved, and ObjectLabelUpdatedValue structs - Add AlertRecipientsSettingType, AdminAlertingAlertSensitivity, and LabelType unions - Update AdminAlertSeverityEnum to include sensitivity_level and recipients_settings - Update PlacementRestriction union to include uk_only - Update EventDetails union to include object_label_added_details, object_label_removed_details and object_label_updated_value_details - Update EventType union to include object_label_added, object_label_removed and object_label_updated_value - Update EventTypeArg union to include object_label_added, object_label_removed, and object_label_updated_value - Update Examples --- files.stone | 44 ++++++++++++---- team_log_generated.stone | 111 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 144 insertions(+), 11 deletions(-) diff --git a/files.stone b/files.stone index 5468efb..01467a7 100644 --- a/files.stone +++ b/files.stone @@ -123,6 +123,10 @@ struct ExportInfo 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" @@ -683,6 +687,8 @@ 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." @@ -692,6 +698,13 @@ 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" @@ -711,6 +724,10 @@ struct ExportMetadata "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? + # TODO(jessk): after /files/paper/update is made public, add "which can be used in :route:`paper/update`." + "If the file is a Paper doc, this gives the latest doc revision." + example default name = "Prime_Numbers.xlsx" size = 7189 @@ -773,7 +790,7 @@ union UploadSessionStartError union UploadSessionLookupError not_found "The upload session ID was not found or has expired. Upload sessions are - valid for 48 hours." + 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 @@ -818,7 +835,7 @@ union UploadSessionFinishError union UploadSessionType sequential - "Pieces of content are uploaded sequentially one after another. This is the default + "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." @@ -856,10 +873,10 @@ route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, Upl 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 48 hours. Attempting + 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 48 hours after its creation will return a + 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 @@ -922,9 +939,8 @@ struct UploadSessionCursor session_id String "The upload session ID (returned by :route:`upload_session/start`)." offset UInt64 - "The amount of data that has been uploaded so far. We use this to make - sure upload data isn't lost or duplicated in the event of a network - error." + "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" @@ -2213,7 +2229,7 @@ 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 and bmp. Photos that are larger than 20MB + 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 @@ -2227,7 +2243,7 @@ route get_thumbnail_batch(GetThumbnailBatchArg, GetThumbnailBatchResult, GetThum "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 and bmp. Photos that are larger than 20MB + 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 @@ -2320,7 +2336,11 @@ struct ThumbnailV2Arg route get_thumbnail:2(ThumbnailV2Arg, PreviewResult, ThumbnailV2Error) - "Get a thumbnail for a file." + "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" @@ -2499,6 +2519,10 @@ union GetTemporaryLinkError 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 diff --git a/team_log_generated.stone b/team_log_generated.stone index b550e5a..9681bb6 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -206,14 +206,58 @@ union AdminAlertSeverityEnum struct AdminAlertingAlertConfiguration "Alert configurations" - alert_state AdminAlertingAlertStatePolicy + alert_state AdminAlertingAlertStatePolicy? "Alert state." + sensitivity_level AdminAlertingAlertSensitivity? + "Sensitivity level." + recipients_settings RecipientsConfiguration? + "Recipient settings." example default alert_state = off + sensitivity_level = invalid + recipients_settings = default example default2 alert_state = off + sensitivity_level = invalid + recipients_settings = default2 + +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 + highest + invalid + low + lowest + medium union AdminAlertingAlertStatePolicy "Policy for controlling whether an alert can be triggered or not" @@ -528,6 +572,10 @@ union IntegrationPolicy disabled enabled +union LabelType + "Label type" + personal_information + union LockStatus "File lock status" locked @@ -614,6 +662,7 @@ union PlacementRestriction europe_only japan_only none + uk_only union PolicyType disposition @@ -2672,6 +2721,33 @@ struct FolderOverviewItemUnpinnedDetails folder_overview_location_asset = 3 pinned_items_asset_indices = [3] +struct ObjectLabelAddedDetails + "Added a label." + + label_type LabelType + "Labels mark a file or folder." + + example default + label_type = personal_information + +struct ObjectLabelRemovedDetails + "Removed a label." + + label_type LabelType + "Labels mark a file or folder." + + example default + label_type = personal_information + +struct ObjectLabelUpdatedValueDetails + "Updated a label's value." + + label_type LabelType + "Labels mark a file or folder." + + example default + label_type = personal_information + struct RewindFolderDetails "Rewound a folder." @@ -6390,6 +6466,9 @@ union EventDetails folder_overview_description_changed_details FolderOverviewDescriptionChangedDetails folder_overview_item_pinned_details FolderOverviewItemPinnedDetails folder_overview_item_unpinned_details FolderOverviewItemUnpinnedDetails + object_label_added_details ObjectLabelAddedDetails + object_label_removed_details ObjectLabelRemovedDetails + object_label_updated_value_details ObjectLabelUpdatedValueDetails rewind_folder_details RewindFolderDetails file_request_change_details FileRequestChangeDetails file_request_close_details FileRequestCloseDetails @@ -7286,6 +7365,24 @@ struct FolderOverviewItemUnpinnedType example default description = "(file_operations) Unpinned item from folder overview" +struct ObjectLabelAddedType + description String + + example default + description = "(file_operations) Added a label" + +struct ObjectLabelRemovedType + description String + + example default + description = "(file_operations) Removed a label" + +struct ObjectLabelUpdatedValueType + description String + + example default + description = "(file_operations) Updated a label's value" + struct RewindFolderType description String @@ -9676,6 +9773,12 @@ union EventType "(file_operations) Pinned item to folder overview" folder_overview_item_unpinned FolderOverviewItemUnpinnedType "(file_operations) Unpinned item from folder overview" + object_label_added ObjectLabelAddedType + "(file_operations) Added a label" + object_label_removed ObjectLabelRemovedType + "(file_operations) Removed a label" + object_label_updated_value ObjectLabelUpdatedValueType + "(file_operations) Updated a label's value" rewind_folder RewindFolderType "(file_operations) Rewound a folder" file_request_change FileRequestChangeType @@ -10594,6 +10697,12 @@ union EventTypeArg "(file_operations) Pinned item to folder overview" folder_overview_item_unpinned "(file_operations) Unpinned item from folder overview" + object_label_added + "(file_operations) Added a label" + object_label_removed + "(file_operations) Removed a label" + object_label_updated_value + "(file_operations) Updated a label's value" rewind_folder "(file_operations) Rewound a folder" file_request_change From 822caa80810d2248730a0c6c61309d45f0063f29 Mon Sep 17 00:00:00 2001 From: Jorge Santoyo Date: Fri, 19 Feb 2021 08:45:21 -0800 Subject: [PATCH 08/48] Spec Update 02/18/2021 (#30) Change Notes: Files Namespace: - Add paper/create, paper/update routes - Add PaperCreateArg, PaperCreateResult, PaperCreateArg, PaperCreateResult, PaperUpdateArg, PaperUpdateResult structs - Add ImportFormat, PaperContentError, PaperCreateError, PaperDocUpdatePolicy, PaperUpdateError unions - Update Comments Team Log Generated Namespace: - Add GovernancePolicyContentDisposedDetails, GovernancePolicyContentDisposedType structs - Add DispositionActionType union - Update ClassificationType union to include pii - Update EventDetails union to include governance_policy_content_disposed_details - Update EventType union to include governance_policy_content_disposed - Update EventTypeArg uniont to include governance_policy_content_disposed - Update Comments Team Reports Namespace: - Deprecate reports/get_storage, reports/get_activity, reports/get_membership, reports/get_devices routes Co-authored-by: jorges26 --- files.stone | 148 ++++++++++++++++++++++++++++++++++++++- team_log_generated.stone | 36 +++++++++- team_reports.stone | 13 ++-- 3 files changed, 190 insertions(+), 7 deletions(-) diff --git a/files.stone b/files.stone index 01467a7..676c88a 100644 --- a/files.stone +++ b/files.stone @@ -725,8 +725,7 @@ struct ExportMetadata For more information see our :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page." paper_revision Int64? - # TODO(jessk): after /files/paper/update is made public, add "which can be used in :route:`paper/update`." - "If the file is a Paper doc, this gives the latest doc revision." + "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" @@ -3070,3 +3069,148 @@ route get_file_lock_batch (LockFileBatchArg, LockFileBatchResult, LockFileError) # # 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/team_log_generated.stone b/team_log_generated.stone index 9681bb6..17b3fca 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -323,7 +323,8 @@ union ClassificationPolicyEnumWrapper enabled union ClassificationType - "The type of classification (currently only PII)" + "The type of classification (currently only personal information)" + personal_information pii union ComputerBackupPolicy @@ -349,6 +350,10 @@ union DeviceUnlinkPolicy keep remove +union DispositionActionType + automatic_delete + automatic_permanently_delete + union DownloadPolicyType "Shared content downloads policy" allow @@ -2025,6 +2030,24 @@ struct GovernancePolicyAddFolderFailedDetails folder = "abc" reason = "abc" +struct GovernancePolicyContentDisposedDetails + "Content disposed." + + governance_policy_id String + "Policy ID." + name String + "Policy name." + policy_type PolicyType? + "Policy type." + disposition_type DispositionActionType + "Disposition type." + + example default + governance_policy_id = "abc" + name = "abc" + policy_type = retention + disposition_type = automatic_delete + struct GovernancePolicyCreateDetails "Activated a new policy." @@ -6398,6 +6421,7 @@ union EventDetails file_unresolve_comment_details FileUnresolveCommentDetails governance_policy_add_folders_details GovernancePolicyAddFoldersDetails governance_policy_add_folder_failed_details GovernancePolicyAddFolderFailedDetails + governance_policy_content_disposed_details GovernancePolicyContentDisposedDetails governance_policy_create_details GovernancePolicyCreateDetails governance_policy_delete_details GovernancePolicyDeleteDetails governance_policy_edit_details_details GovernancePolicyEditDetailsDetails @@ -6957,6 +6981,12 @@ struct GovernancePolicyAddFolderFailedType example default description = "(data_governance) Couldn't add a folder to a policy" +struct GovernancePolicyContentDisposedType + description String + + example default + description = "(data_governance) Content disposed" + struct GovernancePolicyCreateType description String @@ -9637,6 +9667,8 @@ union EventType "(data_governance) Added folders to policy" governance_policy_add_folder_failed GovernancePolicyAddFolderFailedType "(data_governance) Couldn't add a folder to a policy" + governance_policy_content_disposed GovernancePolicyContentDisposedType + "(data_governance) Content disposed" governance_policy_create GovernancePolicyCreateType "(data_governance) Activated a new policy" governance_policy_delete GovernancePolicyDeleteType @@ -10561,6 +10593,8 @@ union EventTypeArg "(data_governance) Added folders to policy" governance_policy_add_folder_failed "(data_governance) Couldn't add a folder to a policy" + governance_policy_content_disposed + "(data_governance) Content disposed" governance_policy_create "(data_governance) Activated a new policy" governance_policy_delete diff --git a/team_reports.stone b/team_reports.stone index e6fb972..6a7ba6f 100644 --- a/team_reports.stone +++ b/team_reports.stone @@ -71,7 +71,8 @@ struct GetStorageReport extends BaseDfbReport 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." + "Retrieves reporting data about a team's storage usage. + Deprecated: Will be removed on July 1st 2021." attrs auth = "team" scope = "team_info.read" @@ -116,7 +117,8 @@ struct GetActivityReport extends BaseDfbReport "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." + "Retrieves reporting data about a team's user activity. + Deprecated: Will be removed on July 1st 2021." attrs auth = "team" scope = "team_info.read" @@ -144,7 +146,8 @@ struct GetMembershipReport extends BaseDfbReport route reports/get_membership(DateRange, GetMembershipReport, DateRangeError) deprecated - "Retrieves reporting data about a team's membership." + "Retrieves reporting data about a team's membership. + Deprecated: Will be removed on July 1st 2021." attrs auth = "team" scope = "team_info.read" @@ -191,7 +194,9 @@ struct GetDevicesReport extends BaseDfbReport route reports/get_devices(DateRange, GetDevicesReport, DateRangeError) deprecated - "Retrieves reporting data about a team's linked devices." + "Retrieves reporting data about a team's linked devices. + Deprecated: Will be removed on July 1st 2021." + attrs auth = "team" scope = "team_info.read" From 9303b45bbfa3d1d3de75a2da609ac47c179d18ba Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Wed, 3 Mar 2021 14:35:13 -0800 Subject: [PATCH 09/48] Spec Update 03/03/2021 (#31) --- auth.stone | 4 +++- files.stone | 5 +++-- team_linked_apps.stone | 38 +++++++++++++++++++++++++++++++++++++- team_log_generated.stone | 1 + 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/auth.stone b/auth.stone index 086a013..7ed9a7a 100644 --- a/auth.stone +++ b/auth.stone @@ -25,7 +25,9 @@ union AuthError "The route is not available to public." route token/revoke(Void, Void, Void) - "Disables the access token used to authenticate the call." + "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 diff --git a/files.stone b/files.stone index 676c88a..e8bc66f 100644 --- a/files.stone +++ b/files.stone @@ -670,8 +670,9 @@ struct DownloadZipResult 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 have fewer than 10,000 total files. The input cannot be a single file. Any single - file must be less than 4GB in size." + 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." attrs host = "content" diff --git a/team_linked_apps.stone b/team_linked_apps.stone index 195f56d..4c4483d 100644 --- a/team_linked_apps.stone +++ b/team_linked_apps.stone @@ -41,6 +41,9 @@ struct ListMemberAppsResult linked_api_apps List(ApiApp) "List of third party applications linked by this team member." + example default + linked_api_apps = [default] + union ListMemberAppsError "Error returned by :route:`linked_apps/list_member_linked_apps`." @@ -72,6 +75,9 @@ struct ListMembersAppsArg passed. Then, if the result of the call includes a cursor, the following requests should include the received cursors in order to receive the next sub list of the team applications." + example default + cursor = "AADAQO8ZWKvBkSMXb1J9dAYVvwZ0wcvfyzIBo2e1H-_N-67pfrYKTb4oN_3LG9_ilWjblZXuiR8ubjjiQQkHq-MvDjbe_6bkcJgjnTpowrRaQA" + struct MemberLinkedApps "Information on linked applications of a team member." @@ -80,6 +86,10 @@ struct MemberLinkedApps linked_api_apps List(ApiApp) "List of third party applications linked by this team member." + example default + team_member_id = "dbmid:AAFdgehTzw7WlXhZJsbGCLePe8RvQGYDr-I" + linked_api_apps = [default] + struct ListMembersAppsResult "Information returned by :route:`linked_apps/list_members_linked_apps`." @@ -92,6 +102,11 @@ struct ListMembersAppsResult "Pass the cursor into :route:`linked_apps/list_members_linked_apps` to receive the next sub list of team's applications." + example default + apps = [default] + has_more = true + cursor = "AADAQO8ZWKvBkSMXb1J9dAYVvwZ0wcvfyzIBo2e1H-_N-67pfrYKTb4oN_3LG9_ilWjblZXuiR8ubjjiQQkHq-MvDjbe_6bkcJgjnTpowrRaQA" + union ListMembersAppsError "Error returned by :route:`linked_apps/list_members_linked_apps`." @@ -124,6 +139,10 @@ struct RevokeLinkedApiAppArg "This flag is not longer supported, the application dedicated folder (in case the application uses 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`." @@ -134,7 +153,6 @@ union RevokeLinkedAppError app_folder_removal_not_supported "App folder removal is not supported." - # # Route: linked_apps/revoke_linked_app # @@ -153,6 +171,9 @@ route linked_apps/revoke_linked_app(RevokeLinkedApiAppArg, Void, RevokeLinkedApp struct RevokeLinkedApiAppBatchArg revoke_linked_app List(RevokeLinkedApiAppArg) + example default + revoke_linked_app = [default] + struct RevokeLinkedAppStatus success Boolean @@ -160,9 +181,16 @@ struct RevokeLinkedAppStatus error_type RevokeLinkedAppError? "The error cause in case of a failure." + example default + success = false + error_type = app_not_found + struct RevokeLinkedAppBatchResult revoke_linked_app_status List(RevokeLinkedAppStatus) + example default + revoke_linked_app_status = [default] + union RevokeLinkedAppBatchError "Error returned by :route:`linked_apps/revoke_linked_app_batch`." @@ -189,6 +217,9 @@ struct ListTeamAppsArg passed. Then, if the result of the call includes a cursor, the following requests should include the received cursors in order to receive the next sub list of the team applications." + example default + cursor = "AADAQO8ZWKvBkSMXb1J9dAYVvwZ0wcvfyzIBo2e1H-_N-67pfrYKTb4oN_3LG9_ilWjblZXuiR8ubjjiQQkHq-MvDjbe_6bkcJgjnTpowrRaQA" + struct ListTeamAppsResult "Information returned by :route:`linked_apps/list_team_linked_apps`." @@ -201,6 +232,11 @@ struct ListTeamAppsResult "Pass the cursor into :route:`linked_apps/list_team_linked_apps` to receive the next sub list of team's applications." + example default + apps = [default] + has_more = true + cursor = "AADAQO8ZWKvBkSMXb1J9dAYVvwZ0wcvfyzIBo2e1H-_N-67pfrYKTb4oN_3LG9_ilWjblZXuiR8ubjjiQQkHq-MvDjbe_6bkcJgjnTpowrRaQA" + union ListTeamAppsError "Error returned by :route:`linked_apps/list_team_linked_apps`." diff --git a/team_log_generated.stone b/team_log_generated.stone index 17b3fca..e4e9a9d 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -265,6 +265,7 @@ union AdminAlertingAlertStatePolicy on union AdminRole + billing_admin limited_admin member_only support_admin From b395c3e9a318665b48e20a087cfeb6109fc3132d Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 24 Mar 2021 14:53:35 -0700 Subject: [PATCH 10/48] Spec Update 03/24/2021 (#32) Change Notes: Team Log Generated Namespace: - Update ClassificationPolicyEnumWrapper to include member_and_team_folders and team_folders - Update Examples Team Member Namespace: - Update Comments Co-authored-by: Brent Bumann --- team_log_generated.stone | 6 ++++-- team_members.stone | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/team_log_generated.stone b/team_log_generated.stone index e4e9a9d..901b96d 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -322,6 +322,8 @@ union ClassificationPolicyEnumWrapper "Policy for controlling team access to the classification feature" disabled enabled + member_and_team_folders + team_folders union ClassificationType "The type of classification (currently only personal information)" @@ -5295,8 +5297,8 @@ struct ClassificationChangePolicyDetails "Policy type." example default - previous_value = disabled - new_value = disabled + previous_value = team_folders + new_value = team_folders classification_type = pii struct ComputerBackupPolicyChangedDetails diff --git a/team_members.stone b/team_members.stone index ef4f363..39d7dd5 100644 --- a/team_members.stone +++ b/team_members.stone @@ -14,7 +14,7 @@ union_closed AdminTier user_management_admin "User can do most user provisioning, de-provisioning and management." support_admin - "User can do a limited set of common support tasks for existing users." + "User can do a limited set of common support tasks for existing users. Note: Dropbox is adding new types of admin roles; these may display as support_admin." member_only "User is not an admin of the team." From 397eca2ba6c0fbc453fb8832ad5c562c89fd6502 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Thu, 8 Apr 2021 14:35:32 -0700 Subject: [PATCH 11/48] Spec Update 04/08/2021 (#33) Change Notes: Shared Links Namespace: - Update Comments Team Log Generated Namespace: - Update AdminAlertCategoryEnum union to include information_governance - Add AdminConsoleAppPermission union - Add AdminConsoleAppPolicy union - Update AdminRole union to include compliance_admin, content_admin, reporting_admin, security_admin - Add AppBlockedByPermissionsDetails struct - Add AppPermissionsChangedDetails struct - Update EventDetails union to include app_blocked_by_permissions_details, app_permissions_changed_details - Add AppBlockedByPermissionsType struct - Add AppPermissionsChangedType struct - Update EventType union to include app_blocked_by_permissions, app_permissions_changed - Update EventTypeArg union to include app_blocked_by_permissions, app_permissions_changed --- shared_links.stone | 4 ++- team_log_generated.stone | 63 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/shared_links.stone b/shared_links.stone index 92a5041..bc69e53 100644 --- a/shared_links.stone +++ b/shared_links.stone @@ -407,7 +407,9 @@ union_closed CreateSharedLinkWithSettingsError settings_error SharedLinkSettingsError "There is an error with the given settings." access_denied - "Access to the requested path is forbidden." + "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. diff --git a/team_log_generated.stone b/team_log_generated.stone index 901b96d..fae1229 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -190,6 +190,7 @@ union AdminAlertCategoryEnum "Alert category" account_takeover data_loss_protection + information_governance malware_sharing massive_file_operation na @@ -264,10 +265,23 @@ union AdminAlertingAlertStatePolicy off on +union AdminConsoleAppPermission + default_for_listed_apps + default_for_unlisted_apps + +union AdminConsoleAppPolicy + allow + block + default + union AdminRole billing_admin + compliance_admin + content_admin limited_admin member_only + reporting_admin + security_admin support_admin team_admin user_management_admin @@ -1862,6 +1876,15 @@ struct AdminAlertingTriggeredAlertDetails alert_category = na alert_instance_id = "pid_admin_alert:AAgAAOVHYCEuavqE0v3Jj9VDogV4wG9q8F-XZKwYpuYTVBm5" +struct AppBlockedByPermissionsDetails + "Failed to connect app for member." + + app_info AppLogInfo + "Relevant application details." + + example default + app_info = default + struct AppLinkTeamDetails "Linked app for team." @@ -5274,6 +5297,24 @@ struct AllowDownloadDisabledDetails struct AllowDownloadEnabledDetails "Enabled downloads." +struct AppPermissionsChangedDetails + "Changed app permissions." + + app_name String? + "Name of the app." + permission AdminConsoleAppPermission? + "Permission that was changed." + previous_value AdminConsoleAppPolicy + "Previous policy." + new_value AdminConsoleAppPolicy + "New policy." + + example default + app_name = "abc" + permission = default_for_listed_apps + previous_value = default + new_value = default + struct CameraUploadsPolicyChangedDetails "Changed camera uploads setting for team." @@ -6408,6 +6449,7 @@ union EventDetails admin_alerting_changed_alert_config_details AdminAlertingChangedAlertConfigDetails admin_alerting_triggered_alert_details AdminAlertingTriggeredAlertDetails + app_blocked_by_permissions_details AppBlockedByPermissionsDetails app_link_team_details AppLinkTeamDetails app_link_user_details AppLinkUserDetails app_unlink_team_details AppUnlinkTeamDetails @@ -6750,6 +6792,7 @@ union EventDetails account_capture_change_policy_details AccountCaptureChangePolicyDetails allow_download_disabled_details AllowDownloadDisabledDetails allow_download_enabled_details AllowDownloadEnabledDetails + app_permissions_changed_details AppPermissionsChangedDetails camera_uploads_policy_changed_details CameraUploadsPolicyChangedDetails classification_change_policy_details ClassificationChangePolicyDetails computer_backup_policy_changed_details ComputerBackupPolicyChangedDetails @@ -6888,6 +6931,12 @@ struct AdminAlertingTriggeredAlertType example default description = "(admin_alerting) Triggered security alert" +struct AppBlockedByPermissionsType + description String + + example default + description = "(apps) Failed to connect app for member" + struct AppLinkTeamType description String @@ -8940,6 +8989,12 @@ struct AllowDownloadEnabledType example default description = "(team_policies) Enabled downloads (deprecated, no longer logged)" +struct AppPermissionsChangedType + description String + + example default + description = "(team_policies) Changed app permissions" + struct CameraUploadsPolicyChangedType description String @@ -9638,6 +9693,8 @@ union EventType "(admin_alerting) Changed an alert setting" admin_alerting_triggered_alert AdminAlertingTriggeredAlertType "(admin_alerting) Triggered security alert" + app_blocked_by_permissions AppBlockedByPermissionsType + "(apps) Failed to connect app for member" app_link_team AppLinkTeamType "(apps) Linked app for team" app_link_user AppLinkUserType @@ -10322,6 +10379,8 @@ union EventType "(team_policies) Disabled downloads (deprecated, no longer logged)" allow_download_enabled AllowDownloadEnabledType "(team_policies) Enabled downloads (deprecated, no longer logged)" + app_permissions_changed AppPermissionsChangedType + "(team_policies) Changed app permissions" camera_uploads_policy_changed CameraUploadsPolicyChangedType "(team_policies) Changed camera uploads setting for team" classification_change_policy ClassificationChangePolicyType @@ -10564,6 +10623,8 @@ union EventTypeArg "(admin_alerting) Changed an alert setting" admin_alerting_triggered_alert "(admin_alerting) Triggered security alert" + app_blocked_by_permissions + "(apps) Failed to connect app for member" app_link_team "(apps) Linked app for team" app_link_user @@ -11248,6 +11309,8 @@ union EventTypeArg "(team_policies) Disabled downloads (deprecated, no longer logged)" allow_download_enabled "(team_policies) Enabled downloads (deprecated, no longer logged)" + app_permissions_changed + "(team_policies) Changed app permissions" camera_uploads_policy_changed "(team_policies) Changed camera uploads setting for team" classification_change_policy From 01bee3a2c93573383fac8430a43c2a5ac250b7d7 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Wed, 14 Apr 2021 14:14:38 -0700 Subject: [PATCH 12/48] Spec Update 04/14/2021 (#34) Change Notes: Team Members Namespace: - Add members/get_available_team_member_roles route - Add MembersGetAvailableTeamMemberRolesResult and TeamMemberRole structs --- team_members.stone | 106 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/team_members.stone b/team_members.stone index 39d7dd5..87f1890 100644 --- a/team_members.stone +++ b/team_members.stone @@ -6,6 +6,39 @@ 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." + + union_closed AdminTier "Describes which team-related admin permissions a user has." @@ -438,6 +471,79 @@ route members/delete_profile_photo(MembersDeleteProfilePhotoArg, TeamMemberInfo, auth = "team" scope = "members.write" + +# +# Route members/get_available_team_member_roles +# + +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 + is_preview = true + 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." + + 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." + + 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 + is_preview = true + auth = "team" + scope = "members.write" + + # # Route members/set_admin_permissions # From 85f2eff045cf6df883f269ed6ecd9b39457077ed Mon Sep 17 00:00:00 2001 From: Eugene Che Date: Fri, 7 May 2021 11:50:58 -0700 Subject: [PATCH 13/48] Spec Update 05/07/2021 (#35) (#39) Change Notes: team_log_generated Namespace - Add MemberTransferredInternalFields structs team_members Namespace - Add members/set_profile_photo:2, members/delete_profile_photo:2, members/add/job_status/get:2, members/add:2, members/list/continue:2, members/get_info:2, members/set_profile:2, members/list:2 routes - Add TeamMemberInfoV2, TeamMemberInfoV2Result, MembersListV2Result, MembersGetInfoV2Arg, MembersGetInfoArgs, MembersGetInfoV2Result, MemberAddArgBase, MemberAddArg extends MemberAddArgBase, MemberAddV2Arg extends MemberAddArgBase, MembersAddArgBase, MembersAddV2Arg extends MembersAddArgBase, MembersAddArg extends MembersAddArgBase structs - Add MembersGetInfoItemV2 extends MembersGetInfoItemBase, MemberAddV2Result extends MemberAddResultBase, MembersAddLaunchV2Result extends async.LaunchResultBase, MembersAddJobStatusV2Result extends async.PollResultBase unions - Remove MembersGetInfoArgs, MemberAddArg, MembersAddArg structs Co-authored-by: Eugene Che --- team_log_generated.stone | 19 +++ team_members.stone | 266 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 268 insertions(+), 17 deletions(-) diff --git a/team_log_generated.stone b/team_log_generated.stone index fae1229..b46454a 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -637,6 +637,22 @@ 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 MicrosoftOfficeAddinPolicy "Microsoft Office addin policy" disabled @@ -2707,6 +2723,9 @@ struct FileMoveDetails struct FilePermanentlyDeleteDetails "Permanently deleted files and/or folders." + + example default + struct FilePreviewDetails "Previewed files and/or folders." diff --git a/team_members.stone b/team_members.stone index 87f1890..6aa66bd 100644 --- a/team_members.stone +++ b/team_members.stone @@ -105,6 +105,29 @@ struct MembersListArg 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." @@ -117,6 +140,20 @@ struct TeamMemberInfo 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) @@ -136,6 +173,19 @@ struct MembersListResult union MembersListError "" + +route members/list:2(MembersListArg, MembersListV2Result, MembersListError) + "Lists members of a team. + + Permission : Team information." + + attrs + is_preview = true + auth = "team" + scope = "members.read" + + + route members/list(MembersListArg, MembersListResult, MembersListError) "Lists members of a team. @@ -161,6 +211,17 @@ 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 + is_preview = true + 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. @@ -176,21 +237,41 @@ route members/list/continue(MembersListContinueArg, MembersListResult, MembersLi # Route: members/get_info # -struct MembersGetInfoArgs +struct MembersGetInfoV2Arg members List(UserSelectorArg) "List of team members." example default members = [default] -union_closed MembersGetInfoItem - "Describes a result obtained for a single user whose id was specified in the - parameter of :route:`members/get_info`." +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`, + "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." @@ -202,10 +283,30 @@ union_closed MembersGetInfoItem # 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 + is_preview = true + auth = "team" + scope = "members.read" + route members/get_info(MembersGetInfoArgs, MembersGetInfoResult, MembersGetInfoError) "Returns information about multiple team members. @@ -229,7 +330,7 @@ route members/get_info(MembersGetInfoArgs, MembersGetInfoResult, MembersGetInfoE # Route members/add # -struct MemberAddArg +struct MemberAddArgBase member_email common.EmailAddress member_given_name common.OptionalNamePart? "Member's first name." @@ -244,10 +345,18 @@ struct MemberAddArg 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." - role AdminTier = member_only 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" @@ -255,24 +364,38 @@ struct MemberAddArg member_external_id = "company_id:342432" role = default -struct MembersAddArg - new_members List(MemberAddArg) - "Details of new members to be added to the team." +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 - "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." + example default + new_members = [default] - success TeamMemberInfo - "Describes a user that was successfully added to the team." +union_closed MemberAddResultBase team_license_limit common.EmailAddress "Team is already full. The organization has no available licenses." free_team_member_limit_reached common.EmailAddress @@ -296,15 +419,69 @@ union_closed MemberAddResult user_creation_failed common.EmailAddress "User creation has failed." + 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." + + success TeamMemberInfo + "Describes a user that was successfully added to the team." + + example default + success = default + +union MembersAddLaunchV2Result extends async.LaunchResultBase + complete List(MemberAddV2Result) + + example default + complete = [default] + union_closed MembersAddLaunch extends async.LaunchResultBase complete List(MemberAddResult) 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 + is_preview = true + auth = "team" + scope = "members.write" + route members/add(MembersAddArg, MembersAddLaunch, Void) "Adds members to a team. @@ -331,6 +508,17 @@ route members/add(MembersAddArg, MembersAddLaunch, Void) # Route members/add/job_status/get # +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] + union_closed MembersAddJobStatus extends async.PollResultBase complete List(MemberAddResult) "The asynchronous job has finished. For each member that was specified in the @@ -342,6 +530,18 @@ union_closed MembersAddJobStatus extends async.PollResultBase 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. + + Permission : Team member management." + + attrs + is_preview = true + 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. @@ -404,6 +604,17 @@ union MembersSetProfileError extends MemberSelectorError "Directory Restrictions option is not available." +route members/set_profile:2(MembersSetProfileArg, TeamMemberInfoV2Result, MembersSetProfileError) + "Updates a team member's profile. + + Permission : Team member management." + + attrs + is_preview = true + auth = "team" + scope = "members.write" + + route members/set_profile(MembersSetProfileArg, TeamMemberInfo, MembersSetProfileError) "Updates a team member's profile. @@ -435,6 +646,17 @@ union MembersSetProfilePhotoError extends MemberSelectorError photo_error account.SetProfilePhotoError +route members/set_profile_photo:2(MembersSetProfilePhotoArg, TeamMemberInfoV2Result, MembersSetProfilePhotoError) + "Updates a team member's profile photo. + + Permission : Team member management." + + attrs + is_preview = true + auth = "team" + scope = "members.write" + + route members/set_profile_photo(MembersSetProfilePhotoArg, TeamMemberInfo, MembersSetProfilePhotoError) "Updates a team member's profile photo. @@ -462,6 +684,16 @@ union MembersDeleteProfilePhotoError extends MemberSelectorError "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 + is_preview = true + auth = "team" + scope = "members.write" + route members/delete_profile_photo(MembersDeleteProfilePhotoArg, TeamMemberInfo, MembersDeleteProfilePhotoError) "Deletes a team member's profile photo. From 4d5bb48ac801df6410ddc9c2cad0d9f5bb0a2365 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Tue, 11 May 2021 11:58:51 -0700 Subject: [PATCH 14/48] Spec Update 05/11/2021 (#40) Change Notes: Team Log Namespace: - Add user_defined_tag to LabelType union --- team_log_generated.stone | 1 + 1 file changed, 1 insertion(+) diff --git a/team_log_generated.stone b/team_log_generated.stone index b46454a..ff74eef 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -597,6 +597,7 @@ union IntegrationPolicy union LabelType "Label type" personal_information + user_defined_tag union LockStatus "File lock status" From 9745cde3e1ee181953a0f97cb10bfffc7076a35f Mon Sep 17 00:00:00 2001 From: Jorge Santoyo Date: Wed, 26 May 2021 14:41:21 -0700 Subject: [PATCH 15/48] Spec Update 05/26/2021 (#41) Change Notes: team_log_generated Namespace - Add AdminAlertingAlertStateChangedDetails, OrganizeFolderWithTidyDetails, AdminAlertingAlertStateChangedType, OrganizeFolderWithTidyType structs - Add AdminAlertGeneralStateEnum unions - Update EventDetails union to include organize_folder_with_tidy_details - Update EventType union to include admin_alerting_alert_state_changed, organize_folder_with_tidy - Update EventTypeArg union to include admin_alerting_alert_state_changed, organize_folder_with_tidy Co-authored-by: jorges26 --- team_log_generated.stone | 57 ++++++++++++++++++++++++++++++++++++++++ team_members.stone | 10 ------- 2 files changed, 57 insertions(+), 10 deletions(-) diff --git a/team_log_generated.stone b/team_log_generated.stone index ff74eef..d73af19 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -196,6 +196,14 @@ union AdminAlertCategoryEnum na threat_management +union AdminAlertGeneralStateEnum + "Alert state" + active + dismissed + in_progress + na + resolved + union AdminAlertSeverityEnum "Alert severity" high @@ -1860,6 +1868,30 @@ union EventCategory # Types for specific events ############################# +struct AdminAlertingAlertStateChangedDetails + "Changed an alert state." + + alert_name String + "Alert name." + alert_severity AdminAlertSeverityEnum + "Alert severity." + alert_category AdminAlertCategoryEnum + "Alert category." + alert_instance_id String + "Alert ID." + previous_value AdminAlertGeneralStateEnum + "Alert state before the change." + new_value AdminAlertGeneralStateEnum + "Alert state after the change." + + example default + alert_name = "abc" + alert_severity = na + alert_category = na + alert_instance_id = "pid_admin_alert:AAgAAOVHYCEuavqE0v3Jj9VDogV4wG9q8F-XZKwYpuYTVBm5" + previous_value = na + new_value = na + struct AdminAlertingChangedAlertConfigDetails "Changed an alert setting." @@ -2817,6 +2849,9 @@ struct ObjectLabelUpdatedValueDetails example default label_type = personal_information +struct OrganizeFolderWithTidyDetails + "Organized a folder with the Tidy Up action." + struct RewindFolderDetails "Rewound a folder." @@ -6467,6 +6502,7 @@ struct TeamMergeRequestSentShownToSecondaryTeamDetails 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 app_blocked_by_permissions_details AppBlockedByPermissionsDetails @@ -6558,6 +6594,7 @@ union EventDetails object_label_added_details ObjectLabelAddedDetails object_label_removed_details ObjectLabelRemovedDetails object_label_updated_value_details ObjectLabelUpdatedValueDetails + organize_folder_with_tidy_details OrganizeFolderWithTidyDetails rewind_folder_details RewindFolderDetails file_request_change_details FileRequestChangeDetails file_request_close_details FileRequestCloseDetails @@ -6939,6 +6976,12 @@ union EventDetails # Event Type ############## +struct AdminAlertingAlertStateChangedType + description String + + example default + description = "(admin_alerting) Changed an alert state" + struct AdminAlertingChangedAlertConfigType description String @@ -7485,6 +7528,12 @@ struct ObjectLabelUpdatedValueType example default description = "(file_operations) Updated a label's value" +struct OrganizeFolderWithTidyType + description String + + example default + description = "(file_operations) Organized a folder with the Tidy Up action" + struct RewindFolderType description String @@ -9709,6 +9758,8 @@ struct TeamMergeRequestSentShownToSecondaryTeamType 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 "(admin_alerting) Changed an alert setting" admin_alerting_triggered_alert AdminAlertingTriggeredAlertType @@ -9891,6 +9942,8 @@ union EventType "(file_operations) Removed a label" object_label_updated_value ObjectLabelUpdatedValueType "(file_operations) Updated a label's value" + organize_folder_with_tidy OrganizeFolderWithTidyType + "(file_operations) Organized a folder with the Tidy Up action" rewind_folder RewindFolderType "(file_operations) Rewound a folder" file_request_change FileRequestChangeType @@ -10639,6 +10692,8 @@ union EventType union EventTypeArg "The type of the event." + admin_alerting_alert_state_changed + "(admin_alerting) Changed an alert state" admin_alerting_changed_alert_config "(admin_alerting) Changed an alert setting" admin_alerting_triggered_alert @@ -10821,6 +10876,8 @@ union EventTypeArg "(file_operations) Removed a label" object_label_updated_value "(file_operations) Updated a label's value" + organize_folder_with_tidy + "(file_operations) Organized a folder with the Tidy Up action" rewind_folder "(file_operations) Rewound a folder" file_request_change diff --git a/team_members.stone b/team_members.stone index 6aa66bd..b430761 100644 --- a/team_members.stone +++ b/team_members.stone @@ -180,7 +180,6 @@ route members/list:2(MembersListArg, MembersListV2Result, MembersListError) Permission : Team information." attrs - is_preview = true auth = "team" scope = "members.read" @@ -218,7 +217,6 @@ route members/list/continue:2(MembersListContinueArg, MembersListV2Result, Membe Permission : Team information." attrs - is_preview = true auth = "team" scope = "members.read" @@ -303,7 +301,6 @@ route members/get_info:2(MembersGetInfoV2Arg, MembersGetInfoV2Result, MembersGet for IDs (or emails) that cannot be matched to a valid team member." attrs - is_preview = true auth = "team" scope = "members.read" @@ -478,7 +475,6 @@ route members/add:2(MembersAddV2Arg, MembersAddLaunchV2Result, Void) the user before they become 'active'." attrs - is_preview = true auth = "team" scope = "members.write" @@ -537,7 +533,6 @@ route members/add/job_status/get:2(async.PollArg, MembersAddJobStatusV2Result, a Permission : Team member management." attrs - is_preview = true auth = "team" scope = "members.write" @@ -610,7 +605,6 @@ route members/set_profile:2(MembersSetProfileArg, TeamMemberInfoV2Result, Member Permission : Team member management." attrs - is_preview = true auth = "team" scope = "members.write" @@ -652,7 +646,6 @@ route members/set_profile_photo:2(MembersSetProfilePhotoArg, TeamMemberInfoV2Res Permission : Team member management." attrs - is_preview = true auth = "team" scope = "members.write" @@ -690,7 +683,6 @@ route members/delete_profile_photo:2(MembersDeleteProfilePhotoArg, TeamMemberInf Permission : Team member management." attrs - is_preview = true auth = "team" scope = "members.write" @@ -724,7 +716,6 @@ route members/get_available_team_member_roles(Void, MembersGetAvailableTeamMembe Permission : Team member management." attrs - is_preview = true auth = "team" scope = "members.read" @@ -771,7 +762,6 @@ route members/set_admin_permissions:2(MembersSetPermissions2Arg, MembersSetPermi Permission : Team member management." attrs - is_preview = true auth = "team" scope = "members.write" From 9923a5075753fa7521c9a180407420b5d893e163 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Wed, 16 Jun 2021 16:27:31 -0700 Subject: [PATCH 16/48] Spec Update 06/16/2021 (#43) Change Notes: shared_content_links Namespace: - Update Comments shared_links Namespace: - Update SharedLinkSettings struct to include require_password - Update Comments team_log_generated Namespace: - Add ChangeLinkExpirationPolicy, DefaultLinkExpirationDaysPolicy, EnforceLinkPasswordPolicy unions - Update LabelType union to include test_only - Add ApplyNamingConventionDetails, UserTagsAddedDetails, UserTagsRemovedDetails, SharingChangeLinkAllowChangeExpirationPolicyDetails, SharingChangeLinkDefaultExpirationPolicyDetails, SharingChangeLinkEnforcePasswordPolicyDetails, ApplyNamingConventionType, UserTagsAddedType, UserTagsRemovedType, SharingChangeLinkAllowChangeExpirationPolicyType, SharingChangeLinkDefaultExpirationPolicyType and SharingChangeLinkEnforcePasswordPolicyType structs - Update EventDetails union to include apply_naming_convention_details, user_tags_added_details, user_tags_removed_details, sharing_change_link_allow_change_expiration_policy_details, sharing_change_link_default_expiration_policy_details and sharing_change_link_enforce_password_policy_details - Update EventType union to include apply_naming_convention, user_tags_added, user_tags_removed, sharing_change_link_allow_change_expiration_policy, sharing_change_link_default_expiration_policy and sharing_change_link_enforce_password_policy - Update EventTypeArg union to include apply_naming_convention, user_tags_added, user_tags_removed, sharing_change_link_allow_change_expiration_policy, sharing_change_link_default_expiration_policy and sharing_change_link_enforce_password_policy - Update Examples --- shared_content_links.stone | 2 +- shared_links.stone | 8 +- team_log_generated.stone | 151 ++++++++++++++++++++++++++++++++++++- 3 files changed, 154 insertions(+), 7 deletions(-) diff --git a/shared_content_links.stone b/shared_content_links.stone index 738dee5..dcc9d0f 100644 --- a/shared_content_links.stone +++ b/shared_content_links.stone @@ -39,7 +39,7 @@ union LinkAudience not grant additional rights to the user. Members of the content who use this link can only access the content with their pre-existing access rights." password - "A link-specific password is required to access the + "Use `require_password` instead. A link-specific password is required to access the link. Login is not required." members "Link is accessible only by members of the content." diff --git a/shared_links.stone b/shared_links.stone index bc69e53..f1e4a19 100644 --- a/shared_links.stone +++ b/shared_links.stone @@ -293,10 +293,10 @@ route list_shared_links(ListSharedLinksArg, ListSharedLinksResult, ListSharedLin # struct SharedLinkSettings - requested_visibility RequestedVisibility? - "The requested access for this shared link." + require_password Boolean? + "Boolean flag to enable or disable password protection." link_password String? - "If :field:`requested_visibility` is :field:`RequestedVisibility.password` this is needed + "If :field:`require_password` is true, this is needed to specify the password to access the link." expires common.DropboxTimestamp? "Expiration time of the shared link. By default the link won't expire." @@ -308,6 +308,8 @@ struct SharedLinkSettings access RequestedLinkAccessLevel? "Requested access level you want the audience to gain from this link. Note, modifying access level for an existing link is not supported." + requested_visibility RequestedVisibility? + "Use :field:`audience` instead. The requested access for this shared link." example default requested_visibility = public diff --git a/team_log_generated.stone b/team_log_generated.stone index d73af19..d9f0ee2 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -340,6 +340,11 @@ struct Certificate 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 is updated" + allowed + not_allowed + union ClassificationPolicyEnumWrapper "Policy for controlling team access to the classification feature" disabled @@ -363,6 +368,17 @@ union ContentPermanentDeletePolicy disabled enabled +union DefaultLinkExpirationDaysPolicy + "Policy for the default number of days until an externally shared link expires" + day_1 + day_180 + day_3 + day_30 + day_7 + day_90 + none + year_1 + union DeviceApprovalsPolicy limited unlimited @@ -384,6 +400,11 @@ union DownloadPolicyType allow disallow +union EnforceLinkPasswordPolicy + "Policy for deciding whether password must be enforced when an externally shared link is updated" + optional + required + union ExtendedVersionHistoryPolicy explicitly_limited explicitly_unlimited @@ -605,6 +626,7 @@ union IntegrationPolicy union LabelType "Label type" personal_information + test_only user_defined_tag union LockStatus @@ -2705,6 +2727,9 @@ struct DomainVerificationRemoveDomainDetails struct EnabledDomainInvitesDetails "Enabled domain invites." +struct ApplyNamingConventionDetails + "Applied a Naming Convention rule." + struct CreateFolderDetails "Created folders." @@ -2829,7 +2854,7 @@ struct ObjectLabelAddedDetails "Labels mark a file or folder." example default - label_type = personal_information + label_type = test_only struct ObjectLabelRemovedDetails "Removed a label." @@ -2838,7 +2863,7 @@ struct ObjectLabelRemovedDetails "Labels mark a file or folder." example default - label_type = personal_information + label_type = test_only struct ObjectLabelUpdatedValueDetails "Updated a label's value." @@ -2847,7 +2872,7 @@ struct ObjectLabelUpdatedValueDetails "Labels mark a file or folder." example default - label_type = personal_information + label_type = test_only struct OrganizeFolderWithTidyDetails "Organized a folder with the Tidy Up action." @@ -2861,6 +2886,24 @@ struct RewindFolderDetails example default rewind_folder_target_ts_ms = "2017-01-25T15:51:30Z" +struct UserTagsAddedDetails + "Tagged a file." + + values List(String) + "values." + + example default + values = ["abc"] + +struct UserTagsRemovedDetails + "Removed tags." + + values List(String) + "values." + + example default + values = ["abc"] + struct FileRequestChangeDetails "Changed file request." @@ -5862,6 +5905,42 @@ struct SharingChangeFolderJoinPolicyDetails new_value = from_anyone previous_value = from_anyone +struct SharingChangeLinkAllowChangeExpirationPolicyDetails + "Changed the password requirement for the links shared outside of the team." + + new_value EnforceLinkPasswordPolicy + "To." + previous_value EnforceLinkPasswordPolicy? + "From." + + example default + new_value = optional + previous_value = optional + +struct SharingChangeLinkDefaultExpirationPolicyDetails + "Changed the default expiration for the links shared outside of the team." + + new_value DefaultLinkExpirationDaysPolicy + "To." + previous_value DefaultLinkExpirationDaysPolicy? + "From." + + example default + new_value = none + previous_value = none + +struct SharingChangeLinkEnforcePasswordPolicyDetails + "Changed the allow remove or change expiration policy for the links shared outside of the team." + + new_value ChangeLinkExpirationPolicy + "To." + previous_value ChangeLinkExpirationPolicy? + "From." + + example default + new_value = allowed + previous_value = allowed + struct SharingChangeLinkPolicyDetails "Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default." @@ -6572,6 +6651,7 @@ union EventDetails domain_verification_add_domain_success_details DomainVerificationAddDomainSuccessDetails domain_verification_remove_domain_details DomainVerificationRemoveDomainDetails enabled_domain_invites_details EnabledDomainInvitesDetails + apply_naming_convention_details ApplyNamingConventionDetails create_folder_details CreateFolderDetails file_add_details FileAddDetails file_copy_details FileCopyDetails @@ -6596,6 +6676,8 @@ union EventDetails object_label_updated_value_details ObjectLabelUpdatedValueDetails organize_folder_with_tidy_details OrganizeFolderWithTidyDetails rewind_folder_details RewindFolderDetails + user_tags_added_details UserTagsAddedDetails + user_tags_removed_details UserTagsRemovedDetails file_request_change_details FileRequestChangeDetails file_request_close_details FileRequestCloseDetails file_request_create_details FileRequestCreateDetails @@ -6900,6 +6982,9 @@ union EventDetails rewind_policy_changed_details RewindPolicyChangedDetails send_for_signature_policy_changed_details SendForSignaturePolicyChangedDetails sharing_change_folder_join_policy_details SharingChangeFolderJoinPolicyDetails + sharing_change_link_allow_change_expiration_policy_details SharingChangeLinkAllowChangeExpirationPolicyDetails + sharing_change_link_default_expiration_policy_details SharingChangeLinkDefaultExpirationPolicyDetails + sharing_change_link_enforce_password_policy_details SharingChangeLinkEnforcePasswordPolicyDetails sharing_change_link_policy_details SharingChangeLinkPolicyDetails sharing_change_member_policy_details SharingChangeMemberPolicyDetails showcase_change_download_policy_details ShowcaseChangeDownloadPolicyDetails @@ -7396,6 +7481,12 @@ struct EnabledDomainInvitesType example default description = "(domains) Enabled domain invites (deprecated, no longer logged)" +struct ApplyNamingConventionType + description String + + example default + description = "(file_operations) Applied a Naming Convention rule" + struct CreateFolderType description String @@ -7540,6 +7631,18 @@ struct RewindFolderType example default description = "(file_operations) Rewound a folder" +struct UserTagsAddedType + description String + + example default + description = "(file_operations) Tagged a file" + +struct UserTagsRemovedType + description String + + example default + description = "(file_operations) Removed tags" + struct FileRequestChangeType description String @@ -9364,6 +9467,24 @@ struct SharingChangeFolderJoinPolicyType example default description = "(team_policies) Changed whether team members can join shared folders owned outside team" +struct SharingChangeLinkAllowChangeExpirationPolicyType + description String + + example default + description = "(team_policies) Changed the password requirement for the links shared outside of the team" + +struct SharingChangeLinkDefaultExpirationPolicyType + description String + + example default + description = "(team_policies) Changed the default expiration for the links shared outside of the team" + +struct SharingChangeLinkEnforcePasswordPolicyType + description String + + example default + description = "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" + struct SharingChangeLinkPolicyType description String @@ -9898,6 +10019,8 @@ union EventType "(domains) Removed domain from list of verified team domains" enabled_domain_invites EnabledDomainInvitesType "(domains) Enabled domain invites (deprecated, no longer logged)" + apply_naming_convention ApplyNamingConventionType + "(file_operations) Applied a Naming Convention rule" create_folder CreateFolderType "(file_operations) Created folders (deprecated, no longer logged)" file_add FileAddType @@ -9946,6 +10069,10 @@ union EventType "(file_operations) Organized a folder with the Tidy Up action" rewind_folder RewindFolderType "(file_operations) Rewound a folder" + user_tags_added UserTagsAddedType + "(file_operations) Tagged a file" + user_tags_removed UserTagsRemovedType + "(file_operations) Removed tags" file_request_change FileRequestChangeType "(file_requests) Changed file request" file_request_close FileRequestCloseType @@ -10554,6 +10681,12 @@ union EventType "(team_policies) Changed send for signature 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 + "(team_policies) Changed the password requirement for the links shared outside of the team" + sharing_change_link_default_expiration_policy SharingChangeLinkDefaultExpirationPolicyType + "(team_policies) Changed the default expiration for the links shared outside of the team" + sharing_change_link_enforce_password_policy SharingChangeLinkEnforcePasswordPolicyType + "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" sharing_change_link_policy SharingChangeLinkPolicyType "(team_policies) Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default" sharing_change_member_policy SharingChangeMemberPolicyType @@ -10832,6 +10965,8 @@ union EventTypeArg "(domains) Removed domain from list of verified team domains" enabled_domain_invites "(domains) Enabled domain invites (deprecated, no longer logged)" + apply_naming_convention + "(file_operations) Applied a Naming Convention rule" create_folder "(file_operations) Created folders (deprecated, no longer logged)" file_add @@ -10880,6 +11015,10 @@ union EventTypeArg "(file_operations) Organized a folder with the Tidy Up action" rewind_folder "(file_operations) Rewound a folder" + user_tags_added + "(file_operations) Tagged a file" + user_tags_removed + "(file_operations) Removed tags" file_request_change "(file_requests) Changed file request" file_request_close @@ -11488,6 +11627,12 @@ union EventTypeArg "(team_policies) Changed send for signature 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 + "(team_policies) Changed the password requirement for the links shared outside of the team" + sharing_change_link_default_expiration_policy + "(team_policies) Changed the default expiration for the links shared outside of the team" + sharing_change_link_enforce_password_policy + "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" sharing_change_link_policy "(team_policies) Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default" sharing_change_member_policy From 444efadbf5a13253dcc8faf6d752df705e001402 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Wed, 23 Jun 2021 15:25:17 -0400 Subject: [PATCH 17/48] Spec Update 06/23/2021 (#44) Change Notes: - Add release note generator script files Namespace - Update comments sharing_files Namespace - Update comments team_legal_holds Namespace - Update comments team_log_generated Namespace - Add InviteAcceptanceEmailPolicyChangedDetails, InviteAcceptanceEmailPolicyChangedType structs - Add InviteAcceptanceEmailPolicy unions - Update EventDetails union to include invite_acceptance_email_policy_changed_details - Update EventType union to include invite_acceptance_email_policy_changed, and invite_acceptance_email_policy_changed team_secondary_mails Namespace - Update comments --- files.stone | 2 +- release_note_generator.py | 188 +++++++++++++++++++++++++++++++++++++ sharing_files.stone | 2 +- team_legal_holds.stone | 2 +- team_log_generated.stone | 28 ++++++ team_secondary_mails.stone | 12 +-- 6 files changed, 225 insertions(+), 9 deletions(-) create mode 100644 release_note_generator.py diff --git a/files.stone b/files.stone index e8bc66f..da60528 100644 --- a/files.stone +++ b/files.stone @@ -2590,7 +2590,7 @@ route get_temporary_upload_link(GetTemporaryUploadLinkArg, GetTemporaryUploadLin of the uploaded data in JSON format. - Example succesful temporary upload link consumption response: + Example successful temporary upload link consumption response: {\"content-hash\": \"599d71033d700ac892a0e48fa61b125d2f5994\"} diff --git a/release_note_generator.py b/release_note_generator.py new file mode 100644 index 0000000..c328526 --- /dev/null +++ b/release_note_generator.py @@ -0,0 +1,188 @@ +import os +import re +from enum import Enum +from datetime import date +from collections import defaultdict +from sys import argv +from typing import List, Optional, NamedTuple, Tuple +from unidiff import PatchSet + +class DataType(str, Enum): + ROUTE = "route" + STRUCT = "struct" + UNION = "union" + +NsChange = NamedTuple('NsChange', [ + ('file_name', str), + ('added_routes', List[str]), + ('added_structs', List[str]), + ('added_unions', List[str]), + ('deprecated_routes', List[str]), + ('removed_routes', List[str]), + ('removed_structs', List[str]), + ('removed_unions', List[str]), + ('updated_datatypes', Optional[List[Tuple[str, DataType]]]), +]) + +ChangeLog = NamedTuple('ChangeLog', [ + ('ns_changes', List[NsChange]), + ('added_nses', List[str]), + ('removed_nses', List[str]), +]) + + +def parse_datatype_info(line): + # type: (str) -> Optional[Tuple[DataType, str]] + route = re.match(r"^route (.+)\(", line) + struct = re.match(r"^struct (.+)$", line) + union = re.match(r"^union (.+)$", line) + match = struct or union or route + if not match: + return None + datatype = DataType.ROUTE + if struct: + datatype = DataType.STRUCT + if union: + datatype = DataType.UNION + return datatype, match.group(1) + + +def parse_change_log(change_log_diff): + # type: (str) -> ChangeLog + ns_changes = [] + added_nses = [] + removed_nses = [] + + patch = PatchSet(change_log_diff) + for patch_file in patch: + path_parts = patch_file.path.split('.') + if len(path_parts) != 2: + continue + ns_file_name, ext = path_parts + if ext != "stone": + continue + + if patch_file.is_added_file: + added_nses.append(ns_file_name) + continue + + if patch_file.is_removed_file: + removed_nses.append(ns_file_name) + continue + + added_routes = [] + added_structs = [] + added_unions = [] + deprecated_routes = [] + removed_routes = [] + removed_structs = [] + removed_unions = [] + updated_datatypes = [] + + route_map = defaultdict(int) + + # Pass for checking for creation/deletion of datatypes + for hunk in patch_file: + for line in hunk: + datatype_info = parse_datatype_info(line.value) + if datatype_info is None: + continue + datatype, datatype_name = datatype_info + + if datatype == DataType.ROUTE: + if line.is_added: + route_map[datatype_name] += 1 + if line.is_removed: + route_map[datatype_name] -= 1 + + if datatype == DataType.STRUCT: + if line.is_added: + added_structs.append(datatype_name) + if line.is_removed: + removed_structs.append(datatype_name) + + if datatype == DataType.UNION: + if line.is_added: + added_unions.append(datatype_name) + if line.is_removed: + removed_unions.append(datatype_name) + + + datatype, datatype_name = None, None + seen_datatypes = set() + + # Pass to check for updated datatypes + for line in hunk: + datatype_info = parse_datatype_info(line.value) + if datatype_info and not line.is_removed: + if line.is_added: + datatype, datatype_name = None, None + else: + datatype, datatype_name = datatype_info + if not datatype_info and datatype and datatype_name: + if line.is_removed or line.is_added and datatype_name not in seen_datatypes: + updated_datatypes.append((datatype, datatype_name)) + seen_datatypes.add(datatype_name) + + for route, ref_count in route_map.iteritems(): + if ref_count > 0: + added_routes.append(route) + if ref_count < 0: + removed_routes.append(route) + + ns_change = NsChange( + ns_file_name, + added_routes, + added_structs, + added_unions, + deprecated_routes, + removed_routes, + removed_structs, + removed_unions, + updated_datatypes, + ) + ns_changes.append(ns_change) + + change_log = ChangeLog(ns_changes, added_nses, removed_nses) + return change_log + + +def main(): + stream = os.popen('git diff') + diff = stream.read() + change_log = parse_change_log(diff) + print "Spec Update {} (#)".format(date.today().strftime("%m/%d/%Y")) + print + print "Change Notes:" + for ns_change in change_log.ns_changes: + print + print "{} Namespace".format(ns_change.file_name) + if ns_change.added_routes: + print "- Add {} routes".format(", ".join(ns_change.added_routes)) + if ns_change.added_structs: + print "- Add {} structs".format(", ".join(ns_change.added_structs)) + if ns_change.added_unions: + print "- Add {} unions".format(", ".join(ns_change.added_unions)) + if ns_change.removed_routes: + print "- Remove {} routes".format(", ".join(ns_change.removed_routes)) + if ns_change.removed_structs: + print "- Remove {} structs".format(", ".join(ns_change.removed_structs)) + if ns_change.removed_unions: + print "- Remove {} unions".format(", ".join(ns_change.removed_unions)) + if ns_change.updated_datatypes: + for datatype, datatype_name in ns_change.updated_datatypes: + print "- Update {} {} to include/remove/deprecate ".format(datatype_name, datatype) + if change_log.added_nses: + print + for ns in change_log.added_nses: + print("Add {} namespace".format(ns)) + + if change_log.removed_nses: + print + for ns in change_log.removed_nses: + print("Add {} namespace".format(ns)) + + +if __name__ == "__main__": + main() + diff --git a/sharing_files.stone b/sharing_files.stone index 5f37dfe..6da6e8e 100644 --- a/sharing_files.stone +++ b/sharing_files.stone @@ -261,7 +261,7 @@ struct AddFileMemberArgs members List(MemberSelector) "Members to add. Note that even an email address is given, this - may result in a user being directy added to the membership if that + may result in a user being directly added to the membership if that email is the user's main account email." custom_message String? diff --git a/team_legal_holds.stone b/team_legal_holds.stone index 46aeceb..079ffd6 100644 --- a/team_legal_holds.stone +++ b/team_legal_holds.stone @@ -49,7 +49,7 @@ struct LegalHoldPolicy activation_time common.DropboxTimestamp? "The time at which the legal hold was activated." members MembersInfo - "Team members IDs and number of permanetly deleted members under hold." + "Team members IDs and number of permanently deleted members under hold." status LegalHoldStatus "The current state of the hold." start_date common.DropboxTimestamp diff --git a/team_log_generated.stone b/team_log_generated.stone index d9f0ee2..5e8f29f 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -623,6 +623,11 @@ union IntegrationPolicy disabled enabled +union InviteAcceptanceEmailPolicy + "Policy for deciding whether team admins receive email when an invitation to join the team is accepted" + disabled + enabled + union LabelType "Label type" personal_information @@ -5668,6 +5673,18 @@ struct IntegrationPolicyChangedDetails new_value = disabled previous_value = disabled +struct InviteAcceptanceEmailPolicyChangedDetails + "Changed invite accept email policy for team." + + new_value InviteAcceptanceEmailPolicy + "To." + previous_value InviteAcceptanceEmailPolicy + "From." + + example default + new_value = disabled + previous_value = disabled + struct MemberRequestsChangePolicyDetails "Changed whether users can find team when not invited." @@ -6959,6 +6976,7 @@ union EventDetails google_sso_change_policy_details GoogleSsoChangePolicyDetails group_user_management_change_policy_details GroupUserManagementChangePolicyDetails integration_policy_changed_details IntegrationPolicyChangedDetails + invite_acceptance_email_policy_changed_details InviteAcceptanceEmailPolicyChangedDetails member_requests_change_policy_details MemberRequestsChangePolicyDetails member_send_invite_policy_changed_details MemberSendInvitePolicyChangedDetails member_space_limits_add_exception_details MemberSpaceLimitsAddExceptionDetails @@ -9329,6 +9347,12 @@ struct IntegrationPolicyChangedType example default description = "(team_policies) Changed integration policy for team" +struct InviteAcceptanceEmailPolicyChangedType + description String + + example default + description = "(team_policies) Changed invite accept email policy for team" + struct MemberRequestsChangePolicyType description String @@ -10635,6 +10659,8 @@ union EventType "(team_policies) Changed who can create groups" integration_policy_changed IntegrationPolicyChangedType "(team_policies) Changed integration policy for team" + invite_acceptance_email_policy_changed InviteAcceptanceEmailPolicyChangedType + "(team_policies) Changed invite accept email policy for team" member_requests_change_policy MemberRequestsChangePolicyType "(team_policies) Changed whether users can find team when not invited" member_send_invite_policy_changed MemberSendInvitePolicyChangedType @@ -11581,6 +11607,8 @@ union EventTypeArg "(team_policies) Changed who can create groups" integration_policy_changed "(team_policies) Changed integration policy for team" + invite_acceptance_email_policy_changed + "(team_policies) Changed invite accept email policy for team" member_requests_change_policy "(team_policies) Changed whether users can find team when not invited" member_send_invite_policy_changed diff --git a/team_secondary_mails.stone b/team_secondary_mails.stone index 724f96f..05d7abc 100644 --- a/team_secondary_mails.stone +++ b/team_secondary_mails.stone @@ -24,7 +24,7 @@ struct UserSecondaryEmailsArg 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 occured." + The other values explain the type of error that occurred, and include the email for which the error occurred." success SecondaryEmail "Describes a secondary email that was successfully added to a user." @@ -72,7 +72,7 @@ struct UserSecondaryEmailsResult 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 occured." + 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." @@ -147,7 +147,7 @@ struct ResendVerificationEmailArg 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 occured." + 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." @@ -174,7 +174,7 @@ struct UserResendEmailsResult 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 occured." + 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." @@ -223,7 +223,7 @@ struct DeleteSecondaryEmailsArg 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 occured." + 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." @@ -253,7 +253,7 @@ struct UserDeleteEmailsResult 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 occured." + 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." From 973bd9fef7e3eea8de85bd20494333bbffe17999 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Wed, 30 Jun 2021 20:46:29 -0700 Subject: [PATCH 18/48] Update Release Note Generator to Be Python3 Compatible (#45) --- release_note_generator.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/release_note_generator.py b/release_note_generator.py index c328526..7ea65ce 100644 --- a/release_note_generator.py +++ b/release_note_generator.py @@ -1,5 +1,6 @@ import os import re +import six from enum import Enum from datetime import date from collections import defaultdict @@ -80,7 +81,7 @@ def parse_change_log(change_log_diff): updated_datatypes = [] route_map = defaultdict(int) - + # Pass for checking for creation/deletion of datatypes for hunk in patch_file: for line in hunk: @@ -124,14 +125,14 @@ def parse_change_log(change_log_diff): updated_datatypes.append((datatype, datatype_name)) seen_datatypes.add(datatype_name) - for route, ref_count in route_map.iteritems(): + for route, ref_count in six.iteritems(route_map): if ref_count > 0: added_routes.append(route) if ref_count < 0: removed_routes.append(route) ns_change = NsChange( - ns_file_name, + ns_file_name, added_routes, added_structs, added_unions, @@ -142,7 +143,7 @@ def parse_change_log(change_log_diff): updated_datatypes, ) ns_changes.append(ns_change) - + change_log = ChangeLog(ns_changes, added_nses, removed_nses) return change_log @@ -151,38 +152,37 @@ def main(): stream = os.popen('git diff') diff = stream.read() change_log = parse_change_log(diff) - print "Spec Update {} (#)".format(date.today().strftime("%m/%d/%Y")) - print - print "Change Notes:" + print("Spec Update {} (#)".format(date.today().strftime("%m/%d/%Y"))) + print() + print("Change Notes:") for ns_change in change_log.ns_changes: - print - print "{} Namespace".format(ns_change.file_name) + print() + print("{} Namespace".format(ns_change.file_name)) if ns_change.added_routes: - print "- Add {} routes".format(", ".join(ns_change.added_routes)) + print("- Add {} routes".format(", ".join(ns_change.added_routes))) if ns_change.added_structs: - print "- Add {} structs".format(", ".join(ns_change.added_structs)) + print("- Add {} structs".format(", ".join(ns_change.added_structs))) if ns_change.added_unions: - print "- Add {} unions".format(", ".join(ns_change.added_unions)) + print("- Add {} unions".format(", ".join(ns_change.added_unions))) if ns_change.removed_routes: - print "- Remove {} routes".format(", ".join(ns_change.removed_routes)) + print("- Remove {} routes".format(", ".join(ns_change.removed_routes))) if ns_change.removed_structs: - print "- Remove {} structs".format(", ".join(ns_change.removed_structs)) + print("- Remove {} structs".format(", ".join(ns_change.removed_structs))) if ns_change.removed_unions: - print "- Remove {} unions".format(", ".join(ns_change.removed_unions)) + print("- Remove {} unions".format(", ".join(ns_change.removed_unions))) if ns_change.updated_datatypes: for datatype, datatype_name in ns_change.updated_datatypes: - print "- Update {} {} to include/remove/deprecate ".format(datatype_name, datatype) + print("- Update {} {} to include/remove/deprecate ".format(datatype_name, datatype)) if change_log.added_nses: - print + print() for ns in change_log.added_nses: print("Add {} namespace".format(ns)) if change_log.removed_nses: - print + print() for ns in change_log.removed_nses: print("Add {} namespace".format(ns)) if __name__ == "__main__": main() - From 4c2256e55c765e545d478018f3eb8f823de52925 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Wed, 30 Jun 2021 20:51:47 -0700 Subject: [PATCH 19/48] Spec Update 06/30/2021 (#46) Change Notes: files Namespace - Update list_folder route to include auth - Update list_folder/continue route to include auth - Update list_folder/get_latest_cursor route to include auth sharing_files Namespace - Update Comments - Add UpdateFileMemberArgs struct - Remove change_file_member_access route - Remove ChangeFileMemberAccessArgs and UpdateFileMemberArgs structs --- files.stone | 3 +++ sharing_files.stone | 20 +++----------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/files.stone b/files.stone index da60528..22bcaa2 100644 --- a/files.stone +++ b/files.stone @@ -555,6 +555,7 @@ route list_folder (ListFolderArg, ListFolderResult, ListFolderError) attrs allow_app_folder_app = true + auth = "app, user" select_admin_mode = "whole_team" scope = "files.metadata.read" @@ -580,6 +581,7 @@ route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderC attrs allow_app_folder_app = true + auth = "app, user" select_admin_mode = "whole_team" scope = "files.metadata.read" @@ -599,6 +601,7 @@ route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorRes attrs allow_app_folder_app = true + auth = "app, user" select_admin_mode = "whole_team" scope = "files.metadata.read" # diff --git a/sharing_files.stone b/sharing_files.stone index 6da6e8e..29055fa 100644 --- a/sharing_files.stone +++ b/sharing_files.stone @@ -187,7 +187,7 @@ union ViewerInfoPolicy ################################## struct FileMemberActionResult - "Per-member result for :route:`add_file_member` or :route:`change_file_member_access`." + "Per-member result for :route:`add_file_member`." member MemberSelector "One of specified input members." @@ -286,14 +286,8 @@ struct AddFileMemberArgs # -- -route change_file_member_access(ChangeFileMemberAccessArgs, FileMemberActionResult, FileMemberActionError) deprecated by update_file_member - "Identical to update_file_member but with less information returned." - - attrs - scope = "sharing.write" - -struct ChangeFileMemberAccessArgs - "Arguments for :route:`change_file_member_access`." +struct UpdateFileMemberArgs + "Arguments for :route:`update_file_member`." file PathOrId "File for which we are changing a member's access." @@ -307,14 +301,6 @@ struct ChangeFileMemberAccessArgs member = default access_level = viewer -struct UpdateFileMemberArgs extends ChangeFileMemberAccessArgs - "Arguments for :route:`update_file_member`." - - 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." From 14ee35013933afb346ba37b3dfafa08ef800244a Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Fri, 2 Jul 2021 08:37:55 -0700 Subject: [PATCH 20/48] Remove Six from Release Note Generator (#47) --- release_note_generator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release_note_generator.py b/release_note_generator.py index 7ea65ce..34bdddf 100644 --- a/release_note_generator.py +++ b/release_note_generator.py @@ -1,6 +1,5 @@ import os import re -import six from enum import Enum from datetime import date from collections import defaultdict @@ -125,7 +124,7 @@ def parse_change_log(change_log_diff): updated_datatypes.append((datatype, datatype_name)) seen_datatypes.add(datatype_name) - for route, ref_count in six.iteritems(route_map): + for route, ref_count in route_map.items(): if ref_count > 0: added_routes.append(route) if ref_count < 0: From 87a8e08baac15deb3adae9771e6a9786189e5073 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Fri, 2 Jul 2021 08:51:38 -0700 Subject: [PATCH 21/48] Spec Update 07/02/2021 (#48) Change Notes: files Namespace - Update list_folder route to remove auth - Update list_folder/continue route to remove auth - Update list_folder/get_latest_cursor route to remove auth --- files.stone | 3 --- 1 file changed, 3 deletions(-) diff --git a/files.stone b/files.stone index 22bcaa2..da60528 100644 --- a/files.stone +++ b/files.stone @@ -555,7 +555,6 @@ route list_folder (ListFolderArg, ListFolderResult, ListFolderError) attrs allow_app_folder_app = true - auth = "app, user" select_admin_mode = "whole_team" scope = "files.metadata.read" @@ -581,7 +580,6 @@ route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderC attrs allow_app_folder_app = true - auth = "app, user" select_admin_mode = "whole_team" scope = "files.metadata.read" @@ -601,7 +599,6 @@ route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorRes attrs allow_app_folder_app = true - auth = "app, user" select_admin_mode = "whole_team" scope = "files.metadata.read" # From f549acb7a174cafc5b7c4f9d8815f7dd5d48a0da Mon Sep 17 00:00:00 2001 From: Eugene Che Date: Thu, 8 Jul 2021 10:26:38 -0700 Subject: [PATCH 22/48] Spec Update 07/08/2021 (#) (#49) Change Notes: shared_links Namespace - Add LinkAudienceOption, VisibilityPolicy structs - Add VisibilityPolicyDisallowedReason, LinkAudienceDisallowedReason, AlphaResolvedVisibility unions Co-authored-by: Eugene Che --- shared_links.stone | 156 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) diff --git a/shared_links.stone b/shared_links.stone index f1e4a19..910b8dd 100644 --- a/shared_links.stone +++ b/shared_links.stone @@ -55,6 +55,13 @@ union ResolvedVisibility extends RequestedVisibility shared_folder_only "Only members of the shared folder containing the linked file can access the link. Login is required." + no_one + "The link merely points the user to the content, and does not grant any additional rights. + Existing members of the content who use this link can only access the content with their + pre-existing access rights. Either on the file directly, or inherited from a parent folder." + only_you + "Only the current user can view this link." + union SharedLinkAccessFailureReason login_required @@ -97,11 +104,53 @@ struct LinkPermissions 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." 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 TeamMemberInfo "Information about a team member." @@ -310,11 +359,15 @@ struct SharedLinkSettings level for an existing link is not supported." requested_visibility RequestedVisibility? "Use :field:`audience` instead. The requested access for this shared link." + allow_download Boolean? + "Boolean flag to allow or not download capabilities for shared links." example default requested_visibility = public audience = public access = viewer + allow_download = true + union LinkAccessLevel viewer @@ -621,3 +674,106 @@ route create_shared_link(CreateSharedLinkArg, PathLinkMetadata, CreateSharedLink 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." + +struct VisibilityPolicy + policy RequestedVisibility + "This is the value to submit when saving the visibility setting." + resolved_policy AlphaResolvedVisibility + "This is what the effective policy would be, if you selected this option. The resolved + policy is obtained after considering external effects such as shared folder settings and + team policy. This value is guaranteed to be provided." + allowed Boolean + "Whether the user is permitted to set the visibility to this policy." + disallowed_reason VisibilityPolicyDisallowedReason? + "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 + 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 From b343fc634be6702d3e58c2eaaf6cb622e8642512 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 14 Jul 2021 09:55:24 -0700 Subject: [PATCH 23/48] Spec Update 07/14/2021 (#50) Change Notes: shared_links Namespace: - Update comments Co-authored-by: Scott Erickson --- shared_links.stone | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/shared_links.stone b/shared_links.stone index 910b8dd..eb3b357 100644 --- a/shared_links.stone +++ b/shared_links.stone @@ -621,9 +621,7 @@ route get_shared_links(GetSharedLinksArg, GetSharedLinksResult, GetSharedLinksEr 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. - - Note that the url field in the response is never the shortened URL." + returned in this case." attrs allow_app_folder_app = true @@ -643,7 +641,6 @@ struct CreateSharedLinkArg "The path to share." short_url Boolean = false - "Whether to return a shortened URL." pending_upload PendingUploadMode? "If it's okay to share a path that does not yet exist, set this to @@ -661,10 +658,6 @@ route create_shared_link(CreateSharedLinkArg, PathLinkMetadata, CreateSharedLink If a shared link already exists for the given path, that link is returned. - Note that in the returned :type:`PathLinkMetadata`, the - :field:`PathLinkMetadata.url` field is the shortened URL if - :field:`CreateSharedLinkArg.short_url` argument is set to :val:`true`. - 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 From cd86d1f4e456af1e6730ecaf079e9dbdeb72be04 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Wed, 28 Jul 2021 13:25:36 -0700 Subject: [PATCH 24/48] Spec Update 07/28/2021 (#51) Change Notes: Team Log Generated Namespace: - Update Comments --- team_log_generated.stone | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/team_log_generated.stone b/team_log_generated.stone index 5e8f29f..772b1c9 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -341,7 +341,7 @@ struct Certificate common_name = "xyz" union ChangeLinkExpirationPolicy - "Policy for deciding whether the team's default expiration days policy must be enforced when an externally shared is updated" + "Policy for deciding whether the team's default expiration days policy must be enforced when an externally shared link is updated" allowed not_allowed @@ -5923,7 +5923,7 @@ struct SharingChangeFolderJoinPolicyDetails previous_value = from_anyone struct SharingChangeLinkAllowChangeExpirationPolicyDetails - "Changed the password requirement for the links shared outside of the team." + "Changed the allow remove or change expiration policy for the links shared outside of the team." new_value EnforceLinkPasswordPolicy "To." @@ -5947,7 +5947,7 @@ struct SharingChangeLinkDefaultExpirationPolicyDetails previous_value = none struct SharingChangeLinkEnforcePasswordPolicyDetails - "Changed the allow remove or change expiration policy for the links shared outside of the team." + "Changed the password requirement for the links shared outside of the team." new_value ChangeLinkExpirationPolicy "To." @@ -9495,7 +9495,7 @@ struct SharingChangeLinkAllowChangeExpirationPolicyType description String example default - description = "(team_policies) Changed the password requirement for the links shared outside of the team" + description = "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" struct SharingChangeLinkDefaultExpirationPolicyType description String @@ -9507,7 +9507,7 @@ struct SharingChangeLinkEnforcePasswordPolicyType description String example default - description = "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" + description = "(team_policies) Changed the password requirement for the links shared outside of the team" struct SharingChangeLinkPolicyType description String @@ -10708,11 +10708,11 @@ union EventType 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 - "(team_policies) Changed the password requirement for the links shared outside of the team" + "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" sharing_change_link_default_expiration_policy SharingChangeLinkDefaultExpirationPolicyType "(team_policies) Changed the default expiration for the links shared outside of the team" sharing_change_link_enforce_password_policy SharingChangeLinkEnforcePasswordPolicyType - "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" + "(team_policies) Changed the password requirement for the links shared outside of the team" sharing_change_link_policy SharingChangeLinkPolicyType "(team_policies) Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default" sharing_change_member_policy SharingChangeMemberPolicyType @@ -11656,11 +11656,11 @@ union EventTypeArg 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 - "(team_policies) Changed the password requirement for the links shared outside of the team" + "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" sharing_change_link_default_expiration_policy "(team_policies) Changed the default expiration for the links shared outside of the team" sharing_change_link_enforce_password_policy - "(team_policies) Changed the allow remove or change expiration policy for the links shared outside of the team" + "(team_policies) Changed the password requirement for the links shared outside of the team" sharing_change_link_policy "(team_policies) Changed whether members can share links outside team, and if links are accessible only by team members or anyone by default" sharing_change_member_policy From e57f8a4da1b070bed3ac5d4d3ec325fcd3630686 Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Wed, 11 Aug 2021 15:32:57 -0700 Subject: [PATCH 25/48] Spec Update 08/11/2021 (#52) Change Notes: sharing_files Namespace - Update Comments sharing_folders Namespace - Update Comments team_folders Namespace - Update Comments team_log_generated Namespace - Add ExternalDriveBackupPolicy union - Add ExternalDriveBackupPolicyChangedDetails and ExternalDriveBackupPolicyChangedType structs - Update EventDetails union to include external_drive_backup_policy_changed_details - Update EventType union to include external_drive_backup_policy_changed - Update EventTypeArg union to include external_drive_backup_policy_changed team_policies Namespace - Add ExternalDriveBackupPolicyState union --- sharing_files.stone | 3 ++- sharing_folders.stone | 8 +++++--- team_folders.stone | 7 +++++-- team_log_generated.stone | 28 ++++++++++++++++++++++++++++ team_policies.stone | 6 ++++++ 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/sharing_files.stone b/sharing_files.stone index 29055fa..90e0cc7 100644 --- a/sharing_files.stone +++ b/sharing_files.stone @@ -446,7 +446,8 @@ 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, if they have." + "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." diff --git a/sharing_folders.stone b/sharing_folders.stone index f86da8a..c044c53 100644 --- a/sharing_folders.stone +++ b/sharing_folders.stone @@ -1067,8 +1067,8 @@ struct RemoveFolderMemberArg 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. Also, this must be set to false when kicking a - group." + 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" @@ -1234,7 +1234,9 @@ 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." + "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." example default shared_folder_id = "84528192421" diff --git a/team_folders.stone b/team_folders.stone index 6bd2883..15dc48e 100644 --- a/team_folders.stone +++ b/team_folders.stone @@ -86,7 +86,8 @@ union BaseTeamFolderError # route team_folder/create(TeamFolderCreateArg, TeamFolderMetadata, TeamFolderCreateError) - "Creates a new, active, team folder with no members. + "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." @@ -249,6 +250,7 @@ union TeamFolderActivateError extends BaseTeamFolderError 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." @@ -299,7 +301,8 @@ union_closed TeamFolderArchiveJobStatus extends async.PollResultBase # route team_folder/permanently_delete(TeamFolderIdArg, Void, TeamFolderPermanentlyDeleteError) - "Permanently deletes an archived team folder. + "Permanently deletes an archived team folder. This endpoint cannot be used for teams + that have a shared team space. Permission : Team member file access." diff --git a/team_log_generated.stone b/team_log_generated.stone index 772b1c9..6f52243 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -411,6 +411,11 @@ union ExtendedVersionHistoryPolicy implicitly_limited implicitly_unlimited +union ExternalDriveBackupPolicy + "Policy for controlling team access to external drive backup feature" + disabled + enabled + struct FailureDetailsLogInfo "Provides details about a failure" @@ -5580,6 +5585,18 @@ struct ExtendedVersionHistoryChangePolicyDetails new_value = implicitly_limited previous_value = implicitly_limited +struct ExternalDriveBackupPolicyChangedDetails + "Changed external drive backup policy for team." + + new_value ExternalDriveBackupPolicy + "New external drive backup policy." + previous_value ExternalDriveBackupPolicy + "Previous external drive backup policy." + + example default + new_value = disabled + previous_value = disabled + struct FileCommentsChangePolicyDetails "Enabled/disabled commenting on team files." @@ -6967,6 +6984,7 @@ union EventDetails emm_change_policy_details EmmChangePolicyDetails emm_remove_exception_details EmmRemoveExceptionDetails extended_version_history_change_policy_details ExtendedVersionHistoryChangePolicyDetails + external_drive_backup_policy_changed_details ExternalDriveBackupPolicyChangedDetails file_comments_change_policy_details FileCommentsChangePolicyDetails file_locking_policy_changed_details FileLockingPolicyChangedDetails file_requests_change_policy_details FileRequestsChangePolicyDetails @@ -9293,6 +9311,12 @@ struct ExtendedVersionHistoryChangePolicyType example default description = "(team_policies) Accepted/opted out of extended version history" +struct ExternalDriveBackupPolicyChangedType + description String + + example default + description = "(team_policies) Changed external drive backup policy for team" + struct FileCommentsChangePolicyType description String @@ -10641,6 +10665,8 @@ union EventType "(team_policies) Removed members from EMM exception list" extended_version_history_change_policy ExtendedVersionHistoryChangePolicyType "(team_policies) Accepted/opted out of extended version history" + external_drive_backup_policy_changed ExternalDriveBackupPolicyChangedType + "(team_policies) Changed external drive backup policy for team" file_comments_change_policy FileCommentsChangePolicyType "(team_policies) Enabled/disabled commenting on team files" file_locking_policy_changed FileLockingPolicyChangedType @@ -11589,6 +11615,8 @@ union EventTypeArg "(team_policies) Removed members from EMM exception list" extended_version_history_change_policy "(team_policies) Accepted/opted out of extended version history" + external_drive_backup_policy_changed + "(team_policies) Changed external drive backup policy for team" file_comments_change_policy "(team_policies) Enabled/disabled commenting on team files" file_locking_policy_changed diff --git a/team_policies.stone b/team_policies.stone index 2ac8445..5dcf739 100644 --- a/team_policies.stone +++ b/team_policies.stone @@ -216,3 +216,9 @@ union ComputerBackupPolicyState "Computer Backup feature is enabled." default "Computer Backup defaults to ON for SSB teams, and OFF for Enterprise teams." + +union ExternalDriveBackupPolicyState + disabled + "External Drive Backup feature is disabled." + enabled + "External Drive Backup feature is enabled." From 837cc8789d6a620442a1b404a3cf8446979b7203 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 18 Aug 2021 10:03:59 -0700 Subject: [PATCH 26/48] Spec Update 08/18/2021 (#53) Change Notes: team_log Namespace: - Add CaptureTranscriptPolicy union - Add CaptureTranscriptPolicyChangedDetails, CaptureTranscriptPolicyChangedType struct - Update EventDetails, EventType, EventTypeArg union Co-authored-by: Scott Erickson --- team_log_generated.stone | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/team_log_generated.stone b/team_log_generated.stone index 6f52243..93a1194 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -304,6 +304,12 @@ union CameraUploadsPolicy disabled enabled +union CaptureTranscriptPolicy + "Policy for deciding whether team users can transcription in Capture" + default + disabled + enabled + struct Certificate "Certificate details." @@ -5435,6 +5441,18 @@ struct CameraUploadsPolicyChangedDetails new_value = disabled previous_value = disabled +struct CaptureTranscriptPolicyChangedDetails + "Changed Capture transcription policy for team." + + new_value CaptureTranscriptPolicy + "To." + previous_value CaptureTranscriptPolicy + "From." + + example default + new_value = default + previous_value = default + struct ClassificationChangePolicyDetails "Changed classification policy for team." @@ -6967,6 +6985,7 @@ union EventDetails allow_download_enabled_details AllowDownloadEnabledDetails app_permissions_changed_details AppPermissionsChangedDetails camera_uploads_policy_changed_details CameraUploadsPolicyChangedDetails + capture_transcript_policy_changed_details CaptureTranscriptPolicyChangedDetails classification_change_policy_details ClassificationChangePolicyDetails computer_backup_policy_changed_details ComputerBackupPolicyChangedDetails content_administration_policy_changed_details ContentAdministrationPolicyChangedDetails @@ -9209,6 +9228,12 @@ struct CameraUploadsPolicyChangedType example default description = "(team_policies) Changed camera uploads setting for team" +struct CaptureTranscriptPolicyChangedType + description String + + example default + description = "(team_policies) Changed Capture transcription policy for team" + struct ClassificationChangePolicyType description String @@ -10631,6 +10656,8 @@ union EventType "(team_policies) Changed app permissions" camera_uploads_policy_changed CameraUploadsPolicyChangedType "(team_policies) Changed camera uploads setting for team" + capture_transcript_policy_changed CaptureTranscriptPolicyChangedType + "(team_policies) Changed Capture transcription policy for team" classification_change_policy ClassificationChangePolicyType "(team_policies) Changed classification policy for team" computer_backup_policy_changed ComputerBackupPolicyChangedType @@ -11581,6 +11608,8 @@ union EventTypeArg "(team_policies) Changed app permissions" camera_uploads_policy_changed "(team_policies) Changed camera uploads setting for team" + capture_transcript_policy_changed + "(team_policies) Changed Capture transcription policy for team" classification_change_policy "(team_policies) Changed classification policy for team" computer_backup_policy_changed From d439f00c77d82184d4d14c783166f372c8f03dd1 Mon Sep 17 00:00:00 2001 From: Eugene Che Date: Thu, 26 Aug 2021 10:46:59 -0700 Subject: [PATCH 27/48] Spec Update 08/26/2021 (#54) (#54) Change Notes: files Namespace Add api_proxy_dev_check_api_v2_service namespace Add api_proxy_dev_check_api_v2_types namespace Co-authored-by: Eugene Che --- ...ervice.stone => check_api_v2_service.stone | 0 ...v2_types.stone => check_api_v2_types.stone | 0 files.stone | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+) rename api_proxy_dev_check_api_v2_service.stone => check_api_v2_service.stone (100%) rename api_proxy_dev_check_api_v2_types.stone => check_api_v2_types.stone (100%) diff --git a/api_proxy_dev_check_api_v2_service.stone b/check_api_v2_service.stone similarity index 100% rename from api_proxy_dev_check_api_v2_service.stone rename to check_api_v2_service.stone diff --git a/api_proxy_dev_check_api_v2_types.stone b/check_api_v2_types.stone similarity index 100% rename from api_proxy_dev_check_api_v2_types.stone rename to check_api_v2_types.stone diff --git a/files.stone b/files.stone index da60528..93ec8de 100644 --- a/files.stone +++ b/files.stone @@ -946,6 +946,10 @@ struct UploadSessionCursor session_id = "1234faaf0678bcde" offset = 0 + example another + session_id = "8dd9d57374911153" + offset = 1073741824 + route upload_session/append (UploadSessionCursor, Void, UploadSessionLookupError) deprecated by upload_session/append:2 "Append more data to an upload session. @@ -986,6 +990,10 @@ union_closed WriteMode 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\"." @@ -1032,6 +1040,10 @@ struct CommitInfo 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 @@ -1048,6 +1060,10 @@ struct UploadSessionFinishArg cursor = default commit = default + example another + cursor = another + commit = another + example update cursor = default commit = update @@ -1098,6 +1114,9 @@ struct UploadSessionFinishBatchArg 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 From 55ae3f7008099fe4776e12265ccb9c9214305ce9 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 8 Sep 2021 10:48:20 -0700 Subject: [PATCH 28/48] Spec Update 09/08/2021 (#55) Change Notes: team_log_generated Namespace: - Add EmailIngestPolicy union - Add EmailIngestReceiveFileDetails, EmailIngestPolicyChangedDetails, EmailIngestReceiveFileType, and EmailIngestPolicyChangedType structs - Update EventDetails union to include email_ingest_receive_file_details and email_ingest_policy_changed_details - Update EventType union to include email_ingest_receive_file and email_ingest_policy_changed - Update EventTypeArg to include email_ingest_receive_file and email_ingest_policy_changed Co-authored-by: Brent Bumann --- team_log_generated.stone | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/team_log_generated.stone b/team_log_generated.stone index 93a1194..67d49b3 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -406,6 +406,11 @@ union DownloadPolicyType allow disallow +union EmailIngestPolicy + "Email ingest policy" + disabled + enabled + union EnforceLinkPasswordPolicy "Policy for deciding whether password must be enforced when an externally shared link is updated" optional @@ -2920,6 +2925,27 @@ struct UserTagsRemovedDetails example default values = ["abc"] +struct EmailIngestReceiveFileDetails + "Received files via Email to my Dropbox." + + inbox_name String + "Inbox name." + attachment_names List(String) + "Submitted file names." + subject String? + "Subject of the email." + from_name common.DisplayNameLegacy? + "The name as provided by the submitter." + from_email EmailAddress? + "The email as provided by the submitter." + + example default + inbox_name = "abc" + attachment_names = ["abc"] + subject = "abc" + from_name = "John Smith" + from_email = "john_smith@acmecorp.com" + struct FileRequestChangeDetails "Changed file request." @@ -5573,6 +5599,18 @@ struct DirectoryRestrictionsAddMembersDetails struct DirectoryRestrictionsRemoveMembersDetails "Removed members from directory restrictions list." +struct EmailIngestPolicyChangedDetails + "Changed email to my dropbox policy for team." + + new_value EmailIngestPolicy + "New email to my dropbox policy." + previous_value EmailIngestPolicy + "Previous email to my dropbox policy." + + example default + new_value = disabled + previous_value = disabled + struct EmmAddExceptionDetails "Added members to EMM exception list." @@ -6730,6 +6768,7 @@ union EventDetails rewind_folder_details RewindFolderDetails user_tags_added_details UserTagsAddedDetails user_tags_removed_details UserTagsRemovedDetails + email_ingest_receive_file_details EmailIngestReceiveFileDetails file_request_change_details FileRequestChangeDetails file_request_close_details FileRequestCloseDetails file_request_create_details FileRequestCreateDetails @@ -6999,6 +7038,7 @@ union EventDetails device_approvals_remove_exception_details DeviceApprovalsRemoveExceptionDetails directory_restrictions_add_members_details DirectoryRestrictionsAddMembersDetails directory_restrictions_remove_members_details DirectoryRestrictionsRemoveMembersDetails + email_ingest_policy_changed_details EmailIngestPolicyChangedDetails emm_add_exception_details EmmAddExceptionDetails emm_change_policy_details EmmChangePolicyDetails emm_remove_exception_details EmmRemoveExceptionDetails @@ -7698,6 +7738,12 @@ struct UserTagsRemovedType example default description = "(file_operations) Removed tags" +struct EmailIngestReceiveFileType + description String + + example default + description = "(file_requests) Received files via Email to my Dropbox" + struct FileRequestChangeType description String @@ -9312,6 +9358,12 @@ struct DirectoryRestrictionsRemoveMembersType example default description = "(team_policies) Removed members from directory restrictions list" +struct EmailIngestPolicyChangedType + description String + + example default + description = "(team_policies) Changed email to my dropbox policy for team" + struct EmmAddExceptionType description String @@ -10146,6 +10198,8 @@ union EventType "(file_operations) Tagged a file" user_tags_removed UserTagsRemovedType "(file_operations) Removed tags" + email_ingest_receive_file EmailIngestReceiveFileType + "(file_requests) Received files via Email to my Dropbox" file_request_change FileRequestChangeType "(file_requests) Changed file request" file_request_close FileRequestCloseType @@ -10684,6 +10738,8 @@ union EventType "(team_policies) Added members to directory restrictions list" directory_restrictions_remove_members DirectoryRestrictionsRemoveMembersType "(team_policies) Removed members from directory restrictions list" + email_ingest_policy_changed EmailIngestPolicyChangedType + "(team_policies) Changed email to my dropbox policy for team" emm_add_exception EmmAddExceptionType "(team_policies) Added members to EMM exception list" emm_change_policy EmmChangePolicyType @@ -11098,6 +11154,8 @@ union EventTypeArg "(file_operations) Tagged a file" user_tags_removed "(file_operations) Removed tags" + email_ingest_receive_file + "(file_requests) Received files via Email to my Dropbox" file_request_change "(file_requests) Changed file request" file_request_close @@ -11636,6 +11694,8 @@ union EventTypeArg "(team_policies) Added members to directory restrictions list" directory_restrictions_remove_members "(team_policies) Removed members from directory restrictions list" + email_ingest_policy_changed + "(team_policies) Changed email to my dropbox policy for team" emm_add_exception "(team_policies) Added members to EMM exception list" emm_change_policy From 2026d2d9a589c1679f82507e4699252a2c3764ba Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 22 Sep 2021 15:15:38 -0700 Subject: [PATCH 29/48] Spec Update 09/22/2021 (#56) Change Notes: team_log Namespace: - Update Comments common: - Update EmailAddress regex Co-authored-by: Scott Erickson --- common.stone | 2 +- team_log_generated.stone | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common.stone b/common.stone index 0e77155..595a82c 100644 --- a/common.stone +++ b/common.stone @@ -12,7 +12,7 @@ alias Date = Timestamp("%Y-%m-%d") # Note - "\\." is needed in order to translate to "\." -alias EmailAddress = String(pattern="^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\\.[A-Za-z]{2,15}$", max_length=255) +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) diff --git a/team_log_generated.stone b/team_log_generated.stone index 67d49b3..c35bd14 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -407,7 +407,7 @@ union DownloadPolicyType disallow union EmailIngestPolicy - "Email ingest policy" + "Policy for deciding whether a team can use Email to my Dropbox feature" disabled enabled @@ -5600,12 +5600,12 @@ struct DirectoryRestrictionsRemoveMembersDetails "Removed members from directory restrictions list." struct EmailIngestPolicyChangedDetails - "Changed email to my dropbox policy for team." + "Changed email to my Dropbox policy for team." new_value EmailIngestPolicy - "New email to my dropbox policy." + "To." previous_value EmailIngestPolicy - "Previous email to my dropbox policy." + "From." example default new_value = disabled @@ -9362,7 +9362,7 @@ struct EmailIngestPolicyChangedType description String example default - description = "(team_policies) Changed email to my dropbox policy for team" + description = "(team_policies) Changed email to my Dropbox policy for team" struct EmmAddExceptionType description String @@ -10739,7 +10739,7 @@ union EventType directory_restrictions_remove_members DirectoryRestrictionsRemoveMembersType "(team_policies) Removed members from directory restrictions list" email_ingest_policy_changed EmailIngestPolicyChangedType - "(team_policies) Changed email to my dropbox policy for team" + "(team_policies) Changed email to my Dropbox policy for team" emm_add_exception EmmAddExceptionType "(team_policies) Added members to EMM exception list" emm_change_policy EmmChangePolicyType @@ -11695,7 +11695,7 @@ union EventTypeArg directory_restrictions_remove_members "(team_policies) Removed members from directory restrictions list" email_ingest_policy_changed - "(team_policies) Changed email to my dropbox policy for team" + "(team_policies) Changed email to my Dropbox policy for team" emm_add_exception "(team_policies) Added members to EMM exception list" emm_change_policy From 65585e4d2e93fd84087b48bbaf1bbf396a4b1126 Mon Sep 17 00:00:00 2001 From: Brad Rogers Date: Wed, 29 Sep 2021 15:07:56 -0400 Subject: [PATCH 30/48] Spec Update 09/29/2021 (#57) Change Notes: files Namespace - Add upload_session/finish_batch:2 route --- files.stone | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/files.stone b/files.stone index 93ec8de..2c7d64a 100644 --- a/files.stone +++ b/files.stone @@ -1179,6 +1179,32 @@ route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFin 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" + is_preview = true + + 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." From 956339f6ff8113095999e38a17bcb7927475ab7b Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Wed, 6 Oct 2021 15:50:38 -0700 Subject: [PATCH 31/48] Spec Update 10/06/2021 (#58) Change Notes: team_log_generated Namespace - Update SharingLinkPolicy union to include default_no_one team_policies Namespace - Update SharedLinkCreatePolicy union to include default_no_one --- team_log_generated.stone | 1 + team_policies.stone | 3 +++ 2 files changed, 4 insertions(+) diff --git a/team_log_generated.stone b/team_log_generated.stone index c35bd14..032924b 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -822,6 +822,7 @@ union SharingFolderJoinPolicy union SharingLinkPolicy "Policy for controlling if team members can share links externally" + default_no_one default_private default_public only_private diff --git a/team_policies.stone b/team_policies.stone index 5dcf739..3fdd467 100644 --- a/team_policies.stone +++ b/team_policies.stone @@ -69,6 +69,9 @@ union SharedLinkCreatePolicy team_only "Only members of the same team can access all shared links. Login will be required to access all shared links." + default_no_one + "Only people invited can access newly created links. + Login will be required to access the shared links unless overridden." union EmmState disabled From 72d0718154d13756b31b5a0e0948abcae35dab84 Mon Sep 17 00:00:00 2001 From: Eugene Che Date: Thu, 21 Oct 2021 13:17:23 -0700 Subject: [PATCH 32/48] Spec Update 10/21/2021 (#59) (#59) Change Notes: files Namespace - Remove upload_session/finish_batch team_log_generated Namespace - Update SharedContentUnshareDetails struct example Co-authored-by: Eugene Che --- files.stone | 3 +-- team_log_generated.stone | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/files.stone b/files.stone index 2c7d64a..8a7c044 100644 --- a/files.stone +++ b/files.stone @@ -1151,7 +1151,7 @@ union UploadSessionFinishBatchLaunch extends async.LaunchResultBase example async_job_id async_job_id = "34g93hh34h04y384084" -route upload_session/finish_batch (UploadSessionFinishBatchArg, UploadSessionFinishBatchLaunch, Void) +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 @@ -1202,7 +1202,6 @@ route upload_session/finish_batch:2 (UploadSessionFinishBatchArg, UploadSessionF allow_app_folder_app = true select_admin_mode = "team_admin" scope = "files.content.write" - is_preview = true route upload_session/finish_batch/check(async.PollArg, UploadSessionFinishBatchJobStatus, async.PollError) diff --git a/team_log_generated.stone b/team_log_generated.stone index 032924b..0a5b74f 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -4679,6 +4679,9 @@ struct SharedContentRestoreMemberDetails struct SharedContentUnshareDetails "Unshared file/folder by clearing membership." + + example default + struct SharedContentViewDetails "Previewed shared file/folder." From 6e0a08f15d3f28359208e079656780789361a95f Mon Sep 17 00:00:00 2001 From: mtruong-dbx <77769746+mtruong-dbx@users.noreply.github.com> Date: Wed, 3 Nov 2021 14:30:49 -0700 Subject: [PATCH 33/48] Spec Update 11/03/2021 (#60) Change Notes: files Namespace - Update list_folder route to include app auth - Update list_folder/continue route to include app auth - Update Examples Add file_tagging Namespace --- file_tagging.stone | 130 +++++++++++++++++++++++++++++++++++++++++++++ files.stone | 4 +- 2 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 file_tagging.stone diff --git a/file_tagging.stone b/file_tagging.stone new file mode 100644 index 0000000..256bdf3 --- /dev/null +++ b/file_tagging.stone @@ -0,0 +1,130 @@ +namespace files + +import common +import async + +alias TagText = String(min_length=1, max_length=32, pattern="[A-Za-z0-9\_]+") + +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 BaseError + unknown + "Action failed." + transient + "Action failed. Try again." + input_validation + "Action failed due to wrong params." + cancelled + "Action cancelled." + +struct UserGeneratedTag + tag_text TagText + + example default + tag_text = "my_tag" + + + +union BaseTagError extends BaseError + feature_not_supported + "Tags are not turned on for your team. Please turn on the feature." + + path_not_found + "Path not found." + + +##################################### +# 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." + + example default + path = "/Prime_Numbers.txt" + tag_text = "MyTag" + +union AddTagError extends BaseTagError + too_many_tags + "Item already has max supported tags." + +route tags/add(AddTagArg, Void, AddTagError) + "Add a tag to an item. A tag is a string. 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." + + example default + path = "/Prime_Numbers.txt" + tag_text = "MyTag" + +union RemoveTagError extends BaseTagError + tag_not_exists_for_this_path + "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." + + example default + paths = ["/Prime_Numbers.txt"] + +struct PathToTags + path Path + "Path of the item." + tags List(Tag) + "Tags assigned to this item." + example default + path = "/Prime_Numbers.txt" + tags = [default] + +struct GetTagsResult + paths_to_tags List(PathToTags) + "List of paths and their corresponding tags." + + example default + paths_to_tags = [default] + +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 index 8a7c044..d7f4e66 100644 --- a/files.stone +++ b/files.stone @@ -555,6 +555,7 @@ route list_folder (ListFolderArg, ListFolderResult, ListFolderError) attrs allow_app_folder_app = true + auth = "app, user" select_admin_mode = "whole_team" scope = "files.metadata.read" @@ -580,6 +581,7 @@ route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderC attrs allow_app_folder_app = true + auth = "app, user" select_admin_mode = "whole_team" scope = "files.metadata.read" @@ -2553,7 +2555,7 @@ struct GetTemporaryLinkResult example default metadata = default - link = "https://content.dropboxapi.com/apitl/1/YXNkZmFzZGcyMzQyMzI0NjU2NDU2NDU2" + link = "https://ucabc123456.dl.dropboxusercontent.com/cd/0/get/abcdefghijklmonpqrstuvwxyz1234567890/file" union GetTemporaryLinkError path LookupError From 28dfbe46c05026fdd867e4fea67cd0ea9acfbca9 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 17 Nov 2021 11:15:24 -0800 Subject: [PATCH 34/48] Spec Update 11/17/2021 (#61) Change Notes: file_tagging Namespace - Add BaseTagError unions - Remove BaseError, BaseTagError extends BaseError unions - Update RemoveTagError extends BaseTagError union to remove tag_not_exists_for_this_path - Update RemoveTagError extends BaseTagError union to include tag_not_present - Update Comments Co-authored-by: Brent Bumann --- file_tagging.stone | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/file_tagging.stone b/file_tagging.stone index 256bdf3..ceb2d44 100644 --- a/file_tagging.stone +++ b/file_tagging.stone @@ -15,16 +15,6 @@ union Tag user_generated_tag = default -union BaseError - unknown - "Action failed." - transient - "Action failed. Try again." - input_validation - "Action failed due to wrong params." - cancelled - "Action cancelled." - struct UserGeneratedTag tag_text TagText @@ -32,13 +22,8 @@ struct UserGeneratedTag tag_text = "my_tag" - -union BaseTagError extends BaseError - feature_not_supported - "Tags are not turned on for your team. Please turn on the feature." - - path_not_found - "Path not found." +union BaseTagError + path LookupError ##################################### @@ -57,7 +42,7 @@ struct AddTagArg union AddTagError extends BaseTagError too_many_tags - "Item already has max supported 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. No more than 20 tags can be added to a given item." @@ -84,7 +69,7 @@ struct RemoveTagArg tag_text = "MyTag" union RemoveTagError extends BaseTagError - tag_not_exists_for_this_path + tag_not_present "That tag doesn't exist at this path." route tags/remove(RemoveTagArg, Void, RemoveTagError) From bca5f1448ac6f65a17c9df95a5175cf7b878ad90 Mon Sep 17 00:00:00 2001 From: Eugene Che Date: Wed, 24 Nov 2021 11:12:18 -0800 Subject: [PATCH 35/48] Spec Update 11/24/2021 (#62) (#62) Change Notes: check_api_v2_service Namespace check_api_v2_types Namespace sharing_folders Namespace team_log_generated Namespace - Add UndoNamingConventionDetails, UndoOrganizeFolderWithTidyDetails, UndoNamingConventionType, UndoOrganizeFolderWithTidyType structs Co-authored-by: Eugene Che --- check_api_v2_service.stone | 1 + check_api_v2_types.stone | 1 + sharing_folders.stone | 2 ++ team_log_generated.stone | 44 +++++++++++++++++++++++++++++++------- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/check_api_v2_service.stone b/check_api_v2_service.stone index 4f7dd0e..d20f6d4 100644 --- a/check_api_v2_service.stone +++ b/check_api_v2_service.stone @@ -1,4 +1,5 @@ # @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) diff --git a/check_api_v2_types.stone b/check_api_v2_types.stone index 2643744..76220f6 100644 --- a/check_api_v2_types.stone +++ b/check_api_v2_types.stone @@ -1,4 +1,5 @@ # @generated by protoc-gen-stone. DO NOT EDIT. +# source: configs/proto/dropbox/proto/check/api_v2_types.proto namespace check import common diff --git a/sharing_folders.stone b/sharing_folders.stone index c044c53..7bbb188 100644 --- a/sharing_folders.stone +++ b/sharing_folders.stone @@ -739,6 +739,8 @@ union SharePathError "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." is_family "We do not support sharing the Family folder." diff --git a/team_log_generated.stone b/team_log_generated.stone index 0a5b74f..04da6f8 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -2750,7 +2750,7 @@ struct EnabledDomainInvitesDetails "Enabled domain invites." struct ApplyNamingConventionDetails - "Applied a Naming Convention rule." + "Applied naming convention." struct CreateFolderDetails "Created folders." @@ -2897,7 +2897,7 @@ struct ObjectLabelUpdatedValueDetails label_type = test_only struct OrganizeFolderWithTidyDetails - "Organized a folder with the Tidy Up action." + "Organized a folder with multi-file organize." struct RewindFolderDetails "Rewound a folder." @@ -2908,6 +2908,12 @@ struct RewindFolderDetails example default rewind_folder_target_ts_ms = "2017-01-25T15:51:30Z" +struct UndoNamingConventionDetails + "Reverted naming convention." + +struct UndoOrganizeFolderWithTidyDetails + "Removed multi-file organize." + struct UserTagsAddedDetails "Tagged a file." @@ -6770,6 +6776,8 @@ union EventDetails object_label_updated_value_details ObjectLabelUpdatedValueDetails organize_folder_with_tidy_details OrganizeFolderWithTidyDetails 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 @@ -7584,7 +7592,7 @@ struct ApplyNamingConventionType description String example default - description = "(file_operations) Applied a Naming Convention rule" + description = "(file_operations) Applied naming convention" struct CreateFolderType description String @@ -7722,7 +7730,7 @@ struct OrganizeFolderWithTidyType description String example default - description = "(file_operations) Organized a folder with the Tidy Up action" + description = "(file_operations) Organized a folder with multi-file organize" struct RewindFolderType description String @@ -7730,6 +7738,18 @@ struct RewindFolderType example default description = "(file_operations) Rewound a folder" +struct UndoNamingConventionType + description String + + example default + description = "(file_operations) Reverted naming convention" + +struct UndoOrganizeFolderWithTidyType + description String + + example default + description = "(file_operations) Removed multi-file organize" + struct UserTagsAddedType description String @@ -10149,7 +10169,7 @@ union EventType enabled_domain_invites EnabledDomainInvitesType "(domains) Enabled domain invites (deprecated, no longer logged)" apply_naming_convention ApplyNamingConventionType - "(file_operations) Applied a Naming Convention rule" + "(file_operations) Applied naming convention" create_folder CreateFolderType "(file_operations) Created folders (deprecated, no longer logged)" file_add FileAddType @@ -10195,9 +10215,13 @@ union EventType object_label_updated_value ObjectLabelUpdatedValueType "(file_operations) Updated a label's value" organize_folder_with_tidy OrganizeFolderWithTidyType - "(file_operations) Organized a folder with the Tidy Up action" + "(file_operations) Organized a folder with multi-file organize" rewind_folder RewindFolderType "(file_operations) Rewound a folder" + undo_naming_convention UndoNamingConventionType + "(file_operations) Reverted naming convention" + undo_organize_folder_with_tidy UndoOrganizeFolderWithTidyType + "(file_operations) Removed multi-file organize" user_tags_added UserTagsAddedType "(file_operations) Tagged a file" user_tags_removed UserTagsRemovedType @@ -11105,7 +11129,7 @@ union EventTypeArg enabled_domain_invites "(domains) Enabled domain invites (deprecated, no longer logged)" apply_naming_convention - "(file_operations) Applied a Naming Convention rule" + "(file_operations) Applied naming convention" create_folder "(file_operations) Created folders (deprecated, no longer logged)" file_add @@ -11151,9 +11175,13 @@ union EventTypeArg object_label_updated_value "(file_operations) Updated a label's value" organize_folder_with_tidy - "(file_operations) Organized a folder with the Tidy Up action" + "(file_operations) Organized a folder with multi-file organize" rewind_folder "(file_operations) Rewound a folder" + undo_naming_convention + "(file_operations) Reverted naming convention" + undo_organize_folder_with_tidy + "(file_operations) Removed multi-file organize" user_tags_added "(file_operations) Tagged a file" user_tags_removed From 4c1da4778bc4bd3dbc6b55e11788a40aa896b3dc Mon Sep 17 00:00:00 2001 From: Mitchell Overfield Date: Thu, 2 Dec 2021 10:06:29 -0800 Subject: [PATCH 36/48] Spec Update 12/01/2021 (#64) Change Notes: Team Log Generated Namespace: - Update ExtendedVersionHistoryPolicy union to include default - Update Examples Team Policies Namespace: - Update ExternalDriveBackupPolicyState union to include default --- team_log_generated.stone | 5 +++-- team_policies.stone | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/team_log_generated.stone b/team_log_generated.stone index 04da6f8..06e6f26 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -424,6 +424,7 @@ union ExtendedVersionHistoryPolicy union ExternalDriveBackupPolicy "Policy for controlling team access to external drive backup feature" + default disabled enabled @@ -5660,8 +5661,8 @@ struct ExternalDriveBackupPolicyChangedDetails "Previous external drive backup policy." example default - new_value = disabled - previous_value = disabled + new_value = default + previous_value = default struct FileCommentsChangePolicyDetails "Enabled/disabled commenting on team files." diff --git a/team_policies.stone b/team_policies.stone index 3fdd467..ad2fd1a 100644 --- a/team_policies.stone +++ b/team_policies.stone @@ -225,3 +225,5 @@ union ExternalDriveBackupPolicyState "External Drive Backup feature is disabled." enabled "External Drive Backup feature is enabled." + default + "External Drive Backup default value based on team tier." From 13bbef7298d235257ee5576025b5938f748de526 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 2 Feb 2022 14:04:37 -0800 Subject: [PATCH 37/48] Spec Update 02/02/2022 (#) (#65) Change Notes: files Namespace - Add MoveIntoFamilyError unions - Add payload_too_large and cant_move_into_family errors sharing_files Namespace - doc update team_log_generated Namespace - Add DataResidencyMigrationRequestSuccessfulDetails, DataResidencyMigrationRequestUnsuccessfulDetails, DataResidencyMigrationRequestSuccessfulType, DataResidencyMigrationRequestUnsuccessfulType structs Co-authored-by: Scott Erickson --- files.stone | 14 ++++++++++++++ sharing_files.stone | 2 +- team_log_generated.stone | 28 ++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/files.stone b/files.stone index d7f4e66..71a4c18 100644 --- a/files.stone +++ b/files.stone @@ -778,6 +778,8 @@ union UploadError "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." struct UploadSessionOffsetError correct_offset UInt64 @@ -788,6 +790,8 @@ union UploadSessionStartError "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." union UploadSessionLookupError not_found @@ -810,6 +814,8 @@ union UploadSessionLookupError "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 UploadSessionFinishError lookup_failed UploadSessionLookupError @@ -832,6 +838,8 @@ union UploadSessionFinishError "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." # Req/Resp @@ -1884,11 +1892,17 @@ union RelocationError "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." diff --git a/sharing_files.stone b/sharing_files.stone index 90e0cc7..b7c14db 100644 --- a/sharing_files.stone +++ b/sharing_files.stone @@ -268,7 +268,7 @@ struct AddFileMemberArgs "Message to send to added members in their invitation." quiet Boolean = false - "Whether added members should be notified via device notifications of + "Whether added members should be notified via email and device notifications of their invitation." access_level AccessLevel = viewer diff --git a/team_log_generated.stone b/team_log_generated.stone index 06e6f26..d765084 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -6300,6 +6300,12 @@ struct WebSessionsChangeIdleLengthPolicyDetails new_value = default previous_value = default +struct DataResidencyMigrationRequestSuccessfulDetails + "Requested data residency migration for team data." + +struct DataResidencyMigrationRequestUnsuccessfulDetails + "Request for data residency migration for team data has failed." + struct TeamMergeFromDetails "Merged another team into this team." @@ -7116,6 +7122,8 @@ union EventDetails web_sessions_change_active_session_limit_details WebSessionsChangeActiveSessionLimitDetails web_sessions_change_fixed_length_policy_details WebSessionsChangeFixedLengthPolicyDetails web_sessions_change_idle_length_policy_details WebSessionsChangeIdleLengthPolicyDetails + data_residency_migration_request_successful_details DataResidencyMigrationRequestSuccessfulDetails + data_residency_migration_request_unsuccessful_details DataResidencyMigrationRequestUnsuccessfulDetails team_merge_from_details TeamMergeFromDetails team_merge_to_details TeamMergeToDetails team_profile_add_background_details TeamProfileAddBackgroundDetails @@ -9773,6 +9781,18 @@ struct WebSessionsChangeIdleLengthPolicyType example default description = "(team_policies) Changed how long team members can be idle while signed in to Dropbox.com" +struct DataResidencyMigrationRequestSuccessfulType + description String + + example default + description = "(team_profile) Requested data residency migration for team data" + +struct DataResidencyMigrationRequestUnsuccessfulType + description String + + example default + description = "(team_profile) Request for data residency migration for team data has failed" + struct TeamMergeFromType description String @@ -10897,6 +10917,10 @@ union EventType "(team_policies) Changed how long members can stay signed in to Dropbox.com" web_sessions_change_idle_length_policy WebSessionsChangeIdleLengthPolicyType "(team_policies) Changed how long team members can be idle while signed in to Dropbox.com" + data_residency_migration_request_successful DataResidencyMigrationRequestSuccessfulType + "(team_profile) Requested data residency migration for team data" + data_residency_migration_request_unsuccessful DataResidencyMigrationRequestUnsuccessfulType + "(team_profile) Request for data residency migration for team data has failed" team_merge_from TeamMergeFromType "(team_profile) Merged another team into this team" team_merge_to TeamMergeToType @@ -11857,6 +11881,10 @@ union EventTypeArg "(team_policies) Changed how long members can stay signed in to Dropbox.com" web_sessions_change_idle_length_policy "(team_policies) Changed how long team members can be idle while signed in to Dropbox.com" + data_residency_migration_request_successful + "(team_profile) Requested data residency migration for team data" + data_residency_migration_request_unsuccessful + "(team_profile) Request for data residency migration for team data has failed" team_merge_from "(team_profile) Merged another team into this team" team_merge_to From 895e08a3fa941888c2c57681c8117a294f8fa4b9 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 9 Feb 2022 13:43:10 -0800 Subject: [PATCH 38/48] Spec Update 02/09/2022 (#66) Change Notes: common Namespace - Update comments files Namespace - Add UploadArg extends CommitInfo structs - Add UploadSessionAppendError extends UploadSessionLookupError unions - Remove CommitInfoWithProperties extends CommitInfo structs - Remove UploadErrorWithProperties extends UploadError unions Co-authored-by: Brent Bumann --- common.stone | 1 + files.stone | 55 ++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/common.stone b/common.stone index 595a82c..3a55b98 100644 --- a/common.stone +++ b/common.stone @@ -12,6 +12,7 @@ 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 diff --git a/files.stone b/files.stone index 71a4c18..5806090 100644 --- a/files.stone +++ b/files.stone @@ -780,6 +780,8 @@ union UploadError "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 @@ -792,6 +794,8 @@ union UploadSessionStartError "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 @@ -817,6 +821,10 @@ union UploadSessionLookupError 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." @@ -840,6 +848,8 @@ union UploadSessionFinishError "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 @@ -860,6 +870,11 @@ struct UploadSessionStartArg "Type of upload session you want to start. If not specified, default is :field:`UploadSessionType.sequential`." + content_hash Sha256HexHash? + "NOT YET SUPPORTED. 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 @@ -922,11 +937,15 @@ struct UploadSessionAppendArg "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? + "NOT YET SUPPORTED. 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, UploadSessionLookupError) +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. @@ -960,7 +979,7 @@ struct UploadSessionCursor session_id = "8dd9d57374911153" offset = 1073741824 -route upload_session/append (UploadSessionCursor, Void, UploadSessionLookupError) deprecated by upload_session/append:2 +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 @@ -1017,6 +1036,8 @@ union_closed WriteMode 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." @@ -1065,6 +1086,10 @@ struct UploadSessionFinishArg "Contains the upload session ID and the offset." commit CommitInfo "Contains the path and other optional modifiers for the commit." + content_hash Sha256HexHash? + "NOT YET SUPPORTED. 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 @@ -1096,7 +1121,13 @@ route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSession select_admin_mode = "team_admin" scope= "files.content.write" -route upload (CommitInfo, FileMetadata, UploadError) +struct UploadArg extends CommitInfo + content_hash Sha256HexHash? + "NOT YET SUPPORTED. 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." + +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 @@ -2854,13 +2885,12 @@ union_closed AlphaGetMetadataError extends GetMetadataError properties_error file_properties.LookUpPropertiesError # -# Patched /upload that accepts properties +# Alpha /upload, originally for properties API. Can be used to pilot new functionality. # -route alpha/upload (CommitInfoWithProperties, FileMetadata, UploadErrorWithProperties) deprecated by alpha/upload - "Create a new file with the contents provided in the request. Note that this - endpoint is part of the properties API alpha and is slightly different from - :route:`upload`. +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`." @@ -2872,15 +2902,6 @@ route alpha/upload (CommitInfoWithProperties, FileMetadata, UploadErrorWithPrope allow_app_folder_app = true scope = "files.content.write" -struct CommitInfoWithProperties extends CommitInfo - example default - path = "/Homework/math/Matrices.txt" - autorename = true - -union UploadErrorWithProperties extends UploadError - example default - properties_error = does_not_fit_template - # # Deprecated File Properties routes # From 9daf01c5b7ac6936956f085792c573c06fb3c905 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 2 Mar 2022 16:44:38 -0800 Subject: [PATCH 39/48] Spec Update 03/02/2022 (#) (#67) Change Notes: files Namespace - Update UploadArg - content_hash doc string sharing_folders Namespace - Add traverse to AccessLevel team_log_generated Namespace - Example and docstring updates Co-authored-by: Scott Erickson --- files.stone | 16 +++++------ sharing_folders.stone | 3 ++ team_log_generated.stone | 60 ++++++++++++++++++++-------------------- 3 files changed, 41 insertions(+), 38 deletions(-) diff --git a/files.stone b/files.stone index 5806090..3ce406d 100644 --- a/files.stone +++ b/files.stone @@ -871,8 +871,8 @@ struct UploadSessionStartArg :field:`UploadSessionType.sequential`." content_hash Sha256HexHash? - "NOT YET SUPPORTED. 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 + "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 @@ -938,8 +938,8 @@ struct UploadSessionAppendArg you won't be able to call :route:`upload_session/append:2` anymore with the current session." content_hash Sha256HexHash? - "NOT YET SUPPORTED. 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 + "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 @@ -1087,8 +1087,8 @@ struct UploadSessionFinishArg commit CommitInfo "Contains the path and other optional modifiers for the commit." content_hash Sha256HexHash? - "NOT YET SUPPORTED. 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 + "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 @@ -1123,8 +1123,8 @@ route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSession struct UploadArg extends CommitInfo content_hash Sha256HexHash? - "NOT YET SUPPORTED. 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 + "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." route upload (UploadArg, FileMetadata, UploadError) diff --git a/sharing_folders.stone b/sharing_folders.stone index 7bbb188..09053bd 100644 --- a/sharing_folders.stone +++ b/sharing_folders.stone @@ -22,6 +22,9 @@ union AccessLevel 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." struct FolderPolicy "A set of policies governing membership and privileges for a shared diff --git a/team_log_generated.stone b/team_log_generated.stone index d765084..d50b0b7 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -407,7 +407,7 @@ union DownloadPolicyType disallow union EmailIngestPolicy - "Policy for deciding whether a team can use Email to my Dropbox feature" + "Policy for deciding whether a team can use Email to Dropbox feature" disabled enabled @@ -2934,7 +2934,7 @@ struct UserTagsRemovedDetails values = ["abc"] struct EmailIngestReceiveFileDetails - "Received files via Email to my Dropbox." + "Received files via Email to Dropbox." inbox_name String "Inbox name." @@ -4476,7 +4476,7 @@ struct SharedContentAddInviteesDetails "A list of invitees." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse invitees = ["john_smith@acmecorp.com"] struct SharedContentAddLinkExpiryDetails @@ -4498,7 +4498,7 @@ struct SharedContentAddMemberDetails "Shared content access level." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse struct SharedContentChangeDownloadsPolicyDetails "Changed whether members can download shared file/folder." @@ -4523,8 +4523,8 @@ struct SharedContentChangeInviteeRoleDetails "The invitee whose role was changed." example default - previous_access_level = viewer_no_comment - new_access_level = viewer_no_comment + previous_access_level = traverse + new_access_level = traverse invitee = "john_smith@acmecorp.com" struct SharedContentChangeLinkAudienceDetails @@ -4563,8 +4563,8 @@ struct SharedContentChangeMemberRoleDetails "New access level." example default - previous_access_level = viewer_no_comment - new_access_level = viewer_no_comment + previous_access_level = traverse + new_access_level = traverse struct SharedContentChangeViewerInfoPolicyDetails "Changed whether members can see who viewed shared file/folder." @@ -4602,7 +4602,7 @@ struct SharedContentCopyDetails example default shared_content_link = "abc" shared_content_owner = default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse destination_path = "/Contract Work/Product Design" struct SharedContentDownloadDetails @@ -4618,7 +4618,7 @@ struct SharedContentDownloadDetails example default shared_content_link = "abc" shared_content_owner = default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse struct SharedContentRelinquishMembershipDetails "Left shared file/folder." @@ -4651,7 +4651,7 @@ struct SharedContentRemoveMemberDetails "Shared content access level." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse struct SharedContentRequestAccessDetails "Requested access to shared file/folder." @@ -4671,7 +4671,7 @@ struct SharedContentRestoreInviteesDetails "A list of invitees." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse invitees = ["john_smith@acmecorp.com"] struct SharedContentRestoreMemberDetails @@ -4681,7 +4681,7 @@ struct SharedContentRestoreMemberDetails "Shared content access level." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse struct SharedContentUnshareDetails "Unshared file/folder by clearing membership." @@ -4702,7 +4702,7 @@ struct SharedContentViewDetails example default shared_content_link = "abc" shared_content_owner = default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse struct SharedFolderChangeLinkPolicyDetails "Changed who can access shared folder via link." @@ -4889,7 +4889,7 @@ struct SharedLinkSettingsAddExpirationDetails "New shared content link expiration date. Might be missing due to historical data gap." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" new_value = "2017-01-25T15:51:30Z" @@ -4902,7 +4902,7 @@ struct SharedLinkSettingsAddPasswordDetails "Shared content link." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" struct SharedLinkSettingsAllowDownloadDisabledDetails @@ -4914,7 +4914,7 @@ struct SharedLinkSettingsAllowDownloadDisabledDetails "Shared content link." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" struct SharedLinkSettingsAllowDownloadEnabledDetails @@ -4926,7 +4926,7 @@ struct SharedLinkSettingsAllowDownloadEnabledDetails "Shared content link." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" struct SharedLinkSettingsChangeAudienceDetails @@ -4942,7 +4942,7 @@ struct SharedLinkSettingsChangeAudienceDetails "Previous link audience value." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" new_value = no_one previous_value = no_one @@ -4960,7 +4960,7 @@ struct SharedLinkSettingsChangeExpirationDetails "Previous shared content link expiration date. Might be missing due to historical data gap." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" new_value = "2017-01-25T15:51:30Z" previous_value = "2017-01-25T15:51:30Z" @@ -4974,7 +4974,7 @@ struct SharedLinkSettingsChangePasswordDetails "Shared content link." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" struct SharedLinkSettingsRemoveExpirationDetails @@ -4988,7 +4988,7 @@ struct SharedLinkSettingsRemoveExpirationDetails "Previous shared link expiration date. Might be missing due to historical data gap." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" previous_value = "2017-01-25T15:51:30Z" @@ -5001,7 +5001,7 @@ struct SharedLinkSettingsRemovePasswordDetails "Shared content link." example default - shared_content_access_level = viewer_no_comment + shared_content_access_level = traverse shared_content_link = "abc" struct SharedLinkShareDetails @@ -5611,7 +5611,7 @@ struct DirectoryRestrictionsRemoveMembersDetails "Removed members from directory restrictions list." struct EmailIngestPolicyChangedDetails - "Changed email to my Dropbox policy for team." + "Changed email to Dropbox policy for team." new_value EmailIngestPolicy "To." @@ -7775,7 +7775,7 @@ struct EmailIngestReceiveFileType description String example default - description = "(file_requests) Received files via Email to my Dropbox" + description = "(file_requests) Received files via Email to Dropbox" struct FileRequestChangeType description String @@ -9395,7 +9395,7 @@ struct EmailIngestPolicyChangedType description String example default - description = "(team_policies) Changed email to my Dropbox policy for team" + description = "(team_policies) Changed email to Dropbox policy for team" struct EmmAddExceptionType description String @@ -10248,7 +10248,7 @@ union EventType user_tags_removed UserTagsRemovedType "(file_operations) Removed tags" email_ingest_receive_file EmailIngestReceiveFileType - "(file_requests) Received files via Email to my Dropbox" + "(file_requests) Received files via Email to Dropbox" file_request_change FileRequestChangeType "(file_requests) Changed file request" file_request_close FileRequestCloseType @@ -10788,7 +10788,7 @@ union EventType directory_restrictions_remove_members DirectoryRestrictionsRemoveMembersType "(team_policies) Removed members from directory restrictions list" email_ingest_policy_changed EmailIngestPolicyChangedType - "(team_policies) Changed email to my Dropbox policy for team" + "(team_policies) Changed email to Dropbox policy for team" emm_add_exception EmmAddExceptionType "(team_policies) Added members to EMM exception list" emm_change_policy EmmChangePolicyType @@ -11212,7 +11212,7 @@ union EventTypeArg user_tags_removed "(file_operations) Removed tags" email_ingest_receive_file - "(file_requests) Received files via Email to my Dropbox" + "(file_requests) Received files via Email to Dropbox" file_request_change "(file_requests) Changed file request" file_request_close @@ -11752,7 +11752,7 @@ union EventTypeArg directory_restrictions_remove_members "(team_policies) Removed members from directory restrictions list" email_ingest_policy_changed - "(team_policies) Changed email to my Dropbox policy for team" + "(team_policies) Changed email to Dropbox policy for team" emm_add_exception "(team_policies) Added members to EMM exception list" emm_change_policy From eec4b43685b7af842d320efaaa86db27232cb465 Mon Sep 17 00:00:00 2001 From: Mitchell Overfield Date: Wed, 30 Mar 2022 16:25:19 -0600 Subject: [PATCH 40/48] Spec Update 03/30/2022 (#69) Change Notes: file_properties Namespace - Update Comments file_tagging Namespace - Update Comments files Namespace - Update Metadata struct to include preview_url - Update Comments team_log_generated Namespace - Add DropboxPasswordsPolicyChangedDetails, DropboxPasswordsPolicyChangedType structs - Add DropboxPasswordsPolicy unions --- file_properties.stone | 3 +-- file_tagging.stone | 2 +- files.stone | 6 ++++-- team_log_generated.stone | 29 +++++++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/file_properties.stone b/file_properties.stone index 0371e22..7ffde9a 100644 --- a/file_properties.stone +++ b/file_properties.stone @@ -146,8 +146,7 @@ union LookupError 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, - sometimes there are legal restrictions due to copyright claims." + "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 diff --git a/file_tagging.stone b/file_tagging.stone index ceb2d44..0daee87 100644 --- a/file_tagging.stone +++ b/file_tagging.stone @@ -45,7 +45,7 @@ union AddTagError extends BaseTagError "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. No more than 20 tags can be added to a given item." + "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" diff --git a/files.stone b/files.stone index 3ce406d..0dcfe2e 100644 --- a/files.stone +++ b/files.stone @@ -64,6 +64,9 @@ struct Metadata "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 @@ -1553,8 +1556,7 @@ union LookupError 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, - sometimes there are legal restrictions due to copyright claims." + "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 diff --git a/team_log_generated.stone b/team_log_generated.stone index d50b0b7..cc855ce 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -406,6 +406,12 @@ union DownloadPolicyType allow disallow +union DropboxPasswordsPolicy + "Policy for deciding whether team users can use Dropbox Passwords" + default + disabled + enabled + union EmailIngestPolicy "Policy for deciding whether a team can use Email to Dropbox feature" disabled @@ -5610,6 +5616,18 @@ struct DirectoryRestrictionsAddMembersDetails struct DirectoryRestrictionsRemoveMembersDetails "Removed members from directory restrictions list." +struct DropboxPasswordsPolicyChangedDetails + "Changed Dropbox Passwords policy for team." + + new_value DropboxPasswordsPolicy + "To." + previous_value DropboxPasswordsPolicy + "From." + + example default + new_value = default + previous_value = default + struct EmailIngestPolicyChangedDetails "Changed email to Dropbox policy for team." @@ -7057,6 +7075,7 @@ union EventDetails device_approvals_remove_exception_details DeviceApprovalsRemoveExceptionDetails directory_restrictions_add_members_details DirectoryRestrictionsAddMembersDetails directory_restrictions_remove_members_details DirectoryRestrictionsRemoveMembersDetails + dropbox_passwords_policy_changed_details DropboxPasswordsPolicyChangedDetails email_ingest_policy_changed_details EmailIngestPolicyChangedDetails emm_add_exception_details EmmAddExceptionDetails emm_change_policy_details EmmChangePolicyDetails @@ -9391,6 +9410,12 @@ struct DirectoryRestrictionsRemoveMembersType example default description = "(team_policies) Removed members from directory restrictions list" +struct DropboxPasswordsPolicyChangedType + description String + + example default + description = "(team_policies) Changed Dropbox Passwords policy for team" + struct EmailIngestPolicyChangedType description String @@ -10787,6 +10812,8 @@ union EventType "(team_policies) Added members to directory restrictions list" directory_restrictions_remove_members DirectoryRestrictionsRemoveMembersType "(team_policies) Removed members from directory restrictions list" + dropbox_passwords_policy_changed DropboxPasswordsPolicyChangedType + "(team_policies) Changed Dropbox Passwords policy for team" email_ingest_policy_changed EmailIngestPolicyChangedType "(team_policies) Changed email to Dropbox policy for team" emm_add_exception EmmAddExceptionType @@ -11751,6 +11778,8 @@ union EventTypeArg "(team_policies) Added members to directory restrictions list" directory_restrictions_remove_members "(team_policies) Removed members from directory restrictions list" + dropbox_passwords_policy_changed + "(team_policies) Changed Dropbox Passwords policy for team" email_ingest_policy_changed "(team_policies) Changed email to Dropbox policy for team" emm_add_exception From ef6b1680d9a05ec7475f503149d771e44db913a2 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 20 Apr 2022 15:34:00 -0700 Subject: [PATCH 41/48] Spec Update 04/20/2022 (#70) Change Notes: files Namespace - Add upload_session/start_batch routes - Add UploadSessionStartBatchArg, UploadSessionStartBatchResult structs team_log_generated Namespace - Add ExternalDriveBackupEligibilityStatusCheckedDetails, ExternalDriveBackupStatusChangedDetails, ExternalDriveBackupEligibilityStatusCheckedType, ExternalDriveBackupStatusChangedType structs - Add ExternalDriveBackupEligibilityStatus, ExternalDriveBackupStatus unions Co-authored-by: Brent Bumann --- files.stone | 29 ++++++++++++++++++ team_log_generated.stone | 66 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/files.stone b/files.stone index 0dcfe2e..aac06ca 100644 --- a/files.stone +++ b/files.stone @@ -890,6 +890,35 @@ struct UploadSessionStartResult 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." + + 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 diff --git a/team_log_generated.stone b/team_log_generated.stone index cc855ce..a5dab69 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -428,12 +428,26 @@ union ExtendedVersionHistoryPolicy implicitly_limited implicitly_unlimited +union ExternalDriveBackupEligibilityStatus + "External Drive Backup eligibility status" + exceed_license_cap + success + union ExternalDriveBackupPolicy "Policy for controlling team access to external drive backup feature" default disabled enabled +union ExternalDriveBackupStatus + "External Drive Backup status" + broken + created + created_or_broken + deleted + empty + unknown + struct FailureDetailsLogInfo "Provides details about a failure" @@ -2648,6 +2662,36 @@ struct DropboxPasswordsNewDeviceEnrolledDetails struct EmmRefreshAuthTokenDetails "Refreshed auth token used for setting up EMM." +struct ExternalDriveBackupEligibilityStatusCheckedDetails + "Checked external drive backup eligibility status." + + desktop_device_session_info DesktopDeviceSessionLogInfo + "Device's session logged information." + status ExternalDriveBackupEligibilityStatus + "Current eligibility status of external drive backup." + number_of_external_drive_backup UInt64 + "Total number of valid external drive backup for all the team members." + + example default + desktop_device_session_info = default + status = success + number_of_external_drive_backup = 3 + +struct ExternalDriveBackupStatusChangedDetails + "Modified external drive backup." + + desktop_device_session_info DesktopDeviceSessionLogInfo + "Device's session logged information." + previous_value ExternalDriveBackupStatus + "Previous status of this external drive backup." + new_value ExternalDriveBackupStatus + "Next status of this external drive backup." + + example default + desktop_device_session_info = default + previous_value = empty + new_value = empty + struct AccountCaptureChangeAvailabilityDetails "Granted/revoked option to enable account capture on team domains." @@ -6761,6 +6805,8 @@ union EventDetails dropbox_passwords_exported_details DropboxPasswordsExportedDetails dropbox_passwords_new_device_enrolled_details DropboxPasswordsNewDeviceEnrolledDetails emm_refresh_auth_token_details EmmRefreshAuthTokenDetails + external_drive_backup_eligibility_status_checked_details ExternalDriveBackupEligibilityStatusCheckedDetails + external_drive_backup_status_changed_details ExternalDriveBackupStatusChangedDetails account_capture_change_availability_details AccountCaptureChangeAvailabilityDetails account_capture_migrate_account_details AccountCaptureMigrateAccountDetails account_capture_notification_emails_sent_details AccountCaptureNotificationEmailsSentDetails @@ -7526,6 +7572,18 @@ struct EmmRefreshAuthTokenType example default description = "(devices) Refreshed auth token used for setting up EMM" +struct ExternalDriveBackupEligibilityStatusCheckedType + description String + + example default + description = "(devices) Checked external drive backup eligibility status" + +struct ExternalDriveBackupStatusChangedType + description String + + example default + description = "(devices) Modified external drive backup" + struct AccountCaptureChangeAvailabilityType description String @@ -10184,6 +10242,10 @@ union EventType "(devices) Enrolled new Dropbox Passwords device" emm_refresh_auth_token EmmRefreshAuthTokenType "(devices) Refreshed auth token used for setting up EMM" + external_drive_backup_eligibility_status_checked ExternalDriveBackupEligibilityStatusCheckedType + "(devices) Checked external drive backup eligibility status" + external_drive_backup_status_changed ExternalDriveBackupStatusChangedType + "(devices) Modified external drive backup" account_capture_change_availability AccountCaptureChangeAvailabilityType "(domains) Granted/revoked option to enable account capture on team domains" account_capture_migrate_account AccountCaptureMigrateAccountType @@ -11150,6 +11212,10 @@ union EventTypeArg "(devices) Enrolled new Dropbox Passwords device" emm_refresh_auth_token "(devices) Refreshed auth token used for setting up EMM" + external_drive_backup_eligibility_status_checked + "(devices) Checked external drive backup eligibility status" + external_drive_backup_status_changed + "(devices) Modified external drive backup" account_capture_change_availability "(domains) Granted/revoked option to enable account capture on team domains" account_capture_migrate_account From 69f7bb2ea7702db5564f12549efb23956c5d6329 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 18 May 2022 14:36:21 -0700 Subject: [PATCH 42/48] Spec Update 05/18/2022 (#71) Change Notes: files Namespace - Update examples shared_links Namespace - Update get_shared_link_metadata route to include app and user auth team_folders Namespace - Update team_folder/create, team_folder/rename, team_folder/list, team_folder/list/continue, team_folder/get_info, team_folder/activate, team_folder/archive, team_folder/archive/check, team_folder/permanently_delete, team_folder/update_sync_settings routes to include updated scopes team_legal_holds Namespace - Update legal_holds/create_policy, legal_holds/get_policy, legal_holds/list_policies, legal_holds/list_held_revisions, legal_holds/list_held_revisions_continue, legal_holds/update_policy, legal_holds/release_policy routes to include updated scopes team_log_generated Namespace - Update AdminAlertingAlertConfiguration to include text and excluded_file_extensions - Update PlacementRestriction to include us_s3_only - Update examples Co-authored-by: Brent Bumann --- files.stone | 8 +++++++- shared_links.stone | 1 + team_folders.stone | 20 ++++++++++---------- team_legal_holds.stone | 14 +++++++------- team_log_generated.stone | 9 +++++++++ 5 files changed, 34 insertions(+), 18 deletions(-) diff --git a/files.stone b/files.stone index aac06ca..ef793f8 100644 --- a/files.stone +++ b/files.stone @@ -677,7 +677,9 @@ 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." + cannot be a single file. + + Note: this endpoint does not support HTTP range requests." attrs host = "content" @@ -1159,6 +1161,10 @@ struct UploadArg extends CommitInfo 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. diff --git a/shared_links.stone b/shared_links.stone index eb3b357..b7353a1 100644 --- a/shared_links.stone +++ b/shared_links.stone @@ -266,6 +266,7 @@ route get_shared_link_metadata(GetSharedLinkMetadataArg, SharedLinkMetadata, Sha "Get the shared link's metadata." attrs + auth = "app, user" allow_app_folder_app = true scope = "sharing.read" diff --git a/team_folders.stone b/team_folders.stone index 15dc48e..5ba9418 100644 --- a/team_folders.stone +++ b/team_folders.stone @@ -93,7 +93,7 @@ route team_folder/create(TeamFolderCreateArg, TeamFolderMetadata, TeamFolderCrea attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.write" struct TeamFolderCreateArg name String @@ -127,7 +127,7 @@ route team_folder/rename(TeamFolderRenameArg, TeamFolderMetadata, TeamFolderRena attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.write" struct TeamFolderRenameArg extends TeamFolderIdArg name String @@ -155,7 +155,7 @@ route team_folder/list(TeamFolderListArg, TeamFolderListResult, TeamFolderListEr Permission : Team member file access." attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.read" struct TeamFolderListArg limit UInt32(min_value=1, max_value=1000) = 1000 @@ -195,7 +195,7 @@ route team_folder/list/continue(TeamFolderListContinueArg, TeamFolderListResult, attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.read" struct TeamFolderListContinueArg cursor String @@ -219,7 +219,7 @@ route team_folder/get_info(TeamFolderIdListArg, List(TeamFolderGetInfoItem), Voi attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.read" union_closed TeamFolderGetInfoItem id_not_found String @@ -239,7 +239,7 @@ route team_folder/activate(TeamFolderIdArg, TeamFolderMetadata, TeamFolderActiva attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.write" union TeamFolderActivateError extends BaseTeamFolderError "" @@ -256,7 +256,7 @@ route team_folder/archive(TeamFolderArchiveArg, TeamFolderArchiveLaunch, TeamFol attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.write" struct TeamFolderArchiveArg extends TeamFolderIdArg force_async_off Boolean = false @@ -285,7 +285,7 @@ route team_folder/archive/check(async.PollArg, TeamFolderArchiveJobStatus, async attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.write" union_closed TeamFolderArchiveJobStatus extends async.PollResultBase complete TeamFolderMetadata @@ -308,7 +308,7 @@ route team_folder/permanently_delete(TeamFolderIdArg, Void, TeamFolderPermanentl attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.write" union TeamFolderPermanentlyDeleteError extends BaseTeamFolderError "" @@ -338,4 +338,4 @@ route team_folder/update_sync_settings(TeamFolderUpdateSyncSettingsArg, TeamFold attrs auth = "team" - scope = "team_data.team_space" + scope = "team_data.content.write" diff --git a/team_legal_holds.stone b/team_legal_holds.stone index 079ffd6..c673a98 100644 --- a/team_legal_holds.stone +++ b/team_legal_holds.stone @@ -116,7 +116,7 @@ route legal_holds/create_policy(LegalHoldsPolicyCreateArg, LegalHoldsPolicyCreat attrs auth = "team" - scope = "team_data.member" + scope = "team_data.governance.write" # # route legal_holds/get_policy @@ -142,7 +142,7 @@ route legal_holds/get_policy(LegalHoldsGetPolicyArg, LegalHoldsGetPolicyResult, attrs auth = "team" - scope = "team_data.member" + scope = "team_data.governance.write" # @@ -173,7 +173,7 @@ route legal_holds/list_policies(LegalHoldsListPoliciesArg, LegalHoldsListPolicie attrs auth = "team" - scope = "team_data.member" + scope = "team_data.governance.write" # @@ -254,7 +254,7 @@ route legal_holds/list_held_revisions(LegalHoldsListHeldRevisionsArg, LegalHolds attrs auth = "team" - scope = "team_data.member" + scope = "team_data.governance.write" # @@ -286,7 +286,7 @@ route legal_holds/list_held_revisions_continue(LegalHoldsListHeldRevisionsContin attrs auth = "team" - scope = "team_data.member" + scope = "team_data.governance.write" # # route legal_holds/update_policy @@ -334,7 +334,7 @@ route legal_holds/update_policy(LegalHoldsPolicyUpdateArg, LegalHoldsPolicyUpdat attrs auth = "team" - scope = "team_data.member" + scope = "team_data.governance.write" # # route legal_holds/release_policy @@ -362,4 +362,4 @@ route legal_holds/release_policy(LegalHoldsPolicyReleaseArg, Void, LegalHoldsPol attrs auth = "team" - scope = "team_data.member" + scope = "team_data.governance.write" diff --git a/team_log_generated.stone b/team_log_generated.stone index a5dab69..9c014ef 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -221,16 +221,24 @@ struct AdminAlertingAlertConfiguration "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" @@ -774,6 +782,7 @@ union PlacementRestriction japan_only none uk_only + us_s3_only union PolicyType disposition From c26b11df5170dcc03a86046b162c284ed24f7487 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 15 Jun 2022 16:03:48 -0700 Subject: [PATCH 43/48] Spec Update 06/15/2022 (#72) Change Notes: files Namespace - Update upload_session/start_batch route to include account_id Co-authored-by: Brent Bumann --- files.stone | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/files.stone b/files.stone index ef793f8..ca5b14d 100644 --- a/files.stone +++ b/files.stone @@ -893,7 +893,12 @@ struct UploadSessionStartResult 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." + "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" @@ -1450,6 +1455,9 @@ struct SearchOptions 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 From f91238c7508770245030a449d86bd698d30ebfc3 Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Wed, 13 Jul 2022 10:50:03 -0700 Subject: [PATCH 44/48] Spec Update 07/13/2022 (#) (#73) Change Notes: check_api_v2_types Namespace - Update EchoArg struct to include max_length in query arg sharing_files Namespace - Update FileMemberActionResult to include sckey_sha1, invitation_signature team_log_generated Namespace - Add AdminEmailRemindersChangedDetails, AdminEmailRemindersChangedType structs - Add AdminEmailRemindersPolicy unions team_policies Namespace - Add AdminEmailRemindersChangedType struct - Add FileProviderMigrationPolicyState unions Co-authored-by: Brent Bumann --- check_api_v2_types.stone | 2 +- openid_openid_types.stone | 28 ++++++++++++++++++++++++++++ sharing_files.stone | 7 +++++++ team_log_generated.stone | 29 +++++++++++++++++++++++++++++ team_policies.stone | 8 ++++++++ 5 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 openid_openid_types.stone diff --git a/check_api_v2_types.stone b/check_api_v2_types.stone index 76220f6..2d32ead 100644 --- a/check_api_v2_types.stone +++ b/check_api_v2_types.stone @@ -6,7 +6,7 @@ import common struct EchoArg "EchoArg contains the arguments to be sent to the Dropbox servers." - query String = "" + query String(max_length=500) = "" "The string that you'd like to be echoed back to you." example default diff --git a/openid_openid_types.stone b/openid_openid_types.stone new file mode 100644 index 0000000..5a7b482 --- /dev/null +++ b/openid_openid_types.stone @@ -0,0 +1,28 @@ +# @generated by protoc-gen-stone. DO NOT EDIT. +# source: configs/proto/dropbox/proto/openid/openid_types.proto +namespace openid + +import common + +union AuthError + invalid_token + no_openid_auth + + +struct UserInfoError + err err_union? + union + auth_error AuthError = invalid_token + error_message String = "" + +struct UserInfoArgs + "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." + +struct UserInfoResult + family_name String? + given_name String? + email String? + email_verified Boolean? + iss String = "" + sub String = "" + diff --git a/sharing_files.stone b/sharing_files.stone index b7c14db..e143936 100644 --- a/sharing_files.stone +++ b/sharing_files.stone @@ -193,10 +193,17 @@ struct FileMemberActionResult "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 member = default result = default + sckey_sha1 = "32gggb672f987b2d94ef1741616bdf37d565e8c1" + invitation_signature = ["32gggb672f987b2d94ef1741616bdf37d565e8c1:c1ce0a9ef6ggg65e6e2f43514082ea5ffefd9cf5"] union_closed FileMemberActionIndividualResult success AccessLevel? diff --git a/team_log_generated.stone b/team_log_generated.stone index 9c014ef..03390a9 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -290,6 +290,12 @@ union AdminConsoleAppPolicy block default +union AdminEmailRemindersPolicy + "Policy for deciding whether team admins receive reminder emails for requests to join the team" + default + disabled + enabled + union AdminRole billing_admin compliance_admin @@ -5501,6 +5507,18 @@ struct AccountCaptureChangePolicyDetails new_value = disabled previous_value = disabled +struct AdminEmailRemindersChangedDetails + "Changed admin email reminder policy for team requests to join." + + new_value AdminEmailRemindersPolicy + "To." + previous_value AdminEmailRemindersPolicy + "From." + + example default + new_value = default + previous_value = default + struct AllowDownloadDisabledDetails "Disabled downloads." @@ -7112,6 +7130,7 @@ union EventDetails team_folder_rename_details TeamFolderRenameDetails team_selective_sync_settings_changed_details TeamSelectiveSyncSettingsChangedDetails account_capture_change_policy_details AccountCaptureChangePolicyDetails + admin_email_reminders_changed_details AdminEmailRemindersChangedDetails allow_download_disabled_details AllowDownloadDisabledDetails allow_download_enabled_details AllowDownloadEnabledDetails app_permissions_changed_details AppPermissionsChangedDetails @@ -9369,6 +9388,12 @@ struct AccountCaptureChangePolicyType example default description = "(team_policies) Changed account capture setting on team domain" +struct AdminEmailRemindersChangedType + description String + + example default + description = "(team_policies) Changed admin email reminder policy for team requests to join" + struct AllowDownloadDisabledType description String @@ -10847,6 +10872,8 @@ union EventType "(team_folders) Changed sync default" account_capture_change_policy AccountCaptureChangePolicyType "(team_policies) Changed account capture setting on team domain" + admin_email_reminders_changed AdminEmailRemindersChangedType + "(team_policies) Changed admin email reminder policy for team requests to join" allow_download_disabled AllowDownloadDisabledType "(team_policies) Disabled downloads (deprecated, no longer logged)" allow_download_enabled AllowDownloadEnabledType @@ -11817,6 +11844,8 @@ union EventTypeArg "(team_folders) Changed sync default" account_capture_change_policy "(team_policies) Changed account capture setting on team domain" + admin_email_reminders_changed + "(team_policies) Changed admin email reminder policy for team requests to join" allow_download_disabled "(team_policies) Disabled downloads (deprecated, no longer logged)" allow_download_enabled diff --git a/team_policies.stone b/team_policies.stone index ad2fd1a..d82feab 100644 --- a/team_policies.stone +++ b/team_policies.stone @@ -227,3 +227,11 @@ union ExternalDriveBackupPolicyState "External Drive Backup feature is enabled." default "External Drive Backup default value based on team tier." + +union FileProviderMigrationPolicyState + disabled + "Team admin has opted out of File Provider Migration for team members." + enabled + "Team admin has not opted out of File Provider Migration for team members." + default + "Team admin has default value based on team tier." From c36ba27d8d56648555d3068bb3826e1d3a44d92b Mon Sep 17 00:00:00 2001 From: bzhang-dbx <108357847+bzhang-dbx@users.noreply.github.com> Date: Thu, 1 Sep 2022 13:59:04 -0700 Subject: [PATCH 45/48] update specs (#74) Co-authored-by: Bruce Zhang --- file_tagging.stone | 8 ++++---- openid_openid.stone | 14 ++++++++++++++ openid_openid_types.stone | 8 ++++++++ sharing_files.stone | 4 +++- team_log_generated.stone | 32 ++++++++++++++++++++++++++++---- 5 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 openid_openid.stone diff --git a/file_tagging.stone b/file_tagging.stone index 0daee87..65b075e 100644 --- a/file_tagging.stone +++ b/file_tagging.stone @@ -34,11 +34,11 @@ struct AddTagArg "Path to the item to be tagged." tag_text TagText - "The value of the tag to add." + "The value of the tag to add. Will be automatically converted to lowercase letters." example default path = "/Prime_Numbers.txt" - tag_text = "MyTag" + tag_text = "my_tag" union AddTagError extends BaseTagError too_many_tags @@ -62,11 +62,11 @@ struct RemoveTagArg "Path to the item to tag." tag_text TagText - "The tag to remove." + "The tag to remove. Will be automatically converted to lowercase letters." example default path = "/Prime_Numbers.txt" - tag_text = "MyTag" + tag_text = "my_tag" union RemoveTagError extends BaseTagError tag_not_present diff --git a/openid_openid.stone b/openid_openid.stone new file mode 100644 index 0000000..497d607 --- /dev/null +++ b/openid_openid.stone @@ -0,0 +1,14 @@ +# @generated by protoc-gen-stone. DO NOT EDIT. +# source: configs/proto/dropbox/proto/openid/openid.proto +namespace openid + +route userinfo (UserInfoArgs, UserInfoResult, UserInfoError) + "This route is used for refreshing the info that is found in the id_token during the OIDC flow. + This route doesn't require any arguments and will use the scopes approved for the given access token." + + attrs + allow_app_folder_app = true + auth = "user" + is_preview = true + scope = "openid" + diff --git a/openid_openid_types.stone b/openid_openid_types.stone index 5a7b482..4d6d8b4 100644 --- a/openid_openid_types.stone +++ b/openid_openid_types.stone @@ -14,15 +14,23 @@ struct UserInfoError union auth_error AuthError = invalid_token error_message String = "" + "Brief explanation of the error." struct UserInfoArgs "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." struct UserInfoResult family_name String? + "Last name of user." given_name String? + "First name of user." email String? + "Email address of user." email_verified Boolean? + "If user is email verified." iss String = "" + "Issuer of token (in this case Dropbox)." sub String = "" + "An identifier for the user. This is the Dropbox account_id, a string + value such as dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc." diff --git a/sharing_files.stone b/sharing_files.stone index e143936..d8b6123 100644 --- a/sharing_files.stone +++ b/sharing_files.stone @@ -207,7 +207,9 @@ struct FileMemberActionResult union_closed FileMemberActionIndividualResult success AccessLevel? - "Member was successfully removed from this file. If AccessLevel is given, + "Part of the response for both add_file_member and remove_file_member_v1 (deprecated). + For add_file_member, indicates giving access was successful and at what AccessLevel. + For remove_file_member_v1, indicates member was successfully removed from the file. If AccessLevel is given, the member still has access via a parent shared folder." member_error FileMemberActionError "User was not able to perform this action." diff --git a/team_log_generated.stone b/team_log_generated.stone index 03390a9..b18786b 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -940,6 +940,7 @@ struct TeamLogInfo union TeamMembershipType free full + guest union TeamMergeRequestAcceptedExtraDetails "Team merge request acceptance details" @@ -5508,7 +5509,7 @@ struct AccountCaptureChangePolicyDetails previous_value = disabled struct AdminEmailRemindersChangedDetails - "Changed admin email reminder policy for team requests to join." + "Changed admin reminder settings for requests to join the team." new_value AdminEmailRemindersPolicy "To." @@ -5777,6 +5778,18 @@ struct FileLockingPolicyChangedDetails new_value = disabled previous_value = disabled +struct FileProviderMigrationPolicyChangedDetails + "Changed File Provider Migration policy for team." + + new_value team_policies.FileProviderMigrationPolicyState + "To." + previous_value team_policies.FileProviderMigrationPolicyState + "From." + + example default + new_value = default + previous_value = default + struct FileRequestsChangePolicyDetails "Enabled/disabled file requests." @@ -7158,6 +7171,7 @@ union EventDetails external_drive_backup_policy_changed_details ExternalDriveBackupPolicyChangedDetails file_comments_change_policy_details FileCommentsChangePolicyDetails file_locking_policy_changed_details FileLockingPolicyChangedDetails + file_provider_migration_policy_changed_details FileProviderMigrationPolicyChangedDetails file_requests_change_policy_details FileRequestsChangePolicyDetails file_requests_emails_enabled_details FileRequestsEmailsEnabledDetails file_requests_emails_restricted_to_team_only_details FileRequestsEmailsRestrictedToTeamOnlyDetails @@ -9392,7 +9406,7 @@ struct AdminEmailRemindersChangedType description String example default - description = "(team_policies) Changed admin email reminder policy for team requests to join" + description = "(team_policies) Changed admin reminder settings for requests to join the team" struct AllowDownloadDisabledType description String @@ -9556,6 +9570,12 @@ struct FileLockingPolicyChangedType example default description = "(team_policies) Changed file locking policy for team" +struct FileProviderMigrationPolicyChangedType + description String + + example default + description = "(team_policies) Changed File Provider Migration policy for team" + struct FileRequestsChangePolicyType description String @@ -10873,7 +10893,7 @@ union EventType account_capture_change_policy AccountCaptureChangePolicyType "(team_policies) Changed account capture setting on team domain" admin_email_reminders_changed AdminEmailRemindersChangedType - "(team_policies) Changed admin email reminder policy for team requests to join" + "(team_policies) Changed admin reminder settings for requests to join the team" allow_download_disabled AllowDownloadDisabledType "(team_policies) Disabled downloads (deprecated, no longer logged)" allow_download_enabled AllowDownloadEnabledType @@ -10928,6 +10948,8 @@ union EventType "(team_policies) Enabled/disabled commenting on team files" file_locking_policy_changed FileLockingPolicyChangedType "(team_policies) Changed file locking policy for team" + file_provider_migration_policy_changed FileProviderMigrationPolicyChangedType + "(team_policies) Changed File Provider Migration policy for team" file_requests_change_policy FileRequestsChangePolicyType "(team_policies) Enabled/disabled file requests" file_requests_emails_enabled FileRequestsEmailsEnabledType @@ -11845,7 +11867,7 @@ union EventTypeArg account_capture_change_policy "(team_policies) Changed account capture setting on team domain" admin_email_reminders_changed - "(team_policies) Changed admin email reminder policy for team requests to join" + "(team_policies) Changed admin reminder settings for requests to join the team" allow_download_disabled "(team_policies) Disabled downloads (deprecated, no longer logged)" allow_download_enabled @@ -11900,6 +11922,8 @@ union EventTypeArg "(team_policies) Enabled/disabled commenting on team files" file_locking_policy_changed "(team_policies) Changed file locking policy for team" + file_provider_migration_policy_changed + "(team_policies) Changed File Provider Migration policy for team" file_requests_change_policy "(team_policies) Enabled/disabled file requests" file_requests_emails_enabled From 18963b8a29fe125f6495d36c38eda5db2710d0dd Mon Sep 17 00:00:00 2001 From: Brent Bumann Date: Tue, 11 Oct 2022 14:25:02 -0700 Subject: [PATCH 46/48] Spec Update 10/11/2022 (#75) Change Notes: openid_openid_types Namespace - Add OpenIdError, UserInfoError unions - Remove UserInfoError structs - Remove AuthError unions - Update UserInfoArgs struct to include documentation team_policies Namespace - Add examples Co-authored-by: Brent Bumann --- openid_openid_types.stone | 16 ++-- team_policies.stone | 3 + team_sharing_allowlist.stone | 141 +++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 10 deletions(-) create mode 100644 team_sharing_allowlist.stone diff --git a/openid_openid_types.stone b/openid_openid_types.stone index 4d6d8b4..d54a4a6 100644 --- a/openid_openid_types.stone +++ b/openid_openid_types.stone @@ -4,20 +4,16 @@ namespace openid import common -union AuthError - invalid_token - no_openid_auth +union OpenIdError + incorrect_openid_scopes + "Missing openid claims for the associated access token." -struct UserInfoError - err err_union? - union - auth_error AuthError = invalid_token - error_message String = "" - "Brief explanation of the error." +union UserInfoError + openid_error OpenIdError = incorrect_openid_scopes struct UserInfoArgs - "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." + "No Parameters" struct UserInfoResult family_name String? diff --git a/team_policies.stone b/team_policies.stone index d82feab..53e0bd1 100644 --- a/team_policies.stone +++ b/team_policies.stone @@ -32,11 +32,14 @@ struct TeamSharingPolicies "Which shared folders team members can join." shared_link_create_policy SharedLinkCreatePolicy "Who can view shared links owned by team members." + group_creation_policy GroupCreation + "Who can create groups." example default shared_folder_member_policy = team shared_folder_join_policy = from_anyone shared_link_create_policy = team_only + group_creation_policy = admins_only # 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. diff --git a/team_sharing_allowlist.stone b/team_sharing_allowlist.stone new file mode 100644 index 0000000..24e4ed7 --- /dev/null +++ b/team_sharing_allowlist.stone @@ -0,0 +1,141 @@ +namespace team + +import common + +struct SharingAllowlistAddArgs + "Structure representing Approve List entries. Domain and emails are supported. + At least one entry of any supported type is required." + domains List(String)? + "List of domains represented by valid string representation (RFC-1034/5)." + emails List(String)? + "List of emails represented by valid string representation (RFC-5322/822)." + + example default + domains = ["test-domain.com", "subdomain.some.com"] + emails = ["adam@test-domain.com", "john@some.com"] + +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." + + example default + limit = 100 + +struct SharingAllowlistListContinueArg + cursor String + "The cursor returned from a previous call to :route:`sharing_allowlist/list` or :route:`sharing_allowlist/list/continue`." + + example default + cursor = "dGVzdF9jdXJzb3IK" + +struct SharingAllowlistListError + "This struct is empty. The comment here is intentionally emitted to avoid indentation issues with Stone." + +struct SharingAllowlistListResponse + domains List(String) + "List of domains represented by valid string representation (RFC-1034/5)." + emails List(String) + "List of emails represented by valid string representation (RFC-5322/822)." + cursor String = "" + "If this is nonempty, there are more entries that can be fetched with :route:`sharing_allowlist/list/continue`." + has_more Boolean = false + "if true indicates that more entries can be fetched with :route:`sharing_allowlist/list/continue`." + + example default + domains = ["test-domain.com", "subdomain.some.com"] + emails = ["adam@test-domain.com", "john@some.com"] + 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)." + emails List(String)? + "List of emails represented by valid string representation (RFC-5322/822)." + + example default + 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. + Valid domains (RFC-1034/5) and emails (RFC-5322/822) are accepted. + Added entries cannot overflow limit of 10000 entries per team. + Maximum 100 entries per call is allowed." + + attrs + auth = "team" + is_preview = true + scope = "team_info.write" + +route sharing_allowlist/list (SharingAllowlistListArg, SharingAllowlistListResponse, SharingAllowlistListError) + "Lists Approve List entries for given team, from newest to oldest, returning + up to `limit` entries at a time. If there are more than `limit` entries + associated with the current team, more can be fetched by passing the + returned `cursor` to :route:`sharing_allowlist/list/continue`." + + attrs + auth = "team" + is_preview = true + scope = "team_info.read" + +route sharing_allowlist/list/continue (SharingAllowlistListContinueArg, SharingAllowlistListResponse, SharingAllowlistListContinueError) + "Lists entries associated with given team, starting from a the cursor. See :route:`sharing_allowlist/list`." + + attrs + auth = "team" + is_preview = true + scope = "team_info.read" + +route sharing_allowlist/remove (SharingAllowlistRemoveArgs, SharingAllowlistRemoveResponse, SharingAllowlistRemoveError) + "Endpoint removes Approve List entries. Changes are effective immediately. + Changes are committed in transaction. In case of single validation error - all entries are rejected. + Valid domains (RFC-1034/5) and emails (RFC-5322/822) are accepted. + Entries being removed have to be present on the list. + Maximum 1000 entries per call is allowed." + + attrs + auth = "team" + is_preview = true + scope = "team_info.write" + From 3d1080a021a67c335c52361d8f61ec558bb80606 Mon Sep 17 00:00:00 2001 From: Mitchell Overfield Date: Wed, 9 Nov 2022 14:01:47 -0800 Subject: [PATCH 47/48] spec update (#76) Change Notes: shared_links Namespace Update RequestedLinkAccessLevel union team Namespace Update TeamGetInfoResult struct team_log_generated Namespace Add FolderLinkRestrictionPolicyChangedDetails, FolderLinkRestrictionPolicyChangedType structs Add FolderLinkRestrictionPolicy unions --- shared_links.stone | 2 ++ team.stone | 4 ++++ team_log_generated.stone | 28 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/shared_links.stone b/shared_links.stone index b7353a1..5b2a5d7 100644 --- a/shared_links.stone +++ b/shared_links.stone @@ -384,6 +384,8 @@ union RequestedLinkAccessLevel 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 diff --git a/team.stone b/team.stone index 4195ff6..e955e4d 100644 --- a/team.stone +++ b/team.stone @@ -159,6 +159,9 @@ struct TeamGetInfoResult num_provisioned_users UInt32 "The number of accounts that have been invited or are already active members of the team." + num_used_licenses UInt32 + "The number of licenses used on the team." + policies team_policies.TeamMemberPolicies example default @@ -166,6 +169,7 @@ struct TeamGetInfoResult team_id="dbtid:1234abcd" num_licensed_users=5 num_provisioned_users=2 + num_used_licenses=1 policies=default route get_info(Void, TeamGetInfoResult, Void) diff --git a/team_log_generated.stone b/team_log_generated.stone index b18786b..d13cff1 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -632,6 +632,11 @@ union FileTransfersPolicy disabled enabled +union FolderLinkRestrictionPolicy + "Policy for deciding whether applying link restrictions on all team owned folders" + disabled + enabled + struct GeoLocationLogInfo "Geographic location details." @@ -5820,6 +5825,18 @@ struct FileTransfersPolicyChangedDetails new_value = disabled previous_value = disabled +struct FolderLinkRestrictionPolicyChangedDetails + "Changed folder link restrictions policy for team." + + new_value FolderLinkRestrictionPolicy + "To." + previous_value FolderLinkRestrictionPolicy + "From." + + example default + new_value = disabled + previous_value = disabled + struct GoogleSsoChangePolicyDetails "Enabled/disabled Google single sign-on for team." @@ -7176,6 +7193,7 @@ union EventDetails file_requests_emails_enabled_details FileRequestsEmailsEnabledDetails file_requests_emails_restricted_to_team_only_details FileRequestsEmailsRestrictedToTeamOnlyDetails file_transfers_policy_changed_details FileTransfersPolicyChangedDetails + folder_link_restriction_policy_changed_details FolderLinkRestrictionPolicyChangedDetails google_sso_change_policy_details GoogleSsoChangePolicyDetails group_user_management_change_policy_details GroupUserManagementChangePolicyDetails integration_policy_changed_details IntegrationPolicyChangedDetails @@ -9600,6 +9618,12 @@ struct FileTransfersPolicyChangedType example default description = "(team_policies) Changed file transfers policy for team" +struct FolderLinkRestrictionPolicyChangedType + description String + + example default + description = "(team_policies) Changed folder link restrictions policy for team" + struct GoogleSsoChangePolicyType description String @@ -10958,6 +10982,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" + folder_link_restriction_policy_changed FolderLinkRestrictionPolicyChangedType + "(team_policies) Changed folder link restrictions policy for team" google_sso_change_policy GoogleSsoChangePolicyType "(team_policies) Enabled/disabled Google single sign-on for team" group_user_management_change_policy GroupUserManagementChangePolicyType @@ -11932,6 +11958,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" + folder_link_restriction_policy_changed + "(team_policies) Changed folder link restrictions policy for team" google_sso_change_policy "(team_policies) Enabled/disabled Google single sign-on for team" group_user_management_change_policy From c8364404953d875801d496a81f786c5545f78223 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 26 Apr 2023 09:50:36 -0700 Subject: [PATCH 48/48] Spec Update 04/26/2023 (#) (#77) Change Notes: check_api_v2_types Namespace - Update EchoArg DataType.STRUCT files Namespace - Update DeleteBatchArg DataType.STRUCT - Update RelocationBatchArgBase DataType.STRUCT - Update save_url DataType.ROUTE team_log_generated Namespace - Add RansomwareRestoreProcessCompletedDetails, RansomwareRestoreProcessStartedDetails, TeamEncryptionKeyCancelKeyDeletionDetails, TeamEncryptionKeyCreateKeyDetails, TeamEncryptionKeyDeleteKeyDetails, TeamEncryptionKeyDisableKeyDetails, TeamEncryptionKeyEnableKeyDetails, TeamEncryptionKeyRotateKeyDetails, TeamEncryptionKeyScheduleKeyDeletionDetails, FileAddFromAutomationDetails, ReplayFileDeleteDetails, BackupAdminInvitationSentDetails, BackupInvitationOpenedDetails, RansomwareAlertCreateReportDetails, RansomwareAlertCreateReportFailedDetails, ReplayFileSharedLinkCreatedDetails, ReplayFileSharedLinkModifiedDetails, ReplayProjectTeamAddDetails, ReplayProjectTeamDeleteDetails, RansomwareRestoreProcessCompletedType, RansomwareRestoreProcessStartedType, TeamEncryptionKeyCancelKeyDeletionType, TeamEncryptionKeyCreateKeyType, TeamEncryptionKeyDeleteKeyType, TeamEncryptionKeyDisableKeyType, TeamEncryptionKeyEnableKeyType, TeamEncryptionKeyRotateKeyType, TeamEncryptionKeyScheduleKeyDeletionType, FileAddFromAutomationType, ReplayFileDeleteType, BackupAdminInvitationSentType, BackupInvitationOpenedType, RansomwareAlertCreateReportType, RansomwareAlertCreateReportFailedType, ReplayFileSharedLinkCreatedType, ReplayFileSharedLinkModifiedType, ReplayProjectTeamAddType, ReplayProjectTeamDeleteType structs team_member_space_limits Namespace - Update member_space_limits/set_custom_quota(SetCustomQuotaArg, List DataType.ROUTE - Update member_space_limits/remove_custom_quota(CustomQuotaUsersArg, List DataType.ROUTE - Update member_space_limits/get_custom_quota(CustomQuotaUsersArg, List DataType.ROUTE - Update member_space_limits/get_custom_quota(CustomQuotaUsersArg, List DataType.ROUTE team_policies Namespace - Add SharedFolderBlanketLinkRestrictionPolicy unions Co-authored-by: Scott Erickson --- auth.stone | 2 +- check_api_v2_types.stone | 2 +- file_requests.stone | 2 - file_tagging.stone | 2 +- files.stone | 6 +- sharing_folders.stone | 17 +- team.stone | 2 +- team_log_generated.stone | 315 +++++++++++++++++++++++++++++++++ team_member_space_limits.stone | 14 +- team_policies.stone | 11 ++ 10 files changed, 357 insertions(+), 16 deletions(-) diff --git a/auth.stone b/auth.stone index 7ed9a7a..a30bcd3 100644 --- a/auth.stone +++ b/auth.stone @@ -78,7 +78,7 @@ union TokenFromOAuth1Error app_id_mismatch "The authorized app does not match the app associated with the supplied access token." -route token/from_oauth1(TokenFromOAuth1Arg, TokenFromOAuth1Result, TokenFromOAuth1Error) +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" diff --git a/check_api_v2_types.stone b/check_api_v2_types.stone index 2d32ead..3911f84 100644 --- a/check_api_v2_types.stone +++ b/check_api_v2_types.stone @@ -5,7 +5,7 @@ namespace check import common struct EchoArg - "EchoArg contains the arguments to be sent to the Dropbox servers." + "Contains the arguments to be sent to the Dropbox servers." query String(max_length=500) = "" "The string that you'd like to be echoed back to you." diff --git a/file_requests.stone b/file_requests.stone index b37c7e8..8dae211 100644 --- a/file_requests.stone +++ b/file_requests.stone @@ -135,7 +135,6 @@ route list:2(ListFileRequestsArg, ListFileRequestsV2Result, ListFileRequestsErro attrs allow_app_folder_app = true - is_preview = true scope = "file_requests.read" struct ListFileRequestsArg @@ -172,7 +171,6 @@ route list/continue(ListFileRequestsContinueArg, ListFileRequestsV2Result, ListF :route:`list/continue`." attrs allow_app_folder_app = true - is_preview = true scope = "file_requests.read" struct ListFileRequestsContinueArg diff --git a/file_tagging.stone b/file_tagging.stone index 65b075e..4d3842e 100644 --- a/file_tagging.stone +++ b/file_tagging.stone @@ -3,7 +3,7 @@ namespace files import common import async -alias TagText = String(min_length=1, max_length=32, pattern="[A-Za-z0-9\_]+") +alias TagText = String(min_length=1, max_length=32, pattern="[\\w]+") union Tag "Tag that can be added in multiple ways." diff --git a/files.stone b/files.stone index ca5b14d..b8348d2 100644 --- a/files.stone +++ b/files.stone @@ -1783,7 +1783,7 @@ union DeleteError "There are too many files in one request. Please retry with fewer files." struct DeleteBatchArg - entries List(DeleteArg) + entries List(DeleteArg, max_items=1000) example default entries = [delete] @@ -1987,7 +1987,7 @@ struct RelocationResult extends FileOpsResult metadata = default struct RelocationBatchArgBase - entries List(RelocationPath, min_items=1) + 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 @@ -2864,7 +2864,7 @@ union SaveUrlError route save_url(https://github.com/SaveUrlArg,%20SaveUrlResult,%20SaveUrlError) "Save the data from a specified URL into a file in user's Dropbox. - Note that the transfer from the URL must complete within 5 minutes, or the + 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 diff --git a/sharing_folders.stone b/sharing_folders.stone index 09053bd..dc487c9 100644 --- a/sharing_folders.stone +++ b/sharing_folders.stone @@ -25,6 +25,12 @@ union AccessLevel 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 @@ -349,6 +355,9 @@ struct SharedFolderMetadataBase "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." @@ -425,6 +434,8 @@ union SharedFolderAccessError 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 @@ -666,9 +677,9 @@ struct ShareFolderArgBase member_policy MemberPolicy? "Who can be a member of this shared folder. Only applicable if the current user is on a team." - path files.WritePath - "The path to the folder to share. If it does not exist, then a new one - is created." + 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 diff --git a/team.stone b/team.stone index e955e4d..49024b7 100644 --- a/team.stone +++ b/team.stone @@ -159,7 +159,7 @@ struct TeamGetInfoResult num_provisioned_users UInt32 "The number of accounts that have been invited or are already active members of the team." - num_used_licenses UInt32 + num_used_licenses UInt32 = 0 "The number of licenses used on the team." policies team_policies.TeamMemberPolicies diff --git a/team_log_generated.stone b/team_log_generated.stone index d13cff1..fb34c8b 100644 --- a/team_log_generated.stone +++ b/team_log_generated.stone @@ -75,6 +75,7 @@ union AccountCapturePolicy all_users disabled invited_users + prevent_personal_creation union AccountState locked @@ -699,6 +700,7 @@ union LoginMethod apple_oauth first_party_token_exchange google_oauth + lenovo_oauth password qr_code saml @@ -1914,6 +1916,8 @@ union EventCategory "Events that apply to linked devices on mobile, desktop and Web platforms." domains "Events that involve domain management feature: domain verification, invite enforcement and account capture." + encryption + "Events that involve encryption." file_operations "Events that have to do with filesystem operations on files and folders: copy, move, delete, etc." file_requests @@ -2011,6 +2015,30 @@ struct AdminAlertingTriggeredAlertDetails alert_category = na alert_instance_id = "pid_admin_alert:AAgAAOVHYCEuavqE0v3Jj9VDogV4wG9q8F-XZKwYpuYTVBm5" +struct RansomwareRestoreProcessCompletedDetails + "Completed ransomware restore process." + + status String + "The status of the restore process." + restored_files_count Int64 + "Restored files count." + restored_files_failed_count Int64 + "Restored files failed count." + + example default + status = "abc" + restored_files_count = 3 + restored_files_failed_count = 3 + +struct RansomwareRestoreProcessStartedDetails + "Started ransomware restore process." + + extension String + "Ransomware filename extension." + + example default + extension = "abc" + struct AppBlockedByPermissionsDetails "Failed to connect app for member." @@ -2821,6 +2849,48 @@ struct DomainVerificationRemoveDomainDetails struct EnabledDomainInvitesDetails "Enabled domain invites." +struct TeamEncryptionKeyCancelKeyDeletionDetails + "Canceled team encryption key deletion." + + + example default + +struct TeamEncryptionKeyCreateKeyDetails + "Created team encryption key." + + + example default + +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 "Applied naming convention." @@ -2830,6 +2900,9 @@ struct CreateFolderDetails struct FileAddDetails "Added files and/or folders." +struct FileAddFromAutomationDetails + "Added files and/or folders from automation." + struct FileCopyDetails "Copied files and/or folders." @@ -2971,6 +3044,9 @@ struct ObjectLabelUpdatedValueDetails struct OrganizeFolderWithTidyDetails "Organized a folder with multi-file organize." +struct ReplayFileDeleteDetails + "Deleted files in Replay." + struct RewindFolderDetails "Rewound a folder." @@ -3313,6 +3389,12 @@ struct SsoErrorDetails example default error_details = default +struct BackupAdminInvitationSentDetails + "Invited members to activate Backup." + +struct BackupInvitationOpenedDetails + "Opened Backup invite." + struct CreateTeamInviteLinkDetails "Created team invite link." @@ -4250,6 +4332,18 @@ struct OutdatedLinkViewReportFailedDetails struct PaperAdminExportStartDetails "Exported all team Paper docs." +struct RansomwareAlertCreateReportDetails + "Created ransomware report." + +struct RansomwareAlertCreateReportFailedDetails + "Couldn't generate ransomware report." + + failure_reason team.TeamReportFailureReason + "Failure reason." + + example default + failure_reason = temporary_error + struct SmartSyncCreateAdminPrivilegeReportDetails "Created Smart Sync non-admin devices report." @@ -4346,6 +4440,18 @@ struct NoteShareReceiveDetails struct OpenNoteSharedDetails "Opened shared Paper doc." +struct ReplayFileSharedLinkCreatedDetails + "Created shared link in Replay." + +struct ReplayFileSharedLinkModifiedDetails + "Modified shared link in Replay." + +struct ReplayProjectTeamAddDetails + "Added member to Replay Project." + +struct ReplayProjectTeamDeleteDetails + "Removed member from Replay Project." + struct SfAddGroupDetails "Added team to shared folder." @@ -6810,6 +6916,8 @@ union EventDetails admin_alerting_alert_state_changed_details AdminAlertingAlertStateChangedDetails admin_alerting_changed_alert_config_details AdminAlertingChangedAlertConfigDetails admin_alerting_triggered_alert_details AdminAlertingTriggeredAlertDetails + ransomware_restore_process_completed_details RansomwareRestoreProcessCompletedDetails + ransomware_restore_process_started_details RansomwareRestoreProcessStartedDetails app_blocked_by_permissions_details AppBlockedByPermissionsDetails app_link_team_details AppLinkTeamDetails app_link_user_details AppLinkUserDetails @@ -6879,9 +6987,17 @@ union EventDetails domain_verification_add_domain_success_details DomainVerificationAddDomainSuccessDetails domain_verification_remove_domain_details DomainVerificationRemoveDomainDetails enabled_domain_invites_details EnabledDomainInvitesDetails + team_encryption_key_cancel_key_deletion_details TeamEncryptionKeyCancelKeyDeletionDetails + team_encryption_key_create_key_details TeamEncryptionKeyCreateKeyDetails + team_encryption_key_delete_key_details TeamEncryptionKeyDeleteKeyDetails + team_encryption_key_disable_key_details TeamEncryptionKeyDisableKeyDetails + team_encryption_key_enable_key_details TeamEncryptionKeyEnableKeyDetails + team_encryption_key_rotate_key_details TeamEncryptionKeyRotateKeyDetails + team_encryption_key_schedule_key_deletion_details TeamEncryptionKeyScheduleKeyDeletionDetails apply_naming_convention_details ApplyNamingConventionDetails create_folder_details CreateFolderDetails file_add_details FileAddDetails + file_add_from_automation_details FileAddFromAutomationDetails file_copy_details FileCopyDetails file_delete_details FileDeleteDetails file_download_details FileDownloadDetails @@ -6903,6 +7019,7 @@ union EventDetails object_label_removed_details ObjectLabelRemovedDetails object_label_updated_value_details ObjectLabelUpdatedValueDetails organize_folder_with_tidy_details OrganizeFolderWithTidyDetails + replay_file_delete_details ReplayFileDeleteDetails rewind_folder_details RewindFolderDetails undo_naming_convention_details UndoNamingConventionDetails undo_organize_folder_with_tidy_details UndoOrganizeFolderWithTidyDetails @@ -6939,6 +7056,8 @@ union EventDetails sign_in_as_session_end_details SignInAsSessionEndDetails sign_in_as_session_start_details SignInAsSessionStartDetails sso_error_details SsoErrorDetails + backup_admin_invitation_sent_details BackupAdminInvitationSentDetails + backup_invitation_opened_details BackupInvitationOpenedDetails create_team_invite_link_details CreateTeamInviteLinkDetails delete_team_invite_link_details DeleteTeamInviteLinkDetails member_add_external_id_details MemberAddExternalIdDetails @@ -7034,6 +7153,8 @@ union EventDetails outdated_link_view_create_report_details OutdatedLinkViewCreateReportDetails outdated_link_view_report_failed_details OutdatedLinkViewReportFailedDetails paper_admin_export_start_details PaperAdminExportStartDetails + ransomware_alert_create_report_details RansomwareAlertCreateReportDetails + ransomware_alert_create_report_failed_details RansomwareAlertCreateReportFailedDetails smart_sync_create_admin_privilege_report_details SmartSyncCreateAdminPrivilegeReportDetails team_activity_create_report_details TeamActivityCreateReportDetails team_activity_create_report_fail_details TeamActivityCreateReportFailDetails @@ -7049,6 +7170,10 @@ union EventDetails note_shared_details NoteSharedDetails note_share_receive_details NoteShareReceiveDetails open_note_shared_details OpenNoteSharedDetails + replay_file_shared_link_created_details ReplayFileSharedLinkCreatedDetails + replay_file_shared_link_modified_details ReplayFileSharedLinkModifiedDetails + replay_project_team_add_details ReplayProjectTeamAddDetails + replay_project_team_delete_details ReplayProjectTeamDeleteDetails sf_add_group_details SfAddGroupDetails sf_allow_non_members_to_view_shared_links_details SfAllowNonMembersToViewSharedLinksDetails sf_external_invite_warn_details SfExternalInviteWarnDetails @@ -7320,6 +7445,18 @@ struct AdminAlertingTriggeredAlertType example default description = "(admin_alerting) Triggered security alert" +struct RansomwareRestoreProcessCompletedType + description String + + example default + description = "(admin_alerting) Completed ransomware restore process" + +struct RansomwareRestoreProcessStartedType + description String + + example default + description = "(admin_alerting) Started ransomware restore process" + struct AppBlockedByPermissionsType description String @@ -7734,6 +7871,48 @@ struct EnabledDomainInvitesType example default description = "(domains) Enabled domain invites (deprecated, no longer logged)" +struct TeamEncryptionKeyCancelKeyDeletionType + description String + + example default + description = "(encryption) Canceled team encryption key deletion" + +struct TeamEncryptionKeyCreateKeyType + description String + + example default + description = "(encryption) Created team encryption key" + +struct TeamEncryptionKeyDeleteKeyType + description String + + example default + description = "(encryption) Deleted team encryption key" + +struct TeamEncryptionKeyDisableKeyType + description String + + example default + description = "(encryption) Disabled team encryption key" + +struct TeamEncryptionKeyEnableKeyType + description String + + example default + description = "(encryption) Enabled team encryption key" + +struct TeamEncryptionKeyRotateKeyType + description String + + example default + description = "(encryption) Rotated team encryption key (deprecated, no longer logged)" + +struct TeamEncryptionKeyScheduleKeyDeletionType + description String + + example default + description = "(encryption) Scheduled encryption key deletion" + struct ApplyNamingConventionType description String @@ -7752,6 +7931,12 @@ struct FileAddType example default description = "(file_operations) Added files and/or folders" +struct FileAddFromAutomationType + description String + + example default + description = "(file_operations) Added files and/or folders from automation" + struct FileCopyType description String @@ -7878,6 +8063,12 @@ struct OrganizeFolderWithTidyType example default description = "(file_operations) Organized a folder with multi-file organize" +struct ReplayFileDeleteType + description String + + example default + description = "(file_operations) Deleted files in Replay" + struct RewindFolderType description String @@ -8094,6 +8285,18 @@ struct SsoErrorType example default description = "(logins) Failed to sign in via SSO (deprecated, replaced by 'Failed to sign in')" +struct BackupAdminInvitationSentType + description String + + example default + description = "(members) Invited members to activate Backup" + +struct BackupInvitationOpenedType + description String + + example default + description = "(members) Opened Backup invite" + struct CreateTeamInviteLinkType description String @@ -8664,6 +8867,18 @@ struct PaperAdminExportStartType example default description = "(reports) Exported all team Paper docs" +struct RansomwareAlertCreateReportType + description String + + example default + description = "(reports) Created ransomware report" + +struct RansomwareAlertCreateReportFailedType + description String + + example default + description = "(reports) Couldn't generate ransomware report" + struct SmartSyncCreateAdminPrivilegeReportType description String @@ -8754,6 +8969,30 @@ struct OpenNoteSharedType example default description = "(sharing) Opened shared Paper doc (deprecated, no longer logged)" +struct ReplayFileSharedLinkCreatedType + description String + + example default + description = "(sharing) Created shared link in Replay" + +struct ReplayFileSharedLinkModifiedType + description String + + example default + description = "(sharing) Modified shared link in Replay" + +struct ReplayProjectTeamAddType + description String + + example default + description = "(sharing) Added member to Replay Project" + +struct ReplayProjectTeamDeleteType + description String + + example default + description = "(sharing) Removed member from Replay Project" + struct SfAddGroupType description String @@ -10216,6 +10455,10 @@ union EventType "(admin_alerting) Changed an alert setting" admin_alerting_triggered_alert AdminAlertingTriggeredAlertType "(admin_alerting) Triggered security alert" + ransomware_restore_process_completed RansomwareRestoreProcessCompletedType + "(admin_alerting) Completed ransomware restore process" + ransomware_restore_process_started RansomwareRestoreProcessStartedType + "(admin_alerting) Started ransomware restore process" app_blocked_by_permissions AppBlockedByPermissionsType "(apps) Failed to connect app for member" app_link_team AppLinkTeamType @@ -10354,12 +10597,28 @@ union EventType "(domains) Removed domain from list of verified team domains" enabled_domain_invites EnabledDomainInvitesType "(domains) Enabled domain invites (deprecated, no longer logged)" + 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_delete_key TeamEncryptionKeyDeleteKeyType + "(encryption) Deleted team encryption key" + team_encryption_key_disable_key TeamEncryptionKeyDisableKeyType + "(encryption) Disabled team encryption key" + team_encryption_key_enable_key TeamEncryptionKeyEnableKeyType + "(encryption) Enabled team encryption key" + team_encryption_key_rotate_key TeamEncryptionKeyRotateKeyType + "(encryption) Rotated team encryption key (deprecated, no longer logged)" + team_encryption_key_schedule_key_deletion TeamEncryptionKeyScheduleKeyDeletionType + "(encryption) Scheduled encryption key deletion" apply_naming_convention ApplyNamingConventionType "(file_operations) Applied naming convention" create_folder CreateFolderType "(file_operations) Created folders (deprecated, no longer logged)" file_add FileAddType "(file_operations) Added files and/or folders" + file_add_from_automation FileAddFromAutomationType + "(file_operations) Added files and/or folders from automation" file_copy FileCopyType "(file_operations) Copied files and/or folders" file_delete FileDeleteType @@ -10402,6 +10661,8 @@ union EventType "(file_operations) Updated a label's value" organize_folder_with_tidy OrganizeFolderWithTidyType "(file_operations) Organized a folder with multi-file organize" + replay_file_delete ReplayFileDeleteType + "(file_operations) Deleted files in Replay" rewind_folder RewindFolderType "(file_operations) Rewound a folder" undo_naming_convention UndoNamingConventionType @@ -10474,6 +10735,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')" + backup_admin_invitation_sent BackupAdminInvitationSentType + "(members) Invited members to activate Backup" + backup_invitation_opened BackupInvitationOpenedType + "(members) Opened Backup invite" create_team_invite_link CreateTeamInviteLinkType "(members) Created team invite link" delete_team_invite_link DeleteTeamInviteLinkType @@ -10664,6 +10929,10 @@ union EventType "(reports) Couldn't create report: Views of old links" paper_admin_export_start PaperAdminExportStartType "(reports) Exported all team Paper docs" + ransomware_alert_create_report RansomwareAlertCreateReportType + "(reports) Created ransomware report" + ransomware_alert_create_report_failed RansomwareAlertCreateReportFailedType + "(reports) Couldn't generate ransomware report" smart_sync_create_admin_privilege_report SmartSyncCreateAdminPrivilegeReportType "(reports) Created Smart Sync non-admin devices report" team_activity_create_report TeamActivityCreateReportType @@ -10694,6 +10963,14 @@ union EventType "(sharing) Shared received Paper doc (deprecated, no longer logged)" open_note_shared OpenNoteSharedType "(sharing) Opened shared Paper doc (deprecated, no longer logged)" + replay_file_shared_link_created ReplayFileSharedLinkCreatedType + "(sharing) Created shared link in Replay" + replay_file_shared_link_modified ReplayFileSharedLinkModifiedType + "(sharing) Modified 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" sf_add_group SfAddGroupType "(sharing) Added team to shared folder (deprecated, no longer logged)" sf_allow_non_members_to_view_shared_links SfAllowNonMembersToViewSharedLinksType @@ -11192,6 +11469,10 @@ union EventTypeArg "(admin_alerting) Changed an alert setting" admin_alerting_triggered_alert "(admin_alerting) Triggered security alert" + ransomware_restore_process_completed + "(admin_alerting) Completed ransomware restore process" + ransomware_restore_process_started + "(admin_alerting) Started ransomware restore process" app_blocked_by_permissions "(apps) Failed to connect app for member" app_link_team @@ -11330,12 +11611,28 @@ union EventTypeArg "(domains) Removed domain from list of verified team domains" enabled_domain_invites "(domains) Enabled domain invites (deprecated, no longer logged)" + 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_delete_key + "(encryption) Deleted team encryption key" + team_encryption_key_disable_key + "(encryption) Disabled team encryption key" + team_encryption_key_enable_key + "(encryption) Enabled team encryption key" + team_encryption_key_rotate_key + "(encryption) Rotated team encryption key (deprecated, no longer logged)" + team_encryption_key_schedule_key_deletion + "(encryption) Scheduled encryption key deletion" apply_naming_convention "(file_operations) Applied naming convention" create_folder "(file_operations) Created folders (deprecated, no longer logged)" file_add "(file_operations) Added files and/or folders" + file_add_from_automation + "(file_operations) Added files and/or folders from automation" file_copy "(file_operations) Copied files and/or folders" file_delete @@ -11378,6 +11675,8 @@ union EventTypeArg "(file_operations) Updated a label's value" organize_folder_with_tidy "(file_operations) Organized a folder with multi-file organize" + replay_file_delete + "(file_operations) Deleted files in Replay" rewind_folder "(file_operations) Rewound a folder" undo_naming_convention @@ -11450,6 +11749,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')" + backup_admin_invitation_sent + "(members) Invited members to activate Backup" + backup_invitation_opened + "(members) Opened Backup invite" create_team_invite_link "(members) Created team invite link" delete_team_invite_link @@ -11640,6 +11943,10 @@ union EventTypeArg "(reports) Couldn't create report: Views of old links" paper_admin_export_start "(reports) Exported all team Paper docs" + ransomware_alert_create_report + "(reports) Created ransomware report" + ransomware_alert_create_report_failed + "(reports) Couldn't generate ransomware report" smart_sync_create_admin_privilege_report "(reports) Created Smart Sync non-admin devices report" team_activity_create_report @@ -11670,6 +11977,14 @@ union EventTypeArg "(sharing) Shared received Paper doc (deprecated, no longer logged)" open_note_shared "(sharing) Opened shared Paper doc (deprecated, no longer logged)" + replay_file_shared_link_created + "(sharing) Created shared link in Replay" + replay_file_shared_link_modified + "(sharing) Modified shared link in Replay" + replay_project_team_add + "(sharing) Added member to Replay Project" + replay_project_team_delete + "(sharing) Removed member from Replay Project" sf_add_group "(sharing) Added team to shared folder (deprecated, no longer logged)" sf_allow_non_members_to_view_shared_links diff --git a/team_member_space_limits.stone b/team_member_space_limits.stone index 0f09418..5ea11e2 100644 --- a/team_member_space_limits.stone +++ b/team_member_space_limits.stone @@ -71,7 +71,9 @@ union RemoveCustomQuotaResult 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." + 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" @@ -80,7 +82,9 @@ route member_space_limits/set_custom_quota(SetCustomQuotaArg, List(CustomQuotaRe 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." + 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" @@ -88,8 +92,10 @@ route member_space_limits/remove_custom_quota(CustomQuotaUsersArg, List(RemoveCu route member_space_limits/get_custom_quota(CustomQuotaUsersArg, List(CustomQuotaResult), CustomQuotaError) - "Get users custom quota. Returns none as the custom quota if none was set. - A maximum of 1000 members can be specified in a single call." + "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" diff --git a/team_policies.stone b/team_policies.stone index 53e0bd1..2c64b8c 100644 --- a/team_policies.stone +++ b/team_policies.stone @@ -34,12 +34,15 @@ struct TeamSharingPolicies "Who can view shared links owned by team members." group_creation_policy GroupCreation "Who can create groups." + shared_folder_link_restriction_policy SharedFolderBlanketLinkRestrictionPolicy + "Who can view links to content in shared folders." example default shared_folder_member_policy = team shared_folder_join_policy = from_anyone shared_link_create_policy = team_only group_creation_policy = admins_only + shared_folder_link_restriction_policy = anyone # 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. @@ -76,6 +79,14 @@ union SharedLinkCreatePolicy "Only people invited can access newly created links. Login will be required to access the shared links unless overridden." +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 EmmState disabled "Emm token is disabled."