@openinc/parse-server-opendash
Version:
Parse Server Cloud Code for open.INC Stack.
40 lines (39 loc) • 1.09 kB
TypeScript
import { Transporter } from "nodemailer";
import SMTPTransport from "nodemailer/lib/smtp-transport";
/**
* Singleton class to manage email transport and template directory
*/
export declare class EmailState {
private static instance;
emailTemplateDir: string;
transport: Transporter<SMTPTransport.SentMessageInfo> | undefined;
private constructor();
/**
* Get the singleton instance
*/
static getInstance(): EmailState;
/**
* Set the email transport
*/
setTransport(transport: Transporter<SMTPTransport.SentMessageInfo>): void;
/**
* Get the email transport
*/
getTransport(): Transporter<SMTPTransport.SentMessageInfo> | undefined;
/**
* Set the email template directory
*/
setEmailTemplateDir(dir: string): void;
/**
* Get the email template directory
*/
getEmailTemplateDir(): string;
/**
* Check if email transport is configured and ready
*/
isConfigured(): boolean;
/**
* Reset the singleton (useful for testing)
*/
static reset(): void;
}