import type { GoogleOAuthTokens } from '../android/oauth-google.js';
import type { PendingOAuthSession } from '../android/oauth-google.js';
export type { PendingOAuthSession };
/**
 * Start a new OAuth session for `appId`, replacing any existing one.
 *
 * `start` is a factory that returns a `PendingOAuthSession` (e.g.
 * `() => startOAuthFlow(config, options)`). Passing a factory rather than the
 * session directly lets the caller defer construction until after the prior
 * session has been cleaned up.
 */
export declare function beginOAuthSession(appId: string, start: () => Promise<PendingOAuthSession>): Promise<void>;
/**
 * Poll the current status for `appId`.
 *
 * Returns `{ status: 'absent' }` when no session has been started or the
 * entry has been cleared. Otherwise returns the entry's current
 * `status`/`tokens`/`error`.
 */
export declare function pollOAuthSession(appId: string): {
    status: 'pending' | 'done' | 'error' | 'absent';
    tokens?: GoogleOAuthTokens;
    error?: Error;
};
/**
 * Close and remove the session entry for `appId`. Safe to call on an absent
 * appId or after the result has already settled.
 */
export declare function clearOAuthSession(appId: string): void;
