import type { gmail_v1 } from '@googleapis/gmail'; import type { Optional } from '../../lib/optionality.js'; import type { Draft } from '../entities/Draft.js'; import type { Message } from '../entities/Message.js'; import type { MimeAttachment } from './attachment.js'; /** Project a raw Gmail message onto the documented Message shape. */ export declare function projectMessage(message: gmail_v1.Schema$Message): Message; /** Project a raw Gmail draft onto the documented Draft shape. */ export declare function projectDraft(draft: gmail_v1.Schema$Draft): Draft; /** * Build an RFC 822 message and base64url-encode it for the Gmail API, via * mail-mime-builder (RFC 2822/2045/2049 compliant: encoded-word headers, * multipart, transfer encoding). `from` is required by the builder; pass the * authenticated account's address. */ export declare function buildRawMessage(args: { from: string; to: string[]; cc?: Optional; bcc?: Optional; subject?: Optional; body?: Optional; htmlBody?: Optional; inReplyTo?: Optional; attachments?: Optional; }): string; /** * Resolve a reply's threading context: fetch the original message for its thread * id and `Message-ID` so the new draft/message lands in the same thread with a * correct `In-Reply-To`. Returns empty fields when not replying. Shared by the * compose handlers (create_draft, send_message) so the threading fetch lives once. */ export declare function resolveReplyContext(gmail: gmail_v1.Gmail, replyToMessageId: string | undefined): Promise<{ threadId: string | undefined; inReplyTo: string | undefined; }>; //# sourceMappingURL=message.d.ts.map