Skip to content

Commit 59537fd

Browse files
sdericksonAndreyVMarkelov
authored andcommitted
Spec Update 04/21/2026
Change Notes: account Namespace: Add get_photo route Add AccountPhotoGetArg, AccountPhotoGetResult structs Add AccountPhotoGetError, ThumbnailError unions Add account_id Namespace auth Namespace: Add UnauthorizedAccountIdUsageError struct Add NoPermissionError union check Namespace: Add EchoError union Update user, app routes to include EchoError error type common Namespace: Add DropboxDuration struct Remove EmailAddress, NamePart, OptionalNamePart, DisplayName, DisplayNameLegacy, NamespaceId, SharedFolderId, SessionId, LanguageCode aliases Remove RootInfo, TeamRootInfo, UserRootInfo structs Remove PathRoot, PathRootError unions file_requests Namespace: Add UpdateFileRequestDeadline union files Namespace: Add upload_session/append_batch route Add UploadSessionAppendBatchArg, UploadSessionAppendBatchArgEntry, UploadSessionAppendBatchResult structs Add UploadSessionAppendBatchEntryError, UploadSessionAppendBatchError, ThumbnailQuality, UploadSessionAppendBatchResultEntry unions Remove get_preview, properties/remove, properties/template/get, properties/template/list routes paper Namespace: Add docs/get_metadata route Add GetDocMetadataArg, PaperDocGetMetadataResult structs Add PaperDocStatus union Add rialto Namespace Add riviera Namespace sharing Namespace: Add ChangeLinkExpirationPolicy, ShareFolderErrorBaseV2, ShareFolderErrorV2, SharePathErrorBaseV2, SharePathErrorV2, SharedLinkMetadataError unions stone_cfg Namespace: Update Route struct to include disable_select_user, required_team_features, required_admin_permission, required_permission_type, limit_access_to_call_type, required_api_app_flag, permission_id Update auth pattern to support "app, team" auth type team Namespace: Add members/delete_former_member_files, team_folder/restore routes Add MembersFormerMemberArg struct Add HasDistinctMemberHomesValue, MembersDeleteFormerMemberFilesError, MembersPermanentlyDeleteFilesError, TeamFolderRestoreError unions Remove members/secondary_emails/add, members/secondary_emails/delete, members/secondary_emails/resend_verification_emails, properties/template/list, properties/template/update routes Remove AddSecondaryEmailsArg, AddSecondaryEmailsResult, DeleteSecondaryEmailsArg, DeleteSecondaryEmailsResult, ResendVerificationEmailArg, ResendVerificationEmailResult, UserDeleteEmailsResult, UserResendEmailsResult, UserSecondaryEmailsArg, UserSecondaryEmailsResult structs Remove AddSecondaryEmailResult, AddSecondaryEmailsError, DeleteSecondaryEmailResult, ResendSecondaryEmailResult, UserAddResult, UserDeleteResult, UserResendResult unions team_log Namespace: Add AddonAssignedDetails, AddonAssignedType, AddonLogInfo, AddonRemovedDetails, AddonRemovedType structs Add AiThirdPartySharingDropboxBasePolicyChangedDetails, AiThirdPartySharingDropboxBasePolicyChangedType structs Add AppleLoginChangePolicyDetails, AppleLoginChangePolicyType structs Add CaptureTeamSpacePolicyChangedDetails, CaptureTeamSpacePolicyChangedType structs Add DashAddedCommentToStackDetails, DashAddedCommentToStackType, DashAddedConnectorDetails, DashAddedConnectorType, DashAddedLinkToStackDetails, DashAddedLinkToStackType, DashAddedTeamEmailDomainAllowlistDetails, DashAddedTeamEmailDomainAllowlistType, DashAdminAddedOrgWideConnectorDetails, DashAdminAddedOrgWideConnectorType, DashAdminDisabledConnectorDetails, DashAdminDisabledConnectorType, DashAdminEnabledConnectorDetails, DashAdminEnabledConnectorType, DashAdminRemovedOrgWideConnectorDetails, DashAdminRemovedOrgWideConnectorType, DashArchivedStackDetails, DashArchivedStackType, DashChangedAudienceOfSharedLinkToStackDetails, DashChangedAudienceOfSharedLinkToStackType, DashClonedStackDetails, DashClonedStackType, DashCreatedStackDetails, DashCreatedStackType, DashDeletedCommentFromStackDetails, DashDeletedCommentFromStackType, DashDeletedStackDetails, DashDeletedStackType, DashEditedCommentInStackDetails, DashEditedCommentInStackType, DashExternalSharingPolicyChangedDetails, DashExternalSharingPolicyChangedType, DashExternalUserOpenedStackDetails, DashExternalUserOpenedStackType, DashFirstLaunchedDesktopDetails, DashFirstLaunchedDesktopType, DashFirstLaunchedExtensionDetails, DashFirstLaunchedExtensionType, DashFirstLaunchedWebStartPageDetails, DashFirstLaunchedWebStartPageType, DashOpenedSharedLinkToStackDetails, DashOpenedSharedLinkToStackType, DashOpenedStackDetails, DashOpenedStackType, DashPreviewOptOutStatusChangedDetails, DashPreviewOptOutStatusChangedType, DashRemovedConnectorDetails, DashRemovedConnectorType, DashRemovedLinkFromStackDetails, DashRemovedLinkFromStackType, DashRemovedSharedLinkToStackDetails, DashRemovedSharedLinkToStackType, DashRemovedTeamEmailDomainAllowlistDetails, DashRemovedTeamEmailDomainAllowlistType, DashRenamedStackDetails, DashRenamedStackType, DashSharedLinkToStackDetails, DashSharedLinkToStackType, DashUnarchivedStackDetails, DashUnarchivedStackType, DashViewedCompanyStackDetails, DashViewedCompanyStackType, DashViewedExternalAiActivityReportDetails, DashViewedExternalAiActivityReportType structs Add EncryptedFolderCancelTeamKeyRotationDetails, EncryptedFolderCancelTeamKeyRotationType, EncryptedFolderEnrollBackupKeyDetails, EncryptedFolderEnrollBackupKeyType, EncryptedFolderEnrollClientDetails, EncryptedFolderEnrollClientType, EncryptedFolderEnrollTeamDetails, EncryptedFolderEnrollTeamType, EncryptedFolderFinishTeamUnenrollmentDetails, EncryptedFolderFinishTeamUnenrollmentType, EncryptedFolderInitTeamKeyRotationDetails, EncryptedFolderInitTeamKeyRotationType, EncryptedFolderInitTeamUnenrollmentDetails, EncryptedFolderInitTeamUnenrollmentType, EncryptedFolderRemoveBackupKeyDetails, EncryptedFolderRemoveBackupKeyType, EncryptedFolderRotateTeamKeyDetails, EncryptedFolderRotateTeamKeyType, EncryptedFolderUnenrollClientDetails, EncryptedFolderUnenrollClientType structs Add FileRequestAutoCloseDetails, FileRequestAutoCloseType, FlexibleFileNamesPolicyChangedDetails, FlexibleFileNamesPolicyChangedType structs Add GroupExternalSharingSettingOverrideChangedDetails, GroupExternalSharingSettingOverrideChangedType, LinkSettingsLogInfo, MalwareExclusionState structs Add MemberAccessDetailsCreateReportDetails, MemberAccessDetailsCreateReportFailedDetails, MemberAccessDetailsCreateReportFailedType, MemberAccessDetailsCreateReportType structs Add MicrosoftLoginChangePolicyDetails, MicrosoftLoginChangePolicyType structs Add PasskeyAddDetails, PasskeyAddType, PasskeyLoginPolicyChangedDetails, PasskeyLoginPolicyChangedType, PasskeyRemoveDetails, PasskeyRemoveType structs Add PreviewsAiPolicyChangedDetails, PreviewsAiPolicyChangedType structs Add ProductAssignedToMemberDetails, ProductAssignedToMemberType, ProductLogInfo, ProductRemovedFromMemberDetails, ProductRemovedFromMemberType structs Add ReplayAddingPeoplePolicyChangedDetails, ReplayAddingPeoplePolicyChangedType, ReplayFileDownloadedDetails, ReplayFileDownloadedType, ReplaySharingPolicyChangedDetails, ReplaySharingPolicyChangedType, ReplayTeamProjectCreatedDetails, ReplayTeamProjectCreatedType structs Add RiscSecurityEventDetails, RiscSecurityEventType structs Add SendAndTrackFileAddedDetails, SendAndTrackFileAddedType, SendAndTrackFileRenamedDetails, SendAndTrackFileRenamedType, SendAndTrackFileUpdatedDetails, SendAndTrackFileUpdatedType, SendAndTrackLinkCreatedDetails, SendAndTrackLinkCreatedType, SendAndTrackLinkDeletedDetails, SendAndTrackLinkDeletedType, SendAndTrackLinkUpdatedDetails, SendAndTrackLinkUpdatedType, SendAndTrackLinkViewedDetails, SendAndTrackLinkViewedType, SendAndTrackPolicyChangedDetails, SendAndTrackPolicyChangedType, SendAndTrackRemovedFileAndAssociatedLinksDetails, SendAndTrackRemovedFileAndAssociatedLinksType structs Add SendExternalSharingPolicyChangedDetails, SendExternalSharingPolicyChangedType structs Add SharedFoldersCreateReportDetails, SharedFoldersCreateReportFailedDetails, SharedFoldersCreateReportFailedType, SharedFoldersCreateReportType structs Add SharedLinkDefaultPermissionsPolicyChangedDetails, SharedLinkDefaultPermissionsPolicyChangedType, SharedLinkRemoveVisitorDetails, SharedLinkRemoveVisitorType structs Add SignExternalSharingPolicyChangedDetails, SignExternalSharingPolicyChangedType structs Add SignSignatureRequestCanceledDetails, SignSignatureRequestCanceledType, SignSignatureRequestCompletedDetails, SignSignatureRequestCompletedType, SignSignatureRequestDeclinedDetails, SignSignatureRequestDeclinedType, SignSignatureRequestOpenedDetails, SignSignatureRequestOpenedType, SignSignatureRequestReminderSentDetails, SignSignatureRequestReminderSentType, SignSignatureRequestSentDetails, SignSignatureRequestSentType structs Add SignTemplateCreatedDetails, SignTemplateCreatedType, SignTemplateCreationPermissionChangedDetails, SignTemplateCreationPermissionChangedType, SignTemplateSharedDetails, SignTemplateSharedType structs Add TeamEncryptionKeyActivateKeyDetails, TeamEncryptionKeyActivateKeyType, TeamEncryptionKeyDeactivateKeyDetails, TeamEncryptionKeyDeactivateKeyType structs Add TeamFoldersCreateReportDetails, TeamFoldersCreateReportFailedDetails, TeamFoldersCreateReportFailedType, TeamFoldersCreateReportType structs Add TeamMemberStorageRequestPolicyChangedDetails, TeamMemberStorageRequestPolicyChangedType structs Add TeamStorageCreateReportDetails, TeamStorageCreateReportFailedDetails, TeamStorageCreateReportFailedType, TeamStorageCreateReportType structs Add TopLevelContentPolicyChangedDetails, TopLevelContentPolicyChangedType structs Add AiThirdPartySharingDropboxBasePolicy, AppleLoginPolicy, CaptureTeamSpacePolicy, DashConnectorStatus, DashExternalSharingPolicy, DashPreviewOptOutStatus, DashStackSharingScope, DashStackType, ExternalSharingSetting, FlexibleFileNamesPolicy, MicrosoftLoginPolicy, PasskeyLoginPolicy, PreviewsAiPolicy, ReplayAddingPeoplePolicy, ReplayLinkAccess, ReplaySharingPolicy, SendAndTrackPolicy, SendExternalSharingPolicy, SharedLinkDefaultPermissionsPolicy, SignExternalSharingPolicy, SignTemplateCreationPermissionPolicy, TeamMemberStorageRequestPolicy, TopLevelContentPolicy unions team_policies Namespace: Add DefaultLinkExpirationDaysPolicy, EnforceLinkPasswordPolicy, SharedLinkDefaultPermissionsPolicy, TopLevelContentPolicy unions users Namespace: Add DistinctMemberHomeValue, TeamSharedDropboxValue unions
1 parent c836440 commit 59537fd

