import type { MatchParams } from '@remix-run/route-pattern/match'; import type * as z from 'zod'; import type { MutationRouteSchema, QueryRouteSchema, RawBodySchema, RouteSchema } from './schema.js'; declare class Any { private isAny; } type PathInput = T extends { path: infer TPath; } ? z.infer : MatchParams

; type QueryInput = T extends QueryRouteSchema & { query: infer TQuery; } ? z.infer : unknown; type BodyInput = T extends MutationRouteSchema ? T extends { body: infer TBody; } ? TBody extends RawBodySchema ? unknown : z.infer : unknown : unknown; type HeaderInput = T extends { headers: infer THeaders; } ? Partial> : Record; /** * Semantic input accepted by a generated client action function. * * @remarks Path params, query params, and JSON body fields are flattened into a * single object. Avoid declaring duplicate keys across path/query/body schemas, * since a flat input cannot distinguish their source. */ export type RouteInput = [T] extends [Any] ? any : PathInput & QueryInput & BodyInput; /** * Fetch options accepted by a generated client action. * * @remarks `headers` remains optional because required route headers may be * supplied by `createClient({ headers })` defaults. Raw-body routes with path or * query input accept `body` here; raw-body routes without input accept the body * as the first client action argument and these options as the second. */ export type RouteFetchOptions = Omit & { /** Headers for this request. Undefined values are removed before `fetch`. */ headers?: HeaderInput; }; type RouteBodyOption = T extends { body: RawBodySchema; } ? { body: BodyInit | null; } : {}; export type RouteOptions = RouteFetchOptions & RouteBodyOption; export {};