import { IGlyph } from '../icon'; export declare enum FileType { AUDIO = 0, VIDEO = 1, WORD = 2, TEXT = 3, ZIP = 4, EXCEL = 5, PPT = 6, PDF = 7, CODE = 8, IMAGE = 9, SVG = 10, DEFAULT = 11, AI = 12, THREE_D = 13 } export declare const FILE_GLYPH_MAP: { [key in FileType]: IGlyph; }; export declare const FILE_TYPE_MAP: { [key: string]: FileType; }; export declare const MIME_TYPE_MAP: { [key: string]: FileType; }; export declare const ACCEPT_MAP: { [key: string]: string[]; }; export declare const REVERSE_ACCEPT_MAP: { [key: string]: string; }; export interface IUploadOptions { prefix?: string; storeTo?: string; timeout?: number; meta?: any; generateAdobeIllustratorImages?: boolean; } export interface IUploadLimits { fileMimeType?: string[]; maxFileCount?: number; maxFileSize?: number; singleFileSize?: number; } export interface IUploadEvents { onDone?: (file: IUploadAttachment) => void; onRemove?: (file: IAttachment) => void; onSuccess?: (files: IUploadAttachment[], queueId?: string) => void; onError?: (message: string, error?: IUploadError) => void; onAbort?: (file: IUploadAttachment) => void; onProgress?: (fileId: string, loaded: number, total: number) => void; } export interface IAttachment { fileId: string; fileName: string; fileType: string; fileKey: string; fileSize: number; largeThumbUrl: string; mediumThumbUrl: string; smallThumbUrl: string; url: string; } export interface IUploadError { status: IUpload['status']; body: string; } export interface IUploadWarn { fileName: string; warnValue?: any; warnCode: UploadWarnCodes; } export interface IUpload { url: string; status: 'ready' | 'uploading' | 'aborted' | 'error' | 'done'; open: () => Promise; retry: () => Promise; abort: () => void; onProgress?: (loaded: number, total: number) => void; onSuccess?: (self: IUpload) => void; onError?: (error: IUploadError, self: IUpload) => void; onAbort?: (self: IUpload) => void; } export interface IUploadAttachment extends IAttachment { upload?: IUpload; } export declare enum DownloadErrorCodes { WEB_BROWER_NOT_SUPPORT = "WEB_BROWER_NOT_SUPPORT", DOWNLOAD_FAIL = "DOWNLOAD_FAIL", NETWORK_FAIL = "NETWORK_FAIL" } export declare enum UploadWarnCodes { MAX_COUNT = "MAX_COUNT", SINGLE_FILE_SIZE = "SINGLE_FILE_SIZE", MAX_FILE_SIZE = "MAX_FILE_SIZE", FILE_MIME = "FILE_MIME" } export declare const DOWNLOAD_CODES: { WEB_BROWER_NOT_SUPPORT: string; DOWNLOAD_FAIL: string; NETWORK_FAIL: string; }; export declare const UPLOAD_CODES: { MAX_COUNT: string; SINGLE_FILE_SIZE: string; MAX_FILE_SIZE: string; FILE_MIME: string; };