Skip to content

Commit 6e30ba6

Browse files
committed
Added file sharing and file properties endpoints.
- sharing/remove_folder_member only ever returns an async_job_id. - sharing/check_remove_member_job_status returns a MemberAccessLevelResult on completion. - sharing/update_folder_member returns a MemberAccessLevelResult on completion. - no_explicit_access information added to UpdateFolderMemberError.
1 parent 9e1fa64 commit 6e30ba6

16 files changed

+1098
-103
lines changed

files.stone

+88-31
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ alias PathOrId = String(pattern="/(.|[\\r\\n])*|id:.*")
1212
alias PathR = String(pattern="(/(.|[\\r\\n])*)?") # A path that can be the root path ("").
1313
alias Rev = String(min_length=9, pattern="[0-9a-f]+") # TODO: Change pattern to "rev:[0-9a-f]{9,}"
1414
alias ListFolderCursor = String(min_length=1)
15-
alias ReadPath = String(pattern="(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})")
15+
alias ReadPath = String(pattern="(/(.|[\\r\\n])*|id:.*)|(rev:[0-9a-f]{9,})|(ns:[0-9]+(/.*)?)")
1616

1717
#
1818
# Metadata definitions and route
@@ -29,14 +29,15 @@ struct Metadata
2929
name String
3030
"The last component of the path (including extension).
3131
This never contains a slash."
32-
path_lower String
33-
"The lowercased full path in the user's Dropbox.
34-
This always starts with a slash."
35-
path_display String
32+
path_lower String?
33+
"The lowercased full path in the user's Dropbox. This always starts with a slash.
34+
This field will be null if the file or folder is not mounted."
35+
path_display String?
3636
"The cased path to be used for display purposes only. In rare instances
3737
the casing will not correctly match the user's filesystem, but this
3838
behavior will match the path provided in the Core API v1.
39-
Changes to the casing of paths won't be returned by :route:`list_folder/continue`"
39+
Changes to the casing of paths won't be returned by :route:`list_folder/continue`.
40+
This field will be null if the file or folder is not mounted."
4041
parent_shared_folder_id common.SharedFolderId?
4142
"Deprecated. Please use :field:`FileSharingInfo.parent_shared_folder_id`
4243
or :field:`FolderSharingInfo.parent_shared_folder_id` instead."
@@ -260,6 +261,9 @@ route get_metadata (GetMetadataArg, Metadata, GetMetadataError)
260261

261262
Note: Metadata for the root folder is unsupported."
262263

