/** * Body formatting shared by every surface that renders an email body — * get_email, get_emails, get_thread, and the CLI. One definition so the * `format` contract cannot drift between tools (it previously did: three * near-duplicates with different HTML handling). */ export type BodyFormat = 'full' | 'text' | 'stripped'; /** * Undo the soft line wrapping of a `text/plain; format=flowed` body (RFC 3676). * * Thunderbird, Apple Mail and most Linux clients send flowed text: a line * ending in a space continues on the next one, and only a line without that * space is a real break. Read literally, a paragraph arrives hard-wrapped at * seventy-two columns with trailing whitespace — which also leaves * stripReplyChain matching against lines the sender never broke. * * `delSp` mirrors the DelSp parameter: when the sender set it, the trailing * space marked the wrap and is not part of the text. */ export declare function unflowFormatFlowed(text: string, delSp?: boolean): string; /** Default body cap for a single-message fetch (get_email). */ export declare const DEFAULT_SINGLE_BODY_MAX = 10000; /** Default per-message body cap for bulk fetches (get_emails, get_thread). */ export declare const DEFAULT_MULTI_BODY_MAX = 5000; /** * Applies the requested body format and optional character cap. * * - full: raw bodyText ?? bodyHtml (preserves the original part) * - text: prefers bodyText; converts bodyHtml to readable text if needed * - stripped: like text, but also removes quoted reply chains and signatures * * `maxLength` of 0 (or undefined) means unlimited; otherwise the body is cut * and a hint names how many characters remain. */ export declare function applyBodyFormat(bodyText: string | undefined, bodyHtml: string | undefined, format: BodyFormat, maxLength?: number): string; //# sourceMappingURL=body-format.d.ts.map