import { Try } from '@oats-ts/try'; import { ValidatorConfig } from '@oats-ts/validators'; /** Types that can be individual parameter values */ export declare type Primitive = string | number | boolean; export declare type PrimitiveArray = ReadonlyArray; export declare type PrimitiveRecord = Record; /** Union type for above */ export declare type ParameterValue = Primitive | PrimitiveArray | PrimitiveRecord; export declare type FieldParsers = { [P in keyof T]: ValueParser; }; /** Object, collection of named parameter values */ export declare type ParameterObject = Record; export declare type ValueParser = (input: I, name: string, path: string, config: ValidatorConfig) => Try; /** Query related types */ export declare type QueryOptions = { explode?: boolean; required?: boolean; }; export declare type RawQueryParams = Record; export declare type QueryValueDeserializer = (value: RawQueryParams, name: string, path: string, config: ValidatorConfig) => Try; export declare type QueryValueDeserializers = { [P in keyof T]: QueryValueDeserializer; }; export declare type QueryDeserializer = (input: string, path?: string, config?: ValidatorConfig) => Try; /** Path related types */ export declare type PathOptions = { explode?: boolean; }; export declare type RawPathParams = Record; export declare type PathValueDeserializer = (value: RawPathParams, name: string, path: string, config: ValidatorConfig) => Try; export declare type PathValueDeserializers = { [P in keyof T]: PathValueDeserializer; }; export declare type PathDeserializer = (input: string, path?: string, config?: ValidatorConfig) => Try; /** Header related types */ export declare type HeaderOptions = { explode?: boolean; required?: boolean; }; export declare type RawHeaders = Record; export declare type HeaderValueDeserializer = (value: RawHeaders, name: string, path: string, config: ValidatorConfig) => Try; export declare type HeaderValueDeserializers = { [P in keyof T]: HeaderValueDeserializer; }; export declare type HeaderDeserializer = (input: RawHeaders, path?: string, config?: ValidatorConfig) => Try;