264+
attrs
265+
owner = "dev-plat"
266+
263267
#
264268
# List folder routes
265269
#
@@ -306,8 +310,9 @@ route list_folder/longpoll (ListFolderLongpollArg, ListFolderLongpollResult, Lis
306310
check out our
307311
:link:`webhooks documentation https://www.dropbox.com/developers/reference/webhooks`."
308312
attrs
309-
host="notify"
310-
auth="noauth"
313+
host = "notify"
314+
auth = "noauth"
315+
owner = "dev-plat"
311316

312317
struct ListFolderArg
313318
path PathR
@@ -369,6 +374,9 @@ route list_folder/continue (ListFolderContinueArg, ListFolderResult, ListFolderC
369374
"Once a cursor has been retrieved from :route:`list_folder`, use this to
370375
paginate through all files and retrieve updates to the folder."
371376

377+
attrs
378+
owner = "dev-plat"
379+
372380
struct ListFolderGetLatestCursorResult
373381
cursor ListFolderCursor
374382
"Pass the cursor into :route:`list_folder/continue` to see what's
@@ -383,6 +391,9 @@ route list_folder/get_latest_cursor (ListFolderArg, ListFolderGetLatestCursorRes
383391
which only needs to know about new files and modifications and doesn't need to know about
384392
files that already exist in Dropbox."
385393

394+
attrs
395+
owner = "dev-plat"
396+
386397
#
387398
# Download
388399
#
@@ -411,8 +422,9 @@ route download (DownloadArg, FileMetadata, DownloadError)
411422
"Download a file from a user's Dropbox."
412423

413424
attrs
414-
host="content"
415-
style="download"
425+
host = "content"
426+
style = "download"
427+
owner = "dev-plat"
416428

417429
#
418430
# Upload Routes
@@ -467,16 +479,17 @@ union UploadSessionFinishError
467479

468480
struct UploadSessionStartArg
469481
close Boolean = false
470-
"If true, current session will be closed. You cannot do
471-
:route:`upload_session/append` any more to current session"
482+
"If true, the current session will be closed, at which point
483+
you won't be able to call :route:`upload_session/append_v2`
484+
anymore with the current session."
472485

473486
example with_close
474487
close = true
475488

476489
struct UploadSessionStartResult
477490
session_id String
478491
"A unique identifier for the upload session. Pass this to
479-
:route:`upload_session/append` and
492+
:route:`upload_session/append_v2` and
480493
:route:`upload_session/finish`."
481494

482495
example default
@@ -485,21 +498,23 @@ struct UploadSessionStartResult
485498
route upload_session/start (UploadSessionStartArg, UploadSessionStartResult, Void)
486499
"Upload sessions allow you to upload a single file using multiple requests.
487500
This call starts a new upload session with the given data. You can
488-
then use :route:`upload_session/append` to add more data and
501+
then use :route:`upload_session/append_v2` to add more data and
489502
:route:`upload_session/finish` to save all the data to a file in Dropbox.
490503

491504
A single request should not upload more than 150 MB of file contents."
492505

493506
attrs
494-
host="content"
495-
style="upload"
507+
host = "content"
508+
style = "upload"
509+
owner = "dev-plat"
496510

497511
struct UploadSessionAppendArg
498512
cursor UploadSessionCursor
499513
"Contains the upload session ID and the offset."
500514
close Boolean = false
501-
"If true, current session will be closed. You cannot do
502-
:route:`upload_session/append` any more to current session"
515+
"If true, the current session will be closed, at which point
516+
you won't be able to call :route:`upload_session/append_v2`
517+
anymore with the current session."
503518

504519
example default
505520
cursor = default
@@ -512,8 +527,9 @@ route upload_session/append_v2 (UploadSessionAppendArg, Void, UploadSessionLooku
512527
A single request should not upload more than 150 MB of file contents."
513528

514529
attrs
515-
host="content"
516-
style="upload"
530+
host = "content"
531+
style = "upload"
532+
owner = "dev-plat"
517533

518534

519535
struct UploadSessionCursor
@@ -534,8 +550,9 @@ route upload_session/append (UploadSessionCursor, Void, UploadSessionLookupError
534550
A single request should not upload more than 150 MB of file contents."
535551

536552
attrs
537-
host="content"
538-
style="upload"
553+
host = "content"
554+
style = "upload"
555+
owner = "dev-plat"
539556

540557
union WriteMode
541558
"Your intent when writing a file to some path. This is used to determine
@@ -623,8 +640,9 @@ route upload_session/finish (UploadSessionFinishArg, FileMetadata, UploadSession
623640
A single request should not upload more than 150 MB of file contents."
624641

625642
attrs
626-
host="content"
627-
style="upload"
643+
host = "content"
644+
style = "upload"
645+
owner = "dev-plat"
628646

629647
route upload (CommitInfo, FileMetadata, UploadError)
630648
"Create a new file with the contents provided in the request.
@@ -633,8 +651,9 @@ route upload (CommitInfo, FileMetadata, UploadError)
633651
upload session with :route:`upload_session/start`."
634652

635653
attrs
636-
host="content"
637-
style="upload"
654+
host = "content"
655+
style = "upload"
656+
owner = "dev-plat"
638657

639658
#
640659
# Search
@@ -727,6 +746,9 @@ route search (SearchArg, SearchResult, SearchError)
727746

728747
Note: Recent changes may not immediately be reflected in search results due to a short delay in indexing."
729748

749+
attrs
750+
owner = "dev-plat"
751+
730752
#
731753
# Errors shared by various operations
732754
#
@@ -784,6 +806,9 @@ union CreateFolderError
784806
route create_folder (CreateFolderArg, FolderMetadata, CreateFolderError)
785807
"Create a folder at a given path."
786808

809+
attrs
810+
owner = "dev-plat"
811+
787812
#
788813
# Delete
789814
#
@@ -809,6 +834,9 @@ route delete (DeleteArg, Metadata, DeleteError)
809834
be the corresponding :type:`FileMetadata` or :type:`FolderMetadata` for the item at time of
810835
deletion, and not a :type:`DeletedMetadata` object."
811836

837+
attrs
838+
owner = "dev-plat"
839+
812840
route permanently_delete (DeleteArg, Void, DeleteError)
813841
"Permanently delete the file or folder at a given path
814842
(see https://www.dropbox.com/en/help/40).
@@ -855,6 +883,9 @@ route copy (RelocationArg, Metadata, RelocationError)
855883

856884
If the source path is a folder all its contents will be copied."
857885

886+
attrs
887+
owner = "dev-plat"
888+
858889
#
859890
# Move
860891
#
@@ -864,6 +895,9 @@ route move (RelocationArg, Metadata, RelocationError)
864895

865896
If the source path is a folder all its contents will be moved."
866897

898+
attrs
899+
owner = "dev-plat"
900+
867901
#
868902
# Thumbnail
869903
#
@@ -924,8 +958,9 @@ route get_thumbnail(ThumbnailArg, FileMetadata, ThumbnailError)
924958
in size won't be converted to a thumbnail."
925959

926960
attrs
927-
host="content"
928-
style="download"
961+
host = "content"
962+
style = "download"
963+
owner = "dev-plat"
929964

930965
#
931966
# Preview
@@ -963,8 +998,9 @@ route get_preview(PreviewArg, FileMetadata, PreviewError)
963998
.xls, .xlsx, .xlsm, .rtf"
964999

9651000
attrs
966-
host="content"
967-
style="download"
1001+
host = "content"
1002+
style = "download"
1003+
owner = "dev-plat"
9681004

9691005
#
9701006
# List revisions
@@ -1000,6 +1036,9 @@ struct ListRevisionsResult
10001036
route list_revisions(ListRevisionsArg, ListRevisionsResult, ListRevisionsError)
10011037
"Return revisions of a file"
10021038

1039+
attrs
1040+
owner = "dev-plat"
1041+
10031042
#
10041043
# Restore
10051044
#
@@ -1027,6 +1066,9 @@ union RestoreError
10271066
route restore(RestoreArg, FileMetadata, RestoreError)
10281067
"Restore a file to a specific revision"
10291068

1069+
attrs
1070+
owner = "dev-plat"
1071+
10301072
#
10311073
# Temporary link
10321074
#
@@ -1058,6 +1100,8 @@ route get_temporary_link(GetTemporaryLinkArg, GetTemporaryLinkResult, GetTempora
10581100
afterwards you will get 410 Gone. Content-Type of the link is determined automatically by
10591101
the file's mime type."
10601102

1103+
attrs
1104+
owner = "dev-plat"
10611105

10621106
#
10631107
# Copy reference
@@ -1093,6 +1137,9 @@ route copy_reference/get(GetCopyReferenceArg, GetCopyReferenceResult, GetCopyRef
10931137
save that file or folder to another user's Dropbox by passing it to
10941138
:route:`copy_reference/save`."
10951139

1140+
attrs
1141+
owner = "dev-plat"
1142+
10961143
struct SaveCopyReferenceArg
10971144
copy_reference String
10981145
"A copy reference returned by :route:`copy_reference/get`."
@@ -1116,7 +1163,9 @@ union SaveCopyReferenceError
11161163
invalid_copy_reference
11171164
"The copy reference is invalid."
11181165
no_permission
1119-
"The app has no permission to access another user's Dropbox."
1166+
"You don't have permission to save the given copy reference. Please make sure this app
1167+
is same app which created the copy reference and the source user is still linked to
1168+
the app."
11201169
not_found
11211170
"The file referenced by the copy reference cannot be found."
11221171
too_many_files
@@ -1126,6 +1175,9 @@ union SaveCopyReferenceError
11261175
route copy_reference/save(SaveCopyReferenceArg, SaveCopyReferenceResult, SaveCopyReferenceError)
11271176
"Save a copy reference returned by :route:`copy_reference/get` to the user's Dropbox."
11281177

1178+
attrs
1179+
owner = "dev-plat"
1180+
11291181
#
11301182
# Save URL
11311183
#
@@ -1158,6 +1210,9 @@ route save_url(SaveUrlArg, SaveUrlResult, SaveUrlError)
11581210
"Save a specified URL into a file in user's Dropbox. If the given path already
11591211
exists, the file will be renamed to avoid the conflict (e.g. myfile (1).txt)."
11601212

1213+
attrs
1214+
owner = "dev-plat"
1215+
11611216
#
11621217
# Save URL Job
11631218
#
@@ -1170,3 +1225,5 @@ union SaveUrlJobStatus extends async.PollResultBase
11701225
route save_url/check_job_status(async.PollArg, SaveUrlJobStatus, async.PollError)
11711226
"Check the status of a :route:`save_url` job."
11721227

1228+
attrs
1229+
owner = "dev-plat"

0 commit comments

Comments
 (0)