Skip to content

Commit 822caa8

Browse files
Jorge Santoyojorges26
Jorge Santoyo
and
jorges26
authored
Spec Update 02/18/2021 (#30)
Change Notes: Files Namespace: - Add paper/create, paper/update routes - Add PaperCreateArg, PaperCreateResult, PaperCreateArg, PaperCreateResult, PaperUpdateArg, PaperUpdateResult structs - Add ImportFormat, PaperContentError, PaperCreateError, PaperDocUpdatePolicy, PaperUpdateError unions - Update Comments Team Log Generated Namespace: - Add GovernancePolicyContentDisposedDetails, GovernancePolicyContentDisposedType structs - Add DispositionActionType union - Update ClassificationType union to include pii - Update EventDetails union to include governance_policy_content_disposed_details - Update EventType union to include governance_policy_content_disposed - Update EventTypeArg uniont to include governance_policy_content_disposed - Update Comments Team Reports Namespace: - Deprecate reports/get_storage, reports/get_activity, reports/get_membership, reports/get_devices routes Co-authored-by: jorges26 <[email protected]>
1 parent 0ba804f commit 822caa8

File tree

3 files changed

+190
-7
lines changed

3 files changed

+190
-7
lines changed

files.stone

+146-2
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,7 @@ struct ExportMetadata
725725
For more information see our :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
726726

727727
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."
728+
"If the file is a Paper doc, this gives the latest doc revision which can be used in :route:`paper/update`."
730729

731730
example default
732731
name = "Prime_Numbers.xlsx"
@@ -3070,3 +3069,148 @@ route get_file_lock_batch (LockFileBatchArg, LockFileBatchResult, LockFileError)
30703069
#
30713070
# END OF FILE LOCKING
30723071
#
3072+
3073+
3074+
#
3075+
# Paper routes
3076+
#
3077+
3078+
union ImportFormat
3079+
"The import format of the incoming Paper doc content."
3080+
3081+
html
3082+
"The provided data is interpreted as standard HTML."
3083+
markdown
3084+
"The provided data is interpreted as markdown."
3085+
plain_text
3086+
"The provided data is interpreted as plain text."
3087+
3088+
3089+
union PaperContentError
3090+
insufficient_permissions
3091+
"Your account does not have permissions to edit Paper docs."
3092+
content_malformed
3093+
"The provided content was malformed and cannot be imported to Paper."
3094+
doc_length_exceeded
3095+
"The Paper doc would be too large, split the content into multiple docs."
3096+
image_size_exceeded
3097+
"The imported document contains an image that is too large. The current limit is 1MB.
3098+
This only applies to HTML with data URI."
3099+
3100+
3101+
struct PaperCreateArg
3102+
3103+
path Path
3104+
"The fully qualified path to the location in the user's Dropbox where the Paper Doc should be created.
3105+
This should include the document's title and end with .paper."
3106+
import_format ImportFormat
3107+
"The format of the provided data."
3108+
3109+
example default
3110+
path = "/Paper Docs/New Doc.paper"
3111+
import_format = html
3112+
3113+
3114+
struct PaperCreateResult
3115+
3116+
url String
3117+
"URL to open the Paper Doc."
3118+
result_path String
3119+
"The fully qualified path the Paper Doc was actually created at."
3120+
file_id FileId
3121+
"The id to use in Dropbox APIs when referencing the Paper Doc."
3122+
paper_revision Int64
3123+
"The current doc revision."
3124+
3125+
example default
3126+
url = "https://www.dropbox.com/scl/xxx.paper?dl=0"
3127+
result_path = "/Paper Docs/New Doc.paper"
3128+
file_id = "id:a4ayc_80_OEAAAAAAAAAXw"
3129+
paper_revision = 1
3130+
3131+
3132+
union PaperCreateError extends PaperContentError
3133+
invalid_path
3134+
"The file could not be saved to the specified location."
3135+
email_unverified
3136+
"The user's email must be verified to create Paper docs."
3137+
invalid_file_extension
3138+
"The file path must end in .paper."
3139+
paper_disabled
3140+
"Paper is disabled for your team."
3141+
3142+
union PaperDocUpdatePolicy
3143+
update
3144+
"Sets the doc content to the provided content if the provided paper_revision matches the latest doc revision.
3145+
Otherwise, returns an error."
3146+
overwrite
3147+
"Sets the doc content to the provided content without checking paper_revision."
3148+
prepend
3149+
"Adds the provided content to the beginning of the doc without checking paper_revision."
3150+
append
3151+
"Adds the provided content to the end of the doc without checking paper_revision."
3152+
3153+
3154+
struct PaperUpdateArg
3155+
3156+
path WritePathOrId
3157+
"Path in the user's Dropbox to update. The path must correspond to a Paper doc or an error will be returned."
3158+
import_format ImportFormat
3159+
"The format of the provided data."
3160+
doc_update_policy PaperDocUpdatePolicy
3161+
"How the provided content should be applied to the doc."
3162+
paper_revision Int64?
3163+
"The latest doc revision. Required when doc_update_policy is update.
3164+
This value must match the current revision of the doc or error revision_mismatch will be returned."
3165+
3166+
example default
3167+
path = "/Paper Docs/My Doc.paper"
3168+
import_format = html
3169+
doc_update_policy = update
3170+
paper_revision = 123
3171+
3172+
3173+
struct PaperUpdateResult
3174+
3175+
paper_revision Int64
3176+
"The current doc revision."
3177+
3178+
example default
3179+
paper_revision = 124
3180+
3181+
3182+
union PaperUpdateError extends PaperContentError
3183+
path LookupError
3184+
revision_mismatch
3185+
"The provided revision does not match the document head."
3186+
doc_archived
3187+
"This operation is not allowed on archived Paper docs."
3188+
doc_deleted
3189+
"This operation is not allowed on deleted Paper docs."
3190+
3191+
3192+
route paper/create (PaperCreateArg, PaperCreateResult, PaperCreateError)
3193+
"
3194+
Creates a new Paper doc with the provided content.
3195+
"
3196+
3197+
attrs
3198+
is_preview = true
3199+
style = "upload"
3200+
scope = "files.content.write"
3201+
3202+
3203+
route paper/update (PaperUpdateArg, PaperUpdateResult, PaperUpdateError)
3204+
"
3205+
Updates an existing Paper doc with the provided content.
3206+
"
3207+
3208+
attrs
3209+
is_preview = true
3210+
style = "upload"
3211+
scope = "files.content.write"
3212+
3213+
3214+
#
3215+
# End of Paper routes
3216+
#

team_log_generated.stone

+35-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ union ClassificationPolicyEnumWrapper
323323
enabled
324324

325325
union ClassificationType
326-
"The type of classification (currently only PII)"
326+
"The type of classification (currently only personal information)"
327+
personal_information
327328
pii
328329

329330
union ComputerBackupPolicy
@@ -349,6 +350,10 @@ union DeviceUnlinkPolicy
349350
keep
350351
remove
351352

353+
union DispositionActionType
354+
automatic_delete
355+
automatic_permanently_delete
356+
352357
union DownloadPolicyType
353358
"Shared content downloads policy"
354359
allow
@@ -2025,6 +2030,24 @@ struct GovernancePolicyAddFolderFailedDetails
20252030
folder = "abc"
20262031
reason = "abc"
20272032

2033+
struct GovernancePolicyContentDisposedDetails
2034+
"Content disposed."
2035+
2036+
governance_policy_id String
2037+
"Policy ID."
2038+
name String
2039+
"Policy name."
2040+
policy_type PolicyType?
2041+
"Policy type."
2042+
disposition_type DispositionActionType
2043+
"Disposition type."
2044+
2045+
example default
2046+
governance_policy_id = "abc"
2047+
name = "abc"
2048+
policy_type = retention
2049+
disposition_type = automatic_delete
2050+
20282051
struct GovernancePolicyCreateDetails
20292052
"Activated a new policy."
20302053

@@ -6398,6 +6421,7 @@ union EventDetails
63986421
file_unresolve_comment_details FileUnresolveCommentDetails
63996422
governance_policy_add_folders_details GovernancePolicyAddFoldersDetails
64006423
governance_policy_add_folder_failed_details GovernancePolicyAddFolderFailedDetails
6424+
governance_policy_content_disposed_details GovernancePolicyContentDisposedDetails
64016425
governance_policy_create_details GovernancePolicyCreateDetails
64026426
governance_policy_delete_details GovernancePolicyDeleteDetails
64036427
governance_policy_edit_details_details GovernancePolicyEditDetailsDetails
@@ -6957,6 +6981,12 @@ struct GovernancePolicyAddFolderFailedType
69576981
example default
69586982
description = "(data_governance) Couldn't add a folder to a policy"
69596983

6984+
struct GovernancePolicyContentDisposedType
6985+
description String
6986+
6987+
example default
6988+
description = "(data_governance) Content disposed"
6989+
69606990
struct GovernancePolicyCreateType
69616991
description String
69626992

@@ -9637,6 +9667,8 @@ union EventType
96379667
"(data_governance) Added folders to policy"
96389668
governance_policy_add_folder_failed GovernancePolicyAddFolderFailedType
96399669
"(data_governance) Couldn't add a folder to a policy"
9670+
governance_policy_content_disposed GovernancePolicyContentDisposedType
9671+
"(data_governance) Content disposed"
96409672
governance_policy_create GovernancePolicyCreateType
96419673
"(data_governance) Activated a new policy"
96429674
governance_policy_delete GovernancePolicyDeleteType
@@ -10561,6 +10593,8 @@ union EventTypeArg
1056110593
"(data_governance) Added folders to policy"
1056210594
governance_policy_add_folder_failed
1056310595
"(data_governance) Couldn't add a folder to a policy"
10596+
governance_policy_content_disposed
10597+
"(data_governance) Content disposed"
1056410598
governance_policy_create
1056510599
"(data_governance) Activated a new policy"
1056610600
governance_policy_delete

team_reports.stone

+9-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ struct GetStorageReport extends BaseDfbReport
7171
If there is no data for a day, the storage summary will be empty."
7272

7373
route reports/get_storage(DateRange, GetStorageReport, DateRangeError) deprecated
74-
"Retrieves reporting data about a team's storage usage."
74+
"Retrieves reporting data about a team's storage usage.
75+
Deprecated: Will be removed on July 1st 2021."
7576
attrs
7677
auth = "team"
7778
scope = "team_info.read"
@@ -116,7 +117,8 @@ struct GetActivityReport extends BaseDfbReport
116117
"Array of the total number of views to shared links created by the team."
117118

118119
route reports/get_activity(DateRange, GetActivityReport, DateRangeError) deprecated
119-
"Retrieves reporting data about a team's user activity."
120+
"Retrieves reporting data about a team's user activity.
121+
Deprecated: Will be removed on July 1st 2021."
120122
attrs
121123
auth = "team"
122124
scope = "team_info.read"
@@ -144,7 +146,8 @@ struct GetMembershipReport extends BaseDfbReport
144146

145147

146148
route reports/get_membership(DateRange, GetMembershipReport, DateRangeError) deprecated
147-
"Retrieves reporting data about a team's membership."
149+
"Retrieves reporting data about a team's membership.
150+
Deprecated: Will be removed on July 1st 2021."
148151
attrs
149152
auth = "team"
150153
scope = "team_info.read"
@@ -191,7 +194,9 @@ struct GetDevicesReport extends BaseDfbReport
191194

192195

193196
route reports/get_devices(DateRange, GetDevicesReport, DateRangeError) deprecated
194-
"Retrieves reporting data about a team's linked devices."
197+
"Retrieves reporting data about a team's linked devices.
198+
Deprecated: Will be removed on July 1st 2021."
199+
195200
attrs
196201
auth = "team"
197202
scope = "team_info.read"

0 commit comments

Comments
 (0)