import { ClassType } from '@deepkit/core';
import { ScopedLogger } from '@deepkit/logger';
import { BaseAppConfig } from '../../app';
export declare abstract class MailTemplate<T> {
    protected data: T;
    constructor(data: T);
    abstract subject: string;
    abstract generateHtml(): string;
    generateText(): string | void;
}
export interface MessageProperties {
    from?: {
        name?: string;
        address: string;
    };
    to: {
        name?: string;
        address: string;
    };
    replyTo?: {
        name?: string;
        address: string;
    };
    subject: string;
    message: string;
    plainMessage?: string;
    attachments?: {
        name: string;
        content: Buffer;
        contentType: string;
        cid?: string;
    }[];
}
export interface TemplateMessageProperties<T> extends Omit<MessageProperties, 'subject' | 'message' | 'plainMessage'> {
    template: ClassType<MailTemplate<T>>;
    data: T;
}
export interface PreparedMessageProperties extends Omit<MessageProperties, 'to' | 'from' | 'replyTo'> {
    to: string;
    from: string;
    replyTo?: string;
}
export interface MailProvider {
    send(message: PreparedMessageProperties): Promise<string>;
}
export declare class MailService {
    private config;
    private logger;
    provider: MailProvider;
    constructor(config: BaseAppConfig, logger: ScopedLogger);
    send(params: MessageProperties): Promise<void>;
    sendFromTemplate<T>(params: TemplateMessageProperties<T>): Promise<void>;
    prepare(params: MessageProperties): PreparedMessageProperties;
    prepareFromTemplate<T>(params: TemplateMessageProperties<T>): PreparedMessageProperties;
    sendPrepared(message: PreparedMessageProperties): Promise<void>;
}
export declare type __ΩMessageProperties = any[];
export declare type __ΩTemplateMessageProperties = any[];
export declare type __ΩPreparedMessageProperties = any[];
export declare type __ΩMailProvider = any[];
//# sourceMappingURL=index.d.ts.map