/** * RFC 2822 message construction for the Gmail API. * * Used by gmail_drafts_create. Construction is deliberately minimal — no * attachments, single text/plain or text/html body, optional multipart/alternative * when both are provided. Output is plain RFC 2822 text; callers are expected * to base64url-encode it before handing to Gmail's `raw` field. */ export interface MimeOptions { /** Recipient(s). Comma-separated for multiple, e.g. "a@x.com, b@y.com" */ to: string; cc?: string; bcc?: string; subject?: string; /** Plain-text body */ body?: string; /** HTML body. If both body and htmlBody are set, output is multipart/alternative. */ htmlBody?: string; /** Message-ID of the message being replied to (improves threading). */ inReplyTo?: string; /** Space-separated Message-IDs of ancestor messages. */ references?: string; /** Optional explicit From; usually omitted so Gmail fills in the authenticated user. */ from?: string; /** Override the multipart boundary for deterministic test output. */ boundary?: string; } /** Encode a UTF-8 string to base64url (RFC 4648 §5). */ export declare function base64url(input: string): string; /** * Encode a header value containing non-ASCII characters per RFC 2047 (B-encoding). * Pure-ASCII values pass through unchanged so common headers stay readable. */ export declare function encodeHeader(value: string): string; /** Build an RFC 2822 message string. */ export declare function buildRfc2822(opts: MimeOptions): string;