100 files changed

Lines changed: 12149 additions & 11494 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

account.stone

Lines changed: 0 additions & 49 deletions
This file was deleted.

account_account_photo.stone

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
namespace account
2+
3+
import account_id
4+
import common
5+
6+
7+
union PhotoSourceArg
8+
base64_data String
9+
"Image data in base64-encoded bytes."
10+
11+
example default
12+
base64_data = "SW1hZ2UgZGF0YSBpbiBiYXNlNjQtZW5jb2RlZCBieXRlcy4gTm90IGEgdmFsaWQgZXhhbXBsZS4="
13+
14+
union SetProfilePhotoError
15+
file_type_error
16+
"File cannot be set as profile photo."
17+
file_size_error
18+
"File cannot exceed 10 MB."
19+
dimension_error
20+
"Image must be larger than 128 x 128."
21+
thumbnail_error
22+
"Image could not be thumbnailed."
23+
transient_error
24+
"Temporary infrastructure failure, please retry."
25+
26+
struct SetProfilePhotoArg
27+
photo PhotoSourceArg
28+
"Image to set as the user's new profile photo."
29+
30+
example default
31+
photo = default
32+
33+
struct SetProfilePhotoResult
34+
profile_photo_url String
35+
"URL for the photo representing the user, if one is set."
36+
37+
example default
38+
profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128"
39+
40+
struct AccountPhotoGetArg
41+
dbx_account_id String
42+
"Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'."
43+
size String
44+
"A string representing the size of the photo."
45+
circle_crop Boolean
46+
"True if the photo should be cropped and false otherwise."
47+
expect_account_photo Boolean
48+
"True if we expect account photo to exist."
49+
50+
example default
51+
dbx_account_id = "dbid:s0meEnc0ded1d"
52+
size = "16x16"
53+
circle_crop = false
54+
expect_account_photo = true
55+
56+
union ThumbnailError
57+
permanent_failure
58+
"Indicates permanent infrastructural failure."
59+
temporary_failure
60+
"Indicates temporary infrastructural failure."
61+
62+
union AccountPhotoGetError
63+
thumbnail_error ThumbnailError
64+
"Indicates infrastructural failure."
65+
account_photo_missing
66+
"Account photo is missing (but we did not expect it to exist)."
67+
expected_account_photo_missing
68+
"Account photo was expected to exist, but it's missing."
69+
70+
struct AccountPhotoGetResult
71+
content_type String
72+
"The data returned by get_photo."
73+
74+
example default
75+
content_type = "image/jpeg"
76+
77+
route set_profile_photo (SetProfilePhotoArg, SetProfilePhotoResult, SetProfilePhotoError)
78+
"Sets a user's profile photo."
79+
80+
attrs
81+
auth = "user"
82+
scope = "account_info.write"
83+

