OptionalidOptionalclassStorage class.
OptionalttlTime-to-live in milliseconds for this item.
OptionalpassphrasePassphrase used for e2e encryption
OptionalkeyKey derivation options.
OptionalgetCustom encryption handler.
OptionalautoAuto-update old encrypted values.
OptionalidSignature (generated in your backend) of the id.
OptionalidKey version for the signature (generated in your backend) of the id.
OptionallogLog level.
OptionalconnectionConnection settings (mainly for WebSocket connection).
OptionalautoReconnect?: booleanIf true, automatically reconnect on unexpected disconnects.
OptionalreconnectBaseDelay?: numberBase delay in milliseconds for exponential backoff between reconnect attempts.
OptionalreconnectMaxDelay?: numberMaximum delay in milliseconds for exponential backoff between reconnect attempts.
OptionalpingInterval?: numberInterval in milliseconds between WebSocket ping messages to keep the connection alive.
OptionalpongTimeout?: numberTimeout in milliseconds to wait for a pong response after sending a ping.
OptionalthrottlingThrottling configuration
OptionalstorageThe storage adapter to use for local persistence.
OptionalresolveOptional function to resolve conflicts between local and remote items.
OptionalexpirationInterval 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