|
1 | 1 | // This file contains TypeScript definitions converted from Flow types in core.js |
2 | | -import { DELIMITER_SLASH, DELIMITER_CARET } from '../../constants'; |
| 2 | +import { |
| 3 | + DELIMITER_SLASH, |
| 4 | + DELIMITER_CARET, |
| 5 | + FIELD_DATE, |
| 6 | + FIELD_NAME, |
| 7 | + FIELD_RELEVANCE, |
| 8 | + FIELD_SIZE, |
| 9 | + SORT_ASC, |
| 10 | + SORT_DESC, |
| 11 | + VIEW_ERROR, |
| 12 | + VIEW_SELECTED, |
| 13 | + VIEW_RECENTS, |
| 14 | + VIEW_FOLDER, |
| 15 | + VIEW_SEARCH, |
| 16 | + VIEW_UPLOAD_EMPTY, |
| 17 | + VIEW_UPLOAD_IN_PROGRESS, |
| 18 | + VIEW_UPLOAD_SUCCESS, |
| 19 | + VIEW_METADATA, |
| 20 | + ITEM_TYPE_FOLDER, |
| 21 | + ITEM_TYPE_FILE, |
| 22 | + ITEM_TYPE_WEBLINK, |
| 23 | + ITEM_TYPE_HUBS, |
| 24 | +} from '../../constants'; |
3 | 25 |
|
4 | 26 | export type Delimiter = typeof DELIMITER_SLASH | typeof DELIMITER_CARET; |
5 | 27 |
|
| 28 | +export type SortBy = typeof FIELD_DATE | typeof FIELD_NAME | typeof FIELD_RELEVANCE | typeof FIELD_SIZE; |
| 29 | +export type SortDirection = typeof SORT_ASC | typeof SORT_DESC; |
| 30 | +export type View = |
| 31 | + | typeof VIEW_ERROR |
| 32 | + | typeof VIEW_SELECTED |
| 33 | + | typeof VIEW_RECENTS |
| 34 | + | typeof VIEW_FOLDER |
| 35 | + | typeof VIEW_SEARCH |
| 36 | + | typeof VIEW_UPLOAD_EMPTY |
| 37 | + | typeof VIEW_UPLOAD_IN_PROGRESS |
| 38 | + | typeof VIEW_UPLOAD_SUCCESS |
| 39 | + | typeof VIEW_METADATA; |
| 40 | + |
| 41 | +export type ItemType = |
| 42 | + | typeof ITEM_TYPE_FOLDER |
| 43 | + | typeof ITEM_TYPE_FILE |
| 44 | + | typeof ITEM_TYPE_HUBS |
| 45 | + | typeof ITEM_TYPE_WEBLINK; |
| 46 | + |
| 47 | +export type StringMap = { [key: string]: string }; |
| 48 | +export type Token = null | undefined | string | ((options?: Record<string, unknown>) => string); |
| 49 | + |
| 50 | +export interface DOMStringList { |
| 51 | + contains: (strToSearch: string) => boolean; |
| 52 | + item: (index: number) => string | null; |
| 53 | + length: number; |
| 54 | +} |
| 55 | + |
| 56 | +export interface Order { |
| 57 | + by: SortBy; |
| 58 | + direction: SortDirection; |
| 59 | +} |
| 60 | + |
| 61 | +export interface Collection { |
| 62 | + boxItem?: BoxItem; |
| 63 | + breadcrumbs?: Crumb[]; |
| 64 | + id?: string; |
| 65 | + items?: BoxItem[]; |
| 66 | + name?: string; |
| 67 | + nextMarker?: string | null; |
| 68 | + offset?: number; |
| 69 | + percentLoaded?: number; |
| 70 | + permissions?: BoxItemPermission; |
| 71 | + sortBy?: SortBy; |
| 72 | + sortDirection?: SortDirection; |
| 73 | + totalCount?: number; |
| 74 | +} |
| 75 | + |
6 | 76 | export interface Crumb { |
7 | 77 | id?: string; |
8 | 78 | name: string; |
|
0 commit comments