/** * Proactively rotate the WorkOS session (used by `config.requireAuth`, * which calls it with no request in hand). Routes through * the shared cross-door lock. Passing the current token as `usedAccessToken` * means "no peer has rotated yet", so it performs a real refresh rather than * short-circuiting. Returns true when a usable session exists afterward. */ export declare function tryRefreshToken(): Promise; type FetchOptions = { method?: string; body?: unknown; magicToken?: string; }; export declare class ApiError extends Error { status: number; body: Record; constructor(message: string, status: number, body: Record); } /** * 401 after any refresh attempt: the session is gone, not a request problem. A typed * class so callers can distinguish a dead session from a generic request error. */ export declare class AuthRequiredError extends Error { constructor(message?: string); } export declare function setCliVersion(version: string): void; export declare function getCliVersion(): string | undefined; /** * Make a request to the API. * Paths are absolute — e.g. pass '/orgs' to hit /orgs, '/auth/signup' to hit /auth/signup. */ export declare function api(path: string, opts?: FetchOptions, _retried?: boolean): Promise; export {}; //# sourceMappingURL=api.d.ts.map