Skip to main content

Interface: DocumentListStoreLike

Defined in: src/lib/documentStore/index.ts:33

A document store that can also list, remove and mark documents opened (see IndexedDbDocumentStore)

Extends​

Properties​

label?​

readonly optional label?: string

Defined in: src/lib/storage/index.ts:404

Names the store for the user, e.g. "Bluesky" (shown while saving)

Inherited from​

DocumentStoreLike.label

Methods​

list()​

list(): Promise<DocumentSummary[]>

Defined in: src/lib/documentStore/index.ts:35

The saved documents in short, most recently opened first

Returns​

Promise<DocumentSummary[]>


load()​

load(id): Promise<DrawingDocument | undefined>

Defined in: src/lib/storage/index.ts:413

A saved document by ID, or undefined if there's none

Parameters​

id​

string

Returns​

Promise<DrawingDocument | undefined>

Inherited from​

DocumentStoreLike.load


markOpened()​

markOpened(id, date?): Promise<void>

Defined in: src/lib/documentStore/index.ts:39

Mark a saved document opened at a time (now by default), without counting it as changed (updatedAt)

Parameters​

id​

string

date?​

Date

Returns​

Promise<void>


remove()​

remove(id): Promise<void>

Defined in: src/lib/documentStore/index.ts:37

Delete a saved document

Parameters​

id​

string

Returns​

Promise<void>


save()​

save(document, onProgress?): Promise<void>

Defined in: src/lib/storage/index.ts:408

Save a document, replacing the one with the same ID. Call onProgress with how much is done (0 to 1), if known.

Parameters​

document​

DrawingDocument

onProgress?​

(done) => void

Returns​

Promise<void>

Inherited from​

DocumentStoreLike.save