From 005a750c0fefc4781cea0850f311b0fca9019da8 Mon Sep 17 00:00:00 2001 From: Dropbox Bot <73138219+DropboxBot@users.noreply.github.com> Date: Wed, 18 May 2022 17:47:06 -0400 Subject: [PATCH] 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 Co-authored-by: Brent Bumann --- dropbox/base.py | 6 ++++-- dropbox/base_team.py | 34 +++++++++++++++++----------------- dropbox/sharing.py | 2 +- dropbox/team_log.py | 40 +++++++++++++++++++++++++++++++++++++++- spec | 2 +- 5 files changed, 62 insertions(+), 22 deletions(-) diff --git a/dropbox/base.py b/dropbox/base.py index 34290fc9..df8037d9 100644 --- a/dropbox/base.py +++ b/dropbox/base.py @@ -1465,7 +1465,8 @@ def files_download_zip(self, 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. Route attributes: scope: files.content.read @@ -1501,7 +1502,8 @@ def files_download_zip_to_file(self, 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. Route attributes: scope: files.content.read diff --git a/dropbox/base_team.py b/dropbox/base_team.py index ab308888..4986e47f 100644 --- a/dropbox/base_team.py +++ b/dropbox/base_team.py @@ -810,7 +810,7 @@ def team_legal_holds_create_policy(self, all teams have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str name: Policy name. :param Nullable[str] description: A description of the legal hold @@ -845,7 +845,7 @@ def team_legal_holds_get_policy(self, teams have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :rtype: :class:`dropbox.team.LegalHoldPolicy` @@ -871,7 +871,7 @@ def team_legal_holds_list_held_revisions(self, file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult` @@ -898,7 +898,7 @@ def team_legal_holds_list_held_revisions_continue(self, Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :param Nullable[str] cursor: The cursor idicates where to continue @@ -927,7 +927,7 @@ def team_legal_holds_list_policies(self, teams have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param bool include_released: Whether to return holds that were released. @@ -953,7 +953,7 @@ def team_legal_holds_release_policy(self, teams have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :rtype: None @@ -981,7 +981,7 @@ def team_legal_holds_update_policy(self, have the feature. Permission : Team member file access. Route attributes: - scope: team_data.member + scope: team_data.governance.write :param str id: The legal hold Id. :param Nullable[str] name: Policy new name. @@ -2565,7 +2565,7 @@ def team_team_folder_activate(self, member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str team_folder_id: The ID of the team folder. :rtype: :class:`dropbox.team.TeamFolderMetadata` @@ -2588,7 +2588,7 @@ def team_team_folder_archive(self, shared team space. Permission : Team member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param bool force_async_off: Whether to force the archive to happen synchronously. @@ -2611,7 +2611,7 @@ def team_team_folder_archive_check(self, Permission : Team member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str async_job_id: Id of the asynchronous job. This is the value of a response returned from the method that launched the job. @@ -2639,7 +2639,7 @@ def team_team_folder_create(self, Permission : Team member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str name: Name for the new team folder. :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: The @@ -2668,7 +2668,7 @@ def team_team_folder_get_info(self, access. Route attributes: - scope: team_data.team_space + scope: team_data.content.read :param List[str] team_folder_ids: The list of team folder IDs. :rtype: List[:class:`dropbox.team.TeamFolderGetInfoItem`] @@ -2688,7 +2688,7 @@ def team_team_folder_list(self, Lists all team folders. Permission : Team member file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.read :param int limit: The maximum number of results to return per request. :rtype: :class:`dropbox.team.TeamFolderListResult` @@ -2714,7 +2714,7 @@ def team_team_folder_list_continue(self, access. Route attributes: - scope: team_data.team_space + scope: team_data.content.read :param str cursor: Indicates from what point to get the next set of team folders. @@ -2741,7 +2741,7 @@ def team_team_folder_permanently_delete(self, file access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str team_folder_id: The ID of the team folder. :rtype: None @@ -2763,7 +2763,7 @@ def team_team_folder_rename(self, access. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param str name: New team folder name. :rtype: :class:`dropbox.team.TeamFolderMetadata` @@ -2791,7 +2791,7 @@ def team_team_folder_update_sync_settings(self, endpoint requires that the team has team selective sync enabled. Route attributes: - scope: team_data.team_space + scope: team_data.content.write :param Nullable[:class:`dropbox.team.SyncSettingArg`] sync_setting: Sync setting to apply to the team folder itself. Only meaningful if the diff --git a/dropbox/sharing.py b/dropbox/sharing.py index c0a1ed73..e992c242 100644 --- a/dropbox/sharing.py +++ b/dropbox/sharing.py @@ -13606,7 +13606,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): GetSharedLinkMetadataArg_validator, SharedLinkMetadata_validator, SharedLinkError_validator, - {'auth': 'user', + {'auth': 'app, user', 'host': 'api', 'style': 'rpc'}, ) diff --git a/dropbox/team_log.py b/dropbox/team_log.py index ebbc7381..63ec670e 100644 --- a/dropbox/team_log.py +++ b/dropbox/team_log.py @@ -1327,12 +1327,17 @@ class AdminAlertingAlertConfiguration(bb.Struct): Sensitivity level. :ivar team_log.AdminAlertingAlertConfiguration.recipients_settings: Recipient settings. + :ivar team_log.AdminAlertingAlertConfiguration.text: Text. + :ivar team_log.AdminAlertingAlertConfiguration.excluded_file_extensions: + Excluded file extensions. """ __slots__ = [ '_alert_state_value', '_sensitivity_level_value', '_recipients_settings_value', + '_text_value', + '_excluded_file_extensions_value', ] _has_required_fields = False @@ -1340,16 +1345,24 @@ class AdminAlertingAlertConfiguration(bb.Struct): def __init__(self, alert_state=None, sensitivity_level=None, - recipients_settings=None): + recipients_settings=None, + text=None, + excluded_file_extensions=None): self._alert_state_value = bb.NOT_SET self._sensitivity_level_value = bb.NOT_SET self._recipients_settings_value = bb.NOT_SET + self._text_value = bb.NOT_SET + self._excluded_file_extensions_value = bb.NOT_SET if alert_state is not None: self.alert_state = alert_state if sensitivity_level is not None: self.sensitivity_level = sensitivity_level if recipients_settings is not None: self.recipients_settings = recipients_settings + if text is not None: + self.text = text + if excluded_file_extensions is not None: + self.excluded_file_extensions = excluded_file_extensions # Instance attribute type: AdminAlertingAlertStatePolicy (validator is set below) alert_state = bb.Attribute("alert_state", nullable=True, user_defined=True) @@ -1360,6 +1373,12 @@ def __init__(self, # Instance attribute type: RecipientsConfiguration (validator is set below) recipients_settings = bb.Attribute("recipients_settings", nullable=True, user_defined=True) + # Instance attribute type: str (validator is set below) + text = bb.Attribute("text", nullable=True) + + # Instance attribute type: str (validator is set below) + excluded_file_extensions = bb.Attribute("excluded_file_extensions", nullable=True) + def _process_custom_annotations(self, annotation_type, field_path, processor): super(AdminAlertingAlertConfiguration, self)._process_custom_annotations(annotation_type, field_path, processor) @@ -59209,6 +59228,8 @@ class PlacementRestriction(bb.Union): # Attribute is overwritten below the class definition uk_only = None # Attribute is overwritten below the class definition + us_s3_only = None + # Attribute is overwritten below the class definition other = None def is_australia_only(self): @@ -59251,6 +59272,14 @@ def is_uk_only(self): """ return self._tag == 'uk_only' + def is_us_s3_only(self): + """ + Check if the union tag is ``us_s3_only``. + + :rtype: bool + """ + return self._tag == 'us_s3_only' + def is_other(self): """ Check if the union tag is ``other``. @@ -73139,15 +73168,21 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): AdminAlertingAlertConfiguration.alert_state.validator = bv.Nullable(AdminAlertingAlertStatePolicy_validator) AdminAlertingAlertConfiguration.sensitivity_level.validator = bv.Nullable(AdminAlertingAlertSensitivity_validator) AdminAlertingAlertConfiguration.recipients_settings.validator = bv.Nullable(RecipientsConfiguration_validator) +AdminAlertingAlertConfiguration.text.validator = bv.Nullable(bv.String()) +AdminAlertingAlertConfiguration.excluded_file_extensions.validator = bv.Nullable(bv.String()) AdminAlertingAlertConfiguration._all_field_names_ = set([ 'alert_state', 'sensitivity_level', 'recipients_settings', + 'text', + 'excluded_file_extensions', ]) AdminAlertingAlertConfiguration._all_fields_ = [ ('alert_state', AdminAlertingAlertConfiguration.alert_state.validator), ('sensitivity_level', AdminAlertingAlertConfiguration.sensitivity_level.validator), ('recipients_settings', AdminAlertingAlertConfiguration.recipients_settings.validator), + ('text', AdminAlertingAlertConfiguration.text.validator), + ('excluded_file_extensions', AdminAlertingAlertConfiguration.excluded_file_extensions.validator), ] AdminAlertingAlertSensitivity._high_validator = bv.Void() @@ -81549,6 +81584,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction._japan_only_validator = bv.Void() PlacementRestriction._none_validator = bv.Void() PlacementRestriction._uk_only_validator = bv.Void() +PlacementRestriction._us_s3_only_validator = bv.Void() PlacementRestriction._other_validator = bv.Void() PlacementRestriction._tagmap = { 'australia_only': PlacementRestriction._australia_only_validator, @@ -81556,6 +81592,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): 'japan_only': PlacementRestriction._japan_only_validator, 'none': PlacementRestriction._none_validator, 'uk_only': PlacementRestriction._uk_only_validator, + 'us_s3_only': PlacementRestriction._us_s3_only_validator, 'other': PlacementRestriction._other_validator, } @@ -81564,6 +81601,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor): PlacementRestriction.japan_only = PlacementRestriction('japan_only') PlacementRestriction.none = PlacementRestriction('none') PlacementRestriction.uk_only = PlacementRestriction('uk_only') +PlacementRestriction.us_s3_only = PlacementRestriction('us_s3_only') PlacementRestriction.other = PlacementRestriction('other') PolicyType._disposition_validator = bv.Void() diff --git a/spec b/spec index ef6b1680..69f7bb2e 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit ef6b1680d9a05ec7475f503149d771e44db913a2 +Subproject commit 69f7bb2ea7702db5564f12549efb23956c5d6329