Skip to content

js-bao-wss-client


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? ​

optional docMetadata?: unknown


documentFormat? ​

optional documentFormat?: 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? ​

optional grantedAt?: string


hasIndexedDbSnapshot? ​

optional hasIndexedDbSnapshot?: boolean


hasUnsyncedLocalChanges? ​

optional hasUnsyncedLocalChanges?: boolean


lastKnownPermission? ​

optional lastKnownPermission?: DocumentPermission | null


lastOpenedAt? ​

optional lastOpenedAt?: string


lastSyncedAt? ​

optional lastSyncedAt?: string


localBytes? ​

optional localBytes?: number


localOnly? ​

optional localOnly?: boolean


metadata? ​

optional metadata?: unknown


metadataSyncedAt? ​

optional metadataSyncedAt?: string


tags? ​

optional tags?: string[]


thumbnailBlobId? ​

optional thumbnailBlobId?: string


title? ​

optional title?: string

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30