Optional
idOptional
classStorage class.
Optional
ttlTime-to-live in milliseconds for this item.
Optional
passphrasePassphrase used for e2e encryption
Optional
keyKey derivation options.
Optional
getCustom encryption handler.
Optional
autoAuto-update old encrypted values.
Optional
idSignature (generated in your backend) of the id.
Optional
idKey version for the signature (generated in your backend) of the id.
Optional
logLog level.
Optional
connectionConnection settings (mainly for WebSocket connection).
Optional
autoReconnect?: booleanIf true, automatically reconnect on unexpected disconnects.
Optional
reconnectBaseDelay?: numberBase delay in milliseconds for exponential backoff between reconnect attempts.
Optional
reconnectMaxDelay?: numberMaximum delay in milliseconds for exponential backoff between reconnect attempts.
Optional
pingInterval?: numberInterval in milliseconds between WebSocket ping messages to keep the connection alive.
Optional
pongTimeout?: numberTimeout in milliseconds to wait for a pong response after sending a ping.
Optional
throttlingThrottling configuration
Optional
storageThe storage adapter to use for local persistence.
Optional
resolveOptional function to resolve conflicts between local and remote items.
Optional
expirationInterval in milliseconds for periodic expiration sweep. Expired items will be removed from local storage at this interval. Defaults to 15 minutes (900000 ms).
Options for creating an offline sync object.
Remarks
Use this interface to configure offline-first behavior, including storage backend and conflict resolution.
Example