@454creative/easy-email
Version:
A framework-agnostic email service library for Node.js with observability and monitoring
27 lines • 887 B
TypeScript
import { EmailProviderType } from '../types';
export interface ITemplateService {
renderTemplate(templateId: string, data: Record<string, any>, provider: EmailProviderType): Promise<string>;
validateTemplate(templateId: string, provider: EmailProviderType): Promise<boolean>;
getTemplateInfo(templateId: string, provider: EmailProviderType): Promise<TemplateInfo>;
}
export interface TemplateInfo {
id: string;
name: string;
version: string;
variables: string[];
lastModified: Date;
provider: EmailProviderType;
}
export interface TemplateRenderOptions {
locale?: string;
version?: string;
fallbackToCustom?: boolean;
}
export interface TemplateValidationResult {
isValid: boolean;
errors: string[];
warnings: string[];
variables: string[];
missingVariables: string[];
}
//# sourceMappingURL=template.interface.d.ts.map