import EmailTemplate from "./email-template"; import * as nodemailer from "nodemailer"; import Mailer, { MailerResult } from "./mailer"; import { Request } from "express"; /** A message set contains a set of email messages that may be sent or overridden. */ export declare class MessageSet { /** The messages registered to this set */ private readonly registrations; /** Registers a message with the given template and options */ register(id: T, template: EmailTemplate, options?: Partial): void; /** Overrides a message */ override(id: T, template: EmailTemplate, options?: Partial): void; /** Gets the message registration for the given id */ lookup(id: T): MessageRegistration; /** Builds the mailer for this message set and the given request */ getMailer(req: Request): MessageSetMailer; } /** A mailer that sends messages from a message set */ export declare class MessageSetMailer extends Mailer { private readonly set; constructor(req: Request, set: MessageSet); /** Sends a message from the set */ sendMessage(id: T, options: Partial, data: any): Promise; } /** Contains a template and details about how the template should be sent. */ export interface MessageRegistration { readonly template: EmailTemplate; readonly options: Partial; }