import { FileType } from "./layers/file"; import { FileNode, MemoryFS } from "./layers/shared/memory-fs"; export declare const LAYERS: { file: string; packaging: string; security: string; domain_logic: string; data_model: string; }; export type FileModel = MemoryFS; /** * Core types for RTZ-IO library */ export interface Header { /** * Schema version of this document (e.g., "1.0"). */ version: string; /** * Timestamp when the file was created (ISO-8601), e.g., "2025-08-05T14:30:00+07:00". */ created: string; /** * Timestamp of last modification (ISO-8601), e.g., "2025-08-06T09:15:00+07:00". */ modified: string; /** * Unique identifier for the document (UUID), e.g., "123e4567-e89b-12d3-a456-426614174000". */ id: string; /** * Optional title of the quiz or slide, e.g., "Math Basics". */ title?: string; /** * Optional description, e.g., "An introductory quiz on algebra". */ description?: string; /** * Optional list of tags for search and categorization, e.g., ["math", "algebra"]. */ tags?: string[]; /** * Optional custom metadata as key/value pairs, e.g., { "courseId": "MATH101" }. */ metadata?: Record; } export interface Content { /** * Main content data. */ data: any; /** * Optional list of associated assets (images, videos). */ assets?: FileNode[]; } export interface WorkingState { /** * Document header information. */ header: Header; /** * Main content payload. */ content: Content; } export interface PersistOptions { /** * Whether to encrypt the snapshot. */ encrypt?: boolean; /** * Function to fetch encryption/decryption keys by keyId. */ keyProvider?: (keyId: string) => Promise; /** * Identifier of the key to use, e.g., "key-v1". */ keyId?: string; /** * Compression method for ZIP: "none", "gzip" or "deflate". */ compression?: "none" | "gzip" | "deflate"; /** * Whether to include assets inline in the package. */ includeAssets?: boolean; } export interface LoadOptions { /** * Function to fetch decryption keys by keyId. */ keyProvider?: (keyId: string) => Promise; /** * Whether to validate the manifest signature. */ validateSignature?: boolean; /** * Whether to extract and load asset data into memory. */ extractAssets?: boolean; } export interface Manifest { author?: { name: string; email?: string; organization?: string; userId?: string; }; /** * Manifest format version, e.g., "1.0". */ version: string; /** * Snapshot creation timestamp (ISO-8601). */ created: string; /** * Persistence type identifier. */ fileType: FileType; /** * List of files included in the package. */ files: ManifestFile[]; } export interface ManifestFile { /** * File name within the package, e.g., "working_state.json". */ name: string; /** * File size in bytes. */ size: number; /** * Category of the file: working_state, asset. */ type: "working_state" | "asset"; } export interface EncryptedWrapper { /** * Encryption wrapper format version, e.g., "1.0". */ version: string; /** * Identifier of the key used, e.g., "key-v1". */ keyId: string; /** * Encryption algorithm, e.g., "AES-256-GCM". */ algorithm: string; /** * Base64-encoded initialization vector. */ iv: string; /** * Base64-encoded authentication tag for GCM. */ authTag: string; /** * Base64-encoded encrypted data blob. */ data: string; } //# sourceMappingURL=types.d.ts.map