File size: 632 Bytes
ca60b56 |
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 |
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; // Destination path in repo
error?: string;
url?: string; // URL to the file after upload
}
export interface RemoteFile {
path: string;
size: number;
url: string;
}
export type UploadCallback = (id: string, status: UploadStatus, error?: string, url?: string) => void; |