Skip to content

Commit 2c5595b

Browse files
authored
Update Spec (#200)
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
1 parent 417ab9c commit 2c5595b

File tree

7 files changed

+6953
-295
lines changed

7 files changed

+6953
-295
lines changed

dropbox/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
secondary_emails,
2222
seen_state,
2323
sharing,
24+
stone_fixtures,
2425
team,
2526
team_common,
2627
team_log,

dropbox/base_team.py

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
secondary_emails,
2222
seen_state,
2323
sharing,
24+
stone_fixtures,
2425
team,
2526
team_common,
2627
team_log,
@@ -785,6 +786,9 @@ def team_legal_holds_get_policy(self,
785786
def team_legal_holds_list_held_revisions(self,
786787
id):
787788
"""
789+
List the file metadata that's under the hold. Permission : Team member
790+
file access.
791+
788792
:param str id: The legal hold Id.
789793
:rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult`
790794
:raises: :class:`.exceptions.ApiError`
@@ -805,8 +809,13 @@ def team_legal_holds_list_held_revisions_continue(self,
805809
id,
806810
cursor=None):
807811
"""
812+
Continue listing the file metadata that's under the hold. Permission :
813+
Team member file access.
814+
808815
:param str id: The legal hold Id.
809-
:param Nullable cursor: cursor of list held revisions.
816+
:param Nullable cursor: The cursor idicates where to continue reading
817+
file metadata entries for the next API call. When there are no more
818+
entries, the cursor will return none.
810819
:rtype: :class:`dropbox.team.LegalHoldsListHeldRevisionResult`
811820
:raises: :class:`.exceptions.ApiError`
812821
@@ -1441,12 +1450,12 @@ def team_members_remove(self,
14411450
members. In order to keep the account the argument ``wipe_data``
14421451
should be set to ``False``.
14431452
:param bool retain_team_shares: If provided, allows removed users to
1444-
keep access to folders already explicitly shared with them (not via
1445-
a group) when they are downgraded to a Basic account. Users will not
1446-
retain access to folders that do not allow external sharing. In
1447-
order to keep the sharing relationships, the arguments ``wipe_data``
1448-
should be set to ``False`` and ``keep_account`` should be set to
1449-
``True``.
1453+
keep access to Dropbox folders (not Dropbox Paper folders) already
1454+
explicitly shared with them (not via a group) when they are
1455+
downgraded to a Basic account. Users will not retain access to
1456+
folders that do not allow external sharing. In order to keep the
1457+
sharing relationships, the arguments ``wipe_data`` should be set to
1458+
``False`` and ``keep_account`` should be set to ``True``.
14501459
:rtype: :class:`dropbox.team.LaunchEmptyResult`
14511460
:raises: :class:`.exceptions.ApiError`
14521461
@@ -2248,7 +2257,8 @@ def team_log_get_events(self,
22482257
limit=1000,
22492258
account_id=None,
22502259
time=None,
2251-
category=None):
2260+
category=None,
2261+
event_type=None):
22522262
"""
22532263
Retrieves team events. If the result's ``GetTeamEventsResult.has_more``
22542264
field is ``True``, call :meth:`team_log_get_events_continue` with the
@@ -2267,12 +2277,15 @@ def team_log_get_events(self,
22672277
even return no events, even with `has_more` set to true. In this
22682278
case, callers should fetch again using
22692279
:meth:`team_log_get_events_continue`.
2270-
:param Nullable account_id: Filter the events by account ID. Return ony
2280+
:param Nullable account_id: Filter the events by account ID. Return only
22712281
events with this account_id as either Actor, Context, or
22722282
Participants.
22732283
:param Nullable time: Filter by time range.
22742284
:param Nullable category: Filter the returned events to a single
22752285
category.
2286+
:param Nullable event_type: Filter the returned events to a single event
2287+
type. Note that event_type shouldn't be provided together with
2288+
category.
22762289
:rtype: :class:`dropbox.team_log.GetTeamEventsResult`
22772290
:raises: :class:`.exceptions.ApiError`
22782291
@@ -2282,7 +2295,8 @@ def team_log_get_events(self,
22822295
arg = team_log.GetTeamEventsArg(limit,
22832296
account_id,
22842297
time,
2285-
category)
2298+
category,
2299+
event_type)
22862300
r = self.request(
22872301
team_log.get_events,
22882302
'team_log',

dropbox/stone_fixtures.py

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# -*- coding: utf-8 -*-
2+
# Auto-generated by Stone, do not modify.
3+
# @generated
4+
# flake8: noqa
5+
# pylint: skip-file
6+
try:
7+
from . import stone_validators as bv
8+
from . import stone_base as bb
9+
except (ImportError, SystemError, ValueError):
10+
# Catch errors raised when importing a relative module when not in a package.
11+
# This makes testing this file directly (outside of a package) easier.
12+
import stone_validators as bv
13+
import stone_base as bb
14+
15+
class EmptyContainer(bb.Struct):
16+
"""
17+
This struct left intentionally empty
18+
"""
19+
20+
__slots__ = [
21+
]
22+
23+
_has_required_fields = False
24+
25+
def __init__(self):
26+
pass
27+
28+
def _process_custom_annotations(self, annotation_type, field_path, processor):
29+
super(EmptyContainer, self)._process_custom_annotations(annotation_type, field_path, processor)
30+
31+
def __repr__(self):
32+
return 'EmptyContainer()'
33+
34+
EmptyContainer_validator = bv.Struct(EmptyContainer)
35+
36+
class MixedInternalOnlyContainer(bb.Struct):
37+
38+
__slots__ = [
39+
'_public_value_value',
40+
'_public_value_present',
41+
]
42+
43+
_has_required_fields = False
44+
45+
def __init__(self,
46+
public_value=None):
47+
self._public_value_value = None
48+
self._public_value_present = False
49+
if public_value is not None:
50+
self.public_value = public_value
51+
52+
@property
53+
def public_value(self):
54+
"""
55+
:rtype: int
56+
"""
57+
if self._public_value_present:
58+
return self._public_value_value
59+
else:
60+
return 0
61+
62+
@public_value.setter
63+
def public_value(self, val):
64+
val = self._public_value_validator.validate(val)
65+
self._public_value_value = val
66+
self._public_value_present = True
67+
68+
@public_value.deleter
69+
def public_value(self):
70+
self._public_value_value = None
71+
self._public_value_present = False
72+
73+
def _process_custom_annotations(self, annotation_type, field_path, processor):
74+
super(MixedInternalOnlyContainer, self)._process_custom_annotations(annotation_type, field_path, processor)
75+
76+
def __repr__(self):
77+
return 'MixedInternalOnlyContainer(public_value={!r})'.format(
78+
self._public_value_value,
79+
)
80+
81+
MixedInternalOnlyContainer_validator = bv.Struct(MixedInternalOnlyContainer)
82+
83+
class MixedInternalOnlyEnum(bb.Union):
84+
"""
85+
This class acts as a tagged union. Only one of the ``is_*`` methods will
86+
return true. To get the associated value of a tag (if one exists), use the
87+
corresponding ``get_*`` method.
88+
"""
89+
90+
_catch_all = 'other'
91+
# Attribute is overwritten below the class definition
92+
public = None
93+
# Attribute is overwritten below the class definition
94+
other = None
95+
96+
def is_public(self):
97+
"""
98+
Check if the union tag is ``public``.
99+
100+
:rtype: bool
101+
"""
102+
return self._tag == 'public'
103+
104+
def is_other(self):
105+
"""
106+
Check if the union tag is ``other``.
107+
108+
:rtype: bool
109+
"""
110+
return self._tag == 'other'
111+
112+
def _process_custom_annotations(self, annotation_type, field_path, processor):
113+
super(MixedInternalOnlyEnum, self)._process_custom_annotations(annotation_type, field_path, processor)
114+
115+
def __repr__(self):
116+
return 'MixedInternalOnlyEnum(%r, %r)' % (self._tag, self._value)
117+
118+
MixedInternalOnlyEnum_validator = bv.Union(MixedInternalOnlyEnum)
119+
120+
EmptyContainer._all_field_names_ = set([])
121+
EmptyContainer._all_fields_ = []
122+
123+
MixedInternalOnlyContainer._public_value_validator = bv.Int32()
124+
MixedInternalOnlyContainer._all_field_names_ = set(['public_value'])
125+
MixedInternalOnlyContainer._all_fields_ = [('public_value', MixedInternalOnlyContainer._public_value_validator)]
126+
127+
MixedInternalOnlyEnum._public_validator = bv.Void()
128+
MixedInternalOnlyEnum._other_validator = bv.Void()
129+
MixedInternalOnlyEnum._tagmap = {
130+
'public': MixedInternalOnlyEnum._public_validator,
131+
'other': MixedInternalOnlyEnum._other_validator,
132+
}
133+
134+
MixedInternalOnlyEnum.public = MixedInternalOnlyEnum('public')
135+
MixedInternalOnlyEnum.other = MixedInternalOnlyEnum('other')
136+
137+
ROUTES = {
138+
}
139+

0 commit comments

Comments
 (0)