import type { gmail_v1 } from "googleapis"; export interface ParsedAddress { name: string; address: string; } export interface Attachment { filename: string; mime_type: string; size_bytes: number; attachment_id: string; part_id: string; } export interface MessageBody { content: string; source: "plain" | "html" | "empty"; } export interface ParsedMessage { headers: Map; body: MessageBody; attachments: Attachment[]; inline_image_count: number; } export declare function parseMessage(msg: gmail_v1.Schema$Message): ParsedMessage; /** * Parse an RFC 5322 address header (From / To / Cc / Bcc) into a list of * `{ name, address }` records. Uses addressparser so display names with * commas (e.g., "Doe, John" ) are handled correctly — a * naive split on `,` would produce four bogus addresses. */ export declare function parseAddresses(headers: Map, name: string): ParsedAddress[];