Preparing search index...
The search index is not available
XYO Platform SDK - v3.6.9
XYO Platform SDK
@xyo-network/payload-wrapper
PayloadWrapper
Class PayloadWrapper<TPayload>
Type Parameters
TPayload
extends
Payload
=
Payload
Hierarchy
PayloadDataWrapper
<
TPayload
>
PayloadWrapper
Index
Constructors
constructor
Properties
payload
loader
Factory
Methods
data
Hash
get
Errors
get
Valid
schema
validate
as
load
parse
set
Loader
Factory
try
Parse
unwrap
unwrap
Single
Payload
wrap
wrapped
Map
Constructors
Protected
constructor
new
PayloadWrapper
<
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
,
>
,
>
(
payload
:
TPayload
,
)
:
PayloadWrapper
<
TPayload
>
Type Parameters
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
Parameters
payload
:
TPayload
Returns
PayloadWrapper
<
TPayload
>
Properties
payload
payload
:
TPayload
Protected
Static
loader
Factory
loaderFactory
:
null
|
PayloadLoaderFactory
= null
Methods
data
Hash
dataHash
()
:
Promise
<
Lowercase
<
string
>
>
Returns
Promise
<
Lowercase
<
string
>
>
get
Errors
getErrors
()
:
Promise
<
Error
[]
>
Returns
Promise
<
Error
[]
>
get
Valid
getValid
()
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
schema
schema
()
:
string
Returns
string
validate
validate
()
:
Promise
<
Error
[]
>
Returns
Promise
<
Error
[]
>
Static
as
as
<
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
,
>
,
>
(
value
:
unknown
,
)
:
null
|
PayloadDataWrapper
<
T
>
Type Parameters
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
Parameters
value
:
unknown
Returns
null
|
PayloadDataWrapper
<
T
>
Static
load
load
(
address
:
Lowercase
<
string
>
)
:
Promise
<
null
|
PayloadDataWrapper
>
Parameters
address
:
Lowercase
<
string
>
Returns
Promise
<
null
|
PayloadDataWrapper
>
Static
parse
parse
<
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
>
(
payload
?:
unknown
,
)
:
undefined
|
PayloadDataWrapper
<
T
>
Type Parameters
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
Parameters
Optional
payload
:
unknown
Returns
undefined
|
PayloadDataWrapper
<
T
>
Static
set
Loader
Factory
setLoaderFactory
(
factory
:
null
|
PayloadLoaderFactory
)
:
void
Parameters
factory
:
null
|
PayloadLoaderFactory
Returns
void
Static
try
Parse
tryParse
<
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
>
(
obj
:
unknown
,
)
:
undefined
|
PayloadDataWrapper
<
T
>
Type Parameters
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
Parameters
obj
:
unknown
Returns
undefined
|
PayloadDataWrapper
<
T
>
Static
unwrap
unwrap
<
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
,
>
,
>
(
payload
?:
TPayload
,
)
:
undefined
|
TPayload
Type Parameters
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
Parameters
Optional
payload
:
TPayload
Returns
undefined
|
TPayload
unwrap
<
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
,
>
,
TWrapper
extends
PayloadWrapperBase
<
TPayload
>
=
PayloadWrapperBase
<
TPayload
>
,
>
(
payload
:
TPayload
|
TWrapper
,
)
:
TPayload
Type Parameters
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
TWrapper
extends
PayloadWrapperBase
<
TPayload
>
=
PayloadWrapperBase
<
TPayload
>
Parameters
payload
:
TPayload
|
TWrapper
Returns
TPayload
unwrap
<
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
,
>
,
TWrapper
extends
PayloadWrapperBase
<
TPayload
>
=
PayloadWrapperBase
<
TPayload
>
,
>
(
payload
:
(
TPayload
|
TWrapper
)
[]
,
)
:
TPayload
[]
Type Parameters
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
TWrapper
extends
PayloadWrapperBase
<
TPayload
>
=
PayloadWrapperBase
<
TPayload
>
Parameters
payload
: (
TPayload
|
TWrapper
)
[]
Returns
TPayload
[]
Static
unwrap
Single
Payload
unwrapSinglePayload
<
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
,
>
,
>
(
payload
?:
TPayload
,
)
:
undefined
|
TPayload
Type Parameters
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
Parameters
Optional
payload
:
TPayload
Returns
undefined
|
TPayload
unwrapSinglePayload
<
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
,
>
,
TWrapper
extends
PayloadWrapperBase
<
TPayload
>
=
PayloadWrapperBase
<
TPayload
>
,
>
(
payload
:
TPayload
|
TWrapper
,
)
:
TPayload
Type Parameters
TPayload
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
=
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
TWrapper
extends
PayloadWrapperBase
<
TPayload
>
=
PayloadWrapperBase
<
TPayload
>
Parameters
payload
:
TPayload
|
TWrapper
Returns
TPayload
Static
wrap
wrap
<
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
>
(
payload
?:
T
|
PayloadDataWrapper
<
T
>
,
)
:
PayloadDataWrapper
<
T
>
Type Parameters
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
Parameters
Optional
payload
:
T
|
PayloadDataWrapper
<
T
>
Returns
PayloadDataWrapper
<
T
>
Static
wrapped
Map
wrappedMap
<
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
>
(
payloads
:
(
T
|
PayloadDataWrapper
<
T
>
)
[]
,
)
:
Promise
<
Record
<
string
,
PayloadDataWrapper
<
T
>
>
>
Type Parameters
T
extends
DeepRestrictToStringKeys
<
{
schema
:
string
}
>
Parameters
payloads
: (
T
|
PayloadDataWrapper
<
T
>
)
[]
Returns
Promise
<
Record
<
string
,
PayloadDataWrapper
<
T
>
>
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
payload
loader
Factory
Methods
data
Hash
get
Errors
get
Valid
schema
validate
as
load
parse
set
Loader
Factory
try
Parse
unwrap
unwrap
Single
Payload
wrap
wrapped
Map
XYO Platform SDK - v3.6.9
Loading...