Skip to content

Commit 09ee8a8

Browse files
Automated Spec Update (#570)
f1b5fa6f96526401bfee0a90171bd5bd19678062 Co-authored-by: dropbox-spec-updater[bot] <306253022+dropbox-spec-updater[bot]@users.noreply.github.com> 0508ca45302aba8fc7b2968813ffebe38d2c21a2 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> aa7bd7a402565927065bcd39dd489808eadd69ff d461e039e9ebfb374a726b28e289f87c58315830 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: dropbox-sdk-updater[bot] <306210582+dropbox-sdk-updater[bot]@users.noreply.github.com>
1 parent e1fcc93 commit 09ee8a8

18 files changed

Lines changed: 2836 additions & 1698 deletions

‎dropbox/account.py‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@ class AccountPhotoGetArg(bb.Struct):
2929

3030
_has_required_fields = True
3131

32-
def __init__(
33-
self,
34-
dbx_account_id=None,
35-
size=None,
36-
circle_crop=None,
37-
expect_account_photo=None,
38-
):
32+
def __init__(self, dbx_account_id=None, size=None, circle_crop=None, expect_account_photo=None):
3933
self._dbx_account_id_value = bb.NOT_SET
4034
self._size_value = bb.NOT_SET
4135
self._circle_crop_value = bb.NOT_SET

‎dropbox/auth.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -879,10 +879,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
879879
UnauthorizedAccountIdUsageError.unauthorized_account_ids.validator = bv.List(bv.String())
880880
UnauthorizedAccountIdUsageError._all_field_names_ = set(["unauthorized_account_ids"])
881881
UnauthorizedAccountIdUsageError._all_fields_ = [
882-
(
883-
"unauthorized_account_ids",
884-
UnauthorizedAccountIdUsageError.unauthorized_account_ids.validator,
885-
)
882+
("unauthorized_account_ids", UnauthorizedAccountIdUsageError.unauthorized_account_ids.validator)
886883
]
887884

888885
RateLimitError.retry_after.default = 1

‎dropbox/base.py‎

Lines changed: 51 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -671,13 +671,7 @@ def file_requests_count(self):
671671
return r
672672

673673
def file_requests_create(
674-
self,
675-
title,
676-
destination,
677-
deadline=None,
678-
open=True,
679-
description=None,
680-
video_project_id=None,
674+
self, title, destination, deadline=None, open=True, description=None, video_project_id=None
681675
):
682676
"""
683677
Creates a file request for this user.
@@ -1037,11 +1031,7 @@ def files_copy(
10371031
DeprecationWarning,
10381032
)
10391033
arg = files.RelocationArg(
1040-
from_path,
1041-
to_path,
1042-
allow_shared_folder,
1043-
autorename,
1044-
allow_ownership_transfer,
1034+
from_path, to_path, allow_shared_folder, autorename, allow_ownership_transfer
10451035
)
10461036
r = self.request(
10471037
files.copy,
@@ -1083,11 +1073,7 @@ def files_copy_v2(
10831073
:class:`dropbox.files.RelocationError`
10841074
"""
10851075
arg = files.RelocationArg(
1086-
from_path,
1087-
to_path,
1088-
allow_shared_folder,
1089-
autorename,
1090-
allow_ownership_transfer,
1076+
from_path, to_path, allow_shared_folder, autorename, allow_ownership_transfer
10911077
)
10921078
r = self.request(
10931079
files.copy_v2,
@@ -1098,11 +1084,7 @@ def files_copy_v2(
10981084
return r
10991085

11001086
def files_copy_batch(
1101-
self,
1102-
entries,
1103-
autorename=False,
1104-
allow_shared_folder=False,
1105-
allow_ownership_transfer=False,
1087+
self, entries, autorename=False, allow_shared_folder=False, allow_ownership_transfer=False
11061088
):
11071089
"""
11081090
Copy multiple files or folders to different locations at once in the
@@ -2597,11 +2579,7 @@ def files_move(
25972579
DeprecationWarning,
25982580
)
25992581
arg = files.RelocationArg(
2600-
from_path,
2601-
to_path,
2602-
allow_shared_folder,
2603-
autorename,
2604-
allow_ownership_transfer,
2582+
from_path, to_path, allow_shared_folder, autorename, allow_ownership_transfer
26052583
)
26062584
r = self.request(
26072585
files.move,
@@ -2644,11 +2622,7 @@ def files_move_v2(
26442622
:class:`dropbox.files.RelocationError`
26452623
"""
26462624
arg = files.RelocationArg(
2647-
from_path,
2648-
to_path,
2649-
allow_shared_folder,
2650-
autorename,
2651-
allow_ownership_transfer,
2625+
from_path, to_path, allow_shared_folder, autorename, allow_ownership_transfer
26522626
)
26532627
r = self.request(
26542628
files.move_v2,
@@ -2659,11 +2633,7 @@ def files_move_v2(
26592633
return r
26602634

26612635
def files_move_batch(
2662-
self,
2663-
entries,
2664-
autorename=False,
2665-
allow_shared_folder=False,
2666-
allow_ownership_transfer=False,
2636+
self, entries, autorename=False, allow_shared_folder=False, allow_ownership_transfer=False
26672637
):
26682638
"""
26692639
Move multiple files or folders to different locations at once in the
@@ -4506,27 +4476,19 @@ def paper_folders_create(self, name, parent_folder_id=None, is_team_folder=None)
45064476
def riviera_get_markdown_async(self, file_id_or_url=None, enable_ocr=False, embed_images=False):
45074477
"""
45084478
Asynchronous document-to-markdown conversion for supported file formats.
4479+
Supported formats: .binder, .docx, .html, .paper, .papert, .pptx, .xlsx,
4480+
.gsheet, .ods, .pdf. Unsupported formats return an
4481+
`unsupported_format_error`. Size limit: the source file must be at most
4482+
50 MB. Larger files are rejected.
45094483
45104484
Route attributes:
45114485
scope: files.content.read
45124486
45134487
:param file_id_or_url: Identifier of the document to convert. Callers
4514-
must set exactly one of the oneof variants: - file_id: a
4515-
Dropbox-issued file id (format: "id:<id>") for a file the
4516-
authenticated user has access to. - path: an absolute Dropbox path,
4517-
e.g. "/folder/report.docx". - url: either a Dropbox shared link
4518-
(www.dropbox.com) or an external HTTPS URL pointing to a supported
4519-
document file. - Dropbox shared links are resolved internally using
4520-
the caller's authenticated identity and the link's visibility /
4521-
download settings. They therefore require an authenticated user
4522-
context (anonymous `url` requests against Dropbox links are rejected
4523-
with an `ACCESS_ERROR`). Links protected by a password are rejected
4524-
with `shared_link_password_protected`; links with downloads disabled
4525-
are rejected with `link_download_disabled_error`. - External URLs
4526-
are fetched over HTTPS through the backend's egress proxy and must
4527-
point at a supported document file extension. The referenced file
4528-
must be a document in a supported format; requests against
4529-
unsupported formats return `unsupported_format_error`.
4488+
must set exactly one of the `FileIdOrUrl` variants. The referenced
4489+
file must be a document in a supported format (see the route
4490+
description for the list); requests against unsupported formats
4491+
return `unsupported_format_error`.
45304492
:type file_id_or_url: Nullable[:class:`dropbox.riviera.FileIdOrUrl`]
45314493
:param enable_ocr: Enable OCR for PDF documents. Processing is slower
45324494
when enabled.
@@ -4572,30 +4534,29 @@ def riviera_get_markdown_async_check(self, async_job_id):
45724534

45734535
def riviera_get_metadata_async(self, file_id_or_url=None):
45744536
"""
4575-
Asynchronous file metadata extraction for supported file formats.
4537+
Asynchronous file metadata extraction for supported file formats. The
4538+
kind of metadata returned depends on the file type: - Image (EXIF)
4539+
formats: .3fr, .arw, .avif, .bmp, .cr2, .cr3, .crw, .dcr, .dcs, .dng,
4540+
.erf, .gif, .heic, .j2c, .j2k, .jp2, .jpc, .jpeg, .jpf, .jpg, .jpg2,
4541+
.jpm, .jpx, .kdc, .mef, .mos, .mrw, .nef, .nrw, .orf, .pef, .png, .ppm,
4542+
.r3d, .raf, .rw2, .rwl, .sr2, .tga, .tif, .tiff, .wbmp, .web, .webp,
4543+
.x3f. - Audio/video (media) formats: .aac, .aif, .aiff, .flac, .m4a,
4544+
.m4r, .mp3, .oga, .ogg, .wav, .wma, .3gp, .3gpp, .3gpp2, .asf, .avi,
4545+
.dv, .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf,
4546+
.oggtheora, .ogv, .rm, .ts, .vob, .webm, .wmv. - PDF format: .pdf. - MS
4547+
Office formats: .docx, .pptx, .xlsx. Unsupported formats return an
4548+
`unsupported_format_error`.
45764549
45774550
Route attributes:
45784551
scope: files.content.read
45794552
45804553
:param file_id_or_url: Identifier of the file to extract metadata from.
4581-
Callers must set exactly one of the oneof variants: - file_id: a
4582-
Dropbox-issued file id (format: "id:<id>") for a file the
4583-
authenticated user has access to. - path: an absolute Dropbox path,
4584-
e.g. "/folder/photo.jpg". - url: either a Dropbox shared link
4585-
(www.dropbox.com) or an external HTTPS URL pointing to a supported
4586-
file. - Dropbox shared links are resolved internally using the
4587-
caller's authenticated identity and the link's visibility / download
4588-
settings. They therefore require an authenticated user context
4589-
(anonymous `url` requests against Dropbox links are rejected with an
4590-
`ACCESS_ERROR`). Links protected by a password are rejected with
4591-
`shared_link_password_protected`; links with downloads disabled are
4592-
rejected with `link_download_disabled_error`. - External URLs are
4593-
fetched over HTTPS through the backend's egress proxy and must point
4594-
at a supported file extension. The kind of metadata returned is
4595-
determined by the file type: image files return EXIF metadata,
4596-
audio/video files return media metadata, PDFs return PDF metadata,
4597-
and MS Office documents (docx, pptx, xlsx) return Office metadata.
4598-
Requests against unsupported formats return
4554+
Callers must set exactly one of the `FileIdOrUrl` variants. The kind
4555+
of metadata returned is determined by the file type: image files
4556+
return EXIF metadata, audio/video files return media metadata, PDFs
4557+
return PDF metadata, and MS Office documents (docx, pptx, xlsx)
4558+
return Office metadata. See the route description for the supported
4559+
formats. Requests against unsupported formats return
45994560
`unsupported_format_error`.
46004561
:type file_id_or_url: Nullable[:class:`dropbox.riviera.FileIdOrUrl`]
46014562
:rtype: :class:`dropbox.async_.LaunchResultBase`
@@ -4637,39 +4598,34 @@ def riviera_get_metadata_async_check(self, async_job_id):
46374598
def riviera_get_transcript_async(
46384599
self,
46394600
file_id_or_url=None,
4640-
timestamp_level=riviera.TimestampLevel.unknown,
4601+
timestamp_level=riviera.TimestampLevel.sentence,
46414602
included_special_words="",
46424603
audio_language="",
46434604
):
46444605
"""
4645-
Asynchronous transcript generation for audio and video files.
4606+
Asynchronous transcript generation for audio and video files. Supported
4607+
audio formats: .aac, .aif, .aiff, .flac, .m4a, .m4r, .mp3, .oga, .ogg,
4608+
.wav, .wma. Supported video formats: .3gp, .3gpp, .3gpp2, .asf, .avi,
4609+
.dv, .flv, .m2t, .m2ts, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .mts, .mxf,
4610+
.oggtheora, .ogv, .rm, .ts, .vob, .webm, .wmv. Unsupported formats
4611+
return an `unsupported_format_error`. Size limits: the source file must
4612+
be at most 10 GB and its audio track at most 1 hour in duration. Files
4613+
exceeding these limits are rejected.
46464614
46474615
Route attributes:
46484616
scope: files.content.read
46494617
46504618
:param file_id_or_url: Identifier of the media asset to transcribe.
4651-
Callers must set exactly one of the oneof variants: - file_id: a
4652-
Dropbox-issued file id (format: "id:<id>") for a file the
4653-
authenticated user has access to. - path: an absolute Dropbox path,
4654-
e.g. "/folder/recording.mp4". - url: either a Dropbox shared link
4655-
(www.dropbox.com) or an external HTTPS URL pointing to a supported
4656-
audio/video file. - Dropbox shared links are resolved internally
4657-
using the caller's authenticated identity and the link's visibility
4658-
/ download settings. They therefore require an authenticated user
4659-
context (anonymous `url` requests against Dropbox links are rejected
4660-
with an `ACCESS_ERROR`). Links protected by a password are rejected
4661-
with `shared_link_password_protected`; links with downloads disabled
4662-
are rejected with `link_download_disabled_error`. - External URLs
4663-
are fetched over HTTPS through the backend's egress proxy and must
4664-
point at a supported audio/video file extension. The referenced
4665-
asset must be an audio or video file in a supported format; requests
4666-
against files with no audio track return a `no_audio_error`.
4619+
Callers must set exactly one of the `FileIdOrUrl` variants. The
4620+
referenced asset must be an audio or video file in a supported
4621+
format (see the route description for the list); requests against
4622+
files with no audio track return a `no_audio_error`.
46674623
:type file_id_or_url: Nullable[:class:`dropbox.riviera.FileIdOrUrl`]
46684624
:param timestamp_level: Granularity of the time offsets returned for
4669-
each transcript segment. Defaults to `SENTENCE. - SENTENCE: one
4670-
segment per spoken sentence (recommended). - WORD: one segment per
4671-
word, useful for fine-grained alignment such as captioning or
4672-
highlight-as-you-listen experiences.
4625+
each transcript segment. Defaults to `SENTENCE` when the field is
4626+
omitted. - SENTENCE: one segment per spoken sentence (recommended).
4627+
- WORD: one segment per word, useful for fine-grained alignment such
4628+
as captioning or highlight-as-you-listen experiences.
46734629
:type timestamp_level: :class:`dropbox.riviera.TimestampLevel`
46744630
:param included_special_words: Comma-delimited list of non-lexical
46754631
filler words to preserve in the transcript output, e.g. `"uh, ah,
@@ -4784,12 +4740,7 @@ def sharing_add_file_member(
47844740
return r
47854741

47864742
def sharing_add_folder_member(
4787-
self,
4788-
shared_folder_id,
4789-
members,
4790-
quiet=False,
4791-
custom_message=None,
4792-
fp_sealed_result=None,
4743+
self, shared_folder_id, members, quiet=False, custom_message=None, fp_sealed_result=None
47934744
):
47944745
"""
47954746
Allows an owner or editor (if the ACL update policy allows) of a shared

0 commit comments

Comments
 (0)