import { QueryClient, DehydratedState, FetchInfiniteQueryOptions, FetchQueryOptions } from '@tanstack/react-query'; import { a as EdenQueryUtils } from './types-CC0ML13o.mjs'; /** * Creates utilities for fetching/prefetching data on the server. * */ declare const createUtils: (client: T, queryClient?: QueryClient) => EdenQueryUtils; type FetchWithQuery = (options: Omit, "queryKey"> & { query: TQuery; }) => Promise; type FetchWithoutQuery = (options?: Omit, "queryKey">) => Promise; type Fetch = TQuery extends void ? FetchWithoutQuery : FetchWithQuery; type FetchInfinite = (options: Omit, "queryKey"> & { query: TQuery; }) => Promise; type EdenQueryServerHelper = { [K in keyof T]: T[K] extends (...args: any) => any ? K extends "get" ? T[K] extends (options: infer Options) => Promise ? Response extends { data: any; error: any; } ? Options extends { query: infer Query; } ? Query extends { cursor: infer Cursor; } ? { fetch: Fetch; fetchInfinite: FetchInfinite; prefetch: Fetch; prefetchInfinite: FetchInfinite; } : { fetch: Fetch; prefetch: Fetch; } : { fetch: Fetch; prefetch: Fetch; } : never : never : never : EdenQueryServerHelper; } & { dehydrate: () => DehydratedState; }; /** * @deprecated This method is replaced with `createUtils` */ declare const createServerHelper: (eden: T) => EdenQueryServerHelper; export { createServerHelper, createUtils };