@breadstone/archipel-platform-documents
Classes
| Class | Description |
|---|---|
| BaseDocumentRenderer | Base class for document renderers. Provides common functionality for template loading, parsing, and image processing. |
| DocumentEngine | DocumentEngine orchestrates document generation workflow. Coordinates resource loading and renderer components. |
| DocumentError | Base class for document-related domain errors. |
| DocumentModule | DocumentModule provides services for document generation and image processing. Uses abstract base classes and interfaces for extensibility. |
| DocumentRenderError | Thrown when document rendering fails. |
| DocumentValidationError | Thrown when document input validation fails. |
| DocxDocumentRenderer2 | DOCX document renderer. Delegates template processing to the configured parser (Encodian, Mustache, etc.). The parser handles all template syntax logic via its processXml() method. |
| ImageProcessingError | Thrown when image processing fails. |
| PdfDocumentRenderer | PDF document renderer using pdf-lib. Supports placeholder overlay and table rendering. |
| SharpImageProcessor | Sharp-based image processor. Handles image resizing and format conversion. |
Interfaces
| Interface | Description |
|---|---|
| IDocumentModuleOptions | Configuration options for the DocumentModule. |
| IDocumentPlaceholderDetail | Placeholder detail for document probe report. |
| IDocumentProbeReport | Document probe report. |
| IDocumentRenderer | Base interface for document renderers. Each renderer handles specific document formats. |
| IImagePayload | Image payload for templates. |
| IImageProcessor | Base interface for image processors. Handles image manipulation and format conversion. |
| IRenderOptions | Options for rendering a document. |
| IRenderResult | Document render result. |
Type Aliases
| Type Alias | Description |
|---|---|
| DocumentFormat | Document output format types. |
| EngineType | Template engine type. |
| ImageMimeType | Image MIME type. |
| TemplateFormat | Template format type (parser syntax). |
| TemplateType | Template type. |
Variables
| Variable | Description |
|---|---|
| DOCUMENT_MODULE_OPTIONS | Injection token for DocumentModule options. |
| DOCUMENT_PARSER_TOKEN | Injection token for IDocumentParser. |
| DOCUMENT_RENDERER_TOKEN | Injection token for IDocumentRenderer (multi-provider). |
| IMAGE_PROCESSOR_TOKEN | Injection token for IImageProcessor. |