Skip to content

Commit 6c68656

Browse files
Spec Update 05/11/2026 (#81)
Change Notes: account Namespace: - Add get_photo route - Add PhotoSourceArg, SetProfilePhotoArg, SetProfilePhotoError structs auth Namespace: - Add token/from_oauth1, token/revoke routes - Add AccessError, AuthError, InvalidAccountTypeError, RateLimitError structs/unions check Namespace: - Update app/check and user/check routes to return EchoError instead of Void common Namespace: - Add DropboxDuration struct file_properties Namespace: - Remove properties/remove, properties/template/get, properties/template/list routes - Update Comments file_requests Namespace: - Update Comments files Namespace: - Add upload_session/append_batch route - Remove properties/remove, properties/template/get, properties/template/list routes - Update Comments paper Namespace: - Add docs/get_metadata route - Update Comments riviera Namespace: - Add riviera Namespace - Add get_transcript_async, get_transcript_async/check routes sharing Namespace: - Add relinquish_access route - Add ShareFolderErrorV2, SharePathErrorV2, SharedLinkMetadataError unions - Update Comments team Namespace: - Add members/delete_former_member_files, team_folder/restore routes - Remove properties/template/list, properties/template/update routes - Update Comments team_log Namespace: - Add ~200 new event detail structs and unions - Update Comments team_policies Namespace: - Add DefaultLinkExpirationDaysPolicy, EnforceLinkPasswordPolicy, SharedLinkDefaultPermissionsPolicy, TopLevelContentPolicy unions users Namespace: - Update Comments users_common Namespace: - Update Comments Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c836440 commit 6c68656

42 files changed

Lines changed: 24427 additions & 23605 deletions

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: 61 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
namespace account
22

3+
import account_id
34
import common
45

5-
#
6-
# Route set_profile_photo
7-
#
6+
route get_photo (AccountPhotoGetArg, AccountPhotoGetResult, AccountPhotoGetError)
7+
"This lovely endpoint gets the account photo of a given user."
8+
9+
attrs
10+
allow_app_folder_app = true
11+
auth = "user"
12+
host = "content"
13+
scope = "account_info.read"
14+
select_admin_mode = "whole_team"
15+
style = "download"
16+
817

918
union PhotoSourceArg
1019
base64_data String
@@ -13,6 +22,17 @@ union PhotoSourceArg
1322
example default
1423
base64_data = "SW1hZ2UgZGF0YSBpbiBiYXNlNjQtZW5jb2RlZCBieXRlcy4gTm90IGEgdmFsaWQgZXhhbXBsZS4="
1524

25+
union SetProfilePhotoError
26+
file_type_error
27+
"File cannot be set as profile photo."
28+
file_size_error
29+
"File cannot exceed 10 MB."
30+
dimension_error
31+
"Image must be larger than 128 x 128."
32+
thumbnail_error
33+
"Image could not be thumbnailed."
34+
transient_error
35+
"Temporary infrastructure failure, please retry."
1636

1737
struct SetProfilePhotoArg
1838
photo PhotoSourceArg
@@ -21,29 +41,54 @@ struct SetProfilePhotoArg
2141
example default
2242
photo = default
2343

24-
2544
struct SetProfilePhotoResult
2645
profile_photo_url String
2746
"URL for the photo representing the user, if one is set."
2847

2948
example default
3049
profile_photo_url = "https://dl-web.dropbox.com/account_photo/get/dbaphid%3AAAHWGmIXV3sUuOmBfTz0wPsiqHUpBWvv3ZA?vers=1556069330102&size=128x128"
3150

51+
struct AccountPhotoGetArg
52+
dbx_account_id String
53+
"Encoded ID of the user. Must start either with 'dbid:' or 'dbaphid:'."
54+
size String
55+
"A string representing the size of the photo."
56+
circle_crop Boolean
57+
"True if the photo should be cropped and false otherwise."
58+
expect_account_photo Boolean
59+
"True if we expect account photo to exist."
3260

33-
union SetProfilePhotoError
34-
file_type_error
35-
"File cannot be set as profile photo."
36-
file_size_error
37-
"File cannot exceed 10 MB."
38-
dimension_error
39-
"Image must be larger than 128 x 128."
40-
thumbnail_error
41-
"Image could not be thumbnailed."
42-
transient_error
43-
"Temporary infrastructure failure, please retry."
61+
example default
62+
dbx_account_id = "dbid:s0meEnc0ded1d"
63+
size = "16x16"
64+
circle_crop = false
65+
expect_account_photo = true
66+
67+
union ThumbnailError
68+
permanent_failure
69+
"Indicates permanent infrastructural failure."
70+
temporary_failure
71+
"Indicates temporary infrastructural failure."
72+
73+
union AccountPhotoGetError
74+
thumbnail_error ThumbnailError
75+
"Indicates infrastructural failure."
76+
account_photo_missing
77+
"Account photo is missing (but we did not expect it to exist)."
78+
expected_account_photo_missing
79+
"Account photo was expected to exist, but it's missing."
4480

45-
route set_profile_photo(SetProfilePhotoArg, SetProfilePhotoResult, SetProfilePhotoError)
81+
struct AccountPhotoGetResult
82+
content_type String
83+
"The data returned by get_photo."
84+
85+
example default
86+
content_type = "image/jpeg"
87+
88+
route set_profile_photo (SetProfilePhotoArg, SetProfilePhotoResult, SetProfilePhotoError)
4689
"Sets a user's profile photo."
4790

4891
attrs
92+
auth = "user"
4993
scope = "account_info.write"
94+

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

async.stone

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+

auth.stone

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@ namespace auth
22

33
import common
44

5-
struct TokenScopeError
6-
required_scope String
7-
"The required scope to access the route."
8-
95
union AuthError
106
"Errors occurred during authentication."
11-
127
invalid_access_token
138
"The access token is invalid."
149
invalid_select_user
@@ -24,39 +19,60 @@ union AuthError
2419
route_access_denied
2520
"The route is not available to public."
2621

27-
route token/revoke(Void, Void, Void)
28-
"Disables the access token used to authenticate the call.
29-
If there is a corresponding refresh token for the access token,
30-
this disables that refresh token, as well as any other access tokens for that refresh token."
31-
32-
attrs
33-
allow_app_folder_app = true
34-
3522
union RateLimitReason
3623
too_many_requests
3724
"You are making too many requests in the past few minutes."
3825
too_many_write_operations
3926
"There are currently too many write operations happening in the user's Dropbox."
4027

28+
union TokenFromOAuth1Error
29+
invalid_oauth1_token_info
30+
"Part or all of the OAuth 1.0 access token info is invalid."
31+
app_id_mismatch
32+
"The authorized app does not match the app associated with the supplied access token."
33+
34+
union AccessError
35+
"Error occurred because the account doesn't have permission to access the resource."
36+
invalid_account_type InvalidAccountTypeError
37+
"Current account type cannot access the resource."
38+
paper_access_denied PaperAccessError
39+
"Current account cannot access Paper."
40+
team_access_denied
41+
"Team doesn't have permission to access."
42+
no_permission NoPermissionError
43+
"Caller does not have permission to access the resource."
44+
45+
union PaperAccessError
46+
paper_disabled
47+
"Paper is disabled."
48+
not_paper_user
49+
"The provided user has not used Paper yet."
50+
51+
union InvalidAccountTypeError
52+
endpoint
53+
"Current account type doesn't have permission to access this route endpoint."
54+
feature
55+
"Current account type doesn't have permission to access this feature."
56+
57+
union NoPermissionError
58+
unauthorized_account_id_usage UnauthorizedAccountIdUsageError
59+
"Current caller does not have permission to access the account information for one or more of the specified account IDs."
60+
61+
struct TokenScopeError
62+
required_scope String
63+
"The required scope to access the route."
64+
4165
struct RateLimitError
4266
"Error occurred because the app is being rate limited."
43-
4467
reason RateLimitReason
4568
"The reason why the app is being rate limited."
46-
4769
retry_after UInt64 = 1
4870
"The number of seconds that the app should wait
4971
before making another request."
5072

51-
#
52-
# OAuth 1.0 token conversion
53-
#
54-
5573
struct TokenFromOAuth1Arg
56-
5774
oauth1_token String(min_length=1)
5875
"The supplied OAuth 1.0 access token."
59-
6076
oauth1_token_secret String(min_length=1)
6177
"The token secret associated with the supplied access token."
6278

@@ -65,42 +81,29 @@ struct TokenFromOAuth1Arg
6581
oauth1_token_secret = "qomoftv0472git7"
6682

6783
struct TokenFromOAuth1Result
68-
6984
oauth2_token String(min_length=1)
7085
"The OAuth 2.0 token generated from the supplied OAuth 1.0 token."
7186

7287
example default
7388
oauth2_token = "9mCrkS7BIdAAAAAAAAAAHHS0TsSnpYvKQVtKdBnN5IuzhYOGblSgTcHgBFKFMmFn"
7489

75-
union TokenFromOAuth1Error
76-
invalid_oauth1_token_info
77-
"Part or all of the OAuth 1.0 access token info is invalid."
78-
app_id_mismatch
79-
"The authorized app does not match the app associated with the supplied access token."
90+
struct UnauthorizedAccountIdUsageError
91+
unauthorized_account_ids List(String)
92+
"The account IDs that the caller does not have permission to use."
93+
94+
route token/revoke (Void, Void, Void)
95+
"Disables the access token used to authenticate the call.
96+
If there is a corresponding refresh token for the access token,
97+
this disables that refresh token, as well as any other access tokens for that refresh token."
8098

81-
route token/from_oauth1(TokenFromOAuth1Arg, TokenFromOAuth1Result, TokenFromOAuth1Error) deprecated
82-
"Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token."
8399
attrs
84-
auth = "app"
85100
allow_app_folder_app = true
101+
auth = "user"
86102

87-
union AccessError
88-
"Error occurred because the account doesn't have permission to access the resource."
89-
90-
invalid_account_type InvalidAccountTypeError
91-
"Current account type cannot access the resource."
92-
93-
paper_access_denied PaperAccessError
94-
"Current account cannot access Paper."
103+
route token/from_oauth1 (TokenFromOAuth1Arg, TokenFromOAuth1Result, TokenFromOAuth1Error) deprecated
104+
"Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token."
95105

96-
union PaperAccessError
97-
paper_disabled
98-
"Paper is disabled."
99-
not_paper_user
100-
"The provided user has not used Paper yet."
106+
attrs
107+
allow_app_folder_app = true
108+
auth = "app"
101109

102-
union InvalidAccountTypeError
103-
endpoint
104-
"Current account type doesn't have permission to access this route endpoint."
105-
feature
106-
"Current account type doesn't have permission to access this feature."

0 commit comments

Comments
 (0)