title: Core.z. Zod Pipeline

A2A Node SDK - v0.1.0 / Modules / Core / z / ZodPipeline

Class: ZodPipeline<A, B>

Core.z.ZodPipeline

Type parameters

NameType
Aextends ZodTypeAny
Bextends ZodTypeAny

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ZodPipeline<A, B>(def): ZodPipeline<A, B>

Type parameters

NameType
Aextends ZodTypeAny
Bextends ZodTypeAny

Parameters

NameType
defZodPipelineDef<A, B>

Returns

ZodPipeline<A, B>

Inherited from

ZodType.constructor

Properties

_def

Readonly _def: ZodPipelineDef<A, B>

Inherited from

ZodType._def


_input

Readonly _input: A["_input"]

Inherited from

ZodType._input


_output

Readonly _output: B["_output"]

Inherited from

ZodType._output


_type

Readonly _type: B["_output"]

Inherited from

ZodType._type


spa

spa: (data: unknown, params?: InexactPartial<ParseParams>) => Promise<SafeParseReturnType<A["_input"], B["_output"]>>

Alias of safeParseAsync

Type declaration

▸ (data, params?): Promise<SafeParseReturnType<A["_input"], B["_output"]>>

Parameters
NameType
dataunknown
params?InexactPartial<ParseParams>
Returns

Promise<SafeParseReturnType<A["_input"], B["_output"]>>

Inherited from

ZodType.spa


~standard

~standard: Props<A["_input"], B["_output"]>

Inherited from

ZodType.~standard

Accessors

description

get description(): undefined | string

Returns

undefined | string

Inherited from

ZodType.description

Methods

_getOrReturnCtx

_getOrReturnCtx(input, ctx?): ParseContext

Parameters

NameType
inputParseInput
ctx?ParseContext

Returns

ParseContext

Inherited from

ZodType._getOrReturnCtx


_getType

_getType(input): string

Parameters

NameType
inputParseInput

Returns

string

Inherited from

ZodType._getType


_parse

_parse(input): ParseReturnType<any>

Parameters

NameType
inputParseInput

Returns

ParseReturnType<any>

Overrides

ZodType._parse


_parseAsync

_parseAsync(input): AsyncParseReturnType<B["_output"]>

Parameters

NameType
inputParseInput

Returns

AsyncParseReturnType<B["_output"]>

Inherited from

ZodType._parseAsync


_parseSync

_parseSync(input): SyncParseReturnType<B["_output"]>

Parameters

NameType
inputParseInput

Returns

SyncParseReturnType<B["_output"]>

Inherited from

ZodType._parseSync


_processInputParams

_processInputParams(input): Object

Parameters

NameType
inputParseInput

Returns

Object

NameType
ctxParseContext
statusParseStatus

Inherited from

ZodType._processInputParams


_refinement

_refinement(refinement): ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Parameters

NameType
refinement(arg: B["_output"], ctx: RefinementCtx) => any

Returns

ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Inherited from

ZodType._refinement


and

and<T>(incoming): ZodIntersection<ZodPipeline<A, B>, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
incomingT

Returns

ZodIntersection<ZodPipeline<A, B>, T>

Inherited from

ZodType.and


array

array(): ZodArray<ZodPipeline<A, B>, "many">

Returns

ZodArray<ZodPipeline<A, B>, "many">

Inherited from

ZodType.array


brand

brand<B>(brand?): ZodBranded<ZodPipeline<A, B>, B>

Type parameters

NameType
Bextends string | number | symbol

Parameters

NameType
brand?B

Returns

ZodBranded<ZodPipeline<A, B>, B>

Inherited from

ZodType.brand


catch

catch(def): ZodCatch<ZodPipeline<A, B>>

Parameters

NameType
defB["_output"]

Returns

ZodCatch<ZodPipeline<A, B>>

Inherited from

ZodType.catch

catch(def): ZodCatch<ZodPipeline<A, B>>

Parameters

NameType
def(ctx: { error: ZodError<any> ; input: A["_input"] }) => B["_output"]

Returns

ZodCatch<ZodPipeline<A, B>>

Inherited from

ZodType.catch


create

create<ASchema, BSchema>(a, b): ZodPipeline<ASchema, BSchema>

Type parameters

NameType
ASchemaextends ZodTypeAny
BSchemaextends ZodTypeAny

Parameters

NameType
aASchema
bBSchema

Returns

ZodPipeline<ASchema, BSchema>


default

default(def): ZodDefault<ZodPipeline<A, B>>

Parameters

NameType
defnoUndefined<A["_input"]>

Returns

ZodDefault<ZodPipeline<A, B>>

Inherited from

ZodType.default

default(def): ZodDefault<ZodPipeline<A, B>>

Parameters

NameType
def() => noUndefined<A["_input"]>

Returns

ZodDefault<ZodPipeline<A, B>>

Inherited from

ZodType.default


describe

describe(description): this

Parameters

NameType
descriptionstring

Returns

this

Inherited from

ZodType.describe


isNullable

isNullable(): boolean

Returns

boolean

Inherited from

ZodType.isNullable


isOptional

isOptional(): boolean

Returns

boolean

