import { Logger } from '../utils'; /** @experimental */ export interface UploadListEntry { /** upload id */ id: string; createdAt: string | Date | number; expiredAt?: string | Date | number; modifiedAt?: string | Date | number; } /** @experimental */ export interface UploadList { items: UploadListEntry[]; prefix?: string; } export interface MetaStorageOptions { prefix?: string; suffix?: string; logger?: Logger; } /** * Stores upload metadata */ export declare class MetaStorage { prefix: string; suffix: string; logger: Logger; constructor(config?: MetaStorageOptions); /** * Saves upload metadata */ save(id: string, file: T): Promise; /** * Deletes an upload metadata */ delete(id: string): Promise; /** * Retrieves upload metadata */ get(id: string): Promise; /** * Mark upload active */ touch(id: string, file: T): Promise; /** * Retrieves a list of uploads whose names begin with the prefix * @experimental */ list(prefix?: string): Promise; getMetaName(id: string): string; getIdFromMetaName(name: string): string; } /** * @deprecated Use MetaStorage.suffix instead */ export declare const METAFILE_EXTNAME = ".META";