| export type RepoType = 'model' | 'dataset' | 'space'; |
|
|
| export interface HFConfig { |
| token: string; |
| repo: string; |
| repoType: RepoType; |
| } |
|
|
| export enum UploadStatus { |
| IDLE = 'IDLE', |
| UPLOADING = 'UPLOADING', |
| SUCCESS = 'SUCCESS', |
| ERROR = 'ERROR', |
| } |
|
|
| export interface FileItem { |
| id: string; |
| file: File; |
| status: UploadStatus; |
| path: string; |
| error?: string; |
| url?: string; |
| } |
|
|
| export interface RemoteFile { |
| path: string; |
| size: number; |
| url: string; |
| } |
|
|
| export type UploadCallback = (id: string, status: UploadStatus, error?: string, url?: string) => void; |