rxdb-server
Version:
RxDB Server Plugin
22 lines (21 loc) • 1.42 kB
TypeScript
import { RxCollection, ReplicationPullOptions, ReplicationPushOptions, ById } from 'rxdb/plugins/core';
import { RxReplicationState } from 'rxdb/plugins/replication';
import { Subject } from 'rxjs';
import type { RxServerCheckpoint, ServerSyncOptions } from './types.ts';
export * from './types.ts';
export declare class RxServerReplicationState<RxDocType> extends RxReplicationState<RxDocType, RxServerCheckpoint> {
readonly replicationIdentifier: string;
readonly collection: RxCollection<RxDocType, unknown, unknown, unknown>;
readonly pull?: ReplicationPullOptions<RxDocType, RxServerCheckpoint> | undefined;
readonly push?: ReplicationPushOptions<RxDocType> | undefined;
readonly live: boolean;
retryTime: number;
autoStart: boolean;
headers: ById<string>;
readonly outdatedClient$: Subject<void>;
readonly unauthorized$: Subject<void>;
readonly forbidden$: Subject<void>;
constructor(replicationIdentifier: string, collection: RxCollection<RxDocType, unknown, unknown, unknown>, pull?: ReplicationPullOptions<RxDocType, RxServerCheckpoint> | undefined, push?: ReplicationPushOptions<RxDocType> | undefined, live?: boolean, retryTime?: number, autoStart?: boolean, headers?: ById<string>);
setHeaders(headers: ById<string>): void;
}
export declare function replicateServer<RxDocType>(options: ServerSyncOptions<RxDocType>): RxServerReplicationState<RxDocType>;