API > @blocksuite/store > Job
Class: Job ​
Constructors ​
constructor ​
new Job(
__namedParameters
):Job
Parameters ​
Parameter | Type |
---|---|
__namedParameters | JobConfig |
Returns ​
Defined In ​
packages/store/src/transformer/job.ts:47
Properties ​
_assetsManager ​
private
readonly
_assetsManager:AssetsManager
Defined In ​
packages/store/src/transformer/job.ts:38
_slots ​
private
readonly
_slots:JobSlots
Defined In ​
packages/store/src/transformer/job.ts:40
_workspace ​
private
readonly
_workspace:Workspace
Defined In ​
packages/store/src/transformer/job.ts:37
Accessors ​
assets ​
get
assets():Map
<string
,Blob
>
Defined In ​
packages/store/src/transformer/job.ts:64
assetsManager ​
get
assetsManager():AssetsManager
Defined In ​
packages/store/src/transformer/job.ts:60
Methods ​
_blockToSnapshot ​
private
_blockToSnapshot(model
):Promise
<BlockSnapshot
>
Parameters ​
Parameter | Type |
---|---|
model | BaseBlockModel < object > |
Returns ​
Promise
< BlockSnapshot
>
Defined In ​
packages/store/src/transformer/job.ts:126
_exportPageMeta ​
private
_exportPageMeta(page
):PageMeta
Parameters ​
Parameter | Type |
---|---|
page | Page |
Returns ​
Defined In ​
packages/store/src/transformer/job.ts:100
_getSchema ​
private
_getSchema(flavour
):object
Parameters ​
Parameter | Type |
---|---|
flavour | string |
Returns ​
model
​
model:
{ flavour: string; role: "root" | "hub" | "content"; parent?: string[] | undefined; children?: string[] | undefined; props?: ((args_0: InternalPrimitives, ...args_1: unknown[]) => Record<...>) | undefined; toModel?: ((...args: unknown[]) => BaseBlockModel<...>) | undefined; }
onUpgrade
​
optional
onUpgrade:function
Parameters ​
Parameter | Type |
---|---|
...args | [any , number , number , ...unknown[] ] |
Returns ​
void
transformer
​
optional
transformer:function
Parameters ​
Parameter | Type |
---|---|
...args | unknown [] |
Returns ​
BaseBlockTransformer
< object
>
version
​
version:
number
Defined In ​
packages/store/src/transformer/job.ts:72
_getTransformer ​
private
_getTransformer(schema
):BaseBlockTransformer
<object
>
Parameters ​
Parameter | Type |
---|---|
schema | object |
schema.model | `{ flavour: string; role: "root" |
schema.onUpgrade ? | function |
schema.transformer ? | function |
schema.version | number |
Returns ​
BaseBlockTransformer
< object
>
Defined In ​
packages/store/src/transformer/job.ts:78
_getWorkspaceMeta ​
private
_getWorkspaceMeta():object
Returns ​
blockVersions
​
blockVersions:
object
pageVersion
​
pageVersion:
number
pages
​
pages:
PageMeta
[]
properties
​
properties:
PagesPropertiesMeta
workspaceVersion
​
workspaceVersion:
number
Defined In ​
packages/store/src/transformer/job.ts:82
_importPageMeta ​
private
_importPageMeta(page
,meta
):void
Parameters ​
Parameter | Type |
---|---|
page | Page |
meta | PageMeta |
Returns ​
void
Defined In ​
packages/store/src/transformer/job.ts:112
_snapshotToBlock ​
private
_snapshotToBlock(snapshot
,page
,parent
?,index
?):Promise
<BaseBlockModel
<object
> >
Parameters ​
Parameter | Type |
---|---|
snapshot | BlockSnapshot |
page | Page |
parent ? | string |
index ? | number |
Returns ​
Promise
< BaseBlockModel
< object
> >
Defined In ​
packages/store/src/transformer/job.ts:165
blockToSnapshot ​
blockToSnapshot(
model
):Promise
<BlockSnapshot
>
Parameters ​
Parameter | Type |
---|---|
model | BaseBlockModel < object > |
Returns ​
Promise
< BlockSnapshot
>
Defined In ​
packages/store/src/transformer/job.ts:158
pageToSnapshot ​
pageToSnapshot(
page
):Promise
<PageSnapshot
>
Parameters ​
Parameter | Type |
---|---|
page | Page |
Returns ​
Promise
< PageSnapshot
>
Defined In ​
packages/store/src/transformer/job.ts:228
reset ​
reset():
void
Returns ​
void
Defined In ​
packages/store/src/transformer/job.ts:68
sliceToSnapshot ​
sliceToSnapshot(
slice
):Promise
<SliceSnapshot
>
Parameters ​
Parameter | Type |
---|---|
slice | Slice |
Returns ​
Promise
< SliceSnapshot
>
Defined In ​
packages/store/src/transformer/job.ts:313
snapshotToBlock ​
snapshotToBlock(
snapshot
,page
,parent
?,index
?):Promise
<BaseBlockModel
<object
> >
Parameters ​
Parameter | Type |
---|---|
snapshot | BlockSnapshot |
page | Page |
parent ? | string |
index ? | number |
Returns ​
Promise
< BaseBlockModel
< object
> >
Defined In ​
packages/store/src/transformer/job.ts:216
snapshotToPage ​
snapshotToPage(
snapshot
):Promise
<Page
>
Parameters ​
Parameter | Type |
---|---|
snapshot | PageSnapshot |
Returns ​
Promise
< Page
>
Defined In ​
packages/store/src/transformer/job.ts:252
snapshotToSlice ​
snapshotToSlice(
snapshot
,page
,parent
?,index
?):Promise
<Slice
>
Parameters ​
Parameter | Type |
---|---|
snapshot | SliceSnapshot |
page | Page |
parent ? | string |
index ? | number |
Returns ​
Promise
< Slice
>
Defined In ​
packages/store/src/transformer/job.ts:348
snapshotToWorkspaceInfo ​
snapshotToWorkspaceInfo(
snapshot
):void
Parameters ​
Parameter | Type |
---|---|
snapshot | WorkspaceInfoSnapshot |
Returns ​
void
Defined In ​
packages/store/src/transformer/job.ts:291
workspaceInfoToSnapshot ​
workspaceInfoToSnapshot():
WorkspaceInfoSnapshot
Returns ​
Defined In ​
packages/store/src/transformer/job.ts:272