Inherited from

ZodType.isOptional


nullable

nullable(): ZodNullable<ZodPipeline<A, B>>

Returns

ZodNullable<ZodPipeline<A, B>>

Inherited from

ZodType.nullable


nullish

nullish(): ZodOptional<ZodNullable<ZodPipeline<A, B>>>

Returns

ZodOptional<ZodNullable<ZodPipeline<A, B>>>

Inherited from

ZodType.nullish


optional

optional(): ZodOptional<ZodPipeline<A, B>>

Returns

ZodOptional<ZodPipeline<A, B>>

Inherited from

ZodType.optional


or

or<T>(option): ZodUnion<[ZodPipeline<A, B>, T]>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
optionT

Returns

ZodUnion<[ZodPipeline<A, B>, T]>

Inherited from

ZodType.or


parse

parse(data, params?): B["_output"]

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

B["_output"]

Inherited from

ZodType.parse


parseAsync

parseAsync(data, params?): Promise<B["_output"]>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<B["_output"]>

Inherited from

ZodType.parseAsync


pipe

pipe<T>(target): ZodPipeline<ZodPipeline<A, B>, T>

Type parameters

NameType
Textends ZodTypeAny

Parameters

NameType
targetT

Returns

ZodPipeline<ZodPipeline<A, B>, T>

Inherited from

ZodType.pipe


promise

promise(): ZodPromise<ZodPipeline<A, B>>

Returns

ZodPromise<ZodPipeline<A, B>>

Inherited from

ZodType.promise


readonly

readonly(): ZodReadonly<ZodPipeline<A, B>>

Returns

ZodReadonly<ZodPipeline<A, B>>

Inherited from

ZodType.readonly


refine

refine<RefinedOutput>(check, message?): ZodEffects<ZodPipeline<A, B>, RefinedOutput, A["_input"]>

Type parameters

NameType
RefinedOutputextends any

Parameters

NameType
check(arg: B["_output"]) => arg is RefinedOutput
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: B["_output"]) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodPipeline<A, B>, RefinedOutput, A["_input"]>

Inherited from

ZodType.refine

refine(check, message?): ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Parameters

NameType
check(arg: B["_output"]) => unknown
message?string | Partial<Omit<ZodCustomIssue, "code">> | (arg: B["_output"]) => Partial<Omit<ZodCustomIssue, "code">>

Returns

ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Inherited from

ZodType.refine


refinement

refinement<RefinedOutput>(check, refinementData): ZodEffects<ZodPipeline<A, B>, RefinedOutput, A["_input"]>

Type parameters

NameType
RefinedOutputextends any

Parameters

NameType
check(arg: B["_output"]) => arg is RefinedOutput
refinementDataIssueData | (arg: B["_output"], ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodPipeline<A, B>, RefinedOutput, A["_input"]>

Inherited from

ZodType.refinement

refinement(check, refinementData): ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Parameters

NameType
check(arg: B["_output"]) => boolean
refinementDataIssueData | (arg: B["_output"], ctx: RefinementCtx) => IssueData

Returns

ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Inherited from

ZodType.refinement


safeParse

safeParse(data, params?): SafeParseReturnType<A["_input"], B["_output"]>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

SafeParseReturnType<A["_input"], B["_output"]>

Inherited from

ZodType.safeParse


safeParseAsync

safeParseAsync(data, params?): Promise<SafeParseReturnType<A["_input"], B["_output"]>>

Parameters

NameType
dataunknown
params?InexactPartial<ParseParams>

Returns

Promise<SafeParseReturnType<A["_input"], B["_output"]>>

Inherited from

ZodType.safeParseAsync


superRefine

superRefine<RefinedOutput>(refinement): ZodEffects<ZodPipeline<A, B>, RefinedOutput, A["_input"]>

Type parameters

NameType
RefinedOutputextends any

Parameters

NameType
refinement(arg: B["_output"], ctx: RefinementCtx) => arg is RefinedOutput

Returns

ZodEffects<ZodPipeline<A, B>, RefinedOutput, A["_input"]>

Inherited from

ZodType.superRefine

superRefine(refinement): ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Parameters

NameType
refinement(arg: B["_output"], ctx: RefinementCtx) => void

Returns

ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Inherited from

ZodType.superRefine

superRefine(refinement): ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Parameters

NameType
refinement(arg: B["_output"], ctx: RefinementCtx) => Promise<void>

Returns

ZodEffects<ZodPipeline<A, B>, B["_output"], A["_input"]>

Inherited from

ZodType.superRefine


transform

transform<NewOut>(transform): ZodEffects<ZodPipeline<A, B>, NewOut, A["_input"]>

Type parameters

Name
NewOut

Parameters

NameType
transform(arg: B["_output"], ctx: RefinementCtx) => NewOut | Promise<NewOut>

Returns

ZodEffects<ZodPipeline<A, B>, NewOut, A["_input"]>

Inherited from

ZodType.transform


~validate

~validate(data): Result<B["_output"]> | Promise<Result<B["_output"]>>

Parameters

NameType
dataunknown

Returns

Result<B["_output"]> | Promise<Result<B["_output"]>>

Inherited from

ZodType.~validate