import { MakeFileOptions } from "../../core/writer"; import { LayerPackagingOutput } from "../packaging"; import { MemoryFS } from "../shared/memory-fs"; export declare enum MIME_TYPE { QUIZ = "application/vnd.realtimezone.rtz.quiz", SLIDE = "application/vnd.realtimezone.rtz.slide", MINDMAP = "application/vnd.realtimezone.rtz.mindmap" } export type FileType = "quiz" | "slide" | "mindmap"; export type LayerFileOutput = { fileType: FileType; content: Buffer; }; export type LayerFileInput = LayerPackagingOutput; /** * Creates a ZIP buffer from a MemoryFS using JSZip (browser-compatible) * * This function creates a ZIP archive containing all files from the specified root * in the MemoryFS. It supports both memory files and stub files (streamed). * The output is compatible with extractFileBufferRTZ for round-trip operations. * * @param makeFileOptions Configuration options (contains root path) * @param memoryFs MemoryFS instance containing files to archive * @returns Promise resolving to Buffer containing the ZIP data */ export declare const createFileBufferRTZ: (makeFileOptions: MakeFileOptions, memoryFs: MemoryFS) => Promise<{ blob: Blob; }>; /** * Extracts a ZIP buffer created by createFileBufferRTZ back into a MemoryFS instance. * * This function reverses the zipping process by: * 1. Parsing the ZIP buffer using JSZip (browser-compatible) * 2. Converting ZIP entry paths back to absolute MemoryFS paths * 3. Writing file contents to a new MemoryFS instance * 4. Applying Zip-Slip protection to prevent path traversal attacks * * @param buffer ZIP buffer created by createFileBufferRTZ * @returns Promise resolving to object containing the populated MemoryFS */ export declare const extractFileBufferRTZ: (blob: Blob) => Promise<{ memoryFs: MemoryFS; }>; //# sourceMappingURL=index.d.ts.map