/** * Header extraction helpers. * * Nothing in the pipeline may depend on a header being present. Every accessor returns null rather * than throwing, and every decode is wrapped so that a malformed encoded word cannot abort a parse. */ import { type HeaderEntry, type MessageHeaders } from './model'; /** Decode MIME encoded words, falling back to the raw value on any failure. */ export declare function decodeWordsSafe(value: string): string; /** Parse a structured header value such as Content-Type into a value plus parameters. */ export declare function parseHeaderValueSafe(value: string): { value: string; params: Record; }; /** * Convert mailsplit's raw header lines into normalised entries. * * mailsplit returns `{ key, line }` where `line` still contains the field name and any folded * continuations joined with CRLF. Lines with no colon at all are kept with an empty key so that * malformed input is still visible to diagnostics. */ export declare function toHeaderEntries(list: readonly { key: string; line: string; }[]): HeaderEntry[]; /** Strip angle brackets and surrounding whitespace from a Message-ID style value. */ export declare function normaliseMessageId(value: string | null): string | null; /** Extract every angle bracketed id from a References style header. */ export declare function parseReferences(value: string | null): string[]; /** Collect the headers the analysis pipeline uses. All fields are optional by design. */ export declare function extractMessageHeaders(entries: readonly HeaderEntry[]): MessageHeaders; //# sourceMappingURL=headers.d.ts.map