Skip to main content
This page is a concise index of every public export in @claritylabs/cl-sync. Follow the links to each feature page for detailed explanations and usage examples.

Core (@claritylabs/cl-sync)

Functions

SyncStore
Creates and returns a new SyncStore instance. Does not call hydrate() automatically — you must call store.hydrate() (or let SyncProvider do it) before reading data.See Store for the full SyncStoreConfig reference.
CollectionDefinition<TRecord, TArgs>
Identity helper for defining a typed collection. Returns definition unchanged. Exists for TypeScript inference.See Collections.
MutationDefinition<TArgs, TResult>
Identity helper for defining a typed mutation. Returns definition unchanged.See Mutations.
string
Derives a composite scope key string in the format "appId:env:userId:orgId". Omitted optional fields produce an empty segment.
string
Produces a deterministic JSON hash of value with object keys sorted. Used internally for argsHash in collection states.

Types

type
type SyncId = stringThe type for record identifiers throughout CL Sync.
interface
interface
Base type for all records stored in CL Sync collections.
interface
interface
interface
See Collections.
interface
See Mutations.
interface
interface
interface
See Migrations.
interface
Provides typed read/write access to records, collection states, outbox items, and metadata during a migration. See Migrations for the full interface.
interface
interface

React (@claritylabs/cl-sync/react)

See Hooks for detailed usage of each hook.

Convex (@claritylabs/cl-sync/convex)

See Convex Adapter for detailed usage.