-
Notifications
You must be signed in to change notification settings - Fork 41
/
team_legal_holds.stone
365 lines (299 loc) · 12.1 KB
/
team_legal_holds.stone
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
namespace team
import common
import team_common
import files
alias LegalHoldId = String(pattern="^pid_dbhid:.+")
alias LegalHoldPolicyName = String(max_length=140)
alias LegalHoldPolicyDescription = String(max_length=501)
alias Path = String(pattern="(/(.|[\\r\\n])*)?")
union LegalHoldStatus
active
"The legal hold policy is active."
released
"The legal hold policy was released."
activating
"The legal hold policy is activating."
updating
"The legal hold policy is updating."
exporting
"The legal hold policy is exporting."
releasing
"The legal hold policy is releasing."
struct MembersInfo
team_member_ids List(team_common.TeamMemberId)
"Team member IDs of the users under this hold."
permanently_deleted_users UInt64
"The number of permanently deleted users that were under this hold."
example default
team_member_ids = ["dbmid:efgh5678"]
permanently_deleted_users = 2
union LegalHoldsError
unknown_legal_hold_error
"There has been an unknown legal hold error."
insufficient_permissions
"You don't have permissions to perform this action."
struct LegalHoldPolicy
id LegalHoldId
"The legal hold id."
name LegalHoldPolicyName
"Policy name."
description LegalHoldPolicyDescription?
"A description of the legal hold policy."
activation_time common.DropboxTimestamp?
"The time at which the legal hold was activated."
members MembersInfo
"Team members IDs and number of permanently deleted members under hold."
status LegalHoldStatus
"The current state of the hold."
start_date common.DropboxTimestamp
"Start date of the legal hold policy."
end_date common.DropboxTimestamp?
"End date of the legal hold policy."
example default
id = "pid_dbhid:abcd1234"
name = "acme cfo policy"
activation_time = "2016-01-20T00:00:10Z"
members = default
status = active
start_date = "2016-01-01T00:00:00Z"
end_date = "2017-12-31T00:00:00Z"
#
# route legal_holds/create_policy
#
struct LegalHoldsPolicyCreateArg
name LegalHoldPolicyName
"Policy name."
description LegalHoldPolicyDescription?
"A description of the legal hold policy."
members List(team_common.TeamMemberId)
"List of team member IDs added to the hold."
start_date common.DropboxTimestamp?
"start date of the legal hold policy."
end_date common.DropboxTimestamp?
"end date of the legal hold policy."
example default
name = "acme cfo policy"
members = ["dbmid:FDFSVF-DFSDF"]
start_date = "2016-01-01T00:00:00Z"
end_date = "2017-12-31T00:00:00Z"
union LegalHoldsPolicyCreateError extends LegalHoldsError
start_date_is_later_than_end_date
"Start date must be earlier than end date."
empty_members_list
"The users list must have at least one user."
invalid_members
"Some members in the members list are not valid to be placed under legal hold."
number_of_users_on_hold_is_greater_than_hold_limitation
"You cannot add more than 5 users in a legal hold."
transient_error
"Temporary infrastructure failure, please retry."
name_must_be_unique
"The name provided is already in use by another legal hold."
team_exceeded_legal_hold_quota
"Team exceeded legal hold quota."
invalid_date
"The provided date is invalid."
alias LegalHoldsPolicyCreateResult = LegalHoldPolicy
route legal_holds/create_policy(LegalHoldsPolicyCreateArg, LegalHoldsPolicyCreateResult, LegalHoldsPolicyCreateError)
"Creates new legal hold policy.
Note: Legal Holds is a paid add-on. Not all teams have the feature.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.governance.write"
#
# route legal_holds/get_policy
#
struct LegalHoldsGetPolicyArg
id LegalHoldId
"The legal hold Id."
example default
id = "pid_dbhid:abcd1234"
alias LegalHoldsGetPolicyResult = LegalHoldPolicy
union LegalHoldsGetPolicyError extends LegalHoldsError
legal_hold_policy_not_found
"Legal hold policy does not exist for :field:`LegalHoldsGetPolicyArg.id`."
route legal_holds/get_policy(LegalHoldsGetPolicyArg, LegalHoldsGetPolicyResult, LegalHoldsGetPolicyError)
"Gets a legal hold by Id.
Note: Legal Holds is a paid add-on. Not all teams have the feature.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.governance.write"
#
# route legal_holds/list_policies
#
struct LegalHoldsListPoliciesArg
include_released Boolean = false
"Whether to return holds that were released."
example default
include_released = false
struct LegalHoldsListPoliciesResult
policies List(LegalHoldPolicy)
example default
policies = [default]
union LegalHoldsListPoliciesError extends LegalHoldsError
transient_error
"Temporary infrastructure failure, please retry."
route legal_holds/list_policies(LegalHoldsListPoliciesArg, LegalHoldsListPoliciesResult, LegalHoldsListPoliciesError)
"Lists legal holds on a team.
Note: Legal Holds is a paid add-on. Not all teams have the feature.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.governance.write"
#
# route legal_holds/list_held_revisions
#
struct LegalHoldsListHeldRevisionsArg
id LegalHoldId
"The legal hold Id."
example default
id = "pid_dbhid:abcd1234"
union LegalHoldsListHeldRevisionsError extends LegalHoldsError
transient_error
"Temporary infrastructure failure, please retry."
legal_hold_still_empty
"The legal hold is not holding any revisions yet."
inactive_legal_hold
"Trying to list revisions for an inactive legal hold."
struct LegalHoldHeldRevisionMetadata
new_filename String
"The held revision filename."
original_revision_id files.Rev
"The id of the held revision."
original_file_path Path
"The original path of the held revision."
server_modified common.DropboxTimestamp
"The last time the file was modified on Dropbox."
author_member_id team_common.TeamMemberId
"The member id of the revision's author."
author_member_status TeamMemberStatus
"The member status of the revision's author."
author_email common.EmailAddress
"The email address of the held revision author."
file_type String
"The type of the held revision's file."
size UInt64
"The file size in bytes."
content_hash files.Sha256HexHash
"A hash of the file content. This field can be used to verify data integrity. For more
information see our :link:`Content hash https://www.dropbox.com/developers/reference/content-hash` page."
example default
new_filename = "111_222.pdf"
original_revision_id = "ab2rij4i5ojgfd"
original_file_path = "/a.pdf"
server_modified = "2019-08-12T12:08:52Z"
author_member_id = "dbmid:abcd1234abcd1234abcd1234abcd1234a23"
author_member_status = active
author_email = "[email protected]"
file_type = "Document"
size = 3
content_hash = "abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234"
alias ListHeldRevisionCursor = String(min_length=1)
struct LegalHoldsListHeldRevisionResult
entries List(LegalHoldHeldRevisionMetadata)
"List of file entries that under the hold."
cursor ListHeldRevisionCursor?
"The cursor idicates where to continue reading file metadata entries for the next API call. When there are no more entries, the cursor will return none.
Pass the cursor into
/2/team/legal_holds/list_held_revisions/continue."
has_more Boolean
"True if there are more file entries that haven't been returned. You can retrieve them with a call to /legal_holds/list_held_revisions_continue."
example default
entries = [default]
has_more = false
route legal_holds/list_held_revisions(LegalHoldsListHeldRevisionsArg, LegalHoldsListHeldRevisionResult, LegalHoldsListHeldRevisionsError)
"List the file metadata that's under the hold.
Note: Legal Holds is a paid add-on. Not all teams have the feature.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.governance.write"
#
# route legal_holds/list_held_revisions_continue
#
struct LegalHoldsListHeldRevisionsContinueArg
id LegalHoldId
"The legal hold Id."
cursor ListHeldRevisionCursor?
"The cursor idicates where to continue reading file metadata entries for the next API call. When there are no more entries, the cursor will return none."
example default
id = "pid_dbhid:abcd1234"
union LegalHoldsListHeldRevisionsContinueError
unknown_legal_hold_error
"There has been an unknown legal hold error."
transient_error
"Temporary infrastructure failure, please retry."
reset
"Indicates that the cursor has been invalidated. Call
:route:`legal_holds/list_held_revisions_continue` again with an empty cursor to obtain a new cursor."
route legal_holds/list_held_revisions_continue(LegalHoldsListHeldRevisionsContinueArg, LegalHoldsListHeldRevisionResult, LegalHoldsListHeldRevisionsError)
"Continue listing the file metadata that's under the hold.
Note: Legal Holds is a paid add-on. Not all teams have the feature.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.governance.write"
#
# route legal_holds/update_policy
#
struct LegalHoldsPolicyUpdateArg
id LegalHoldId
"The legal hold Id."
name LegalHoldPolicyName?
"Policy new name."
description LegalHoldPolicyDescription?
"Policy new description."
members List(team_common.TeamMemberId)?
"List of team member IDs to apply the policy on."
example default
id = "pid_dbhid:abcd1234"
members = ["dbmid:FDFSVF-DFSDF"]
union LegalHoldsPolicyUpdateError extends LegalHoldsError
transient_error
"Temporary infrastructure failure, please retry."
inactive_legal_hold
"Trying to release an inactive legal hold."
legal_hold_performing_another_operation
"Legal hold is currently performing another operation."
invalid_members
"Some members in the members list are not valid to be placed under legal hold."
number_of_users_on_hold_is_greater_than_hold_limitation
"You cannot add more than 5 users in a legal hold."
empty_members_list
"The users list must have at least one user."
name_must_be_unique
"The name provided is already in use by another legal hold."
legal_hold_policy_not_found
"Legal hold policy does not exist for :field:`LegalHoldsPolicyUpdateArg.id`."
alias LegalHoldsPolicyUpdateResult = LegalHoldPolicy
route legal_holds/update_policy(LegalHoldsPolicyUpdateArg, LegalHoldsPolicyUpdateResult, LegalHoldsPolicyUpdateError)
"Updates a legal hold.
Note: Legal Holds is a paid add-on. Not all teams have the feature.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.governance.write"
#
# route legal_holds/release_policy
#
struct LegalHoldsPolicyReleaseArg
id LegalHoldId
"The legal hold Id."
example default
id = "pid_dbhid:abcd1234"
union LegalHoldsPolicyReleaseError extends LegalHoldsError
legal_hold_performing_another_operation
"Legal hold is currently performing another operation."
legal_hold_already_releasing
"Legal hold is currently performing a release or is already released."
legal_hold_policy_not_found
"Legal hold policy does not exist for :field:`LegalHoldsPolicyReleaseArg.id`."
route legal_holds/release_policy(LegalHoldsPolicyReleaseArg, Void, LegalHoldsPolicyReleaseError)
"Releases a legal hold by Id.
Note: Legal Holds is a paid add-on. Not all teams have the feature.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.governance.write"