BlockSuite API Documentation / @blocksuite/store / Job
Class: Job
Constructors
new Job(__namedParameters)
new Job(
__namedParameters
):Job
Parameters
• __namedParameters: JobConfig
Returns
Source
packages/framework/store/src/transformer/job.ts:48
Properties
_adapterConfigs
private
readonly
_adapterConfigs:Map
<string
,string
>
Source
packages/framework/store/src/transformer/job.ts:39
_assetsManager
private
readonly
_assetsManager:AssetsManager
Source
packages/framework/store/src/transformer/job.ts:38
_slots
private
readonly
_slots:JobSlots
Source
packages/framework/store/src/transformer/job.ts:41
_workspace
private
readonly
_workspace:Workspace
Source
packages/framework/store/src/transformer/job.ts:37
Accessors
adapterConfigs
get
adapterConfigs():Map
<string
,string
>
Returns
Map
<string
, string
>
Source
packages/framework/store/src/transformer/job.ts:70
assets
get
assets():Map
<string
,Blob
>
Returns
Map
<string
, Blob
>
Source
packages/framework/store/src/transformer/job.ts:66
assetsManager
get
assetsManager():AssetsManager
Returns
Source
packages/framework/store/src/transformer/job.ts:62
Methods
_blockToSnapshot()
private
_blockToSnapshot(model
):Promise
<BlockSnapshot
>
Parameters
• model: BlockModel
<object
>
Returns
Promise
<BlockSnapshot
>
Source
packages/framework/store/src/transformer/job.ts:130
_exportDocMeta()
private
_exportDocMeta(doc
):DocMeta
Parameters
• doc: Doc
Returns
Source
packages/framework/store/src/transformer/job.ts:103
_getSchema()
private
_getSchema(flavour
):Object
Parameters
• flavour: string
Returns
Object
model
model:
Object
model.children?
model.children?:
string
[] =ContentSchema
model.flavour
model.flavour:
string
=FlavourSchema
model.parent?
model.parent?:
string
[] =ParentSchema
model.props?
model.props?: (...
args
) =>Record
<string
,any
>Parameters
• ...args: [
InternalPrimitives
,...unknown[]
]Returns
Record
<string
,any
>model.role
model.role:
"root"
|"hub"
|"content"
=RoleSchema
model.toModel?
model.toModel?: (...
args
) =>BlockModel
<object
>Parameters
• ...args:
unknown
[]Returns
BlockModel
<object
>onUpgrade?
onUpgrade?: (...
args
) =>void
Parameters
• ...args: [
any
,number
,number
,...unknown[]
]Returns
void
transformer?
transformer?: (...
args
) =>BaseBlockTransformer
<object
>Parameters
• ...args:
unknown
[]Returns
BaseBlockTransformer
<object
>version
version:
number
Source
packages/framework/store/src/transformer/job.ts:78
_getTransformer()
private
_getTransformer(schema
):BaseBlockTransformer
<object
>
Parameters
• schema: Object
• schema.model: Object
= undefined
• schema.model.children?: string
[]= ContentSchema
• schema.model.flavour: string
= FlavourSchema
• schema.model.parent?: string
[]= ParentSchema
• schema.model.props?: (...args
) => Record
<string
, any
>= undefined
• schema.model.role: "root"
| "hub"
| "content"
= RoleSchema
• schema.model.toModel?: (...args
) => BlockModel
<object
>= undefined
• schema.onUpgrade?: (...args
) => void
= undefined
• schema.transformer?: (...args
) => BaseBlockTransformer
<object
>= undefined
• schema.version: number
= undefined
Returns
BaseBlockTransformer
<object
>
Source
packages/framework/store/src/transformer/job.ts:84
_getWorkspaceMeta()
private
_getWorkspaceMeta():Object
Returns
Object
pageVersion
pageVersion:
number
pages
pages:
DocMeta
[]properties
properties:
DocsPropertiesMeta
workspaceVersion
workspaceVersion:
number
Source
packages/framework/store/src/transformer/job.ts:88
_importDocMeta()
private
_importDocMeta(doc
,meta
):void
Parameters
• doc: Doc
• meta: DocMeta
Returns
void
Source
packages/framework/store/src/transformer/job.ts:115
_snapshotToBlock()
private
_snapshotToBlock(snapshot
,doc
,parent
?,index
?):Promise
<BlockModel
<object
>>
Parameters
• snapshot: BlockSnapshot
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<BlockModel
<object
>>
Source
packages/framework/store/src/transformer/job.ts:167
blockToSnapshot()
blockToSnapshot(
model
):Promise
<BlockSnapshot
>
Parameters
• model: BlockModel
<object
>
Returns
Promise
<BlockSnapshot
>
Source
packages/framework/store/src/transformer/job.ts:160
docToSnapshot()
docToSnapshot(
doc
):Promise
<DocSnapshot
>
Parameters
• doc: Doc
Returns
Promise
<DocSnapshot
>
Source
packages/framework/store/src/transformer/job.ts:249
reset()
reset():
void
Returns
void
Source
packages/framework/store/src/transformer/job.ts:74
sliceToSnapshot()
sliceToSnapshot(
slice
):Promise
<SliceSnapshot
>
Parameters
• slice: Slice
Returns
Promise
<SliceSnapshot
>
Source
packages/framework/store/src/transformer/job.ts:334
snapshotToBlock()
snapshotToBlock(
snapshot
,doc
,parent
?,index
?):Promise
<BlockModel
<object
>>
Parameters
• snapshot: BlockSnapshot
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<BlockModel
<object
>>
Source
packages/framework/store/src/transformer/job.ts:237
snapshotToDoc()
snapshotToDoc(
snapshot
):Promise
<Doc
>
Parameters
• snapshot: DocSnapshot
Returns
Promise
<Doc
>
Source
packages/framework/store/src/transformer/job.ts:273
snapshotToModelData()
snapshotToModelData(
snapshot
):Promise
<SnapshotReturn
<object
>>
Parameters
• snapshot: BlockSnapshot
Returns
Promise
<SnapshotReturn
<object
>>
Source
packages/framework/store/src/transformer/job.ts:218
snapshotToSlice()
snapshotToSlice(
snapshot
,doc
,parent
?,index
?):Promise
<Slice
>
Parameters
• snapshot: SliceSnapshot
• doc: Doc
• parent?: string
• index?: number
Returns
Promise
<Slice
>
Source
packages/framework/store/src/transformer/job.ts:363
snapshotToWorkspaceInfo()
snapshotToWorkspaceInfo(
snapshot
):void
Parameters
• snapshot: WorkspaceInfoSnapshot
Returns
void
Source
packages/framework/store/src/transformer/job.ts:312
workspaceInfoToSnapshot()
workspaceInfoToSnapshot():
WorkspaceInfoSnapshot
Returns
Source
packages/framework/store/src/transformer/job.ts:293
Generated using TypeDoc and typedoc-plugin-markdown.