import type { AttachmentFile } from '../entities/AttachmentFile.js'; /** * The `attachments` parameter description, shared by the three compose * schemas (create_draft, update_draft, send_message) so the wording and the * interpolated cap cannot drift between them or from the constant. */ export declare const ATTACHMENTS_PARAM_DESCRIPTION: string; /** MIME type for a filename, by extension; octet-stream when unrecognized. */ export declare function mimeTypeForExtension(filename: string): string; /** * An attachment loaded and encoded for MIME assembly: `data` is standard * base64 (the RFC 2045 content-transfer-encoding, not the base64url the API's * outer `raw` field uses), folded to 76-character lines because the builder * emits the string verbatim and an unfolded multi-megabyte line breaks the * RFC 5322 line-length limit. */ export type MimeAttachment = { filename: string; contentType: string; data: string; }; /** Fold a base64 string to 76-character CRLF-separated lines (RFC 2045 ยง6.8). */ export declare function foldBase64(base64: string): string; /** * Read attachment specs from disk into MIME-ready parts. The combined decoded * size is capped at the suite's shared JSON-transfer ceiling; that bounds * what this process buffers, not what Gmail accepts (base64 inflates the * encoded message ~4/3, so sends near the cap can still be refused by * Google; the band past the cap is deferred to issue #103). Each path is * stat-checked first: only regular files are read (a FIFO or device file * would block or grow unbounded), and an oversize total refuses before the * offending file is buffered. Returns undefined when there is nothing to * attach. */ export declare function loadAttachments(specs: AttachmentFile[] | undefined): Promise; //# sourceMappingURL=attachment.d.ts.map