/** * IMAP web provider — implements MailProvider using CompatImapClient + BridgeTransport. * Used for non-Gmail accounts on Android/WebView where Node.js isn't available. * * The native shell (MAUI) exposes TCP via window._nativeBridge.tcp.*; we alias it * to window.msgapi in initAndroid() because iflow-direct's BridgeTransport expects * that global name. * * Includes automatic retry on broken pipe / connection errors: if an operation fails * with a connection-related error, we create a fresh client and retry once. */ import { type ImapClientConfig } from "@bobfrankston/iflow-direct"; import type { MailProvider, ProviderFolder, ProviderMessage, FetchOptions } from "./provider-types.js"; export declare class ImapWebProvider implements MailProvider { private client; private config; private transportFactory; private specialFolders; private folderListCache; constructor(config: ImapClientConfig, transportFactory?: () => any); /** Create a fresh client (after broken pipe / connection error) */ private reconnect; /** Run an operation with one retry on connection error */ private withRetry; listFolders(): Promise; fetchSince(folder: string, sinceUid: number, options?: FetchOptions): Promise; fetchByDate(folder: string, since: Date, before: Date, options?: FetchOptions, onChunk?: (msgs: ProviderMessage[]) => void): Promise; fetchByUids(folder: string, uids: number[], options?: FetchOptions): Promise; fetchOne(folder: string, uid: number, options?: FetchOptions): Promise; getUids(folder: string): Promise; /** APPEND a raw message to this account's Sent folder. Used by the * Android send path after a successful SMTP delivery — without it a * phone-sent message never got a Sent copy on IMAP accounts (Gmail's * API self-files; SMTP does not). Resolves the Sent path from the * special-folder map (populated by listFolders; refreshed here if the * cache is cold). Returns the appended UID when the server reports it. */ appendToSent(raw: string): Promise; close(): Promise; } //# sourceMappingURL=imap-web-provider.d.ts.map