import { type FetchLike } from "@opengeni/sdk/browser"; import { type ReactNode } from "react"; import type { SessionClientLike } from "../client.js"; /** Request headers for every proxy call: static, or computed per request. */ export type SessionProxyHeaders = Record | (() => Record); export type SessionProxyBaseUrl = { /** * Mount path of your `createSessionProxyHandler` (for example * `"/api/opengeni"`). The component then needs no `OpenGeniProvider`, * client, or workspace id: it creates the browser client for that path and * uses the workspace the proxy resolved for the signed-in user. An explicit * `workspaceId` skips that lookup. A `client` you pass is used instead of * the created one (point it at the same proxy). */ baseUrl?: string | undefined; /** * `baseUrl` mode: headers added to every proxy request, for hosts that * authenticate with a bearer token instead of cookies. A function is called * per request, so it can return the current token. */ headers?: SessionProxyHeaders | undefined; /** `baseUrl` mode: custom fetch for every proxy request (async auth, retries). */ fetch?: FetchLike | undefined; }; /** * `OpenGeniProvider` for a same-origin session proxy, from its base URL alone. * The proxy's client config names the resolved workspace, so the browser * never handles an Opengeni id. Provider-based usage is unchanged. */ export declare function SessionProxyScope({ baseUrl, workspaceId, client: suppliedClient, headers, fetch, children, }: Omit & { baseUrl: string; workspaceId?: string | undefined; client?: SessionClientLike | undefined; children: ReactNode; }): import("react").JSX.Element;