@pulp-engine/template-model
v0.85.0
Published
TypeScript types for Pulp Engine template definitions. Used by @pulp-engine/sdk and by any code that needs to type-check or construct Pulp Engine template documents.
Maintainers
Readme
@pulp-engine/template-model — TypeScript types for Pulp Engine templates
Typed TypeScript shapes for PulpEngine template definitions. Used by @pulp-engine/sdk for typed .definition fields on template operations, and by any code that needs to type-check or construct Pulp Engine templates directly.
When to install this directly
If you're using @pulp-engine/sdk, you don't need to install @pulp-engine/template-model explicitly — the SDK lists it as a regular dependency and your package manager pulls it in automatically. Install it directly only if:
- You want to author Pulp Engine templates in TypeScript (e.g. a template-authoring tool, a custom editor, or a code-generator that emits template JSON).
- You need the types in a non-SDK context (e.g. validating template JSON in a build step before uploading it to Pulp Engine).
- You want to build a template at runtime without constructing the full SDK client.
Install
npm install @pulp-engine/template-model
# or
pnpm add @pulp-engine/template-model
# or
yarn add @pulp-engine/template-modelRequires Node.js 18 or later. No runtime dependencies — pure TypeScript types compiled to .d.ts + a thin .js file for compatibility.
What's exported
import type {
TemplateDefinition, // The root template shape
DocumentNode, // Top-level container
BlockNode, // Block-level nodes (paragraph, heading, table, image, chart, ...)
InlineNode, // Inline nodes (text, link, mark)
RenderConfig, // Page size, margins, header/footer, pagination
FieldMapping, // Data adaptation rules
// ... and all the per-node type definitions
} from '@pulp-engine/template-model'See Pulp Engine's template guide for the full node-type reference and the template authoring model.
Versioning
@pulp-engine/template-model is version-locked with the Pulp Engine server release cadence — every release ships a matching version. Installing @pulp-engine/[email protected] pairs with Pulp Engine server 0.64.0, @pulp-engine/[email protected], and pulp-engine==0.64.0 (Python).
License
MIT
