/// <reference types="node" resolution-mode="require"/>
import { TypedEmitter } from "tiny-typed-emitter";
import OneSecMailAPI from "./OneSecMailAPI.js";
import type { ShortMessage, Attachment, Message, Options } from "./types.js";
export default function OneSecMail(emailAddress?: string): Promise<OneSecMailbox>;
export default function OneSecMail(options: Partial<Options>): Promise<OneSecMailbox>;
export default function OneSecMail(emailAddress: string, options?: Partial<Options>): Promise<OneSecMailbox>;
declare class OneSecMailbox extends TypedEmitter {
    #private;
    readonly emailAddress: string;
    constructor(emailAddress: string, api: OneSecMailAPI);
    getMessages(options?: Partial<Options>): Promise<OneSecMailShortMessage[]>;
    clearMessages(options?: Partial<Options>): Promise<void>;
}
declare class OneSecMailShortMessage {
    #private;
    readonly id: number;
    readonly from: string;
    readonly subject: string;
    readonly date: string;
    constructor(emailAddress: string, message: ShortMessage, api: OneSecMailAPI);
    fetchFullMessage(options?: Partial<Options>): Promise<OneSecMailMessage>;
    serialize(): ShortMessage;
}
declare class OneSecMailMessage {
    readonly id: number;
    readonly from: string;
    readonly subject: string;
    readonly date: string;
    readonly attachments: OneSecMailAttachment[];
    readonly body: string;
    readonly textBody: string;
    readonly htmlBody: string;
    constructor(emailAddress: string, message: Message, api: OneSecMailAPI);
    serialize(): Message;
}
declare class OneSecMailAttachment {
    #private;
    readonly filename: string;
    readonly contentType: string;
    readonly size: number;
    constructor(emailAddress: string, messageId: number, attachment: Attachment, api: OneSecMailAPI);
    download(options?: Partial<Options>): Promise<Buffer>;
    serialize(): Attachment;
}
export {};
