export interface BlockNoteCompanyInfo { name: string; legal_address?: string; fiscal_data?: string; /** Preferred logo URL (S3 signed URL or absolute HTTP URL). */ logoUrl?: string; /** Fallback logo field. */ logo?: string; } export interface BlockNoteRenderContext { /** Document title (rendered as H1). */ title: string; /** * Sections to render. Each section gets an H2 title followed by * markdown-parsed content. */ sections: Array<{ title: string; content: string; }>; /** Company information for the page header. */ company: BlockNoteCompanyInfo; } /** * Converts a BlockNote template (JSON-serialized blocks buffer) into a DOCX * buffer by: * 1. Parsing the BlockNote JSON. * 2. Replacing `templateField` inline nodes with values from fieldContext. * 3. Converting the resulting blocks to markdown. * 4. Rendering markdown into a `docx` Document with company header/footer. * 5. Returning the document as a Node.js Buffer. * * This service is the Node.js equivalent of the browser-side * `generateDocxBlob` function in `apps/web/src/lib/export-markdown-to-docx.ts`. */ export declare class BlockNoteToDocxService { /** * Render a BlockNote template buffer against a field context and return a * DOCX buffer. * * @param templateBuffer UTF-8 JSON-encoded BlockNote blocks array, OR * a pre-rendered markdown string (UTF-8 encoded). * When the buffer's content starts with `[` the * service treats it as BlockNote JSON; otherwise it * is treated as raw markdown. * @param fieldContext Must include `title` (string), `company` * (BlockNoteCompanyInfo), and any template field * values whose keys match the `templateField` * `fieldId` / `alias` props in the template blocks. * Additional keys are ignored. */ render(templateBuffer: Buffer, fieldContext: Record): Promise; private _buildDocx; } //# sourceMappingURL=blocknote-to-docx.service.d.ts.map