import { UploadChunkData } from '../api';
import * as utils from '../utils';
import Base, { Extra } from './base';
export interface UploadedChunkStorage extends UploadChunkData {
    size: number;
}
export interface ChunkLoaded {
    mkFileProgress: 0 | 1;
    chunks: number[];
}
export interface ChunkInfo {
    chunk: Blob;
    index: number;
}
export interface LocalInfo {
    data: UploadedChunkStorage[];
    id: string;
}
export interface ChunkPart {
    etag: string;
    partNumber: number;
}
export interface UploadChunkBody extends Extra {
    parts: ChunkPart[];
}
export default class Resume extends Base {
    /**
     * @description 文件的分片 chunks
     */
    private chunks;
    /**
     * @description 使用缓存的 chunks
     */
    private usedCacheList;
    /**
     * @description 来自缓存的上传信息
     */
    private cachedUploadedList;
    /**
     * @description 当前上传过程中已完成的上传信息
     */
    private uploadedList;
    /**
     * @description 当前上传片进度信息
     */
    private loaded;
    /**
     * @description 当前上传任务的 id
     */
    private uploadId;
    /**
     * @returns  {Promise<ResponseSuccess<any>>}
     * @description 实现了 Base 的 run 接口，处理具体的分片上传事务，并抛出过程中的异常。
     */
    protected run(): Promise<utils.ResponseSuccess<any>>;
    private uploadChunk;
    private mkFileReq;
    private initBeforeUploadChunks;
    private getUploadInfo;
    private getLocalKey;
    private updateLocalCache;
    private updateChunkProgress;
    private updateMkFileProgress;
    private notifyResumeProgress;
}
