import { AxiosError } from 'axios';
import AttachmentFile from '../data-set/AttachmentFile';
import { getConfig } from '../configure';
import AttachmentFileChunk from '../data-set/AttachmentFileChunk';
export interface UploaderProps {
    /**
     *  可接受的上传文件类型
     */
    accept?: string[] | undefined;
    /**
     * 上传文件路径
     */
    action?: string | undefined;
    /**
     * 上传所需参数或者返回上传参数的方法
     */
    data?: object | Function | undefined;
    /**
     * 设置上传的请求头部
     */
    headers?: any | undefined;
    withCredentials?: boolean | undefined;
    fileKey?: string | undefined;
    fileSize?: number | undefined;
    chunkSize?: number | undefined;
    chunkThreads?: number | undefined;
    useChunk?: boolean | undefined;
    bucketName?: string | undefined;
    bucketDirectory?: string | undefined;
    storageCode?: string | undefined;
    isPublic?: boolean | undefined;
    beforeUpload?: ((attachment: AttachmentFile, attachments: AttachmentFile[], chunk?: AttachmentFileChunk) => boolean | undefined | PromiseLike<boolean | undefined>) | undefined;
    onUploadProgress?: ((percent: number, attachment: AttachmentFile) => void) | undefined;
    onUploadSuccess?: ((response: any, attachment: AttachmentFile, useChunk?: boolean) => void) | undefined;
    onUploadError?: ((error: AxiosError, response: any, attachment: AttachmentFile) => void) | undefined;
}
export default class Uploader {
    private props;
    private context;
    constructor(props: UploaderProps, context?: {
        getConfig: typeof getConfig;
    });
    setProps(props: UploaderProps): void;
    upload(attachment: AttachmentFile, attachments?: AttachmentFile[], tempAttachmentUUID?: string | undefined): Promise<any>;
}
