BlockSuite API Documentation / @blocksuite/store / BlockSchema
Variable: BlockSchema
const
BlockSchema:ZodObject
<object
,"strip"
,ZodTypeAny
,object
,object
>
Type declaration
model
model:
ZodObject
<object
,"strip"
,ZodTypeAny
,object
,object
>
Type declaration
children
children:
ZodOptional
<ZodArray
<ZodString
,"many"
>> =ContentSchema
flavour
flavour:
ZodString
=FlavourSchema
parent
parent:
ZodOptional
<ZodArray
<ZodString
,"many"
>> =ParentSchema
props
props:
ZodOptional
<ZodFunction
<ZodTuple
<[ZodType
<InternalPrimitives
,ZodTypeDef
,InternalPrimitives
>],ZodUnknown
>,ZodRecord
<ZodString
,ZodAny
>>>
role
role:
ZodEnum
<["root"
,"hub"
,"content"
]> =RoleSchema
toModel
toModel:
ZodOptional
<ZodFunction
<ZodTuple
<[],ZodUnknown
>,ZodType
<BlockModel
<object
>,ZodTypeDef
,BlockModel
<object
>>>>
onUpgrade
onUpgrade:
ZodOptional
<ZodFunction
<ZodTuple
<[ZodAny
,ZodNumber
,ZodNumber
],ZodUnknown
>,ZodVoid
>>
transformer
transformer:
ZodOptional
<ZodFunction
<ZodTuple
<[],ZodUnknown
>,ZodType
<BaseBlockTransformer
<object
>,ZodTypeDef
,BaseBlockTransformer
<object
>>>>
version
version:
ZodNumber
Source
packages/framework/store/src/schema/base.ts:29