Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions dropbox/base_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -2533,6 +2533,121 @@ def team_reports_get_storage(self, start_date=None, end_date=None):
)
return r

def team_sharing_allowlist_add(self, domains=None, emails=None):
"""
Endpoint adds Approve List entries. Changes are effective immediately.
Changes are committed in transaction. In case of single validation error
- all entries are rejected. Valid domains (RFC-1034/5) and emails
(RFC-5322/822) are accepted. Added entries cannot overflow limit of
10000 entries per team. Maximum 100 entries per call is allowed.

Route attributes:
scope: team_info.write

:param domains: List of domains represented by valid string
representation (RFC-1034/5).
:type domains: Nullable[List[str]]
:param emails: List of emails represented by valid string representation
(RFC-5322/822).
:type emails: Nullable[List[str]]
:rtype: :class:`dropbox.team.SharingAllowlistAddResponse`
:raises: :class:`.exceptions.ApiError`

If this raises, ApiError will contain:
:class:`dropbox.team.SharingAllowlistAddError`
"""
arg = team.SharingAllowlistAddArgs(domains, emails)
r = self.request(
team.sharing_allowlist_add,
"team",
arg,
None,
)
return r

def team_sharing_allowlist_list(self, limit=1000):
"""
Lists Approve List entries for given team, from newest to oldest,
returning up to `limit` entries at a time. If there are more than
`limit` entries associated with the current team, more can be fetched by
passing the returned `cursor` to
:meth:`team_sharing_allowlist_list_continue`.

Route attributes:
scope: team_info.read

:param limit: The number of entries to fetch at one time.
:type limit: int
:rtype: :class:`dropbox.team.SharingAllowlistListResponse`
"""
arg = team.SharingAllowlistListArg(limit)
r = self.request(
team.sharing_allowlist_list,
"team",
arg,
None,
)
return r

def team_sharing_allowlist_list_continue(self, cursor):
"""
Lists entries associated with given team, starting from a the cursor.
See :meth:`team_sharing_allowlist_list`.

Route attributes:
scope: team_info.read

:param cursor: The cursor returned from a previous call to
:meth:`team_sharing_allowlist_list` or
:meth:`team_sharing_allowlist_list_continue`.
:type cursor: str
:rtype: :class:`dropbox.team.SharingAllowlistListResponse`
:raises: :class:`.exceptions.ApiError`

If this raises, ApiError will contain:
:class:`dropbox.team.SharingAllowlistListContinueError`
"""
arg = team.SharingAllowlistListContinueArg(cursor)
r = self.request(
team.sharing_allowlist_list_continue,
"team",
arg,
None,
)
return r

def team_sharing_allowlist_remove(self, domains=None, emails=None):
"""
Endpoint removes Approve List entries. Changes are effective
immediately. Changes are committed in transaction. In case of single
validation error - all entries are rejected. Valid domains (RFC-1034/5)
and emails (RFC-5322/822) are accepted. Entries being removed have to be
present on the list. Maximum 1000 entries per call is allowed.

Route attributes:
scope: team_info.write

:param domains: List of domains represented by valid string
representation (RFC-1034/5).
:type domains: Nullable[List[str]]
:param emails: List of emails represented by valid string representation
(RFC-5322/822).
:type emails: Nullable[List[str]]
:rtype: :class:`dropbox.team.SharingAllowlistRemoveResponse`
:raises: :class:`.exceptions.ApiError`

If this raises, ApiError will contain:
:class:`dropbox.team.SharingAllowlistRemoveError`
"""
arg = team.SharingAllowlistRemoveArgs(domains, emails)
r = self.request(
team.sharing_allowlist_remove,
"team",
arg,
None,
)
return r

def team_team_folder_activate(self, team_folder_id):
"""
Sets an archived team folder's status to active. Permission : Team
Expand Down
Loading
Loading