export const INotificationRepository = 'INotificationRepository'; export type SendEmailOptions = { from: string; to: string; replyTo?: string; subject: string; html: string; text: string; smtp: SmtpOptions; }; export type SmtpOptions = { host: string; port?: number; username?: string; password?: string; ignoreCert?: boolean; }; export enum EmailTemplate { WELCOME = 'welcome', RESET_PASSWORD = 'reset-password', } export interface WelcomeEmailProps { baseUrl: string; displayName: string; username: string; password?: string; } export type EmailRenderRequest = { template: EmailTemplate.WELCOME; data: WelcomeEmailProps }; export type SendEmailResponse = { messageId: string; response: any; }; export interface INotificationRepository { renderEmail(request: EmailRenderRequest): { html: string; text: string }; sendEmail(options: SendEmailOptions): Promise; verifySmtp(options: SmtpOptions): Promise; }