import { AuthenticatedFetchOptions, OAuth2CallbackParams, OAuth2Error, OAuth2Session, OAuth2UserInfo, StrandsAccountConfig } from './types'; export interface OAuthClientState { session: OAuth2Session | null; isLoading: boolean; error: OAuth2Error | null; } export type Listener = (state: OAuthClientState) => void; export interface OAuthClient { getState(): OAuthClientState; subscribe(listener: Listener): () => void; startAuth(returnTo?: string): Promise; handleCallback(params: OAuth2CallbackParams): Promise; refreshTokens(): Promise; fetchUserInfo(): Promise; signOut(revokeTokens?: boolean): Promise; getAuthHeaders(): Record; authenticatedFetch(url: string | URL, options?: AuthenticatedFetchOptions): Promise; dispose(): void; } export declare function createOAuthClient(config: StrandsAccountConfig): OAuthClient; export declare function setDefaultClient(client: OAuthClient | null): void; export declare function getDefaultClient(): OAuthClient | null;