js-bao-wss-client / LocalMetadataEntry
Interface: LocalMetadataEntry
Locally cached metadata for a single document, as returned by getLocalMetadata() and emitted with metadata-change events. Combines the last server-synced envelope fields (title, tags, permission, thumbnail, app-defined metadata) with local-only state such as localOnly, hasUnsyncedLocalChanges, and hasIndexedDbSnapshot. All timestamps are ISO strings.
Properties
docMetadata?
optionaldocMetadata?:unknown
documentFormat?
optionaldocumentFormat?:1|2
2 for a large document, absent when nothing local knows the format.
Recorded at create when the caller asked for one, and by the read paths that learn it from the server. Absence means UNKNOWN here, not "ordinary": this row is also written by sync bookkeeping, which knows nothing about the format (see internal/large-documents/document-format.ts).
documentId
documentId:
string
grantedAt?
optionalgrantedAt?:string
hasIndexedDbSnapshot?
optionalhasIndexedDbSnapshot?:boolean
hasUnsyncedLocalChanges?
optionalhasUnsyncedLocalChanges?:boolean
lastKnownPermission?
optionallastKnownPermission?:DocumentPermission|null
lastOpenedAt?
optionallastOpenedAt?:string
lastSyncedAt?
optionallastSyncedAt?:string
localBytes?
optionallocalBytes?:number
localOnly?
optionallocalOnly?:boolean
metadata?
optionalmetadata?:unknown
metadataSyncedAt?
optionalmetadataSyncedAt?:string
tags?
optionaltags?:string[]
thumbnailBlobId?
optionalthumbnailBlobId?:string
title?
optionaltitle?:string