The type of the parsed JSON body.
The type of the parsed form fields.
The type of the parsed path parameters.
The type of the parsed query parameters.
The type of the parsed headers.
The expected file definitions.
The type of the parsed cookie data.
IMPORT_PATH: "@daiso-tech/core/http-router/contracts"
Optionalcookies?: StandardSchemaV1<StringInputs, TCookieData>Optionalfields?: StandardSchemaV1<MultiStringInputs, TReqFields>Optional schema for validating form fields or url encoded fields. Receives MultiStringInputs (string or string[]) since form fields may appear multiple times.
Optionalfiles?: TReqFilesOptional expected file definitions for validation.
Optionalheaders?: StandardSchemaV1<StringInputs, TReqHeaders>Optional schema for validating request headers.
Optionaljson?: StandardSchemaV1<TReqJson>Optional schema for validating the JSON body.
Optionalparams?: StandardSchemaV1<StringInputs, TReqParams>Optional schema for validating path parameters.
OptionalsearchParams?: StandardSchemaV1<MultiStringInputs, TReqSearchParams>Optional schema for validating query string parameters.
Defines optional validation schemas for each source of request data. Each field uses Standard Schema V1 to validate and transform the input.
Cookies are validated via the optional
cookiesschema, which receives raw cookie strings and should produce a typed record of parsed values.Each field maps directly to its own type parameter so TypeScript can infer the output type from the schema (e.g. from a Zod schema) without needing to reverse through indexed access types.