/** Result returned by one OAuth device-code polling attempt. */ export type OAuthDeviceCodePollResult = { status: "complete"; value: T; } | { status: "pending"; } | { status: "slow_down"; } | { status: "failed"; message: string; }; /** Options for polling an RFC 8628-style OAuth device-code flow. */ export interface OAuthDeviceCodeFlowOptions { /** Poll the provider once and classify the response. */ poll(): OAuthDeviceCodePollResult | Promise>; /** Provider-requested polling cadence; defaults to RFC 8628's five seconds. */ intervalSeconds?: number; /** Provider-issued expiry window for the device code. */ expiresInSeconds?: number; /** Cancels the flow with the legacy "Login cancelled" error. */ signal?: AbortSignal; } /** Poll an OAuth device-code flow until completion, provider failure, timeout, or cancellation. */ export declare function pollOAuthDeviceCodeFlow(options: OAuthDeviceCodeFlowOptions): Promise;