Skip to main content

Interface: ZodString

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:109

Extends

Properties

_def

_def: $ZodStringDef

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:10

Deprecated

Use .def instead.

Inherited from

_ZodString._def


_input

_input: string

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:14

Deprecated

Use z.input<typeof schema> instead.

Inherited from

_ZodString._input


_output

_output: string

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:12

Deprecated

Use z.output<typeof schema> instead.

Inherited from

_ZodString._output


_zod

_zod: $ZodStringInternals

Defined in: packages/agentos/node_modules/zod/v4/core/schemas.d.cts:93

Inherited from

_ZodString._zod


~standard

~standard: ZodStandardSchemaWithJSON<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:15

Inherited from

_ZodString.~standard


def

def: $ZodStringDef

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:7

Inherited from

_ZodString.def


description?

optional description: string

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:60

Inherited from

_ZodString.description


format

format: string | null

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:88

Inherited from

_ZodString.format


maxLength

maxLength: number | null

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:90

Inherited from

_ZodString.maxLength


minLength

minLength: number | null

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:89

Inherited from

_ZodString.minLength


spa()

spa: (data, params?) => Promise<ZodSafeParseResult<string>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:29

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

Promise<ZodSafeParseResult<string>>

Inherited from

_ZodString.spa


type

type: "string"

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:8

Inherited from

_ZodString.type

Methods

and()

and<T>(incoming): ZodIntersection<ZodString, 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<ZodString, T>

Inherited from

_ZodString.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

_ZodString.apply


array()

array(): ZodArray<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:50

Returns

ZodArray<ZodString>

Inherited from

_ZodString.array


base64()

