|
1 | 1 | // @flow |
| 2 | +import type { CollaborationRole, Item, SharedLink } from '@box/unified-share-modal'; |
| 3 | + |
2 | 4 | import type { |
3 | 5 | Access, |
4 | 6 | BoxItemClassification, |
@@ -153,123 +155,6 @@ export type ConvertCollabOptions = { |
153 | 155 | ownerEmail: ?string, |
154 | 156 | }; |
155 | 157 |
|
156 | | -// ContentSharingV2 types |
157 | | -interface Enterprise { |
158 | | - name?: string; |
159 | | -} |
160 | | - |
161 | | -export interface User { |
162 | | - id: string; |
163 | | - enterprise: Enterprise; |
164 | | -} |
165 | | - |
166 | | -export interface SharedLink { |
167 | | - /** |
168 | | - * The access level of the shared link. |
169 | | - */ |
170 | | - access?: AccessLevelType; |
171 | | - /** |
172 | | - * The available access levels for the shared link. The allowed levels are dependent on the Enterprise settings. |
173 | | - */ |
174 | | - accessLevels?: (AccessLevel | AccessLevelType)[]; |
175 | | - /** |
176 | | - * The expiration timestamp of the shared link to indicate when the item will be unshared. |
177 | | - */ |
178 | | - expiresAt?: number; |
179 | | - /** |
180 | | - * The permission level of the shared link. |
181 | | - */ |
182 | | - permission?: PermissionLevelType; |
183 | | - /** |
184 | | - * The available permission levels for the shared link. The allowed levels are dependent on the Item and Enterprise settings. |
185 | | - */ |
186 | | - permissionLevels?: (PermissionLevel | PermissionLevelType)[]; |
187 | | - /** |
188 | | - * The configuration options and permissions for managing the shared link settings. |
189 | | - */ |
190 | | - settings?: SharedLinkSettings; |
191 | | - /** |
192 | | - * The URL that can be used to access the shared item. |
193 | | - */ |
194 | | - url: string; |
195 | | - /** |
196 | | - * The static domain portion of the shared link. Used with `vanityName` to preview the custom URL. |
197 | | - */ |
198 | | - vanityDomain?: string; |
199 | | - /** |
200 | | - * The custom name of the shared link. Used with `vanityDomain` to preview the custom URL. |
201 | | - */ |
202 | | - vanityName?: string; |
203 | | -} |
204 | | - |
205 | | -export interface CollaborationRole { |
206 | | - /** |
207 | | - * The description for the role. Supported roles have default descriptions. |
208 | | - */ |
209 | | - description?: string; |
210 | | - /** |
211 | | - * The ID of the role. The value must be one of the supported roles within the Enterprise. |
212 | | - * |
213 | | - * If the value does not match a supported role, the role is treated as a custom collaboration role. |
214 | | - */ |
215 | | - id: InvitationRole | string; |
216 | | - /** |
217 | | - * When `true`, the role will be the default selected collaboration role. |
218 | | - */ |
219 | | - isDefault?: boolean; |
220 | | - /** |
221 | | - * When `true`, the role will be disabled when selecting a collaboration role. |
222 | | - */ |
223 | | - isDisabled?: boolean; |
224 | | - /** |
225 | | - * The label for the role. Supported roles have default labels. |
226 | | - */ |
227 | | - label?: string; |
228 | | -} |
229 | | - |
230 | | -export interface Classification { |
231 | | - colorId: number; |
232 | | - definition: string; |
233 | | - name: string; |
234 | | - restrictions?: string; |
235 | | -} |
236 | | - |
237 | | -export interface Item { |
238 | | - /** |
239 | | - * The classification of the item. |
240 | | - */ |
241 | | - classification?: Classification; |
242 | | - /** |
243 | | - * The ID of the item. |
244 | | - */ |
245 | | - id: string; |
246 | | - /** |
247 | | - * The name of the item. |
248 | | - */ |
249 | | - name: string; |
250 | | - /** |
251 | | - * The permissions that the current user has for the item. |
252 | | - */ |
253 | | - permissions?: { |
254 | | - /** |
255 | | - * When `true`, the user can invite collaborators on the item. |
256 | | - */ |
257 | | - canInviteCollaborator?: boolean, |
258 | | - /** |
259 | | - * When `true`, the user can change the access level of the shared link. |
260 | | - */ |
261 | | - canSetShareAccess?: boolean, |
262 | | - /** |
263 | | - * When `true`, the user can create a shared link for the item. |
264 | | - */ |
265 | | - canShare?: boolean, |
266 | | - }; |
267 | | - /** |
268 | | - * The type of the item. |
269 | | - */ |
270 | | - type: ItemType; |
271 | | -} |
272 | | - |
273 | 158 | export interface ItemData { |
274 | 159 | collaborationRoles: CollaborationRole[]; |
275 | 160 | item: Item; |
|
0 commit comments