Skip to content

Commit 005a750

Browse files
DropboxBotBrent Bumann
andauthored
Automated Spec Update (#430)
69f7bb2ea7702db5564f12549efb23956c5d6329 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: DropboxBot <[email protected]> Co-authored-by: Brent Bumann <[email protected]>
1 parent c371d43 commit 005a750

File tree

5 files changed

+62
-22
lines changed

5 files changed

+62
-22
lines changed

dropbox/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,8 @@ def files_download_zip(self,
14651465
must be less than 20 GB in size and any single file within must be less
14661466
than 4 GB in size. The resulting zip must have fewer than 10,000 total
14671467
file and folder entries, including the top level folder. The input
1468-
cannot be a single file.
1468+
cannot be a single file. Note: this endpoint does not support HTTP range
1469+
requests.
14691470
14701471
Route attributes:
14711472
scope: files.content.read
@@ -1501,7 +1502,8 @@ def files_download_zip_to_file(self,
15011502
must be less than 20 GB in size and any single file within must be less
15021503
than 4 GB in size. The resulting zip must have fewer than 10,000 total
15031504
file and folder entries, including the top level folder. The input
1504-
cannot be a single file.
1505+
cannot be a single file. Note: this endpoint does not support HTTP range
1506+
requests.
15051507
15061508
Route attributes:
15071509
scope: files.content.read

dropbox/base_team.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ def team_legal_holds_create_policy(self,
810810
all teams have the feature. Permission : Team member file access.
811811
812812
Route attributes:
813-
scope: team_data.member
813+
scope: team_data.governance.write
814814
815815
:param str name: Policy name.
816816
:param Nullable[str] description: A description of the legal hold
@@ -845,7 +845,7 @@ def team_legal_holds_get_policy(self,
845845
teams have the feature. Permission : Team member file access.
846846
847847
Route attributes:
848-
scope: team_data.member
848+
scope: team_data.governance.write
849849
850850
:param str id: The legal hold Id.
851851
:rtype: :class:`dropbox.team.LegalHoldPolicy`
@@ -871,7 +871,7 @@ def team_legal_holds_list_held_revisions(self,
871871
file access.
872872
873873
Route attributes:
874-
scope: team_data.member
874+
scope: team_data.governance.write
875875
876876
:param str id: The legal hold Id.
877877
:rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult`
@@ -898,7 +898,7 @@ def team_legal_holds_list_held_revisions_continue(self,
898898
Team member file access.
899899
900900
Route attributes:
901-
scope: team_data.member
901+
scope: team_data.governance.write
902902
903903
:param str id: The legal hold Id.
904904
:param Nullable[str] cursor: The cursor idicates where to continue
@@ -927,7 +927,7 @@ def team_legal_holds_list_policies(self,
927927
teams have the feature. Permission : Team member file access.
928928
929929
Route attributes:
930-
scope: team_data.member
930+
scope: team_data.governance.write
931931
932932
:param bool include_released: Whether to return holds that were
933933
released.
@@ -953,7 +953,7 @@ def team_legal_holds_release_policy(self,
953953
teams have the feature. Permission : Team member file access.
954954
955955
Route attributes:
956-
scope: team_data.member
956+
scope: team_data.governance.write
957957
958958
:param str id: The legal hold Id.
959959
:rtype: None
@@ -981,7 +981,7 @@ def team_legal_holds_update_policy(self,
981981
have the feature. Permission : Team member file access.
982982
983983
Route attributes:
984-
scope: team_data.member
984+
scope: team_data.governance.write
985985
986986
:param str id: The legal hold Id.
987987
:param Nullable[str] name: Policy new name.
@@ -2565,7 +2565,7 @@ def team_team_folder_activate(self,
25652565
member file access.
25662566
25672567
Route attributes:
2568-
scope: team_data.team_space
2568+
scope: team_data.content.write
25692569
25702570
:param str team_folder_id: The ID of the team folder.
25712571
:rtype: :class:`dropbox.team.TeamFolderMetadata`
@@ -2588,7 +2588,7 @@ def team_team_folder_archive(self,
25882588
shared team space. Permission : Team member file access.
25892589
25902590
Route attributes:
2591-
scope: team_data.team_space
2591+
scope: team_data.content.write
25922592
25932593
:param bool force_async_off: Whether to force the archive to happen
25942594
synchronously.
@@ -2611,7 +2611,7 @@ def team_team_folder_archive_check(self,
26112611
Permission : Team member file access.
26122612
26132613
Route attributes:
2614-
scope: team_data.team_space
2614+
scope: team_data.content.write
26152615
26162616
:param str async_job_id: Id of the asynchronous job. This is the value
26172617
of a response returned from the method that launched the job.
@@ -2639,7 +2639,7 @@ def team_team_folder_create(self,
26392639
Permission : Team member file access.
26402640
26412641
Route attributes:
2642-
scope: team_data.team_space
2642+
scope: team_data.content.write
26432643
26442644
:param str name: Name for the new team folder.
26452645
:param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: The
@@ -2668,7 +2668,7 @@ def team_team_folder_get_info(self,
26682668
access.
26692669
26702670
Route attributes:
2671-
scope: team_data.team_space
2671+
scope: team_data.content.read
26722672
26732673
:param List[str] team_folder_ids: The list of team folder IDs.
26742674
:rtype: List[:class:`dropbox.team.TeamFolderGetInfoItem`]
@@ -2688,7 +2688,7 @@ def team_team_folder_list(self,
26882688
Lists all team folders. Permission : Team member file access.
26892689
26902690
Route attributes:
2691-
scope: team_data.team_space
2691+
scope: team_data.content.read
26922692
26932693
:param int limit: The maximum number of results to return per request.
26942694
:rtype: :class:`dropbox.team.TeamFolderListResult`
@@ -2714,7 +2714,7 @@ def team_team_folder_list_continue(self,
27142714
access.
27152715
27162716
Route attributes:
2717-
scope: team_data.team_space
2717+
scope: team_data.content.read
27182718
27192719
:param str cursor: Indicates from what point to get the next set of team
27202720
folders.
@@ -2741,7 +2741,7 @@ def team_team_folder_permanently_delete(self,
27412741
file access.
27422742
27432743
Route attributes:
2744-
scope: team_data.team_space
2744+
scope: team_data.content.write
27452745
27462746
:param str team_folder_id: The ID of the team folder.
27472747
:rtype: None
@@ -2763,7 +2763,7 @@ def team_team_folder_rename(self,
27632763
access.
27642764
27652765
Route attributes:
2766-
scope: team_data.team_space
2766+
scope: team_data.content.write
27672767
27682768
:param str name: New team folder name.
27692769
:rtype: :class:`dropbox.team.TeamFolderMetadata`
@@ -2791,7 +2791,7 @@ def team_team_folder_update_sync_settings(self,
27912791
endpoint requires that the team has team selective sync enabled.
27922792
27932793
Route attributes:
2794-
scope: team_data.team_space
2794+
scope: team_data.content.write
27952795
27962796
:param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: Sync
27972797
setting to apply to the team folder itself. Only meaningful if the

dropbox/sharing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13606,7 +13606,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
1360613606
GetSharedLinkMetadataArg_validator,
1360713607
SharedLinkMetadata_validator,
1360813608
SharedLinkError_validator,
13609-
{'auth': 'user',
13609+
{'auth': 'app, user',
1361013610
'host': 'api',
1361113611
'style': 'rpc'},
1361213612
)

dropbox/team_log.py

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,29 +1327,42 @@ class AdminAlertingAlertConfiguration(bb.Struct):
13271327
Sensitivity level.
13281328
:ivar team_log.AdminAlertingAlertConfiguration.recipients_settings:
13291329
Recipient settings.
1330+
:ivar team_log.AdminAlertingAlertConfiguration.text: Text.
1331+
:ivar team_log.AdminAlertingAlertConfiguration.excluded_file_extensions:
1332+
Excluded file extensions.
13301333
"""
13311334

13321335
__slots__ = [
13331336
'_alert_state_value',
13341337
'_sensitivity_level_value',
13351338
'_recipients_settings_value',
1339+
'_text_value',
1340+
'_excluded_file_extensions_value',
13361341
]
13371342

13381343
_has_required_fields = False
13391344

13401345
def __init__(self,
13411346
alert_state=None,
13421347
sensitivity_level=None,
1343-
recipients_settings=None):
1348+
recipients_settings=None,
1349+
text=None,
1350+
excluded_file_extensions=None):
13441351
self._alert_state_value = bb.NOT_SET
13451352
self._sensitivity_level_value = bb.NOT_SET
13461353
self._recipients_settings_value = bb.NOT_SET
1354+
self._text_value = bb.NOT_SET
1355+
self._excluded_file_extensions_value = bb.NOT_SET
13471356
if alert_state is not None:
13481357
self.alert_state = alert_state
13491358
if sensitivity_level is not None:
13501359
self.sensitivity_level = sensitivity_level
13511360
if recipients_settings is not None:
13521361
self.recipients_settings = recipients_settings
1362+
if text is not None:
1363+
self.text = text
1364+
if excluded_file_extensions is not None:
1365+
self.excluded_file_extensions = excluded_file_extensions
13531366

13541367
# Instance attribute type: AdminAlertingAlertStatePolicy (validator is set below)
13551368
alert_state = bb.Attribute("alert_state", nullable=True, user_defined=True)
@@ -1360,6 +1373,12 @@ def __init__(self,
13601373
# Instance attribute type: RecipientsConfiguration (validator is set below)
13611374
recipients_settings = bb.Attribute("recipients_settings", nullable=True, user_defined=True)
13621375

1376+
# Instance attribute type: str (validator is set below)
1377+
text = bb.Attribute("text", nullable=True)
1378+
1379+
# Instance attribute type: str (validator is set below)
1380+
excluded_file_extensions = bb.Attribute("excluded_file_extensions", nullable=True)
1381+
13631382
def _process_custom_annotations(self, annotation_type, field_path, processor):
13641383
super(AdminAlertingAlertConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor)
13651384

@@ -59209,6 +59228,8 @@ class PlacementRestriction(bb.Union):
5920959228
# Attribute is overwritten below the class definition
5921059229
uk_only = None
5921159230
# Attribute is overwritten below the class definition
59231+
us_s3_only = None
59232+
# Attribute is overwritten below the class definition
5921259233
other = None
5921359234

5921459235
def is_australia_only(self):
@@ -59251,6 +59272,14 @@ def is_uk_only(self):
5925159272
"""
5925259273
return self._tag == 'uk_only'
5925359274

59275+
def is_us_s3_only(self):
59276+
"""
59277+
Check if the union tag is ``us_s3_only``.
59278+
59279+
:rtype: bool
59280+
"""
59281+
return self._tag == 'us_s3_only'
59282+
5925459283
def is_other(self):
5925559284
"""
5925659285
Check if the union tag is ``other``.
@@ -73139,15 +73168,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
7313973168
AdminAlertingAlertConfiguration.alert_state.validator = bv.Nullable(AdminAlertingAlertStatePolicy_validator)
7314073169
AdminAlertingAlertConfiguration.sensitivity_level.validator = bv.Nullable(AdminAlertingAlertSensitivity_validator)
7314173170
AdminAlertingAlertConfiguration.recipients_settings.validator = bv.Nullable(RecipientsConfiguration_validator)
73171+
AdminAlertingAlertConfiguration.text.validator = bv.Nullable(bv.String())
73172+
AdminAlertingAlertConfiguration.excluded_file_extensions.validator = bv.Nullable(bv.String())
7314273173
AdminAlertingAlertConfiguration._all_field_names_ = set([
7314373174
'alert_state',
7314473175
'sensitivity_level',
7314573176
'recipients_settings',
73177+
'text',
73178+
'excluded_file_extensions',
7314673179
])
7314773180
AdminAlertingAlertConfiguration._all_fields_ = [
7314873181
('alert_state', AdminAlertingAlertConfiguration.alert_state.validator),
7314973182
('sensitivity_level', AdminAlertingAlertConfiguration.sensitivity_level.validator),
7315073183
('recipients_settings', AdminAlertingAlertConfiguration.recipients_settings.validator),
73184+
('text', AdminAlertingAlertConfiguration.text.validator),
73185+
('excluded_file_extensions', AdminAlertingAlertConfiguration.excluded_file_extensions.validator),
7315173186
]
7315273187

7315373188
AdminAlertingAlertSensitivity._high_validator = bv.Void()
@@ -81549,13 +81584,15 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
8154981584
PlacementRestriction._japan_only_validator = bv.Void()
8155081585
PlacementRestriction._none_validator = bv.Void()
8155181586
PlacementRestriction._uk_only_validator = bv.Void()
81587+
PlacementRestriction._us_s3_only_validator = bv.Void()
8155281588
PlacementRestriction._other_validator = bv.Void()
8155381589
PlacementRestriction._tagmap = {
8155481590
'australia_only': PlacementRestriction._australia_only_validator,
8155581591
'europe_only': PlacementRestriction._europe_only_validator,
8155681592
'japan_only': PlacementRestriction._japan_only_validator,
8155781593
'none': PlacementRestriction._none_validator,
8155881594
'uk_only': PlacementRestriction._uk_only_validator,
81595+
'us_s3_only': PlacementRestriction._us_s3_only_validator,
8155981596
'other': PlacementRestriction._other_validator,
8156081597
}
8156181598

@@ -81564,6 +81601,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
8156481601
PlacementRestriction.japan_only = PlacementRestriction('japan_only')
8156581602
PlacementRestriction.none = PlacementRestriction('none')
8156681603
PlacementRestriction.uk_only = PlacementRestriction('uk_only')
81604+
PlacementRestriction.us_s3_only = PlacementRestriction('us_s3_only')
8156781605
PlacementRestriction.other = PlacementRestriction('other')
8156881606

8156981607
PolicyType._disposition_validator = bv.Void()

0 commit comments

Comments
 (0)