base64(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:143

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Deprecated

Use z.base64() instead.


base64url()

base64url(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:145

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Deprecated

Use z.base64url() instead.


brand()

brand<T, Dir>(value?): PropertyKey extends T ? ZodString : $ZodBranded<ZodString, 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 ? ZodString : $ZodBranded<ZodString, T, Dir>

Inherited from

_ZodString.brand


catch()

Call Signature

catch(def): ZodCatch<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:54

Parameters
def

string

Returns

ZodCatch<ZodString>

Inherited from

_ZodString.catch

Call Signature

catch(def): ZodCatch<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:55

Parameters
def

(ctx) => string

Returns

ZodCatch<ZodString>

Inherited from

_ZodString.catch


check()

check(...checks): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:18

Parameters

checks

...($ZodCheck<string> | CheckFn<string>)[]

Returns

this

Inherited from

_ZodString.check


cidrv4()

cidrv4(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:155

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; version?: "v4"; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

version?

"v4"

Returns

this

Deprecated

Use z.cidrv4() instead.


cidrv6()

cidrv6(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:157

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; version?: "v6"; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

version?

"v6"

Returns

this

Deprecated

Use z.cidrv6() instead.


clone()

clone(def?, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:20

Parameters

def?

$ZodStringDef

params?
parent

boolean

Returns

this

Inherited from

_ZodString.clone


cuid()

cuid(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:137

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

CUID v1 is deprecated by its authors due to information leakage (timestamps embedded in the id). Use z.cuid2() instead. See https://github.com/paralleldrive/cuid.


cuid2()

cuid2(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:139

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.cuid2() instead.


date()

date(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:163

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Deprecated

Use z.iso.date() instead.


datetime()

datetime(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:161

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; local?: boolean; message?: string; offset?: boolean; precision?: number | null; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

local?

boolean

message?

string

Deprecated

This parameter is deprecated. Use error instead.

offset?

boolean

precision?

number | null

Returns

this

Deprecated

Use z.iso.datetime() instead.


decode()

decode(data, params?): string

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:31

Parameters

data

string

params?

ParseContext<$ZodIssue>

Returns

string

Inherited from

_ZodString.decode


decodeAsync()

decodeAsync(data, params?): Promise<string>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:33

Parameters

data

string

params?

ParseContext<$ZodIssue>

Returns

Promise<string>

Inherited from

_ZodString.decodeAsync


default()

Call Signature

default(def): ZodDefault<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:46

Parameters
def

string

Returns

ZodDefault<ZodString>

Inherited from

_ZodString.default

Call Signature

default(def): ZodDefault<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:47

Parameters
def

() => string

Returns

ZodDefault<ZodString>

Inherited from

_ZodString.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

_ZodString.describe


duration()

duration(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:167

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.iso.duration() instead.


e164()

e164(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:159

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.e164() instead.


email()

email(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:111

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.email() instead.


emoji()

emoji(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:117

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.emoji() instead.


encode()

encode(data, params?): string

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:30

Parameters

data

string

params?

ParseContext<$ZodIssue>

Returns

string

Inherited from

_ZodString.encode


encodeAsync()

encodeAsync(data, params?): Promise<string>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:32

Parameters

data

string

params?

ParseContext<$ZodIssue>

Returns

Promise<string>

Inherited from

_ZodString.encodeAsync


endsWith()

endsWith(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:94

Parameters

value

string

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Inherited from

_ZodString.endsWith


exactOptional()

exactOptional(): ZodExactOptional<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:42

Returns

ZodExactOptional<ZodString>

Inherited from

_ZodString.exactOptional


guid()

Call Signature

guid(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:119

Parameters
params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Deprecated

Use z.guid() instead.

Call Signature

guid(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:131

Parameters
params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Deprecated

Use z.guid() instead.


includes()

includes(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:92

Parameters

value

string

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; position?: number; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

position?

number

Returns

this

Inherited from

_ZodString.includes


ipv4()

ipv4(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:151

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Deprecated

Use z.ipv4() instead.


ipv6()

ipv6(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:153

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Deprecated

Use z.ipv6() instead.


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

_ZodString.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

_ZodString.isOptional


jwt()

jwt(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:115

Parameters

params?

string |

{ abort?: boolean; alg?: JWTAlgorithm; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

alg?

JWTAlgorithm

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Deprecated

Use z.jwt() instead.


ksuid()

ksuid(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:149

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.ksuid() instead.


length()

length(len, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:97

Parameters

len

number

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<NonNullable<$ZodIssueTooSmall<HasLength> | $ZodIssueTooBig<HasLength>>>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<NonNullable<$ZodIssueTooSmall<HasLength> | $ZodIssueTooBig<HasLength>>>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Inherited from

_ZodString.length


lowercase()

lowercase(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:99

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Inherited from

_ZodString.lowercase


max()

max(maxLength, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:96

Parameters

maxLength

number

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooBig<HasLength>>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueTooBig<HasLength>>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Inherited from

_ZodString.max


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

_ZodString.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

_ZodString.meta


min()

min(minLength, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:95

Parameters

minLength

number

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooSmall<HasLength>>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueTooSmall<HasLength>>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Inherited from

_ZodString.min


nanoid()

nanoid(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:129

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.nanoid() instead.


nonempty()

nonempty(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:98

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueTooSmall<HasLength>>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueTooSmall<HasLength>>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Inherited from

_ZodString.nonempty


nonoptional()

nonoptional(params?): ZodNonOptional<ZodString>

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<ZodString>

Inherited from

_ZodString.nonoptional


normalize()

normalize(form?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:102

Parameters

form?

string & object | "NFC" | "NFD" | "NFKC" | "NFKD"

Returns

this

Inherited from

_ZodString.normalize


nullable()

nullable(): ZodNullable<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:44

Returns

ZodNullable<ZodString>

Inherited from

_ZodString.nullable


nullish()

nullish(): ZodOptional<ZodNullable<ZodString>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:45

Returns

ZodOptional<ZodNullable<ZodString>>

Inherited from

_ZodString.nullish


optional()

optional(): ZodOptional<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:41

Returns

ZodOptional<ZodString>

Inherited from

_ZodString.optional


or()

or<T>(option): ZodUnion<[ZodString, 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<[ZodString, T]>

Inherited from

_ZodString.or


overwrite()

overwrite(fn): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:40

Parameters

fn

(x) => string

Returns

this

Inherited from

_ZodString.overwrite


parse()

parse(data, params?): string

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:25

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

string

Inherited from

_ZodString.parse


parseAsync()

parseAsync(data, params?): Promise<string>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:27

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

Promise<string>

Inherited from

_ZodString.parseAsync


pipe()

pipe<T>(target): ZodPipe<ZodString, T>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:56

Type Parameters

T

T extends $ZodType<any, string, $ZodTypeInternals<any, string>>

Parameters

target

T | $ZodType<any, string, $ZodTypeInternals<any, string>>

Returns

ZodPipe<ZodString, T>

Inherited from

_ZodString.pipe


prefault()

Call Signature

prefault(def): ZodPrefault<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:48

Parameters
def

() => string

Returns

ZodPrefault<ZodString>

Inherited from

_ZodString.prefault

Call Signature

prefault(def): ZodPrefault<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:49

Parameters
def

string

Returns

ZodPrefault<ZodString>

Inherited from

_ZodString.prefault


readonly()

readonly(): ZodReadonly<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:57

Returns

ZodReadonly<ZodString>

Inherited from

_ZodString.readonly


refine()

refine<Ch>(check, params?): Ch extends (arg) => arg is R ? ZodString & ZodType<R, string, $ZodTypeInternals<R, string>> : ZodString

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:38

Type Parameters

Ch

Ch extends (arg) => unknown

Parameters

check

Ch

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<NonNullable<$ZodIssue>>; message?: string; params?: Record<string, any>; path?: PropertyKey[]; when?: (payload) => boolean; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<NonNullable<$ZodIssue>>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

params?

Record<string, any>

path?

PropertyKey[]

when?

(payload) => boolean

If provided, the check runs only when this returns true. By default, it is skipped if prior parsing produced aborting issues.

Returns

Ch extends (arg) => arg is R ? ZodString & ZodType<R, string, $ZodTypeInternals<R, string>> : ZodString

Inherited from

_ZodString.refine


regex()

regex(regex, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:91

Parameters

regex

RegExp

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Inherited from

_ZodString.regex


register()

register<R>(registry, ...meta): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:23

Type Parameters

R

R extends $ZodRegistry<MetadataType, $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>>

Parameters

registry

R

meta

...ZodString extends R["_schema"] ? undefined extends R["_meta"] ? [$replace<R["_meta"], R["_schema"] & ZodString>?] : [$replace<R["_meta"], R["_schema"] & ZodString>] : ["Incompatible schema"]

Returns

this

Inherited from

_ZodString.register


safeDecode()

safeDecode(data, params?): ZodSafeParseResult<string>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:35

Parameters

data

string

params?

ParseContext<$ZodIssue>

Returns

ZodSafeParseResult<string>

Inherited from

_ZodString.safeDecode


safeDecodeAsync()

safeDecodeAsync(data, params?): Promise<ZodSafeParseResult<string>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:37

Parameters

data

string

params?

ParseContext<$ZodIssue>

Returns

Promise<ZodSafeParseResult<string>>

Inherited from

_ZodString.safeDecodeAsync


safeEncode()

safeEncode(data, params?): ZodSafeParseResult<string>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:34

Parameters

data

string

params?

ParseContext<$ZodIssue>

Returns

ZodSafeParseResult<string>

Inherited from

_ZodString.safeEncode


safeEncodeAsync()

safeEncodeAsync(data, params?): Promise<ZodSafeParseResult<string>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:36

Parameters

data

string

params?

ParseContext<$ZodIssue>

Returns

Promise<ZodSafeParseResult<string>>

Inherited from

_ZodString.safeEncodeAsync


safeParse()

safeParse(data, params?): ZodSafeParseResult<string>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:26

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

ZodSafeParseResult<string>

Inherited from

_ZodString.safeParse


safeParseAsync()

safeParseAsync(data, params?): Promise<ZodSafeParseResult<string>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:28

Parameters

data

unknown

params?

ParseContext<$ZodIssue>

Returns

Promise<ZodSafeParseResult<string>>

Inherited from

_ZodString.safeParseAsync


slugify()

slugify(): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:105

Returns

this

Inherited from

_ZodString.slugify


startsWith()

startsWith(value, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:93

Parameters

value

string

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

this

Inherited from

_ZodString.startsWith


superRefine()

superRefine(refinement, params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:39

Parameters

refinement

(arg, ctx) => void | Promise<void>

params?

$ZodSuperRefineParams

Returns

this

Inherited from

_ZodString.superRefine


time()

time(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:165

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; precision?: number | null; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

precision?

number | null

Returns

this

Deprecated

Use z.iso.time() instead.


toJSONSchema()

toJSONSchema(params?): ZodStandardJSONSchemaPayload<ZodString>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:17

Converts this schema to a JSON Schema representation.

Parameters

params?

ToJSONSchemaParams

Returns

ZodStandardJSONSchemaPayload<ZodString>

Inherited from

_ZodString.toJSONSchema


toLowerCase()

toLowerCase(): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:103

Returns

this

Inherited from

_ZodString.toLowerCase


toUpperCase()

toUpperCase(): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:104

Returns

this

Inherited from

_ZodString.toUpperCase


transform()

transform<NewOut>(transform): ZodPipe<ZodString, ZodTransform<Awaited<NewOut>, string>>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:53

Type Parameters

NewOut

NewOut

Parameters

transform

(arg, ctx) => NewOut | Promise<NewOut>

Returns

ZodPipe<ZodString, ZodTransform<Awaited<NewOut>, string>>

Inherited from

_ZodString.transform


trim()

trim(): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:101

Returns

this

Inherited from

_ZodString.trim


ulid()

ulid(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:141

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.ulid() instead.


uppercase()

uppercase(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:100

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Inherited from

_ZodString.uppercase


url()

url(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:113

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; hostname?: RegExp; message?: string; normalize?: boolean; pattern?: RegExp; protocol?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

hostname?

RegExp

message?

string

Deprecated

This parameter is deprecated. Use error instead.

normalize?

boolean

pattern?

RegExp

protocol?

RegExp

Returns

this

Deprecated

Use z.url() instead.


uuid()

uuid(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:121

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

version?

"v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"

Returns

this

Deprecated

Use z.uuid() instead.


uuidv4()

uuidv4(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:123

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

version?

"v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"

Returns

this

Deprecated

Use z.uuid() instead.


uuidv6()

uuidv6(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:125

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

version?

"v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"

Returns

this

Deprecated

Use z.uuid() instead.


uuidv7()

uuidv7(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:127

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

version?

"v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8"

Returns

this

Deprecated

Use z.uuid() instead.


with()

with(...checks): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:19

Parameters

checks

...($ZodCheck<string> | CheckFn<string>)[]

Returns

this

Inherited from

_ZodString.with


xid()

xid(params?): this

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:147

Parameters

params?

string |

{ abort?: boolean; error?: string | $ZodErrorMap<$ZodIssueInvalidStringFormat>; message?: string; pattern?: RegExp; }

abort?

boolean

If true, no later checks will be executed if this check fails. Default false.

error?

string | $ZodErrorMap<$ZodIssueInvalidStringFormat>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

pattern?

RegExp

Returns

this

Deprecated

Use z.xid() instead.