| 1 | export interface FileAccount { |
| 2 | id: string; |
| 3 | name: string; |
| 4 | username: string; |
| 5 | subject: string; |
| 6 | } |
| 7 | |
| 8 | export interface FolderGrant { |
| 9 | id: string; |
| 10 | subject: string; |
| 11 | path: string; |
| 12 | permissions: string; |
| 13 | } |
| 14 | |
| 15 | export interface SharedLink { |
| 16 | key: string; |
| 17 | name: string; |
| 18 | path: string; |
| 19 | permissions: string; |
| 20 | owner: string; |
| 21 | created: number; |
| 22 | expires: number; |
| 23 | hasPassword: boolean; |
| 24 | files: string[]; |
| 25 | } |
| 26 | |
| 27 | export interface ShareState { |
| 28 | root: string; |
| 29 | defaultRoot: string; |
| 30 | filesUrl: string | null; |
| 31 | accounts: FileAccount[]; |
| 32 | grants: FolderGrant[]; |
| 33 | links: SharedLink[]; |
| 34 | } |
| 35 | |
| 36 | export interface LinkInput { |
| 37 | name: string; |
| 38 | path: string; |
| 39 | permissions: string; |
| 40 | expires: number; |
| 41 | password: string | null; |
| 42 | } |
| 43 | |
| 44 | export type AccountSecret = ShareState & { account: FileAccount; password: string }; |