BlockSuite API Documentation / @blocksuite/blocks / AttachmentAdapter
Class: AttachmentAdapter
Extends
Constructors
new AttachmentAdapter()
new AttachmentAdapter(
job
):AttachmentAdapter
Parameters
job
Returns
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:46
Properties
job
job:
Job
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:44
Accessors
configs
Get Signature
get configs():
Map
<string
,string
>
Returns
Map
<string
, string
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:45
Methods
fromBlock()
fromBlock(
model
):Promise
<undefined
|FromBlockSnapshotResult
<Attachment
>>
Parameters
model
Returns
Promise
<undefined
| FromBlockSnapshotResult
<Attachment
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:47
fromBlockSnapshot()
fromBlockSnapshot(
_payload
):Promise
<FromBlockSnapshotResult
<Attachment
>>
Parameters
_payload
Returns
Promise
<FromBlockSnapshotResult
<Attachment
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/attachment.ts:38
fromDoc()
fromDoc(
doc
):Promise
<undefined
|FromDocSnapshotResult
<Attachment
>>
Parameters
doc
Returns
Promise
<undefined
| FromDocSnapshotResult
<Attachment
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:49
fromDocSnapshot()
fromDocSnapshot(
_payload
):Promise
<FromDocSnapshotResult
<Attachment
>>
Parameters
_payload
Returns
Promise
<FromDocSnapshotResult
<Attachment
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/attachment.ts:47
fromSlice()
fromSlice(
slice
):Promise
<undefined
|FromSliceSnapshotResult
<Attachment
>>
Parameters
slice
Returns
Promise
<undefined
| FromSliceSnapshotResult
<Attachment
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:51
fromSliceSnapshot()
fromSliceSnapshot(
payload
):Promise
<FromSliceSnapshotResult
<Attachment
>>
Parameters
payload
Returns
Promise
<FromSliceSnapshotResult
<Attachment
>>
Overrides
Defined in
packages/blocks/src/_common/adapters/attachment.ts:56
toBlock()
toBlock(
payload
,doc
,parent
?,index
?):Promise
<undefined
|BlockModel
<object
,object
>>
Parameters
payload
ToBlockSnapshotPayload
<Attachment
>
doc
parent?
string
index?
number
Returns
Promise
<undefined
| BlockModel
<object
, object
>>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:53
toBlockSnapshot()
toBlockSnapshot(
_payload
):Promise
<BlockSnapshot
>
Parameters
_payload
ToBlockSnapshotPayload
<Attachment
>
Returns
Promise
<BlockSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/attachment.ts:77
toDoc()
toDoc(
payload
):Promise
<undefined
|Doc
>
Parameters
payload
ToDocSnapshotPayload
<Attachment
>
Returns
Promise
<undefined
| Doc
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:55
toDocSnapshot()
toDocSnapshot(
_payload
):Promise
<DocSnapshot
>
Parameters
_payload
ToDocSnapshotPayload
<Attachment
>
Returns
Promise
<DocSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/attachment.ts:86
toSlice()
toSlice(
payload
,doc
,parent
?,index
?):Promise
<undefined
|Slice
>
Parameters
payload
ToSliceSnapshotPayload
<Attachment
>
doc
parent?
string
index?
number
Returns
Promise
<undefined
| Slice
>
Inherited from
Defined in
packages/framework/store/dist/adapter/base.d.ts:57
toSliceSnapshot()
toSliceSnapshot(
payload
):Promise
<null
|SliceSnapshot
>
Parameters
payload
AttachmentToSliceSnapshotPayload
Returns
Promise
<null
| SliceSnapshot
>
Overrides
Defined in
packages/blocks/src/_common/adapters/attachment.ts:95