import { BlockNoteToDocxService } from "../../blocknote/services/blocknote-to-docx.service"; /** * Describes a template that can be rendered into a DOCX buffer. * * - `kind: "docx"` — a Word `.docx` file processed by `docx-templates` * (field placeholders use `[[fieldName]]` syntax with cmdDelimiter `["[[", "]]"]`) * - `kind: "blocknote"` — a BlockNote / Markdown template processed by * `BlockNoteToDocxService` */ export interface DocumentTemplate { buffer: Buffer; kind: "docx" | "blocknote"; } /** * Single entry-point for rendering a document template against a field context. * * Routes by `template.kind`: * - `"docx"` → `docx-templates` `createReport` * - `"blocknote"` → `BlockNoteToDocxService.render` * * Returns a DOCX `Buffer` either way. Callers (e.g. `AbstractDocumentGeneratorService`) * do not need to know which rendering path was taken. */ export declare class DocxTemplateService { private readonly blockNoteToDocxService; constructor(blockNoteToDocxService: BlockNoteToDocxService); /** * Render `template` against `fieldContext` and return a DOCX Buffer. * * @param template - The template descriptor (buffer + kind). * @param fieldContext - Key/value pairs whose keys match template placeholders. * @returns A DOCX Buffer. */ render(template: DocumentTemplate, fieldContext: Record): Promise; } //# sourceMappingURL=docx-template.service.d.ts.map