import type { Attachment } from "../types/emails"; /** Splits raw header section into an unfolded, MIME-word-decoded map (lowercased names). */ export declare function parseHeaders(raw: string): Record; /** Splits an address header value (e.g. "Name , d@e.f") into individual addresses. */ export declare function parseAddresses(value: string): string[]; export declare function parseContentType(value: string): { mimeType: string; params: Record; }; export type ParsedPart = { contentType: string; charset?: string; encoding: string; boundary?: string; disposition: "inline" | "attachment" | "none"; filename?: string; contentId?: string; headers: Record; body: Uint8Array; children: ParsedPart[]; }; /** Parses a raw MIME message/part (bytes) into a structural tree. */ export declare function parseMime(raw: Uint8Array, depth?: number): ParsedPart; export type ExtractedContent = { text?: string; html?: string; attachments: Attachment[]; }; /** Walks a parsed MIME tree, collecting body text and attachments. */ export declare function extractContent(root: ParsedPart): ExtractedContent;