/*! * Copyright (c) 2026 Interop Alliance. All rights reserved. */ /** * `createWasReplication` -- wires an RxDB collection to a remote WAS Collection * through the collection-agnostic pull/push handlers. This is the single public * entry point of the sync module; the caller supplies an already-open RxDB * collection and a {@link WasSyncPort} (its only WAS dependency), and gets back * the live `RxReplicationState` to observe (`error$` / `active$`) and control * (`reSync()` / `cancel()`). * * No React and no `@interop/was-client` imports -- only RxDB (the replication * engine being wrapped) and the injected port. This is the seam that keeps the * WAS access injectable. */ import { type RxReplicationState } from 'rxdb/plugins/replication'; import type { RxCollection } from 'rxdb/plugins/core'; import type { SyncCheckpoint, SyncedDoc, WasSyncPort } from './types.js'; /** * Starts (or configures) replication of one RxDB collection against a remote WAS * Collection. Poll-based only -- no `pull.stream$` (live streaming is deferred * server-side); RxDB's own `retryTime` backoff and `error$` are the reachability * signal (the replication attempt is the probe). * * @param options {object} * @param options.rxCollection {RxCollection} the local replica * @param options.wasPort {WasSyncPort} injected WAS access * @param options.replicationIdentifier {string} stable id (include the server * URL + collection) so RxDB can resume across reloads * @param [options.batchSize] {number} pull `limit` / push batch (default 100) * @param [options.retryTime] {number} ms backoff between failed cycles * @param [options.live] {boolean} ongoing (default true) vs one-shot * @param [options.autoStart] {boolean} start immediately (default true) * @param [options.deletedField] {string} RxDB deleted flag (default `_deleted`) * @returns {RxReplicationState} */ export declare function createWasReplication({ rxCollection, wasPort, replicationIdentifier, batchSize, retryTime, live, autoStart, deletedField }: { rxCollection: RxCollection; wasPort: WasSyncPort; replicationIdentifier: string; batchSize?: number; retryTime?: number; live?: boolean; autoStart?: boolean; deletedField?: string; }): RxReplicationState; //# sourceMappingURL=wasReplication.d.ts.map