import { type PersistedClient } from "@tanstack/query-persist-client-core"; import { type QueryClient } from "@tanstack/react-query"; import { type ReactNode } from "react"; import type { AuthSession } from "../server/auth.js"; export interface ActionQueryCacheStorage { get(key: string): Promise; set(key: string, value: PersistedClient): Promise; del(key: string): Promise; keys(): Promise; clear(): Promise; } /** @internal exported for tests */ export declare function setActionQueryCacheStorage(next: ActionQueryCacheStorage | undefined): void; /** * The record a session's results live under: one per user, org, and client * build. The session comes only from the verified session, never a hint saved * from an earlier visit. The build keeps a deploy from painting results shaped * by the previous build. */ export declare function actionQueryCacheScope(session: Pick, buildId: string): string; /** * Points the client's action results at one scope's record and restores it. * Resolves once the record is in the client or the restore has given up. */ export declare function bindActionQueryCache(client: QueryClient, scope: string, options?: { trustPrebindResults?: boolean; }): Promise; /** Sign-out: stop, drop this document's results, and delete every stored * record. */ export declare function clearActionQueryCache(client?: QueryClient): Promise; /** * Holds action queries until the session's cached results are in the client, * so a revisit paints them instead of a skeleton. With a signed-out session it * clears the stored results, whichever path ended that session. */ export declare function ActionQueryCacheGate({ children }: { children: ReactNode; }): import("react").JSX.Element;