import type { CallerToMethods, TypedRpcClient } from '@jsonjoy.com/reactive-rpc/lib/common'; import type { JsonJoyDemoRpcCaller } from 'json-crdt-server'; import type { ServerBlock, ServerSnapshot, ServerPatch, ServerCursor, ServerHistory, ServerBatch, ServerEvent } from './types'; export type DemoServerClient = TypedRpcClient>; export type Cursor = ServerCursor; export type DemoServerBlock = ServerBlock; export type DemoServerSnapshot = ServerSnapshot; export type DemoServerBatch = ServerBatch; export type DemoServerPatch = ServerPatch; export type DemoServerEvent = ServerEvent; export declare class DemoServerRemoteHistory implements ServerHistory { protected readonly client: DemoServerClient; protected readonly clientId: number; constructor(client: DemoServerClient, clientId?: number); read(id: string): Promise<{ block: DemoServerBlock; }>; pull(id: string, seq?: Cursor, create?: boolean): Promise<{ batches: DemoServerBatch[]; snapshot?: DemoServerSnapshot; }>; create(id: string, batch?: Pick): Promise<{ snapshot: Omit; batch: Omit; }>; update(id: string, batch: Pick, seq?: number): Promise<{ batch: Omit; pull?: { batches: DemoServerBatch[]; snapshot?: DemoServerSnapshot; }; }>; delete(id: string): Promise; scanFwd(id: string, seq: Cursor): Promise<{ batches: DemoServerBatch[]; }>; scanBwd(id: string, seq: Cursor, snapshot?: boolean): Promise<{ batches: DemoServerBatch[]; snapshot?: DemoServerSnapshot; }>; readonly listen: (key: string) => import("rxjs").Observable<{ event: ["new"] | ["upd", { batch: { patches: { blob: Uint8Array; }[]; seq: number; ts: number; cts?: number | undefined; }; }, number] | ["del"]; }>; }