open-agreements
Version:
Open-source legal template filling CLI and library
22 lines • 1.08 kB
TypeScript
/**
* The generation compiler: DocumentSpec → validated spec → per-part emitters
* → ordered file record → zip buffer.
*
* Determinism contract: identical specs compile to byte-identical buffers.
* No emitter reads the clock or randomness; zip entry dates are pinned to a
* fixed epoch (document-facing dates come from spec.meta.createdIso).
*
* Ordering: header/footer parts are allocated first so their relationship
* ids exist when the document part binds section references; the standard
* ancillary parts (theme, fontTable, webSettings) register before the package
* plumbing, which runs last because [Content_Types].xml is assembled from the
* part registry.
*/
import type { DocumentSpec } from './types.js';
export type GenerateDocxOptions = {
/** Overrides spec.options.includeDraftingNotes when provided. */
includeDraftingNotes?: boolean;
};
/** Compile a DocumentSpec into a complete DOCX package. */
export declare function generateDocx(spec: DocumentSpec, opts?: GenerateDocxOptions): Promise<Buffer>;
//# sourceMappingURL=compile.d.ts.map