/** * FileSystemTemplateService * * Loads template files from the filesystem. * Matches the pattern from @plyaz/notifications/templates/FileSystemTranslationService * * Template Path Format: {locale}/{category}/{templateId}.md * Example: en/invoices/standard-invoice.md */ import type { TemplateService } from '@plyaz/types/storage'; import type { StorageFileSystemTemplateServiceConfig } from '@plyaz/types'; /** * FileSystemTemplateService * * Loads markdown templates from filesystem with frontmatter * Used for PDF generation (invoices, tax documents, receipts, etc.) * * @example * ```typescript * const templateService = new FileSystemTemplateService({ * basePath: join(__dirname, '../templates'), * logger: myLogger * }); * * const template = await templateService.getTemplate('en/invoices/standard-invoice.md'); * ``` */ export declare class FileSystemTemplateService implements TemplateService { private readonly basePath; private readonly logger?; constructor(config?: StorageFileSystemTemplateServiceConfig); /** * Get template content by path * * @param path - Template path (locale/category/templateId.md) * @returns Template content (markdown with frontmatter) * @throws StoragePackageError if template not found * * @example * ```typescript * const content = await service.getTemplate('en/invoices/standard-invoice.md'); * ``` */ getTemplate(path: string): Promise; /** * Check if template exists * * @param path - Template path * @returns true if template exists * * @example * ```typescript * const exists = await service.hasTemplate('en/invoices/standard-invoice.md'); * ``` */ hasTemplate(path: string): Promise; /** * Get base path for templates */ getBasePath(): string; }