Interface: ZodJSONSchema
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:763
Extends
_ZodJSONSchema
Properties
_def
_def:
$ZodUnionDef<[ZodString,ZodNumber,ZodBoolean,ZodNull,ZodArray<ZodJSONSchema>,ZodRecord<ZodString,ZodJSONSchema>]>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:10
Deprecated
Use .def instead.
Inherited from
_ZodJSONSchema._def
_input
_input:
string|number|boolean|Record<string,JSONType> |JSONType[] |null
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:14
Deprecated
Use z.input<typeof schema> instead.
Inherited from
_ZodJSONSchema._input
_output
_output:
string|number|boolean|Record<string,JSONType> |JSONType[] |null
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:12
Deprecated
Use z.output<typeof schema> instead.
Inherited from
_ZodJSONSchema._output
_zod
_zod:
ZodJSONSchemaInternals
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:764
Overrides
_ZodJSONSchema._zod
~standard
~standard:
ZodStandardSchemaWithJSON<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:494
Inherited from
_ZodJSONSchema.~standard
def
def:
$ZodUnionDef<[ZodString,ZodNumber,ZodBoolean,ZodNull,ZodArray<ZodJSONSchema>,ZodRecord<ZodString,ZodJSONSchema>]>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:7
Inherited from
_ZodJSONSchema.def
description?
optionaldescription:string
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:60
Inherited from
_ZodJSONSchema.description
options
options: [
ZodString,ZodNumber,ZodBoolean,ZodNull,ZodArray<ZodJSONSchema>,ZodRecord<ZodString,ZodJSONSchema>]
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:495
Inherited from
_ZodJSONSchema.options
spa()
spa: (
data,params?) =>Promise<ZodSafeParseResult<JSONType>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:29
Parameters
data
unknown
params?
Returns
Promise<ZodSafeParseResult<JSONType>>
Inherited from
_ZodJSONSchema.spa
type
type:
"union"
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:8
Inherited from
_ZodJSONSchema.type
Methods
and()
and<
T>(incoming):ZodIntersection<ZodJSONSchema,T>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:52
Type Parameters
T
T extends SomeType
Parameters
incoming
T
Returns
ZodIntersection<ZodJSONSchema, T>
Inherited from
_ZodJSONSchema.and
apply()
apply<
T>(fn):T
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:82
Type Parameters
T
T
Parameters
fn
(schema) => T
Returns
T
Inherited from
_ZodJSONSchema.apply
array()
array():
ZodArray<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:50
Returns
ZodArray<ZodJSONSchema>
Inherited from
_ZodJSONSchema.array
brand()
brand<
T,Dir>(value?):PropertyKeyextendsT?ZodJSONSchema:$ZodBranded<ZodJSONSchema,T,Dir>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:24
Type Parameters
T
T extends PropertyKey = PropertyKey
Dir
Dir extends "inout" | "in" | "out" = "out"
Parameters
value?
T
Returns
PropertyKey extends T ? ZodJSONSchema : $ZodBranded<ZodJSONSchema, T, Dir>
Inherited from
_ZodJSONSchema.brand
catch()
Call Signature
catch(
def):ZodCatch<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:54
Parameters
def
Returns
ZodCatch<ZodJSONSchema>
Inherited from
_ZodJSONSchema.catch
Call Signature
catch(
def):ZodCatch<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:55
Parameters
def
(ctx) => JSONType
Returns
ZodCatch<ZodJSONSchema>
Inherited from
_ZodJSONSchema.catch
check()
check(...
checks):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:18
Parameters
checks
...(CheckFn<JSONType> | $ZodCheck<JSONType>)[]
Returns
this
Inherited from
_ZodJSONSchema.check
clone()
clone(
def?,params?):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:20
Parameters
def?
$ZodUnionDef<[ZodString, ZodNumber, ZodBoolean, ZodNull, ZodArray<ZodJSONSchema>, ZodRecord<ZodString, ZodJSONSchema>]>
params?
parent
boolean
Returns
this
Inherited from
_ZodJSONSchema.clone
decode()
decode(
data,params?):JSONType
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:31
Parameters
data
params?
Returns
Inherited from
_ZodJSONSchema.decode
decodeAsync()
decodeAsync(
data,params?):Promise<JSONType>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:33
Parameters
data
params?
Returns
Promise<JSONType>
Inherited from
_ZodJSONSchema.decodeAsync
default()
Call Signature
default(
def):ZodDefault<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:46
Parameters
def
Returns
ZodDefault<ZodJSONSchema>
Inherited from
_ZodJSONSchema.default
Call Signature
default(
def):ZodDefault<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:47
Parameters
def
() => JSONType
Returns
ZodDefault<ZodJSONSchema>
Inherited from
_ZodJSONSchema.default
describe()
describe(
description):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:59
Returns a new instance that has been registered in z.globalRegistry with the specified description
Parameters
description
string
Returns
this
Inherited from
_ZodJSONSchema.describe
encode()
encode(
data,params?):JSONType
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:30
Parameters
data
params?
Returns
Inherited from
_ZodJSONSchema.encode
encodeAsync()
encodeAsync(
data,params?):Promise<JSONType>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:32
Parameters
data
params?
Returns
Promise<JSONType>
Inherited from
_ZodJSONSchema.encodeAsync
exactOptional()
exactOptional():
ZodExactOptional<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:42
Returns
ZodExactOptional<ZodJSONSchema>
Inherited from
_ZodJSONSchema.exactOptional
isNullable()
isNullable():
boolean
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:81
Returns
boolean
Deprecated
Try safe-parsing null (this is what isNullable does internally):
const schema = z.string().nullable();
const isNullable = schema.safeParse(null).success; // true
Inherited from
_ZodJSONSchema.isNullable
isOptional()
isOptional():
boolean
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:72
Returns
boolean
Deprecated
Try safe-parsing undefined (this is what isOptional does internally):
const schema = z.string().optional();
const isOptional = schema.safeParse(undefined).success; // true
Inherited from
_ZodJSONSchema.isOptional
meta()
Call Signature
meta(): {[
key:string]:unknown;deprecated?:boolean;description?:string;id?:string;title?:string; } |undefined
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:62
Returns the metadata associated with this instance in z.globalRegistry
Returns
{[key: string]: unknown; deprecated?: boolean; description?: string; id?: string; title?: string; } | undefined
Inherited from
_ZodJSONSchema.meta
Call Signature
meta(
data):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:64
Returns a new instance that has been registered in z.globalRegistry with the specified metadata
Parameters
data
deprecated?
boolean
description?
string
id?
string
title?
string
Returns
this
Inherited from
_ZodJSONSchema.meta
nonoptional()
nonoptional(
params?):ZodNonOptional<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:43
Parameters
params?
string |
{ error?: string | $ZodErrorMap<$ZodIssueInvalidType<unknown>>; message?: string; }
error?
string | $ZodErrorMap<$ZodIssueInvalidType<unknown>>
message?
string
Deprecated
This parameter is deprecated. Use error instead.
Returns
ZodNonOptional<ZodJSONSchema>
Inherited from
_ZodJSONSchema.nonoptional
nullable()
nullable():
ZodNullable<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:44
Returns
ZodNullable<ZodJSONSchema>
Inherited from
_ZodJSONSchema.nullable
nullish()
nullish():
ZodOptional<ZodNullable<ZodJSONSchema>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:45
Returns
ZodOptional<ZodNullable<ZodJSONSchema>>
Inherited from
_ZodJSONSchema.nullish
optional()
optional():
ZodOptional<ZodJSONSchema>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:41
Returns
ZodOptional<ZodJSONSchema>
Inherited from
_ZodJSONSchema.optional
or()
or<
T>(option):ZodUnion<[ZodJSONSchema,T]>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:51
Type Parameters
T
T extends SomeType
Parameters
option
T
Returns
ZodUnion<[ZodJSONSchema, T]>
Inherited from
_ZodJSONSchema.or
overwrite()
overwrite(
fn):this
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:40
Parameters
fn
(x) => JSONType
Returns
this
Inherited from
_ZodJSONSchema.overwrite
parse()
parse(
data,params?):JSONType
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:25
Parameters
data
unknown
params?
Returns
Inherited from
_ZodJSONSchema.parse
parseAsync()
parseAsync(
data,params?):Promise<JSONType>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:27