Skip to content

Commit 56f2f33

Browse files
committed
Updated API specification.
Auth namespace: - Added user_suspended to AuthError. Files namespace: - Added PathRootError. - Added invalid_path_root to LookupError. - Added autorename to CreateFolderArg. - Added DeleteBatchArg, DeleteBatchResultEntry, DeleteResult, DeleteBatchResult, DeleteBatchError and DeleteBatchJobStatus. - Added delete_batch and delete_batch/check routes. - Added RelocationPath. - Added to allow_shared_folder and autorename to RelocationArg. - Added RelocationBatchArg, RelocationBatchResult, RelocationBatchJobStatus. RelocationResult and RelocationBatchError. - Added copy_batch and copy_batch/check routes. - Added move_batch and move_batch/check routes. Sharing namespace: - Changed PathOrId validation pattern. - Changed path in ShareFolderArg from type files.Path to files.WritePath. - Added contains_app_folder, contains_team_folder and invalid_path_root to ShareFolderArg. Stone Cfg namespace: - Changed validation pattern for owner in Route. Team namespace: - Added team_license_limit to MembersRecoverError. - Removed beta_group attribute from members/recover.
1 parent 350e6e2 commit 56f2f33

File tree

8 files changed

+1668
-109
lines changed

8 files changed

+1668
-109
lines changed

dropbox/auth.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class AuthError(bb.Union):
2222
is no longer on the team.
2323
:ivar invalid_select_admin: The user specified in 'Dropbox-API-Select-Admin'
2424
is not a Dropbox Business team admin.
25+
:ivar user_suspended: The user has been suspended.
2526
"""
2627

2728
_catch_all = 'other'
@@ -32,6 +33,8 @@ class AuthError(bb.Union):
3233
# Attribute is overwritten below the class definition
3334
invalid_select_admin = None
3435
# Attribute is overwritten below the class definition
36+
user_suspended = None
37+
# Attribute is overwritten below the class definition
3538
other = None
3639

3740
def is_invalid_access_token(self):
@@ -58,6 +61,14 @@ def is_invalid_select_admin(self):
5861
"""
5962
return self._tag == 'invalid_select_admin'
6063

64+
def is_user_suspended(self):
65+
"""
66+
Check if the union tag is ``user_suspended``.
67+
68+
:rtype: bool
69+
"""
70+
return self._tag == 'user_suspended'
71+
6172
def is_other(self):
6273
"""
6374
Check if the union tag is ``other``.
@@ -208,17 +219,20 @@ def __repr__(self):
208219
AuthError._invalid_access_token_validator = bv.Void()
209220
AuthError._invalid_select_user_validator = bv.Void()
210221
AuthError._invalid_select_admin_validator = bv.Void()
222+
AuthError._user_suspended_validator = bv.Void()
211223
AuthError._other_validator = bv.Void()
212224
AuthError._tagmap = {
213225
'invalid_access_token': AuthError._invalid_access_token_validator,
214226
'invalid_select_user': AuthError._invalid_select_user_validator,
215227
'invalid_select_admin': AuthError._invalid_select_admin_validator,
228+
'user_suspended': AuthError._user_suspended_validator,
216229
'other': AuthError._other_validator,
217230
}
218231

219232
AuthError.invalid_access_token = AuthError('invalid_access_token')
220233
AuthError.invalid_select_user = AuthError('invalid_select_user')
221234
AuthError.invalid_select_admin = AuthError('invalid_select_admin')
235+
AuthError.user_suspended = AuthError('user_suspended')
222236
AuthError.other = AuthError('other')
223237

224238
RateLimitError._reason_validator = RateLimitReason_validator

0 commit comments

Comments
 (0)