-
Notifications
You must be signed in to change notification settings - Fork 41
/
team_folders.stone
341 lines (254 loc) · 9.91 KB
/
team_folders.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
namespace team
import async
import common
import files
# Common structs
union TeamFolderStatus
active
"The team folder and sub-folders are available to all members."
archived
"The team folder is not accessible outside of the team folder manager."
archive_in_progress
"The team folder is not accessible outside of the team folder manager."
struct TeamFolderIdArg
team_folder_id common.SharedFolderId
"The ID of the team folder."
example default
team_folder_id = "123456789"
struct TeamFolderIdListArg
team_folder_ids List(common.SharedFolderId, min_items=1)
"The list of team folder IDs."
example default
team_folder_ids = ["947182", "5819424", "852307532"]
struct TeamFolderMetadata
"Properties of a team folder."
team_folder_id common.SharedFolderId
"The ID of the team folder."
name String
"The name of the team folder."
status TeamFolderStatus
"The status of the team folder."
is_team_shared_dropbox Boolean
"True if this team folder is a shared team root."
sync_setting files.SyncSetting
"The sync setting applied to this team folder."
content_sync_settings List(files.ContentSyncSetting)
"Sync settings applied to contents of this team folder."
example default
name = "Marketing"
team_folder_id = "123456789"
status = active
is_team_shared_dropbox = false
sync_setting = default
content_sync_settings = [default]
union TeamFolderAccessError
invalid_team_folder_id
"The team folder ID is invalid."
no_access
"The authenticated app does not have permission to manage that team folder."
union TeamFolderInvalidStatusError
active
"The folder is active and the operation did not succeed."
archived
"The folder is archived and the operation did not succeed."
archive_in_progress
"The folder is being archived and the operation did not succeed."
union TeamFolderTeamSharedDropboxError
disallowed
"This action is not allowed for a shared team root."
union BaseTeamFolderError
"Base error that all errors for existing team folders should extend."
access_error TeamFolderAccessError
status_error TeamFolderInvalidStatusError
team_shared_dropbox_error TeamFolderTeamSharedDropboxError
#
# Team folder create
#
route team_folder/create(TeamFolderCreateArg, TeamFolderMetadata, TeamFolderCreateError)
"Creates a new, active, team folder with no members. This endpoint can only be used for teams
that do not already have a shared team space.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.write"
struct TeamFolderCreateArg
name String
"Name for the new team folder."
sync_setting files.SyncSettingArg?
"The sync setting to apply to this team folder. Only permitted if the team has team selective sync enabled."
example default
name = "Marketing"
sync_setting = not_synced
union TeamFolderCreateError
invalid_folder_name
"The provided name cannot be used."
folder_name_already_used
"There is already a team folder with the provided name."
folder_name_reserved
"The provided name cannot be used because it is reserved."
sync_settings_error files.SyncSettingsError
"An error occurred setting the sync settings."
#
# Team folder rename
#
route team_folder/rename(TeamFolderRenameArg, TeamFolderMetadata, TeamFolderRenameError)
"Changes an active team folder's name.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.write"
struct TeamFolderRenameArg extends TeamFolderIdArg
name String
"New team folder name."
example default
team_folder_id = "123456789"
name = "Sales"
union TeamFolderRenameError extends BaseTeamFolderError
invalid_folder_name
"The provided folder name cannot be used."
folder_name_already_used
"There is already a team folder with the same name."
folder_name_reserved
"The provided name cannot be used because it is reserved."
#
# Team folder list
#
route team_folder/list(TeamFolderListArg, TeamFolderListResult, TeamFolderListError)
"Lists all team folders.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.read"
struct TeamFolderListArg
limit UInt32(min_value=1, max_value=1000) = 1000
"The maximum number of results to return per request."
example default
limit = 100
struct TeamFolderListResult
"Result for :route:`team_folder/list` and :route:`team_folder/list/continue`."
team_folders List(TeamFolderMetadata)
"List of all team folders in the authenticated team."
cursor String
"Pass the cursor into :route:`team_folder/list/continue` to obtain additional team folders."
has_more Boolean
"Is true if there are additional team folders that have not been returned
yet. An additional call to :route:`team_folder/list/continue` can retrieve them."
example default
team_folders = [default]
cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu"
has_more = false
struct TeamFolderListError
access_error TeamFolderAccessError
#
# Team folder list/continue
#
route team_folder/list/continue(TeamFolderListContinueArg, TeamFolderListResult, TeamFolderListContinueError)
"Once a cursor has been retrieved from :route:`team_folder/list`, use this to paginate
through all team folders.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.read"
struct TeamFolderListContinueArg
cursor String
"Indicates from what point to get the next set of team folders."
example default
cursor = "ZtkX9_EHj3x7PMkVuFIhwKYXEpwpLwyxp9vMKomUhllil9q7eWiAu"
union TeamFolderListContinueError
invalid_cursor
"The cursor is invalid."
#
# Team folder get info
#
route team_folder/get_info(TeamFolderIdListArg, List(TeamFolderGetInfoItem), Void)
"Retrieves metadata for team folders.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.read"
union_closed TeamFolderGetInfoItem
id_not_found String
"An ID that was provided as a parameter to :route:`team_folder/get_info` did not
match any of the team's team folders."
team_folder_metadata TeamFolderMetadata
"Properties of a team folder."
#
# Team folder activate
#
route team_folder/activate(TeamFolderIdArg, TeamFolderMetadata, TeamFolderActivateError)
"Sets an archived team folder's status to active.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.write"
union TeamFolderActivateError extends BaseTeamFolderError
""
#
# Team folder archive
#
route team_folder/archive(TeamFolderArchiveArg, TeamFolderArchiveLaunch, TeamFolderArchiveError)
"Sets an active team folder's status to archived and removes all folder and file members.
This endpoint cannot be used for teams that have a shared team space.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.write"
struct TeamFolderArchiveArg extends TeamFolderIdArg
force_async_off Boolean = false
"Whether to force the archive to happen synchronously."
example default
team_folder_id = "123456789"
force_async_off = false
union_closed TeamFolderArchiveLaunch extends async.LaunchResultBase
complete TeamFolderMetadata
example default
complete = default
example async_job_id
async_job_id = "34g93hh34h04y384084"
union TeamFolderArchiveError extends BaseTeamFolderError
""
route team_folder/archive/check(async.PollArg, TeamFolderArchiveJobStatus, async.PollError)
"Returns the status of an asynchronous job for archiving a team folder.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.write"
union_closed TeamFolderArchiveJobStatus extends async.PollResultBase
complete TeamFolderMetadata
"The archive job has finished. The value is the metadata for the resulting team folder."
failed TeamFolderArchiveError
"Error occurred while performing an asynchronous job from :route:`team_folder/archive`."
example default
complete = default
#
# Team folder permanently delete
#
route team_folder/permanently_delete(TeamFolderIdArg, Void, TeamFolderPermanentlyDeleteError)
"Permanently deletes an archived team folder. This endpoint cannot be used for teams
that have a shared team space.
Permission : Team member file access."
attrs
auth = "team"
scope = "team_data.content.write"
union TeamFolderPermanentlyDeleteError extends BaseTeamFolderError
""
#
# Team folder update_sync_settings
#
struct TeamFolderUpdateSyncSettingsArg extends TeamFolderIdArg
sync_setting files.SyncSettingArg?
"Sync setting to apply to the team folder itself. Only meaningful if the team folder is not a shared team root."
content_sync_settings List(files.ContentSyncSettingArg)?
"Sync settings to apply to contents of this team folder."
example default
team_folder_id = "123456789"
sync_setting = default
content_sync_settings = [default]
union TeamFolderUpdateSyncSettingsError extends BaseTeamFolderError
sync_settings_error files.SyncSettingsError
"An error occurred setting the sync settings."
route team_folder/update_sync_settings(TeamFolderUpdateSyncSettingsArg, TeamFolderMetadata, TeamFolderUpdateSyncSettingsError)
"Updates the sync settings on a team folder or its contents. Use of this endpoint requires that the team has team selective sync enabled."
attrs
auth = "team"
scope = "team_data.content.write"