cosmos_sync library

Native offline document synchronization with the Cosmos Sync BFF.

Classes

BuiltinAccount
An account registered by the BFF from a verified issuer and subject. No email, provider role or client-selected owner establishes this identity.
CacheStore
A fully opened, single-owner durable cache with committed synchronous reads.
ChangeHint
An SSE hint ID resumes only the hint stream; it is never a sync cursor.
ChangeHintTransport
ConsistencyTokenTransport
Optional opaque BFF consistency envelope, persisted alongside ACKs/pages.
CosmosSyncClient
Offline local document API with an explicitly triggered durable sync engine.
CreateSharedScopeRequest
Persist this request before sending if it must survive an application exit. A timeout has an unknown outcome: retry this exact request, never a new ID.
DocumentSnapshot
A local view: latest pending write overlays the latest confirmed base.
FlushResult
HttpSyncTransport
HTTP wire transport. Durable retries belong to the offline client.
LocalQuery
A bounded, immutable local query AST. No query is sent to Cosmos DB.
LocalQuerySnapshot
MutationRequest
An immutable wire request, persisted exactly before its first transmission.
PendingMutation
A durable local write. Later writes to a conflicted document remain blocked.
QueryCacheMetadata
Cache coverage metadata; cache origin never implies server freshness.
QueryCursor
Local pagination position. It is not a BFF sync cursor or capability.
QueryField
A literal field-name path, without dot parsing or array indexes.
QueryFilter
One predicate; multiple query predicates are combined with AND.
QueryOrder
ScopeSelectionTransport
Optional local check for an explicitly selected mode/shared scope. This does not verify a token's identity or learn an offline revocation.
ServerDocument
A confirmed document or retained server deletion tombstone.
SessionInfo
SetSharedScopeMemberRequest
An immutable owner edit. none revokes access. No operation may change the fixed owner or grant a client permission to manage its own membership.
SharedScope
An owner-only policy view. Member lists are immutable; revision is the optimistic concurrency base for the next edit, not a document version.
SharedScopeMember
SnapshotPage
A stable initial view at one partition sequence, with a separate resume cursor.
SnapshotTransport
SqliteCache
Native, synchronous SQLite storage. Use one client/writer per file.
SyncPage
SyncStatus
SyncTransport

Enums

MutationKind
MutationState
QueryOperator
SharedScopeRole
Shared data permissions. The fixed owner is managed by the BFF separately.
SyncScopeMode
Server-verified authorization scope. It contains no Cosmos credential.

Functions

immutableJson(Map<String, Object?> value) → Map<String, Object?>
Deeply copied JSON prevents caller mutation after persistence or sending.