import type { QueryKey, QueryOptions, QueryState, QueryClientOptions } from "./types.js"; import { QueryCache } from "./query-cache.js"; export declare class QueryClient { private cache; private defaultOptions?; constructor(options?: QueryClientOptions); /** * Gets cached query data. */ getQueryData(queryKey: QueryKey): TData | undefined; /** * Sets query data directly in the cache. */ setQueryData(queryKey: QueryKey, data: TData): void; /** * Gets query state. */ getQueryState(queryKey: QueryKey): QueryState | undefined; /** * Invalidates queries matching the given key. */ invalidateQueries(queryKey: QueryKey): void; /** * Refetches queries matching the given key. */ refetchQueries(queryKey: QueryKey): Promise; /** * Fetches a query and updates the cache. */ fetchQuery(queryKey: QueryKey, queryFn: () => Promise, options?: Partial>): Promise; /** * Executes a query with retry logic and error handling. */ private executeQuery; /** * Updates query state and notifies subscribers. */ private updateQueryState; /** * Clears all queries from the cache. */ clear(): void; /** * Gets the internal cache (for testing). */ getCache(): QueryCache; /** * Gets default options. */ getDefaultOptions(): { queries?: Partial>; } | undefined; } /** * Creates a new QueryClient instance. */ export declare function createQueryClient(options?: QueryClientOptions): QueryClient; //# sourceMappingURL=query-client.d.ts.map