import type { NotificationPayload } from './notifications.types.js'; import { ChannelType } from './channel/channel.interface.js'; export interface NotificationTemplate { id: string; name: string; description?: string; channels: ChannelType[]; content: TemplateContent; variables?: TemplateVariable[]; defaultLocale?: string; locales?: Record; category?: string; tags?: string[]; version?: number; createdAt?: number; updatedAt?: number; } export interface TemplateContent { email?: { subject: string; html?: string; text: string; }; sms?: { text: string; }; push?: { title: string; body: string; }; inApp?: { title: string; body: string; }; webhook?: { payload: Record; }; } export interface TemplateVariable { name: string; type: 'string' | 'number' | 'boolean' | 'object' | 'array'; required?: boolean; default?: unknown; description?: string; } export interface RenderedContent { subject?: string; html?: string; text?: string; title?: string; body?: string; payload?: Record; } export interface RenderOptions { locale?: string; channel?: ChannelType; skipCache?: boolean; } export interface TemplateEngineOptions { cacheEnabled?: boolean; cacheTTL?: number; keyPrefix?: string; } export interface ValidationResult { valid: boolean; missing: string[]; } export declare class TemplateEngine { private static readonly MAX_RENDER_CACHE_SIZE; private readonly templates; private readonly cache; private readonly options; constructor(options?: TemplateEngineOptions); register(template: NotificationTemplate): void; get(templateId: string): NotificationTemplate | undefined; list(): NotificationTemplate[]; delete(templateId: string): boolean; has(templateId: string): boolean; render(templateId: string, data: Record, options?: RenderOptions): RenderedContent; renderForChannel(content: TemplateContent, channel: ChannelType, data: Record): RenderedContent; private renderAllChannels; applyToPayload(templateId: string, payload: NotificationPayload, data: Record, options?: RenderOptions): NotificationPayload; replaceVariables(template: string, data: Record): string; replaceVariablesInObject(obj: Record, data: Record): Record; private getNestedValue; extractVariables(template: NotificationTemplate): string[]; private validateTemplate; validateData(templateId: string, data: Record): ValidationResult; private getCacheKey; private hashData; private getFromCache; private setCache; private cleanupCache; clearCache(): void; } export declare const DEFAULT_TEMPLATES: NotificationTemplate[]; //# sourceMappingURL=template-engine.d.ts.map