BlockSuite API Documentation / @blocksuite/store / Job
Class: Job ​
Contents ​
Constructors ​
new Job(__namedParameters) ​
new Job(
__namedParameters
):Job
Parameters ​
• __namedParameters: JobConfig
Returns ​
Source ​
packages/store/src/transformer/job.ts:47
Properties ​
_assetsManager ​
private
readonly
_assetsManager:AssetsManager
Source ​
packages/store/src/transformer/job.ts:38
_slots ​
private
readonly
_slots:JobSlots
Source ​
packages/store/src/transformer/job.ts:40
_workspace ​
private
readonly
_workspace:Workspace
Source ​
packages/store/src/transformer/job.ts:37
Accessors ​
assets ​
get
assets():Map
<string
,Blob
>
Returns ​
Map
<string
, Blob
>
Source ​
packages/store/src/transformer/job.ts:64
assetsManager ​
get
assetsManager():AssetsManager
Returns ​
Source ​
packages/store/src/transformer/job.ts:60
Methods ​
_blockToSnapshot() ​
private
_blockToSnapshot(model
):Promise
<BlockSnapshot
>
Parameters ​
• model: BaseBlockModel
<object
>
Returns ​
Promise
<BlockSnapshot
>
Source ​
packages/store/src/transformer/job.ts:126
_exportPageMeta() ​
private
_exportPageMeta(page
):PageMeta
Parameters ​
• page: Page
Returns ​
Source ​
packages/store/src/transformer/job.ts:100
_getSchema() ​
private
_getSchema(flavour
):Object
Parameters ​
• flavour: string
Returns ​
Object
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? ​
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/store/src/transformer/job.ts:72
_getTransformer() ​
private
_getTransformer(schema
):BaseBlockTransformer
<object
>
Parameters ​
• schema: Object
• schema.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; }= undefined
• schema.onUpgrade?: (...args
) => void
= undefined
• schema.transformer?: (...args
) => BaseBlockTransformer
<object
>= undefined
• schema.version: number
= undefined
Returns ​
BaseBlockTransformer
<object
>
Source ​
packages/store/src/transformer/job.ts:78
_getWorkspaceMeta() ​
private
_getWorkspaceMeta():Object
Returns ​
Object
blockVersions ​
blockVersions:
Object
pageVersion ​
pageVersion:
number
pages ​
pages:
PageMeta
[]properties ​
properties:
PagesPropertiesMeta
workspaceVersion ​
workspaceVersion:
number
Source ​
packages/store/src/transformer/job.ts:82
_importPageMeta() ​
private
_importPageMeta(page
,meta
):void
Parameters ​
• page: Page
• meta: PageMeta
Returns ​
void
Source ​
packages/store/src/transformer/job.ts:112
_snapshotToBlock() ​
private
_snapshotToBlock(snapshot
,page
,parent
?,index
?):Promise
<BaseBlockModel
<object
>>
Parameters ​
• snapshot: BlockSnapshot
• page: Page
• parent?: string
• index?: number
Returns ​
Promise
<BaseBlockModel
<object
>>
Source ​
packages/store/src/transformer/job.ts:165
blockToSnapshot() ​
blockToSnapshot(
model
):Promise
<BlockSnapshot
>
Parameters ​
• model: BaseBlockModel
<object
>
Returns ​
Promise
<BlockSnapshot
>
Source ​
packages/store/src/transformer/job.ts:158
pageToSnapshot() ​
pageToSnapshot(
page
):Promise
<PageSnapshot
>
Parameters ​
• page: Page
Returns ​
Promise
<PageSnapshot
>
Source ​
packages/store/src/transformer/job.ts:247
reset() ​
reset():
void
Returns ​
void
Source ​
packages/store/src/transformer/job.ts:68
sliceToSnapshot() ​
sliceToSnapshot(
slice
):Promise
<SliceSnapshot
>
Parameters ​
• slice: Slice
Returns ​
Promise
<SliceSnapshot
>
Source ​
packages/store/src/transformer/job.ts:332
snapshotToBlock() ​
snapshotToBlock(
snapshot
,page
,parent
?,index
?):Promise
<BaseBlockModel
<object
>>
Parameters ​
• snapshot: BlockSnapshot
• page: Page
• parent?: string
• index?: number
Returns ​
Promise
<BaseBlockModel
<object
>>
Source ​
packages/store/src/transformer/job.ts:235
snapshotToModelData() ​
snapshotToModelData(
snapshot
):Promise
<SnapshotReturn
<object
>>
Parameters ​
• snapshot: BlockSnapshot
Returns ​
Promise
<SnapshotReturn
<object
>>
Source ​
packages/store/src/transformer/job.ts:216
snapshotToPage() ​
snapshotToPage(
snapshot
):Promise
<Page
>
Parameters ​
• snapshot: PageSnapshot
Returns ​
Promise
<Page
>
Source ​
packages/store/src/transformer/job.ts:271
snapshotToSlice() ​
snapshotToSlice(
snapshot
,page
,parent
?,index
?):Promise
<Slice
>
Parameters ​
• snapshot: SliceSnapshot
• page: Page
• parent?: string
• index?: number
Returns ​
Promise
<Slice
>
Source ​
packages/store/src/transformer/job.ts:368
snapshotToWorkspaceInfo() ​
snapshotToWorkspaceInfo(
snapshot
):void
Parameters ​
• snapshot: WorkspaceInfoSnapshot
Returns ​
void
Source ​
packages/store/src/transformer/job.ts:310
workspaceInfoToSnapshot() ​
workspaceInfoToSnapshot():
WorkspaceInfoSnapshot
Returns ​
Source ​
packages/store/src/transformer/job.ts:291
Generated using typedoc-plugin-markdown and TypeDoc