import { Workbook } from '../core/workbook'; export interface DumperOptions { workbook: Workbook; } declare type FileContent = ArrayBuffer | File | Blob; export interface FileCreator { /** * hint that should enter a folder-like structure, create one if not exists * @param name Folder name */ folder(name: string): Promise; /** * hint that a file-like object should be created with the `content`, overrides if exists * @param name Filename */ file(name: string, content: FileContent): Promise; } export declare class Dumper { protected options: DumperOptions; private workbook; private _manifest; constructor(options?: DumperOptions); /** * @description dumping an object that contains the pair of $filename: $value * @return {Array} Array<{filename: string, value: any}> */ dumping(): any[]; /** * @description Update manifest metadata * @param { string } key - a string key * @param { FileContent } content - file content * @param { FileCreator } creator - specify how to save the file * @return { Promise } a promise that follows the promise returned by the method of `creator`, or rejects if the key is empty */ updateManifestMetadata(key: string, content: FileContent, creator: FileCreator): Promise; private wrap; /** * @description metadata.json * */ get metadata(): { filename: string; value: any; }; /** * @description manifest.json */ get manifest(): { filename: string; value: any; }; /** * @description content.json */ get json(): { filename: string; value: any; }; /** * @description content.xml */ get xml(): { filename: string; value: any; }; } export {};