Skip to content

Commit 0ba804f

Browse files
authored
Spec Update 02/10/2021 (#29)
Change Notes: Files Namespace: - Update ExportInfo struct to include export_options - Update ExportError union to include invalid_export_format - Update ExportArg struct to include export_format - Update ExportMetadata to include paper_revision - Update GetTemporaryLinkError union to include not_allowed - Update Comments Team Log Generated Namespace: - Add RecipicientsConfiguration, ObjectLabelAddedDetails, ObjectLabelRemoveDetails, ObjectLabelUpdatedValueDetails, ObjectLabelAddedType, ObjectLabelRemoved, and ObjectLabelUpdatedValue structs - Add AlertRecipientsSettingType, AdminAlertingAlertSensitivity, and LabelType unions - Update AdminAlertSeverityEnum to include sensitivity_level and recipients_settings - Update PlacementRestriction union to include uk_only - Update EventDetails union to include object_label_added_details, object_label_removed_details and object_label_updated_value_details - Update EventType union to include object_label_added, object_label_removed and object_label_updated_value - Update EventTypeArg union to include object_label_added, object_label_removed, and object_label_updated_value - Update Examples
1 parent cce31b9 commit 0ba804f

File tree

2 files changed

+144
-11
lines changed

2 files changed

+144
-11
lines changed

files.stone

+34-10
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ struct ExportInfo
123123
export_as String?
124124
"Format to which the file can be exported to."
125125

126+
export_options List(String)?
127+
"Additional formats to which the file can be exported. These values can be
128+
specified as the export_format in /files/export."
129+
126130
example default
127131
export_as = "xlsx"
128132

@@ -683,6 +687,8 @@ union ExportError
683687
path LookupError
684688
non_exportable
685689
"This file type cannot be exported. Use :route:`download` instead."
690+
invalid_export_format
691+
"The specified export format is not a valid option for this file type."
686692
retry_error
687693
"The exportable content is not yet available. Please retry later."
688694

@@ -692,6 +698,13 @@ struct ExportArg
692698
path ReadPath
693699
"The path of the file to be exported."
694700

701+
export_format String?
702+
"The file format to which the file should be exported.
703+
This must be one of the formats listed in the file's
704+
export_options returned by :route:`get_metadata`.
705+
If none is specified, the default format (specified
706+
in export_as in file metadata) will be used."
707+
695708
example default
696709
path = "/Homework/math/Prime_Numbers.gsheet"
697710

@@ -711,6 +724,10 @@ struct ExportMetadata
711724
"A hash based on the exported file content. This field can be used to verify data integrity. Similar to content hash.
712725
For more information see our :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
713726

727+
paper_revision Int64?
728+
# TODO(jessk): after /files/paper/update is made public, add "which can be used in :route:`paper/update`."
729+
"If the file is a Paper doc, this gives the latest doc revision."
730+
714731
example default
715732
name = "Prime_Numbers.xlsx"
716733
size = 7189
@@ -773,7 +790,7 @@ union UploadSessionStartError
773790
union UploadSessionLookupError
774791
not_found
775792
"The upload session ID was not found or has expired. Upload sessions are
776-
valid for 48 hours."
793+
valid for 7 days."
777794
incorrect_offset UploadSessionOffsetError
778795
"The specified offset was incorrect. See the value for the
779796
correct offset. This error may occur when a previous request
@@ -818,7 +835,7 @@ union UploadSessionFinishError
818835

819836
union UploadSessionType
820837
sequential
821-
"Pieces of content are uploaded sequentially one after another. This is the default
838+
"Pieces of data are uploaded sequentially one after another. This is the default
822839
behavior."
823840
concurrent
824841
"Pieces of data can be uploaded in concurrent RPCs in any order."
@@ -856,10 +873,10 @@ route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, Upl
856873
A single request should not upload more than 150 MB. The maximum size of
857874
a file one can upload to an upload session is 350 GB.
858875

859-
An upload session can be used for a maximum of 48 hours. Attempting
876+
An upload session can be used for a maximum of 7 days. Attempting
860877
to use an :field:`UploadSessionStartResult.session_id` with
861878
:route:`upload_session/append:2` or :route:`upload_session/finish` more
862-
than 48 hours after its creation will return a
879+
than 7 days after its creation will return a
863880
:field:`UploadSessionLookupError.not_found`.
864881

865882
Calls to this endpoint will count as data transport calls for any Dropbox
@@ -922,9 +939,8 @@ struct UploadSessionCursor
922939
session_id String
923940
"The upload session ID (returned by :route:`upload_session/start`)."
924941
offset UInt64
925-
"The amount of data that has been uploaded so far. We use this to make
926-
sure upload data isn't lost or duplicated in the event of a network
927-
error."
942+
"Offset in bytes at which data should be appended. We use this to make
943+
sure upload data isn't lost or duplicated in the event of a network error."
928944

929945
example default
930946
session_id = "1234faaf0678bcde"
@@ -2213,7 +2229,7 @@ route get_thumbnail(ThumbnailArg, FileMetadata, ThumbnailError)
22132229
"Get a thumbnail for an image.
22142230

22152231
This method currently supports files with the following file extensions:
2216-
jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB
2232+
jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB
22172233
in size won't be converted to a thumbnail."
22182234

22192235
attrs
@@ -2227,7 +2243,7 @@ route get_thumbnail_batch(GetThumbnailBatchArg, GetThumbnailBatchResult, GetThum
22272243
"Get thumbnails for a list of images. We allow up to 25 thumbnails in a single batch.
22282244

22292245
This method currently supports files with the following file extensions:
2230-
jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger than 20MB
2246+
jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB
22312247
in size won't be converted to a thumbnail."
22322248

22332249
attrs
@@ -2320,7 +2336,11 @@ struct ThumbnailV2Arg
23202336

23212337

23222338
route get_thumbnail:2(ThumbnailV2Arg, PreviewResult, ThumbnailV2Error)
2323-
"Get a thumbnail for a file."
2339+
"Get a thumbnail for an image.
2340+
2341+
This method currently supports files with the following file extensions:
2342+
jpg, jpeg, png, tiff, tif, gif, webp, ppm and bmp. Photos that are larger than 20MB
2343+
in size won't be converted to a thumbnail."
23242344

23252345
attrs
23262346
host = "content"
@@ -2499,6 +2519,10 @@ union GetTemporaryLinkError
24992519
their email address :link:`here https://www.dropbox.com/help/317`."
25002520
unsupported_file
25012521
"Cannot get temporary link to this file type; use :route:`export` instead."
2522+
not_allowed
2523+
"The user is not allowed to request a temporary link to the specified file.
2524+
For example, this can occur if the file is restricted or if the user's links
2525+
are :link:`banned https://help.dropbox.com/files-folders/share/banned-links`."
25022526

25032527
route get_temporary_link(GetTemporaryLinkArg, GetTemporaryLinkResult, GetTemporaryLinkError)
25042528
"Get a temporary link to stream content of a file. This link will expire in four hours and

team_log_generated.stone

+110-1
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,58 @@ union AdminAlertSeverityEnum
206206
struct AdminAlertingAlertConfiguration
207207
"Alert configurations"
208208

209-
alert_state AdminAlertingAlertStatePolicy
209+
alert_state AdminAlertingAlertStatePolicy?
210210
"Alert state."
211+
sensitivity_level AdminAlertingAlertSensitivity?
212+
"Sensitivity level."
213+
recipients_settings RecipientsConfiguration?
214+
"Recipient settings."
211215

212216
example default
213217
alert_state = off
218+
sensitivity_level = invalid
219+
recipients_settings = default
214220

215221
example default2
216222
alert_state = off
223+
sensitivity_level = invalid
224+
recipients_settings = default2
225+
226+
struct RecipientsConfiguration
227+
"Recipients Configuration"
228+
229+
recipient_setting_type AlertRecipientsSettingType?
230+
"Recipients setting type."
231+
emails List(EmailAddress)?
232+
"A list of user emails to notify."
233+
groups List(String)?
234+
"A list of groups to notify."
235+
236+
example default
237+
recipient_setting_type = invalid
238+
emails = ["[email protected]"]
239+
groups = ["abc"]
240+
241+
example default2
242+
recipient_setting_type = invalid
243+
emails = ["[email protected]"]
244+
groups = ["xyz"]
245+
246+
union AlertRecipientsSettingType
247+
"Alert recipients setting type"
248+
custom_list
249+
invalid
250+
none
251+
team_admins
252+
253+
union AdminAlertingAlertSensitivity
254+
"Alert sensitivity"
255+
high
256+
highest
257+
invalid
258+
low
259+
lowest
260+
medium
217261

218262
union AdminAlertingAlertStatePolicy
219263
"Policy for controlling whether an alert can be triggered or not"
@@ -528,6 +572,10 @@ union IntegrationPolicy
528572
disabled
529573
enabled
530574

575+
union LabelType
576+
"Label type"
577+
personal_information
578+
531579
union LockStatus
532580
"File lock status"
533581
locked
@@ -614,6 +662,7 @@ union PlacementRestriction
614662
europe_only
615663
japan_only
616664
none
665+
uk_only
617666

618667
union PolicyType
619668
disposition
@@ -2672,6 +2721,33 @@ struct FolderOverviewItemUnpinnedDetails
26722721
folder_overview_location_asset = 3
26732722
pinned_items_asset_indices = [3]
26742723

2724+
struct ObjectLabelAddedDetails
2725+
"Added a label."
2726+
2727+
label_type LabelType
2728+
"Labels mark a file or folder."
2729+
2730+
example default
2731+
label_type = personal_information
2732+
2733+
struct ObjectLabelRemovedDetails
2734+
"Removed a label."
2735+
2736+
label_type LabelType
2737+
"Labels mark a file or folder."
2738+
2739+
example default
2740+
label_type = personal_information
2741+
2742+
struct ObjectLabelUpdatedValueDetails
2743+
"Updated a label's value."
2744+
2745+
label_type LabelType
2746+
"Labels mark a file or folder."
2747+
2748+
example default
2749+
label_type = personal_information
2750+
26752751
struct RewindFolderDetails
26762752
"Rewound a folder."
26772753

@@ -6390,6 +6466,9 @@ union EventDetails
63906466
folder_overview_description_changed_details FolderOverviewDescriptionChangedDetails
63916467
folder_overview_item_pinned_details FolderOverviewItemPinnedDetails
63926468
folder_overview_item_unpinned_details FolderOverviewItemUnpinnedDetails
6469+
object_label_added_details ObjectLabelAddedDetails
6470+
object_label_removed_details ObjectLabelRemovedDetails
6471+
object_label_updated_value_details ObjectLabelUpdatedValueDetails
63936472
rewind_folder_details RewindFolderDetails
63946473
file_request_change_details FileRequestChangeDetails
63956474
file_request_close_details FileRequestCloseDetails
@@ -7286,6 +7365,24 @@ struct FolderOverviewItemUnpinnedType
72867365
example default
72877366
description = "(file_operations) Unpinned item from folder overview"
72887367

7368+
struct ObjectLabelAddedType
7369+
description String
7370+
7371+
example default
7372+
description = "(file_operations) Added a label"
7373+
7374+
struct ObjectLabelRemovedType
7375+
description String
7376+
7377+
example default
7378+
description = "(file_operations) Removed a label"
7379+
7380+
struct ObjectLabelUpdatedValueType
7381+
description String
7382+
7383+
example default
7384+
description = "(file_operations) Updated a label's value"
7385+
72897386
struct RewindFolderType
72907387
description String
72917388

@@ -9676,6 +9773,12 @@ union EventType
96769773
"(file_operations) Pinned item to folder overview"
96779774
folder_overview_item_unpinned FolderOverviewItemUnpinnedType
96789775
"(file_operations) Unpinned item from folder overview"
9776+
object_label_added ObjectLabelAddedType
9777+
"(file_operations) Added a label"
9778+
object_label_removed ObjectLabelRemovedType
9779+
"(file_operations) Removed a label"
9780+
object_label_updated_value ObjectLabelUpdatedValueType
9781+
"(file_operations) Updated a label's value"
96799782
rewind_folder RewindFolderType
96809783
"(file_operations) Rewound a folder"
96819784
file_request_change FileRequestChangeType
@@ -10594,6 +10697,12 @@ union EventTypeArg
1059410697
"(file_operations) Pinned item to folder overview"
1059510698
folder_overview_item_unpinned
1059610699
"(file_operations) Unpinned item from folder overview"
10700+
object_label_added
10701+
"(file_operations) Added a label"
10702+
object_label_removed
10703+
"(file_operations) Removed a label"
10704+
object_label_updated_value
10705+
"(file_operations) Updated a label's value"
1059710706
rewind_folder
1059810707
"(file_operations) Rewound a folder"
1059910708
file_request_change

0 commit comments

Comments
 (0)