Copy
Ask AI
const ctx = useSunbreak();
Shape
Copy
Ask AI
{
get<T>(path: string, opts?: RequestInit): Promise<T | undefined>;
post<T>(path: string, body?: unknown, opts?: RequestInit): Promise<T | undefined>;
session(): Promise<SessionResp | undefined>;
refresh(): Promise<boolean>;
authenticated: boolean;
loading: boolean;
error: string | null;
allowed: boolean | null;
sessionExpiry: number | null;
sessionData: SessionResp | null;
}
loading reflects the number of in‑flight requests.