Skip to content

Workery / parameters

Module: parameters

Table of contents

Functions

Functions

Path

Path(): PathParameter<z.ZodString>

Returns

PathParameter<z.ZodString>

Defined in

src/parameters.ts:27

Path<S>(schema, options?): PathParameter<S>

Type parameters

NameType
Sextends ZodType<any, ZodTypeDef, any>

Parameters

NameType
schemaS
options?Omit<RouteParameterOptions, "mediaType">

Returns

PathParameter<S>

Defined in

src/parameters.ts:28


Query

Query(): QueryParameter<z.ZodString>

Returns

QueryParameter<z.ZodString>

Defined in

src/parameters.ts:47

Query<S>(schema, options?): QueryParameter<S>

Type parameters

NameType
Sextends ZodType<any, ZodTypeDef, any>

Parameters

NameType
schemaS
options?Omit<RouteParameterOptions, "mediaType">

Returns

QueryParameter<S>

Defined in

src/parameters.ts:48


Header(): HeaderParameter<z.ZodString>

Returns

HeaderParameter<z.ZodString>

Defined in

src/parameters.ts:67

Header<S>(schema, options?): HeaderParameter<S>

Type parameters

NameType
Sextends ZodType<any, ZodTypeDef, any>

Parameters

NameType
schemaS
options?Omit<RouteParameterOptions, "mediaType">

Returns

HeaderParameter<S>

Defined in

src/parameters.ts:68


Cookie(): CookieParameter<z.ZodString>

Returns

CookieParameter<z.ZodString>

Defined in

src/parameters.ts:87

Cookie<S>(schema, options?): CookieParameter<S>

Type parameters

NameType
Sextends ZodType<any, ZodTypeDef, any>

Parameters

NameType
schemaS
options?Omit<RouteParameterOptions, "mediaType">

Returns

CookieParameter<S>

Defined in

src/parameters.ts:88


Body

Body(): BodyParameter<z.ZodString>

Returns

BodyParameter<z.ZodString>

Defined in

src/parameters.ts:107

Body(schema, options?): BodyParameter<z.ZodString>

Parameters

NameType
schemaStringConstructor
options?Omit<RouteParameterOptions, "altName">

Returns

BodyParameter<z.ZodString>

Defined in

src/parameters.ts:108

Body(schema, options?): BodyParameter<z.ZodType<Blob>>

Parameters

NameType
schema(blobParts?: BlobPart[], options?: BlobPropertyBag) => Blob
schema.prototypeBlob
options?Omit<RouteParameterOptions, "altName">

Returns

BodyParameter<z.ZodType<Blob>>

Defined in

src/parameters.ts:112

Body(schema, options?): BodyParameter<z.ZodType<ReadableStream>>

Parameters

NameType
schema(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }) => ReadableStream<Uint8Array><R>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>) => ReadableStream<R><R>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>) => ReadableStream<R>
schema.prototypeReadableStream<any>
options?Omit<RouteParameterOptions, "altName">

Returns

BodyParameter<z.ZodType<ReadableStream>>

Defined in

src/parameters.ts:116

Body<S>(schema, options?): BodyParameter<S>

Type parameters

NameType
Sextends ZodType<any, ZodTypeDef, any>

Parameters

NameType
schemaS
options?Omit<RouteParameterOptions, "altName">

Returns

BodyParameter<S>

Defined in

src/parameters.ts:120


Depends

Depends<R>(dependency): DependsParameter<z.ZodType<R>>

Type parameters

Name
R

Parameters

NameType
dependencyDependency<R, any, any>

Returns

DependsParameter<z.ZodType<R>>

Defined in

src/parameters.ts:140


parseArgs

parseArgs<Ps, E>(parameters, input): Promise<ParseArgsInfo<Ps, E>>

Type parameters

NameType
Psextends RouteParameters
Eunknown

Parameters

NameType
parametersPs
inputObject
input.baseArgsArgsOf<{}, E>
input.rawParameters?Object
input.rawParameters.params?Record<string, string>
input.rawParameters.queries?Record<string, string[]>
input.rawParameters.cookies?Record<string, string>
input.laterLater

Returns

Promise<ParseArgsInfo<Ps, E>>

Defined in

src/parameters.ts:148


Responds

Responds(): ResponseConfig

Returns

ResponseConfig

Defined in

src/parameters.ts:250

Responds(schema, options?): ResponseConfig

Parameters

NameType
schemaStringConstructor
options?RespondsOptions

Returns

ResponseConfig

Defined in

src/parameters.ts:251

Responds(schema, options?): ResponseConfig

Parameters

NameType
schema(blobParts?: BlobPart[], options?: BlobPropertyBag) => Blob
schema.prototypeBlob
options?RespondsOptions

Returns

ResponseConfig

Defined in

src/parameters.ts:252

Responds(schema, options?): ResponseConfig

Parameters

NameType
schema(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number }) => ReadableStream<Uint8Array><R>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>) => ReadableStream<R><R>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>) => ReadableStream<R>
schema.prototypeReadableStream<any>
options?RespondsOptions

Returns

ResponseConfig

Defined in

src/parameters.ts:253

Responds(schema, options?): ResponseConfig

Parameters

NameType
schemaZodType<any, ZodTypeDef, any>
options?RespondsOptions

Returns

ResponseConfig

Defined in

src/parameters.ts:254