Skip to content

Commit

Permalink
Update Spec (#200)
Browse files Browse the repository at this point in the history
Change Notes:

Team Legal Holds Namespace:

- Added comments to legalHoldPolicy struct
- Add more detailed comments to LegalHoldsListHeldRevisionResult
- Fix misc typos in comments

Team Log Namespace:

- Add optional EventTypeArg event_type to GetTeamEventsArg struct
- Add invalid_filters to GetTeamEventsError union

Team Log Generated Namespace:

- Add deprecated tag to was_linked_apps_truncated, was_linked_devices_truncated, was_link_shared_folders_truncated parameters in JoinTeamDetails struct
- Added the EventTypeArg union

Team Members Namespace:

- Update comment for retain_team_shares arg of MembersRemoveArg
  • Loading branch information
rogebrd authored May 27, 2020
1 parent 417ab9c commit 2c5595b
Show file tree
Hide file tree
Showing 7 changed files with 6,953 additions and 295 deletions.
1 change: 1 addition & 0 deletions dropbox/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
secondary_emails,
seen_state,
sharing,
stone_fixtures,
team,
team_common,
team_log,
Expand Down
34 changes: 24 additions & 10 deletions dropbox/base_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
secondary_emails,
seen_state,
sharing,
stone_fixtures,
team,
team_common,
team_log,
Expand Down Expand Up @@ -785,6 +786,9 @@ def team_legal_holds_get_policy(self,
def team_legal_holds_list_held_revisions(self,
id):
"""
List the file metadata that's under the hold. Permission : Team member
file access.
:param str id: The legal hold Id.
:rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult`
:raises: :class:`.exceptions.ApiError`
Expand All @@ -805,8 +809,13 @@ def team_legal_holds_list_held_revisions_continue(self,
id,
cursor=None):
"""
Continue listing the file metadata that's under the hold. Permission :
Team member file access.
:param str id: The legal hold Id.
:param Nullable cursor: cursor of list held revisions.
:param Nullable cursor: The cursor idicates where to continue reading
file metadata entries for the next API call. When there are no more
entries, the cursor will return none.
:rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult`
:raises: :class:`.exceptions.ApiError`
Expand Down Expand Up @@ -1441,12 +1450,12 @@ def team_members_remove(self,
members. In order to keep the account the argument ``wipe_data``
should be set to ``False``.
:param bool retain_team_shares: If provided, allows removed users to
keep access to folders already explicitly shared with them (not via
a group) when they are downgraded to a Basic account. Users will not
retain access to folders that do not allow external sharing. In
order to keep the sharing relationships, the arguments ``wipe_data``
should be set to ``False`` and ``keep_account`` should be set to
``True``.
keep access to Dropbox folders (not Dropbox Paper folders) already
explicitly shared with them (not via a group) when they are
downgraded to a Basic account. Users will not retain access to
folders that do not allow external sharing. In order to keep the
sharing relationships, the arguments ``wipe_data`` should be set to
``False`` and ``keep_account`` should be set to ``True``.
:rtype: :class:`dropbox.team.LaunchEmptyResult`
:raises: :class:`.exceptions.ApiError`
Expand Down Expand Up @@ -2248,7 +2257,8 @@ def team_log_get_events(self,
limit=1000,
account_id=None,
time=None,
category=None):
category=None,
event_type=None):
"""
Retrieves team events. If the result's ``GetTeamEventsResult.has_more``
field is ``True``, call :meth:`team_log_get_events_continue` with the
Expand All @@ -2267,12 +2277,15 @@ def team_log_get_events(self,
even return no events, even with `has_more` set to true. In this
case, callers should fetch again using
:meth:`team_log_get_events_continue`.
:param Nullable account_id: Filter the events by account ID. Return ony
:param Nullable account_id: Filter the events by account ID. Return only
events with this account_id as either Actor, Context, or
Participants.
:param Nullable time: Filter by time range.
:param Nullable category: Filter the returned events to a single
category.
:param Nullable event_type: Filter the returned events to a single event
type. Note that event_type shouldn't be provided together with
category.
:rtype: :class:`dropbox.team_log.GetTeamEventsResult`
:raises: :class:`.exceptions.ApiError`
Expand All @@ -2282,7 +2295,8 @@ def team_log_get_events(self,
arg = team_log.GetTeamEventsArg(limit,
account_id,
time,
category)
category,
event_type)
r = self.request(
team_log.get_events,
'team_log',
Expand Down
139 changes: 139 additions & 0 deletions dropbox/stone_fixtures.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# -*- coding: utf-8 -*-
# Auto-generated by Stone, do not modify.
# @generated
# flake8: noqa
# pylint: skip-file
try:
from . import stone_validators as bv
from . import stone_base as bb
except (ImportError, SystemError, ValueError):
# Catch errors raised when importing a relative module when not in a package.
# This makes testing this file directly (outside of a package) easier.
import stone_validators as bv
import stone_base as bb

class EmptyContainer(bb.Struct):
"""
This struct left intentionally empty
"""

__slots__ = [
]

_has_required_fields = False

def __init__(self):
pass

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(EmptyContainer, self)._process_custom_annotations(annotation_type, field_path, processor)

def __repr__(self):
return 'EmptyContainer()'

EmptyContainer_validator = bv.Struct(EmptyContainer)

class MixedInternalOnlyContainer(bb.Struct):

__slots__ = [
'_public_value_value',
'_public_value_present',
]

_has_required_fields = False

def __init__(self,
public_value=None):
self._public_value_value = None
self._public_value_present = False
if public_value is not None:
self.public_value = public_value

@property
def public_value(self):
"""
:rtype: int
"""
if self._public_value_present:
return self._public_value_value
else:
return 0

@public_value.setter
def public_value(self, val):
val = self._public_value_validator.validate(val)
self._public_value_value = val
self._public_value_present = True

@public_value.deleter
def public_value(self):
self._public_value_value = None
self._public_value_present = False

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(MixedInternalOnlyContainer, self)._process_custom_annotations(annotation_type, field_path, processor)

def __repr__(self):
return 'MixedInternalOnlyContainer(public_value={!r})'.format(
self._public_value_value,
)

MixedInternalOnlyContainer_validator = bv.Struct(MixedInternalOnlyContainer)

class MixedInternalOnlyEnum(bb.Union):
"""
This class acts as a tagged union. Only one of the ``is_*`` methods will
return true. To get the associated value of a tag (if one exists), use the
corresponding ``get_*`` method.
"""

_catch_all = 'other'
# Attribute is overwritten below the class definition
public = None
# Attribute is overwritten below the class definition
other = None

def is_public(self):
"""
Check if the union tag is ``public``.
:rtype: bool
"""
return self._tag == 'public'

def is_other(self):
"""
Check if the union tag is ``other``.
:rtype: bool
"""
return self._tag == 'other'

def _process_custom_annotations(self, annotation_type, field_path, processor):
super(MixedInternalOnlyEnum, self)._process_custom_annotations(annotation_type, field_path, processor)

def __repr__(self):
return 'MixedInternalOnlyEnum(%r, %r)' % (self._tag, self._value)

MixedInternalOnlyEnum_validator = bv.Union(MixedInternalOnlyEnum)

EmptyContainer._all_field_names_ = set([])
EmptyContainer._all_fields_ = []

MixedInternalOnlyContainer._public_value_validator = bv.Int32()
MixedInternalOnlyContainer._all_field_names_ = set(['public_value'])
MixedInternalOnlyContainer._all_fields_ = [('public_value', MixedInternalOnlyContainer._public_value_validator)]

MixedInternalOnlyEnum._public_validator = bv.Void()
MixedInternalOnlyEnum._other_validator = bv.Void()
MixedInternalOnlyEnum._tagmap = {
'public': MixedInternalOnlyEnum._public_validator,
'other': MixedInternalOnlyEnum._other_validator,
}

MixedInternalOnlyEnum.public = MixedInternalOnlyEnum('public')
MixedInternalOnlyEnum.other = MixedInternalOnlyEnum('other')

ROUTES = {
}

Loading

0 comments on commit 2c5595b

Please sign in to comment.