/** Tokens returned by a successful token-endpoint call. */ export interface TokenSet { /** Access token for authenticated API calls. */ accessToken: string; /** Long-lived token used to mint new access tokens without re-auth. Absent if the flow did not return one. */ refreshToken?: string; /** Absolute timestamp (ms since epoch) when the access token expires. */ expiresAt: number; /** Space-delimited scopes the server actually granted, if reported. */ grantedScope?: string; } /** * Reads a non-2xx response body and throws `TOKEN_EXCHANGE_FAILED` * with the OAuth `error` / `error_description` surfaced when present. */ export declare function throwTokenEndpointError(response: Response, context: string): Promise; /** * Parses a 2xx response from an RFC 6749 ยง5.1 token endpoint into a * `TokenSet`. `issuedAt` is the timestamp captured just before the * network call; the resulting `expiresAt` is conservative by ~RTT. */ export declare function parseTokenResponse(response: Response, issuedAt: number, endpointURL: string): Promise;