import type { MailProvider, ProviderCapabilities, EmailSummary, EmailMessage, EmailThread, Label, SendOptions, ReplyOptions, ForwardOptions, DraftOptions, DraftSummary, UnreadCount, ExportedMessage } from "./interface.js"; export declare class JmapProvider implements MailProvider { private host; private email; private sessionUrl?; readonly type = "jmap"; readonly capabilities: ProviderCapabilities; private session; private authHeader; constructor(host: string, email: string, username: string, password: string, sessionUrl?: string | undefined); private ensureSession; private apiCall; 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; inboxSummary(): Promise<{ total: number; unread: number; recent: EmailSummary[]; }>; private findMailboxByRole; /** Resolve a mailbox by its id or display name. Prefers exact id match. */ private findMailboxByNameOrId; /** * Upload an attachment blob to the JMAP server and return a reference * to the server-assigned blobId. Used as the first step in sending or * drafting an email with attachments. */ private uploadBlob; /** Upload each attachment and return JMAP EmailBodyPart entries referencing the blobIds. */ private buildAttachmentParts; private identityCache?; /** * A JMAP server only accepts a submission whose From matches one of the * account's identities, and it needs that identity's id to do so. Resolve * both here, or fail with the addresses that would have worked. */ private resolveIdentity; 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