Preparing search index...
The search index is not available
@rendley/sdk - v1.7.2
@rendley/sdk
Zod
z
ZodBranded
Class ZodBranded<T, B>
Type Parameters
T
extends
Zod
.
z
.
ZodTypeAny
B
extends
string
|
number
|
symbol
Hierarchy (
View Summary
)
Zod
.
z
.
ZodType
<
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
Zod
.
z
.
ZodBrandedDef
<
T
>
,
T
[
"_input"
]
,
>
ZodBranded
Index
Constructors
constructor
Properties
_def
_input
_output
_type
spa
Accessors
description
Methods
_get
Or
Return
Ctx
_get
Type
_parse
_parse
Async
_parse
Sync
_process
Input
Params
_refinement
and
array
brand
catch
default
describe
is
Nullable
is
Optional
nullable
nullish
optional
or
parse
parse
Async
pipe
promise
readonly
refine
refinement
safe
Parse
safe
Parse
Async
super
Refine
transform
unwrap
Constructors
constructor
new
ZodBranded
<
T
extends
Zod
.
z
.
ZodTypeAny
,
B
extends
string
|
number
|
symbol
>
(
def
:
Zod
.
z
.
ZodBrandedDef
<
T
>
,
)
:
Zod
.
z
.
ZodBranded
<
T
,
B
>
Type Parameters
T
extends
Zod
.
z
.
ZodTypeAny
B
extends
string
|
number
|
symbol
Parameters
def
:
Zod
.
z
.
ZodBrandedDef
<
T
>
Returns
Zod
.
z
.
ZodBranded
<
T
,
B
>
Properties
Readonly
_def
_def
:
Zod
.
z
.
ZodBrandedDef
<
T
>
Readonly
_input
_input
:
T
[
"_input"
]
Readonly
_output
_output
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
Readonly
_type
_type
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
spa
spa
:
(
data
:
unknown
,
params
?:
Partial
<
Zod
.
z
.
ParseParams
>
,
)
=>
Promise
<
Zod
.
z
.
SafeParseReturnType
<
T
[
"_input"
]
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
,
>
Alias of safeParseAsync
Accessors
description
get
description
()
:
undefined
|
string
Returns
undefined
|
string
Methods
_get
Or
Return
Ctx
_getOrReturnCtx
(
input
:
Zod
.
z
.
ParseInput
,
ctx
?:
Zod
.
z
.
ParseContext
,
)
:
Zod
.
z
.
ParseContext
Parameters
input
:
Zod
.
z
.
ParseInput
Optional
ctx
:
Zod
.
z
.
ParseContext
Returns
Zod
.
z
.
ParseContext
_get
Type
_getType
(
input
:
Zod
.
z
.
ParseInput
)
:
string
Parameters
input
:
Zod
.
z
.
ParseInput
Returns
string
_parse
_parse
(
input
:
Zod
.
z
.
ParseInput
)
:
Zod
.
z
.
ParseReturnType
<
any
>
Parameters
input
:
Zod
.
z
.
ParseInput
Returns
Zod
.
z
.
ParseReturnType
<
any
>
_parse
Async
_parseAsync
(
input
:
Zod
.
z
.
ParseInput
,
)
:
Zod
.
z
.
AsyncParseReturnType
<
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
Parameters
input
:
Zod
.
z
.
ParseInput
Returns
Zod
.
z
.
AsyncParseReturnType
<
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
_parse
Sync
_parseSync
(
input
:
Zod
.
z
.
ParseInput
,
)
:
Zod
.
z
.
SyncParseReturnType
<
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
Parameters
input
:
Zod
.
z
.
ParseInput
Returns
Zod
.
z
.
SyncParseReturnType
<
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
_process
Input
Params
_processInputParams
(
input
:
Zod
.
z
.
ParseInput
,
)
:
{
ctx
:
Zod
.
z
.
ParseContext
;
status
:
Zod
.
z
.
ParseStatus
}
Parameters
input
:
Zod
.
z
.
ParseInput
Returns
{
ctx
:
Zod
.
z
.
ParseContext
;
status
:
Zod
.
z
.
ParseStatus
}
_refinement
_refinement
(
refinement
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
any
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
Parameters
refinement
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
)
=>
any
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
and
and
<
T
extends
Zod
.
z
.
ZodTypeAny
>
(
incoming
:
T
,
)
:
Zod
.
z
.
ZodIntersection
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
>
Type Parameters
T
extends
Zod
.
z
.
ZodTypeAny
Parameters
incoming
:
T
Returns
Zod
.
z
.
ZodIntersection
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
>
array
array
()
:
Zod
.
z
.
ZodArray
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
"many"
>
Returns
Zod
.
z
.
ZodArray
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
"many"
>
brand
brand
<
B
extends
string
|
number
|
symbol
>
(
brand
?:
B
,
)
:
Zod
.
z
.
ZodBranded
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
B
>
Type Parameters
B
extends
string
|
number
|
symbol
Parameters
Optional
brand
:
B
Returns
Zod
.
z
.
ZodBranded
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
B
>
catch
catch
(
def
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
)
:
Zod
.
z
.
ZodCatch
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
Parameters
def
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
Returns
Zod
.
z
.
ZodCatch
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
catch
(
def
:
(
ctx
:
{
error
:
Zod
.
z
.
ZodError
<
any
>
;
input
:
T
[
"_input"
]
}
,
)
=>
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
)
:
Zod
.
z
.
ZodCatch
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
Parameters
def
:
(
ctx
:
{
error
:
Zod
.
z
.
ZodError
<
any
>
;
input
:
T
[
"_input"
]
}
,
)
=>
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
Returns
Zod
.
z
.
ZodCatch
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
default
default
(
def
:
noUndefined
<
T
[
"_input"
]
>
)
:
Zod
.
z
.
ZodDefault
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
Parameters
def
:
noUndefined
<
T
[
"_input"
]
>
Returns
Zod
.
z
.
ZodDefault
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
default
(
def
:
()
=>
noUndefined
<
T
[
"_input"
]
>
,
)
:
Zod
.
z
.
ZodDefault
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
Parameters
def
:
()
=>
noUndefined
<
T
[
"_input"
]
>
Returns
Zod
.
z
.
ZodDefault
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
describe
describe
(
description
:
string
)
:
this
Parameters
description
:
string
Returns
this
is
Nullable
isNullable
()
:
boolean
Returns
boolean
is
Optional
isOptional
()
:
boolean
Returns
boolean
nullable
nullable
()
:
Zod
.
z
.
ZodNullable
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
Returns
Zod
.
z
.
ZodNullable
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
nullish
nullish
()
:
Zod
.
z
.
ZodOptional
<
Zod
.
z
.
ZodNullable
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
>
Returns
Zod
.
z
.
ZodOptional
<
Zod
.
z
.
ZodNullable
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
>
optional
optional
()
:
Zod
.
z
.
ZodOptional
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
Returns
Zod
.
z
.
ZodOptional
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
or
or
<
T
extends
Zod
.
z
.
ZodTypeAny
>
(
option
:
T
,
)
:
Zod
.
z
.
ZodUnion
<
[
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
]
>
Type Parameters
T
extends
Zod
.
z
.
ZodTypeAny
Parameters
option
:
T
Returns
Zod
.
z
.
ZodUnion
<
[
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
]
>
parse
parse
(
data
:
unknown
,
params
?:
Partial
<
Zod
.
z
.
ParseParams
>
,
)
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
Parameters
data
:
unknown
Optional
params
:
Partial
<
Zod
.
z
.
ParseParams
>
Returns
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
parse
Async
parseAsync
(
data
:
unknown
,
params
?:
Partial
<
Zod
.
z
.
ParseParams
>
,
)
:
Promise
<
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
Parameters
data
:
unknown
Optional
params
:
Partial
<
Zod
.
z
.
ParseParams
>
Returns
Promise
<
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
pipe
pipe
<
T
extends
Zod
.
z
.
ZodTypeAny
>
(
target
:
T
,
)
:
Zod
.
z
.
ZodPipeline
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
>
Type Parameters
T
extends
Zod
.
z
.
ZodTypeAny
Parameters
target
:
T
Returns
Zod
.
z
.
ZodPipeline
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
>
promise
promise
()
:
Zod
.
z
.
ZodPromise
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
Returns
Zod
.
z
.
ZodPromise
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
readonly
readonly
()
:
Zod
.
z
.
ZodReadonly
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
Returns
Zod
.
z
.
ZodReadonly
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
>
refine
refine
<
RefinedOutput
extends
any
>
(
check
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
)
=>
arg
is
RefinedOutput
,
message
?:
|
string
|
Partial
<
Omit
<
Zod
.
z
.
ZodCustomIssue
,
"code"
>
>
|
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
)
=>
Partial
<
Omit
<
Zod
.
z
.
ZodCustomIssue
,
"code"
>
>
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
RefinedOutput
,
T
[
"_input"
]
>
Type Parameters
RefinedOutput
extends
any
Parameters
check
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
)
=>
arg
is
RefinedOutput
Optional
message
:
|
string
|
Partial
<
Omit
<
Zod
.
z
.
ZodCustomIssue
,
"code"
>
>
|
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
)
=>
Partial
<
Omit
<
Zod
.
z
.
ZodCustomIssue
,
"code"
>
>
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
RefinedOutput
,
T
[
"_input"
]
>
refine
(
check
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
)
=>
unknown
,
message
?:
|
string
|
Partial
<
Omit
<
Zod
.
z
.
ZodCustomIssue
,
"code"
>
>
|
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
)
=>
Partial
<
Omit
<
Zod
.
z
.
ZodCustomIssue
,
"code"
>
>
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
Parameters
check
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
)
=>
unknown
Optional
message
:
|
string
|
Partial
<
Omit
<
Zod
.
z
.
ZodCustomIssue
,
"code"
>
>
|
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
)
=>
Partial
<
Omit
<
Zod
.
z
.
ZodCustomIssue
,
"code"
>
>
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
refinement
refinement
<
RefinedOutput
extends
any
>
(
check
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
)
=>
arg
is
RefinedOutput
,
refinementData
:
|
Zod
.
z
.
IssueData
|
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
Zod
.
z
.
IssueData
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
RefinedOutput
,
T
[
"_input"
]
>
Type Parameters
RefinedOutput
extends
any
Parameters
check
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
)
=>
arg
is
RefinedOutput
refinementData
:
|
Zod
.
z
.
IssueData
|
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
Zod
.
z
.
IssueData
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
RefinedOutput
,
T
[
"_input"
]
>
refinement
(
check
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
)
=>
boolean
,
refinementData
:
|
Zod
.
z
.
IssueData
|
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
Zod
.
z
.
IssueData
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
Parameters
check
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
)
=>
boolean
refinementData
:
|
Zod
.
z
.
IssueData
|
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
Zod
.
z
.
IssueData
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
safe
Parse
safeParse
(
data
:
unknown
,
params
?:
Partial
<
Zod
.
z
.
ParseParams
>
,
)
:
Zod
.
z
.
SafeParseReturnType
<
T
[
"_input"
]
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
Parameters
data
:
unknown
Optional
params
:
Partial
<
Zod
.
z
.
ParseParams
>
Returns
Zod
.
z
.
SafeParseReturnType
<
T
[
"_input"
]
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
safe
Parse
Async
safeParseAsync
(
data
:
unknown
,
params
?:
Partial
<
Zod
.
z
.
ParseParams
>
,
)
:
Promise
<
Zod
.
z
.
SafeParseReturnType
<
T
[
"_input"
]
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
,
>
Parameters
data
:
unknown
Optional
params
:
Partial
<
Zod
.
z
.
ParseParams
>
Returns
Promise
<
Zod
.
z
.
SafeParseReturnType
<
T
[
"_input"
]
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
>
>
super
Refine
superRefine
<
RefinedOutput
extends
any
>
(
refinement
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
arg
is
RefinedOutput
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
RefinedOutput
,
T
[
"_input"
]
>
Type Parameters
RefinedOutput
extends
any
Parameters
refinement
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
arg
is
RefinedOutput
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
RefinedOutput
,
T
[
"_input"
]
>
superRefine
(
refinement
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
void
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
Parameters
refinement
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
)
=>
void
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
superRefine
(
refinement
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
Promise
<
void
>
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
Parameters
refinement
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
)
=>
Promise
<
void
>
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
T
[
"_input"
]
,
>
transform
transform
<
NewOut
>
(
transform
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
NewOut
|
Promise
<
NewOut
>
,
)
:
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
NewOut
,
T
[
"_input"
]
>
Type Parameters
NewOut
Parameters
transform
:
(
arg
:
T
[
"_output"
]
&
Zod
.
z
.
BRAND
<
B
>
,
ctx
:
Zod
.
z
.
RefinementCtx
,
)
=>
NewOut
|
Promise
<
NewOut
>
Returns
Zod
.
z
.
ZodEffects
<
Zod
.
z
.
ZodBranded
<
T
,
B
>
,
NewOut
,
T
[
"_input"
]
>
unwrap
unwrap
()
:
T
Returns
T
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
_def
_input
_output
_type
spa
Accessors
description
Methods
_get
Or
Return
Ctx
_get
Type
_parse
_parse
Async
_parse
Sync
_process
Input
Params
_refinement
and
array
brand
catch
default
describe
is
Nullable
is
Optional
nullable
nullish
optional
or
parse
parse
Async
pipe
promise
readonly
refine
refinement
safe
Parse
safe
Parse
Async
super
Refine
transform
unwrap
@rendley/sdk - v1.7.2
Loading...
Alias of safeParseAsync