account_account_photo_block.stone

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace account
2+
3+
route get_photo (AccountPhotoGetArg, AccountPhotoGetResult, AccountPhotoGetError)
4+
"This lovely endpoint gets the account photo of a given user."
5+
6+
attrs
7+
allow_app_folder_app = true
8+
auth = "user"
9+
host = "content"
10+
scope = "account_info.read"
11+
select_admin_mode = "whole_team"
12+
style = "download"
13+

account_id.stone

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace account_id
2+
3+
annotation_type ContainsDbidAnnotation
4+
"Annotation type should be applied to Response object fields which contain account id"
5+
6+
authorize_caller Boolean = true
Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
11
namespace async
22

3-
#
4-
# Types for writing asynchronous API methods.
5-
#
6-
# There are two calls for each asynchronous method:
7-
# 1. A "Launch" method that (optionally) launches the asynchronous job
8-
# 2. A "Polling" method that polls for the status of the job that was launched by the first call.
9-
#
10-
# The following definitions are prefixed by "Launch" or "Poll", according to their intended use.
11-
3+
import common
124

135
alias AsyncJobId = String(min_length=1)
146

15-
16-
#
17-
# Launch
18-
#
19-
207
union_closed LaunchResultBase
218
"Result returned by methods that launch an asynchronous job.
22-
239
A method who may either launch an asynchronous job, or complete the request
2410
synchronously, can use this union by extending it, and adding a 'complete' field
2511
with the type of the synchronous response.
26-
2712
See :type:`LaunchEmptyResult` for an example."
28-
2913
async_job_id AsyncJobId
3014
"This response indicates that the processing is asynchronous.
3115
The string is an id that can be used to obtain the status of the asynchronous job."
@@ -36,63 +20,50 @@ union_closed LaunchResultBase
3620
union_closed LaunchEmptyResult extends LaunchResultBase
3721
"Result returned by methods that may either launch an asynchronous job or complete synchronously.
3822
Upon synchronous completion of the job, no additional information is returned."
39-
4023
complete
4124
"The job finished synchronously and successfully."
4225

