export interface BffUser { isAuthenticated: boolean; claims?: Record; sessionExpiresAt?: string; } export interface BffClientOptions { /** Must match the server's basePath. Default `/bff`. */ basePath?: string; /** Must match the server's antiForgeryHeader. Default `X-Authagonal-Bff`. */ antiForgeryHeader?: string; } export interface BffClient { /** fetch() that adds the anti-forgery header. Use for `/bff/user` and `/bff/api/*`. */ fetch(input: string, init?: RequestInit): Promise; /** GET `/bff/user`. */ getUser(): Promise; /** Navigate the browser to login (defaults returnUrl to the current path). */ login(returnUrl?: string): void; /** Navigate the browser to logout. */ logout(): void; /** Proxy a call through the BFF: `apiFetch('/orders/1')` → `GET {basePath}/api/orders/1` with the token. */ apiFetch(path: string, init?: RequestInit): Promise; } export declare function createBffClient(options?: BffClientOptions): BffClient;