/** * DOCX Module - Reader / Parser * * Reads a DOCX ZIP file and parses it into a DocxDocument model. * Uses the archive module for ZIP reading and XML module for parsing. */ import { type WordSecurityPolicy } from "../security/policy.js"; import type { DocxDocument } from "../types.js"; /** Options for reading a DOCX file. */ export interface ReadDocxOptions { /** Password for decrypting an encrypted DOCX file. */ readonly password?: string; /** * Optional security policy that controls hard limits enforced while reading * the package (max total size, max single-part size, max part count). Falls * back to {@link DEFAULT_SECURITY_POLICY} when omitted. Helpful as a * defense-in-depth control against ZIP bombs / pathological inputs. */ readonly securityPolicy?: WordSecurityPolicy; } /** * Read a DOCX file from a Uint8Array buffer and parse it into a DocxDocument model. * * If the file is encrypted (CFB format), provide a password via the options parameter * to decrypt it automatically. */ export declare function readDocx(buffer: Uint8Array, options?: ReadDocxOptions): Promise;