/** * DOCX Module - Packager * * Assembles a DocxDocument model into a DOCX ZIP package using the * archive and XML modules. Supports all parts including comments, * custom properties, document background, hyperlink relationships, * and per-header/footer relationship files. */ import { type WordSecurityPolicy } from "../security/policy.js"; import type { DocxDocument } from "../types.js"; /** * Options accepted by `packageDocx`. * * For backwards compatibility the second positional argument may also be a * raw number, in which case it is interpreted as `compressionLevel` with the * default security policy. */ export interface PackageDocxOptions { /** ZIP compression level (0-9). Default: backend-specific (typically 6). */ readonly compressionLevel?: number; /** * Security policy controlling rawXmlPolicy, OLE/signature handling, etc. * Defaults to {@link DEFAULT_SECURITY_POLICY}. */ readonly securityPolicy?: WordSecurityPolicy; } /** * Package a DocxDocument model into a DOCX ZIP file. * Returns the ZIP bytes as Uint8Array. * * This function does NOT modify the input `doc` object. Internally it creates * shallow copies of mutable structures (images, headers, footers, etc.) to * assign relationship IDs without polluting the caller's model. */ export declare function packageDocx(doc: DocxDocument, optionsOrCompressionLevel?: PackageDocxOptions | number): Promise;