API index and search · Build metadata
Supporting declarations
packages/remote/src/remote-source.ts. These declarations explain referenced types. Only package-page symbols are package exports.
RemoteNormalizedSourceOptions
export interface RemoteNormalizedSourceOptions {
/** Resolve the upstream subscribe target. Defaults to embedded-server `{name,args}`. */
resolveSubscribe?: SubscribeResolver;
/** Override raw authoritative writes, e.g. POST them to an app API server. */
sendMutation?: RawMutationSender;
}RemoteNormalizedSource
export declare class RemoteNormalizedSource implements NormalizedSource {
private readonly transport;
private readonly resolveSubscribe;
private readonly sendMutation?;
private handler;
private readonly subs;
/** The client's own typed per-table schemas, for hello validation (CRIT#4); set by the backend. */
private clientTables;
constructor(transport: Transport, opts?: RemoteNormalizedSourceOptions);
expectClientSchema(tables: NormalizedTableSchema[]): void;
registerQuery(qid: QueryId, remote: RemoteQuery): void;
unregisterQuery(qid: QueryId): void;
mutate(mutations: Mutation[]): Promise<void>;
onNormalized(handler: (qid: QueryId, ev: NormalizedEvent) => void): void;
private subscribe;
private onServerMsg;
/** Route a `queryError` by its 101 §5 classification: retryable ⇒ keep the QState (and the
* rows already folded downstream — 101 §6) and re-subscribe after a jittered backoff
* honoring `retryAfterMs`; terminal (or pre-classification servers) ⇒ drop the
* subscription, exactly as before (FOLLOWER-LAG-SHED §6.3). */
private onQueryError;
private openSubscriber;
private applyBatch;
}createRemoteNormalizedSource
/** Convenience: a `RemoteNormalizedSource` over a ws URL or a custom transport. */
export declare function createRemoteNormalizedSource(urlOrTransport: string | Transport, opts?: RemoteNormalizedSourceOptions): RemoteNormalizedSource;