/**
 * 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<ProviderFolder[]>;
    fetchSince(folder: string, sinceUid: number, options?: FetchOptions): Promise<ProviderMessage[]>;
    fetchByDate(folder: string, since: Date, before: Date, options?: FetchOptions, onChunk?: (msgs: ProviderMessage[]) => void): Promise<ProviderMessage[]>;
    fetchByUids(folder: string, uids: number[], options?: FetchOptions): Promise<ProviderMessage[]>;
    fetchOne(folder: string, uid: number, options?: FetchOptions): Promise<ProviderMessage | null>;
    getUids(folder: string): Promise<number[]>;
    /** 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<number | null>;
    close(): Promise<void>;
}
//# sourceMappingURL=imap-web-provider.d.ts.map