import { type TokenSet } from "./tokenResponse"; /** Options for `exchangeCodeForTokens`. */ export interface ExchangeCodeForTokensOptions { /** Token endpoint resolved from OIDC discovery. */ tokenEndpoint: string; /** OAuth client identifier. */ clientId: string; /** Authorization code received via the loopback callback. */ code: string; /** PKCE verifier paired with the `code_challenge` sent at auth time. */ codeVerifier: string; /** Redirect URI originally sent to the authorization endpoint. */ redirectURI: string; /** Source of `now`. Injected for test determinism; defaults to `Date.now`. */ now?: () => number; /** Aborts the underlying fetch when fired. */ signal?: AbortSignal; } /** * Exchanges an authorization code for a `TokenSet` via the * authorization server's token endpoint (RFC 6749 §4.1.3 + RFC 7636 * §4.5). Rejects with `OAuthFlowError("TOKEN_EXCHANGE_FAILED", ...)` * for any failure mode, surfacing the OAuth `error` / * `error_description` when available. */ export declare function exchangeCodeForTokens(options: ExchangeCodeForTokensOptions): Promise;