import { RouteDataCacheKey } from './cache.mjs'; import { ServerFnContext, ServerFnSchema, AnyServerFnMiddleware, InferServerFnSchemaOutput, ServerFnMiddlewareContext, ServerFnHandler, InferServerFnSchemaInput } from './server-fn.mjs'; import './server-fn-error-DDh14a0V.mjs'; type MaybePromise = T | Promise; type ServerQueryStaleTime = number | false | `${number}${"ms" | "s" | "m" | "h"}`; type ServerQueryKey = (context: ServerFnContext) => MaybePromise; type ServerQueryOptions = { input?: TSchema; output?: undefined; middleware?: TMiddlewares; key: ServerQueryKey : unknown, ServerFnMiddlewareContext>; /** Milliseconds, a duration string such as "30s", or false for no expiry. */ staleTime?: ServerQueryStaleTime; /** Allow the configured client cache persistence adapter to store results on the device. */ persist?: boolean; handler: ServerFnHandler : unknown, TResult, ServerFnMiddlewareContext>; }; type ServerQueryOutputOptions = { input?: TInputSchema; output: TOutputSchema; middleware?: TMiddlewares; key: ServerQueryKey : unknown, ServerFnMiddlewareContext>; /** Milliseconds, a duration string such as "30s", or false for no expiry. */ staleTime?: ServerQueryStaleTime; /** Allow the configured client cache persistence adapter to store results on the device. */ persist?: boolean; handler: ServerFnHandler : unknown, unknown, ServerFnMiddlewareContext>; }; type ServerQuery = ([unknown] extends [TInput] ? (input?: TInput) => Promise : (input: TInput) => Promise) & { readonly __farmServerQuery: true; readonly __farmServerQueryInput?: unknown; readonly __farmServerQueryOutput?: unknown; }; declare const FARM_SERVER_QUERY_SYMBOL: unique symbol; declare function createServerQuery(options: ServerQueryOutputOptions): ServerQuery, Awaited>>; declare function createServerQuery(options: ServerQueryOutputOptions): ServerQuery>>; declare function createServerQuery(options: ServerQueryOptions): ServerQuery, Awaited>; declare function createServerQuery(options: ServerQueryOptions): ServerQuery>; export { FARM_SERVER_QUERY_SYMBOL, type ServerQuery, type ServerQueryKey, type ServerQueryOptions, type ServerQueryOutputOptions, type ServerQueryStaleTime, createServerQuery };