4326
example complete
4427
complete = null
45-
28+
4629
example async_job_id
4730
async_job_id = "34g93hh34h04y384084"
4831

49-
#
50-
# Poll
51-
#
52-
5332
struct PollArg
5433
"Arguments for methods that poll the status of an asynchronous job."
55-
5634
async_job_id AsyncJobId
5735
"Id of the asynchronous job.
5836
This is the value of a response returned from the method that launched the job."
5937

6038
example default
6139
async_job_id = "34g93hh34h04y384084"
6240

63-
# TODO(kelkabany): Remove `error_msg` since others might want to return it
64-
# differently.
6541
union_closed PollResultBase
6642
"Result returned by methods that poll for the status of an asynchronous job.
6743
Unions that extend this union should add a 'complete' field with a type of
6844
the information returned upon job completion.
69-
70-
See :type:`PollEmptyResult` for an example."
71-
45+
See :type:`PollEmptyResult` for an example"
7246
in_progress
7347
"The asynchronous job is still in progress."
7448

75-
7649
union_closed PollEmptyResult extends PollResultBase
7750
"Result returned by methods that poll for the status of an asynchronous job.
7851
Upon completion of the job, no additional information is returned."
79-
8052
complete
8153
"The asynchronous job has completed successfully."
8254

8355
example complete
8456
complete = null
85-
57+
8658
example in_progress
8759
in_progress = null
8860

89-
9061
union PollError
9162
"Error returned by methods for polling the status of asynchronous job."
92-
9363
invalid_async_job_id
9464
"The job ID is invalid."
9565
internal_error
9666
"Something went wrong with the job on Dropbox's end. You'll need to
9767
verify that the action you were taking succeeded, and if not, try
9868
again. This should happen very rarely."
69+

0 commit comments

Comments
 (0)