type GmailClient = any; import type { MailProvider, ProviderCapabilities, EmailSummary, EmailMessage, EmailThread, Label, SendOptions, ReplyOptions, ForwardOptions, DraftOptions, DraftSummary, UnreadCount, ExportedMessage } from "./interface.js"; export type GmailEncodeOptions = SendOptions & { inReplyTo?: string; references?: string; }; export declare function buildEmailBuffer(to: string[], subject: string, body: string, options?: GmailEncodeOptions): Buffer; export declare function shouldUseMediaUpload(raw: Buffer, options?: GmailEncodeOptions): boolean; export declare class GmailProvider implements MailProvider { private gmail; readonly type = "gmail"; readonly capabilities: ProviderCapabilities; constructor(gmail: GmailClient); private sendAsCache?; /** * Gmail silently falls back to the primary address when the From header * names an address that isn't a verified send-as alias, so a wrong sender * looks like a successful send. Check up front and fail loudly instead. * Pending (unverified) aliases are rejected; Gmail will not send as them. */ assertCanSendAs(from: string): Promise; searchMessages(query: string, maxResults?: number, folder?: string): Promise; findMessageIds(query: string, folder?: string, maxResults?: number): Promise; readMessage(messageId: string): Promise; private fetchMessage; readThread(threadId: string): Promise; sendMessage(to: string[], subject: string, body: string, options?: SendOptions): Promise; replyToMessage(messageId: string, body: string, options?: ReplyOptions): Promise; forwardMessage(messageId: string, to: string[], options?: ForwardOptions): Promise; createDraft(to: string[], subject: string, body: string, options?: DraftOptions): Promise; trashMessages(messageIds: string[]): Promise; listLabels(): Promise; createLabel(name: string): Promise