mushroomdb-client 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,aAAa,GAiBd,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,SAAS,IAAI,WAAW,GAIzB,MAAM,SAAS,CAAC;AA6BjB,OAAO,EAAE,aAAa,EAAE,CAAC;AAoBzB;;;;;;;;;GASG;AACH,MAAM,OAAO,cAAc;IACR,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAqB;IAE3C;;;;OAIG;IACH,YAAY,OAAe,EAAE,IAAoB;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,CAAC;IAC3B,CAAC;IAED,4EAA4E;IAC5E,mBAAmB;IACnB,4EAA4E;IAEpE,GAAG,CAAC,IAAY;QACtB,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;IAClC,CAAC;IAEO,KAAK,CAAC,IAAY;QACxB,OAAO,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,CAAC;IACjC,CAAC;IAEO,WAAW;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,SAAS,CACrB,IAAY,EACZ,IAAkB;QAElB,MAAM,IAAI,GAAG,MAAM,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AG,IAAI,UAAU,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACpD,CAAC;QACD,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * mushroomdb-client — TypeScript client for mushroomdb.
3
+ *
4
+ * Entry point re-exports everything callers need.
5
+ */
6
+ export { MushroomClient, MushroomError } from "./client.js";
7
+ export type { AlgoDir, AlgoReport, CellValue, ClientOptions, DegreeConfig, DegreeReport, Explanation, IngestEdge, IngestOptions, IngestReport, IngestRequest, Neighborhood, NodeInfo, PageRankConfig, PageRankReport, PredicateKind, PredicateSummary, QueryOptions, QueryParams, QueryResult, RuleDef, RulePredicate, RuleStats, RuleSuggestion, Stats, SuggestReport, WccConfig, WccReport, } from "./client.js";
8
+ export type { DbEvent, SubscribeMessage, } from "./types.js";
9
+ export type { SubscribeHandle, SubscribeOptions, WsConstructor, WsLike, } from "./ws.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5D,YAAY,EACV,OAAO,EACP,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,WAAW,EACX,OAAO,EACP,aAAa,EACb,SAAS,EACT,cAAc,EACd,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,OAAO,EACP,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,MAAM,GACP,MAAM,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * mushroomdb-client — TypeScript client for mushroomdb.
3
+ *
4
+ * Entry point re-exports everything callers need.
5
+ */
6
+ export { MushroomClient, MushroomError } from "./client.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,406 @@
1
+ /**
2
+ * TypeScript types for the mushroomdb HTTP + WebSocket API.
3
+ *
4
+ * Every type is annotated with the Rust struct / enum it mirrors.
5
+ */
6
+ /**
7
+ * A single cell value in a query result row.
8
+ *
9
+ * Mirrors `core_storage::types::Value`:
10
+ * Int(i64) → number
11
+ * Float(f64) → number (NaN serializes as null per server behaviour)
12
+ * Str(String) → string
13
+ * Bool(bool) → boolean
14
+ * List(Vec<Value>) → CellValue[]
15
+ * null cell → null
16
+ *
17
+ * **Precision warning (Int / i64):** JavaScript `number` (IEEE 754 double)
18
+ * safely represents integers only up to ±2^53 − 1 (~9×10^15). Rust `i64`
19
+ * reaches ±9.2×10^18. Integer node properties whose absolute value exceeds
20
+ * 2^53 will be silently corrupted when parsed as JS numbers. For such values
21
+ * use a string representation in the graph instead. A future release will
22
+ * offer a BigInt-aware parsing mode.
23
+ */
24
+ export type CellValue = number | string | boolean | null | CellValue[];
25
+ /**
26
+ * Wire shape of a successful `POST /query?format=json` response.
27
+ *
28
+ * Mirrors `crates/server/src/json.rs::result_set_json` output:
29
+ * { columns: string[], rows: (scalar|null)[][] }
30
+ */
31
+ export interface QueryResult {
32
+ columns: string[];
33
+ rows: CellValue[][];
34
+ }
35
+ /**
36
+ * Per-rule statistics.
37
+ *
38
+ * Mirrors `core_api::db::RuleStats`.
39
+ */
40
+ export interface RuleStats {
41
+ name: string;
42
+ edges: number;
43
+ tripped: boolean;
44
+ fires: number;
45
+ approximate: boolean;
46
+ }
47
+ /**
48
+ * Database-wide counters returned by `GET /stats`.
49
+ *
50
+ * Mirrors `core_api::db::Stats`.
51
+ */
52
+ export interface Stats {
53
+ nodes_live: number;
54
+ nodes_tombstoned: number;
55
+ edges: number;
56
+ rules: RuleStats[];
57
+ }
58
+ /**
59
+ * Options for `POST /ingest`.
60
+ *
61
+ * Mirrors `core_api::IngestOptions` (serialised by `crates/server/src/http.rs::ingest_options`).
62
+ */
63
+ export interface IngestOptions {
64
+ /** Name of the field to use as the node key. Defaults to "key". */
65
+ key_field?: string;
66
+ /**
67
+ * Auto foreign-key detection mode.
68
+ * false | "off" → disabled
69
+ * { suffix: string } → detect fields ending with `suffix` (e.g. "_id")
70
+ */
71
+ auto_fk?: false | "off" | {
72
+ suffix: string;
73
+ };
74
+ }
75
+ /** An explicit edge to wire during ingest. */
76
+ export interface IngestEdge {
77
+ edge_type: string;
78
+ src: string;
79
+ dst: string;
80
+ }
81
+ /** Body sent to `POST /ingest`. */
82
+ export interface IngestRequest {
83
+ label: string;
84
+ rows: Record<string, unknown>[];
85
+ options?: IngestOptions;
86
+ edges?: IngestEdge[];
87
+ }
88
+ /** Response from `POST /ingest`. Shape is opaque; use `ok` to check success. */
89
+ export type IngestReport = Record<string, unknown>;
90
+ /**
91
+ * Wire `NodeInfo` from `GET /node/{key}`.
92
+ *
93
+ * `props` uses the same untagged Value JSON as `/query`. Unknown keys are
94
+ * HTTP 404; the client `node()` method maps that to `null`.
95
+ */
96
+ export interface NodeInfo {
97
+ key: string;
98
+ label: string;
99
+ props: Record<string, CellValue>;
100
+ }
101
+ /**
102
+ * Predicate kind on an {@link Explanation}, matching HTTP snake_case JSON.
103
+ */
104
+ export type PredicateKind = "key_match" | "field_equal" | "overlap" | "all" | "numeric_within" | "geo_radius" | "vector_similar";
105
+ /**
106
+ * Wire `PredicateSummary`. Option fields are present-null, never omitted.
107
+ */
108
+ export interface PredicateSummary {
109
+ kind: PredicateKind;
110
+ fields: string[];
111
+ min: number | null;
112
+ tolerance: number | null;
113
+ km: number | null;
114
+ parts: PredicateSummary[] | null;
115
+ }
116
+ /**
117
+ * One rule-derived edge between two nodes from `GET /explain?a=&b=`.
118
+ *
119
+ * Mirrors `core_api::db::Explanation`.
120
+ */
121
+ export interface Explanation {
122
+ rule: string;
123
+ edge_type: string;
124
+ src_key: string;
125
+ dst_key: string;
126
+ weight: number | null;
127
+ predicate: PredicateSummary;
128
+ }
129
+ /**
130
+ * Wire neighborhood expansion from `GET /node/{key}/neighborhood`.
131
+ *
132
+ * Columns are `key`, `label`, `depth`.
133
+ */
134
+ export interface Neighborhood {
135
+ columns: string[];
136
+ rows: CellValue[][];
137
+ }
138
+ /**
139
+ * Internally-tagged `Predicate` JSON accepted by `POST /rules`.
140
+ *
141
+ * Mirrors `core_rules::Predicate`.
142
+ */
143
+ export type RulePredicate = {
144
+ KeyMatch: {
145
+ field: string;
146
+ };
147
+ } | {
148
+ FieldEqual: {
149
+ field: string;
150
+ };
151
+ } | {
152
+ Overlap: {
153
+ field: string;
154
+ min: number;
155
+ };
156
+ } | {
157
+ NumericWithin: {
158
+ field: string;
159
+ tolerance: number;
160
+ };
161
+ } | {
162
+ GeoRadius: {
163
+ field: string;
164
+ km: number;
165
+ };
166
+ } | {
167
+ VectorSimilar: {
168
+ field: string;
169
+ min: number;
170
+ };
171
+ } | {
172
+ All: RulePredicate[];
173
+ } | {
174
+ Any: RulePredicate[];
175
+ };
176
+ /**
177
+ * Rule definition posted to `POST /rules`.
178
+ *
179
+ * Mirrors `core_rules::RuleDef`. Omit or `max_edges: null` → server fills
180
+ * scored top-k 32, or 1 if the predicate is KeyMatch-rooted. HTTP has no
181
+ * uncapped hatch (Rust/Python explicit `None` still uses the 1_000_000
182
+ * global first-N-by-id budget).
183
+ */
184
+ export interface RuleDef {
185
+ name: string;
186
+ src_label: string;
187
+ dst_label: string;
188
+ predicate: RulePredicate;
189
+ edge_type: string;
190
+ weight_prop?: string | null;
191
+ /** Per-source top-k. Omit/`null` fills 32 (scored) or 1 (KeyMatch-rooted). */
192
+ max_edges?: number | null;
193
+ approximate?: boolean;
194
+ }
195
+ /**
196
+ * One rule suggestion returned by `GET /suggest`.
197
+ *
198
+ * Mirrors `core_rules::suggest::RuleSuggestion`.
199
+ */
200
+ export interface RuleSuggestion {
201
+ /** The proposed rule definition (not yet created in the database). */
202
+ def: Record<string, unknown>;
203
+ /** Estimated edge count if the rule were applied. */
204
+ est_edges: number;
205
+ /** Up to 3 example (src_key, dst_key, score) triples drawn from sample evaluation. */
206
+ examples: [string, string, number][];
207
+ /** Human-readable explanation of why this rule was suggested. */
208
+ rationale: string;
209
+ }
210
+ /**
211
+ * Response from `GET /suggest`.
212
+ *
213
+ * Mirrors `core_rules::suggest::SuggestReport`.
214
+ */
215
+ export interface SuggestReport {
216
+ suggestions: RuleSuggestion[];
217
+ /**
218
+ * true when the global time budget fired before all candidates were evaluated.
219
+ * Partial results are still returned.
220
+ */
221
+ truncated: boolean;
222
+ }
223
+ /**
224
+ * Edge direction for graph algorithms.
225
+ *
226
+ * Mirrors `core_api::algo::AlgoDir` (serialises as lowercase string).
227
+ */
228
+ export type AlgoDir = "out" | "in" | "both";
229
+ /**
230
+ * Config for `POST /algo/pagerank`.
231
+ *
232
+ * Mirrors `core_api::algo::PageRankConfig`. All fields are optional — the
233
+ * server applies defaults (damping=0.85, max_iters=50, tol=1e-6,
234
+ * edge_type=null, direction="out", budget_ms=5000).
235
+ */
236
+ export interface PageRankConfig {
237
+ damping?: number;
238
+ max_iters?: number;
239
+ tol?: number;
240
+ edge_type?: string | null;
241
+ direction?: AlgoDir;
242
+ budget_ms?: number;
243
+ }
244
+ /**
245
+ * Result of `POST /algo/pagerank`.
246
+ *
247
+ * Mirrors `core_api::algo::PageRankReport`.
248
+ */
249
+ export interface PageRankReport {
250
+ /** [node_key, score] pairs, sorted by score descending (ties: key asc). */
251
+ scores: [string, number][];
252
+ /** true when the algorithm converged before max_iters and before any budget fired. */
253
+ converged: boolean;
254
+ }
255
+ /**
256
+ * Config for `POST /algo/wcc`.
257
+ *
258
+ * Mirrors `core_api::algo::WccConfig`. Defaults: edge_type=null, budget_ms=5000.
259
+ */
260
+ export interface WccConfig {
261
+ edge_type?: string | null;
262
+ budget_ms?: number;
263
+ }
264
+ /**
265
+ * Result of `POST /algo/wcc`.
266
+ *
267
+ * Mirrors `core_api::algo::WccReport`.
268
+ */
269
+ export interface WccReport {
270
+ /** [node_key, component_id] pairs. component_id is the smallest key in the component. */
271
+ components: [string, string][];
272
+ truncated: boolean;
273
+ }
274
+ /**
275
+ * Config for `POST /algo/degree`.
276
+ *
277
+ * Mirrors `core_api::algo::DegreeConfig`. Defaults: edge_type=null, direction="both", budget_ms=5000.
278
+ */
279
+ export interface DegreeConfig {
280
+ edge_type?: string | null;
281
+ direction?: AlgoDir;
282
+ budget_ms?: number;
283
+ }
284
+ /**
285
+ * Result of `POST /algo/degree`.
286
+ *
287
+ * Mirrors `core_api::algo::DegreeReport`.
288
+ */
289
+ export interface DegreeReport {
290
+ /**
291
+ * [node_key, degree] pairs, sorted by degree descending (ties: key asc).
292
+ *
293
+ * **Precision warning:** Rust returns `u64` degrees. JS `number` (IEEE 754)
294
+ * safely represents values up to 2^53 − 1. Nodes with degree above ~9×10^15
295
+ * will silently lose precision. In practice graphs with that many edges per
296
+ * node do not exist, but be aware of the type constraint.
297
+ */
298
+ scores: [string, number][];
299
+ truncated: boolean;
300
+ }
301
+ /** Union of all algo configs. */
302
+ export type AlgoConfig = {
303
+ algo: "pagerank";
304
+ config?: PageRankConfig;
305
+ } | {
306
+ algo: "wcc";
307
+ config?: WccConfig;
308
+ } | {
309
+ algo: "degree";
310
+ config?: DegreeConfig;
311
+ };
312
+ /** Union of all algo results. */
313
+ export type AlgoReport = PageRankReport | WccReport | DegreeReport;
314
+ /**
315
+ * A post-commit event delivered over the `/subscribe` WebSocket.
316
+ *
317
+ * Mirrors `core_api::subscription::DbEvent` — serialised as internally-tagged
318
+ * JSON with `"type"` as the discriminant.
319
+ *
320
+ * All variants except `lagged` carry `commit_seq: number` (Rust: `u64`).
321
+ * `lagged` means the subscriber's internal queue overflowed; the caller should
322
+ * re-read graph state to recover consistency for lossless consumers.
323
+ *
324
+ * **Precision warning (`commit_seq` / `missed`):** Both are Rust `u64` and map
325
+ * to JS `number` (IEEE 754 double, safe up to 2^53 − 1 ≈ 9×10^15). A
326
+ * long-lived server generating more than ~9×10^15 commits will silently
327
+ * corrupt these values. A future release will represent u64 fields as
328
+ * `string` or `bigint`. For now treat `commit_seq` as an opaque ordering key,
329
+ * not an exact integer.
330
+ */
331
+ export type DbEvent = {
332
+ type: "edge_fired";
333
+ rule: string;
334
+ src_key: string;
335
+ dst_key: string;
336
+ edge_type: string;
337
+ weight?: number;
338
+ commit_seq: number;
339
+ } | {
340
+ type: "edge_retracted";
341
+ rule: string;
342
+ src_key: string;
343
+ dst_key: string;
344
+ edge_type: string;
345
+ commit_seq: number;
346
+ } | {
347
+ type: "node_inserted";
348
+ label: string;
349
+ key: string;
350
+ commit_seq: number;
351
+ } | {
352
+ type: "node_deleted";
353
+ key: string;
354
+ commit_seq: number;
355
+ } | {
356
+ type: "edge_inserted";
357
+ edge_type: string;
358
+ src: string;
359
+ dst: string;
360
+ commit_seq: number;
361
+ } | {
362
+ type: "edge_deleted";
363
+ edge_type: string;
364
+ src: string;
365
+ dst: string;
366
+ commit_seq: number;
367
+ } | {
368
+ type: "prop_set";
369
+ key: string;
370
+ field: string;
371
+ commit_seq: number;
372
+ } | {
373
+ type: "prop_removed";
374
+ key: string;
375
+ field: string;
376
+ commit_seq: number;
377
+ } | {
378
+ /**
379
+ * One or more events were dropped because the subscriber's queue was full
380
+ * (capacity 65,536). The caller must re-read graph state to recover
381
+ * consistency for lossless consumers.
382
+ */
383
+ type: "lagged";
384
+ missed: number;
385
+ };
386
+ /**
387
+ * Subscribe message sent to the server after the WebSocket upgrade.
388
+ *
389
+ * Mirrors `crates/server/src/subscribe.rs::SubscribeMsg`.
390
+ * All fields are optional. With no fields the client receives no events.
391
+ */
392
+ export interface SubscribeMessage {
393
+ /** Rule names to subscribe to. Receive EdgeFired/EdgeRetracted for each. */
394
+ rules?: string[];
395
+ /** If true, also receive node/property write events. */
396
+ writes?: boolean;
397
+ }
398
+ /**
399
+ * Thrown by the client when the server returns an HTTP error or the
400
+ * WebSocket handshake fails.
401
+ */
402
+ export declare class MushroomError extends Error {
403
+ readonly detail: string;
404
+ constructor(detail: string);
405
+ }
406
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC;AAMvE;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;CACrB;AAMD;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAMD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,O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* Every type is annotated with the Rust struct / enum it mirrors.
5
+ */
6
+ // ---------------------------------------------------------------------------
7
+ // Client error
8
+ // ---------------------------------------------------------------------------
9
+ /**
10
+ * Thrown by the client when the server returns an HTTP error or the
11
+ * WebSocket handshake fails.
12
+ */
13
+ export class MushroomError extends Error {
14
+ detail;
15
+ constructor(detail) {
16
+ super(detail);
17
+ this.detail = detail;
18
+ this.name = "MushroomError";
19
+ }
20
+ }
21
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0bH,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACV,MAAM;IAAlC,YAA4B,MAAc;QACxC,KAAK,CAAC,MAAM,CAAC,CAAC;sBADY,MAAM;QAEhC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF"}
package/dist/ws.d.ts ADDED
@@ -0,0 +1,92 @@
1
+ /**
2
+ * WebSocket subscription over `GET /subscribe`.
3
+ *
4
+ * # Protocol (matches crates/server/src/subscribe.rs)
5
+ *
6
+ * 1. Connect to `ws[s]://<host>/subscribe`.
7
+ * 2. Server waits for one JSON subscribe message: `{rules?, writes?}`.
8
+ * 3. Server responds with `{"subscribed":true}`.
9
+ * 4. Server streams DbEvent JSON frames until the connection closes.
10
+ *
11
+ * # Reconnection
12
+ *
13
+ * Auto-reconnect is NOT implemented in v1. When the connection drops
14
+ * (network error, server restart), no further events are delivered. The
15
+ * caller is responsible for reconnecting if required.
16
+ *
17
+ * # Lagged events
18
+ *
19
+ * If the server's per-subscriber queue overflows, it emits a
20
+ * `{"type":"lagged","missed":N}` frame. This is passed to `onEvent` like any
21
+ * other event. For lossless consumers: on receiving a `lagged` event, re-read
22
+ * the affected graph state via a query.
23
+ *
24
+ * # Node.js usage
25
+ *
26
+ * The browser WebSocket global is not present in Node < 21. Pass the `ws`
27
+ * package's WebSocket class via `opts.wsConstructor`:
28
+ *
29
+ * ```ts
30
+ * import WS from 'ws';
31
+ * const handle = await subscribe(wsUrl, { writes: true, wsConstructor: WS as WsConstructor }, onEvent);
32
+ * ```
33
+ */
34
+ import type { DbEvent, SubscribeMessage } from "./types.js";
35
+ export type { DbEvent };
36
+ /**
37
+ * Minimal WebSocket-like interface required by subscribe().
38
+ * Satisfied by both browser WebSocket and the `ws` npm package.
39
+ */
40
+ export interface WsLike {
41
+ send(data: string): void;
42
+ close(): void;
43
+ set onopen(handler: ((ev: unknown) => void) | null);
44
+ set onmessage(handler: ((ev: {
45
+ data: unknown;
46
+ }) => void) | null);
47
+ set onclose(handler: ((ev: unknown) => void) | null);
48
+ set onerror(handler: ((ev: unknown) => void) | null);
49
+ }
50
+ /** Constructor type for both browser WebSocket and the `ws` package. */
51
+ export type WsConstructor = new (url: string) => WsLike;
52
+ /** Options for {@link subscribe}. */
53
+ export interface SubscribeOptions extends SubscribeMessage {
54
+ /**
55
+ * Custom WebSocket constructor.
56
+ *
57
+ * **Node.js only** — required when `globalThis.WebSocket` is not available
58
+ * (Node < 21). Example:
59
+ *
60
+ * ```ts
61
+ * import WS from 'ws';
62
+ * { wsConstructor: WS as WsConstructor }
63
+ * ```
64
+ *
65
+ * In the browser the native `WebSocket` global is used automatically.
66
+ */
67
+ wsConstructor?: WsConstructor;
68
+ }
69
+ /** Handle returned by {@link subscribe}. */
70
+ export interface SubscribeHandle {
71
+ /**
72
+ * Close the WebSocket connection.
73
+ *
74
+ * Returns a promise that resolves when the connection is fully closed.
75
+ * Always await this before ending a test or shutting down to avoid
76
+ * dangling handles that keep the event loop alive.
77
+ */
78
+ close(): Promise<void>;
79
+ }
80
+ /**
81
+ * Open a `GET /subscribe` WebSocket and begin streaming {@link DbEvent}s.
82
+ *
83
+ * Resolves when the server acknowledges the subscribe message
84
+ * (`{"subscribed":true}`). Rejects on connection failure or if the server
85
+ * returns an error (e.g. unknown rule name).
86
+ *
87
+ * @param wsUrl Full WebSocket URL, e.g. `ws://127.0.0.1:8080/subscribe`.
88
+ * @param opts Subscribe options — rules, writes flag, optional wsConstructor.
89
+ * @param onEvent Callback invoked for each {@link DbEvent}, including `lagged`.
90
+ */
91
+ export declare function subscribe(wsUrl: string, opts: SubscribeOptions, onEvent: (event: DbEvent) => void): Promise<SubscribeHandle>;
92
+ //# sourceMappingURL=ws.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../src/ws.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE5D,YAAY,EAAE,OAAO,EAAE,CAAC;AAExB;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE;IACpD,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE;IACjE,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE;IACrD,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE;CACtD;AAED,wEAAwE;AACxE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAExD,qCAAqC;AACrC,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD;;;;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