/**
 * @plan:PLAN-20250214-CREDPROXY.P29
 * @plan:PLAN-20250214-CREDPROXY.P27
 * @requirement R17.4, R17.5, R18.3-R18.5, R19.2
 * @pseudocode analysis/pseudocode/009-proxy-oauth-adapter.md
 */
import { ProxySocketClient, type OAuthToken } from '@vybestack/llxprt-code-core';
type FlowType = 'pkce_redirect' | 'device_code' | 'browser_redirect';
type PollStatus = 'pending' | 'complete' | 'error';
export interface InitiateResponse {
    readonly flow_type?: FlowType | string;
    readonly mode?: 'pkce' | 'device_code' | 'browser_redirect';
    readonly session_id?: string;
    readonly sessionId?: string;
    readonly auth_url?: string;
    readonly verification_url?: string;
    readonly user_code?: string;
    readonly pollIntervalMs?: number;
    readonly verificationUri?: string;
    readonly verificationUriComplete?: string;
    readonly userCode?: string;
    readonly deviceCode?: string;
    readonly intervalSeconds?: number;
    readonly expiresInSeconds?: number;
    readonly authorizationUrl?: string;
    readonly redirectUri?: string;
    readonly state?: string;
    readonly status?: PollStatus | string;
    readonly token?: Omit<OAuthToken, 'refresh_token'>;
    readonly access_token?: string;
    readonly expiry?: number;
    readonly token_type?: string;
    readonly scope?: string;
    readonly error?: string;
}
export declare class ProxyOAuthAdapter {
    private readonly socketClient;
    constructor(socketClient: ProxySocketClient);
    login(provider: string, bucket?: string): Promise<unknown>;
    handlePkceRedirect(sessionId: string, data: InitiateResponse): Promise<unknown>;
    handleDeviceCode(sessionId: string, data: InitiateResponse): Promise<unknown>;
    handleBrowserRedirect(sessionId: string, data: InitiateResponse): Promise<unknown>;
    refresh(provider: string, bucket?: string): Promise<unknown>;
    cancel(sessionId: string): Promise<void>;
    private normalizeFlowType;
    private wait;
}
export {};
