import { ServerQuery } from './server-query.js'; declare const FARM_SERVER_QUERY_RESULT_VERSION: 1; type FarmServerQueryResult = { __farmServerQuery: { version: typeof FARM_SERVER_QUERY_RESULT_VERSION; key: string; staleTime: number | false; updatedAt: number; /** Declared by the query; allows the client persistence adapter to store the entry. */ persist?: boolean; }; data: TData; }; type ServerQueryFetchOptions = { /** Used only when a non-Farm transport returns plain data. Farm transports use the declaration. */ staleTime?: number | false; /** Return stale data immediately while refreshing it in the background. Default true. */ swr?: boolean; /** Always wait for a new result. */ force?: boolean; }; type FarmServerQueryActionInvocation = { actionId: string; args: readonly unknown[]; provisionalKey?: string; owner?: object; }; declare function beginFarmServerQueryAction(actionId: string, args: readonly unknown[]): FarmServerQueryActionInvocation; declare function completeFarmServerQueryAction(invocation: FarmServerQueryActionInvocation, value: TData | FarmServerQueryResult): TData; declare function shouldApplyFarmServerQueryActionResult(invocation: FarmServerQueryActionInvocation): boolean; declare function fetchServerQuery(query: ServerQuery, input: TInput, options?: ServerQueryFetchOptions): Promise; declare function prefetchServerQuery(query: ServerQuery, input: TInput, options?: Omit): Promise; export { type FarmServerQueryActionInvocation as F, type ServerQueryFetchOptions as S, beginFarmServerQueryAction as b, completeFarmServerQueryAction as c, fetchServerQuery as f, prefetchServerQuery as p, shouldApplyFarmServerQueryActionResult as s };