mushroomdb-client 0.7.2 → 0.8.1
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.
- package/README.md +145 -2
- package/dist/client.d.ts +239 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +343 -4
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +339 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ws.d.ts +51 -2
- package/dist/ws.d.ts.map +1 -1
- package/dist/ws.js +123 -0
- package/dist/ws.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +456 -4
- package/src/index.ts +18 -0
- package/src/types.ts +334 -0
- package/src/ws.ts +165 -2
package/dist/client.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
14
|
import { MushroomError, } from "./types.js";
|
|
15
|
-
import { subscribe as wsSubscribe, } from "./ws.js";
|
|
15
|
+
import { subscribe as wsSubscribe, watch as wsWatch, } from "./ws.js";
|
|
16
16
|
export { MushroomError };
|
|
17
17
|
/**
|
|
18
18
|
* HTTP + WebSocket client for mushroomdb.
|
|
@@ -50,8 +50,37 @@ export class MushroomClient {
|
|
|
50
50
|
authHeaders() {
|
|
51
51
|
return this.token ? { Authorization: `Bearer ${this.token}` } : {};
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Validate a single URL path segment (a node key, edge type, or property
|
|
55
|
+
* field name that will be percent-encoded into a URL path).
|
|
56
|
+
*
|
|
57
|
+
* Rejects `.` and `..` because fetch normalises those path segments away
|
|
58
|
+
* (`/node/./edges` becomes `/node/edges`, silently querying the wrong route).
|
|
59
|
+
* Encoding them as `%2E` / `%2E%2E` does not help — fetch normalises those
|
|
60
|
+
* too. Also catches lone-surrogate strings, which would throw a raw
|
|
61
|
+
* `URIError` from `encodeURIComponent`; re-throws as {@link MushroomError}.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link MushroomError}
|
|
64
|
+
*/
|
|
65
|
+
checkPathSeg(seg) {
|
|
66
|
+
if (seg === "." || seg === "..") {
|
|
67
|
+
throw new MushroomError(`"${seg}" is not a valid path segment — fetch normalises it away`);
|
|
68
|
+
}
|
|
69
|
+
try {
|
|
70
|
+
encodeURIComponent(seg);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// encodeURIComponent throws URIError for lone Unicode surrogates.
|
|
74
|
+
throw new MushroomError("key or field name contains an invalid Unicode character (lone surrogate)");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
53
77
|
/**
|
|
54
78
|
* Execute a fetch and decode the JSON body.
|
|
79
|
+
*
|
|
80
|
+
* Reads the response as text first so that an empty or plain-text error body
|
|
81
|
+
* (e.g. HTTP 404 with `content-length: 0`, or a 408/413/415 plain-text body)
|
|
82
|
+
* produces `MushroomError("HTTP <status>")` instead of a raw `SyntaxError`.
|
|
83
|
+
*
|
|
55
84
|
* Throws {@link MushroomError} on non-2xx responses.
|
|
56
85
|
*/
|
|
57
86
|
async fetchJson(path, init) {
|
|
@@ -64,8 +93,15 @@ export class MushroomClient {
|
|
|
64
93
|
...(init?.headers ?? {}),
|
|
65
94
|
},
|
|
66
95
|
});
|
|
96
|
+
const text = await resp.text();
|
|
67
97
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
|
-
|
|
98
|
+
let body;
|
|
99
|
+
try {
|
|
100
|
+
body = text ? JSON.parse(text) : null;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
body = null;
|
|
104
|
+
}
|
|
69
105
|
if (!resp.ok) {
|
|
70
106
|
const detail = typeof body?.error === "string" ? body.error : `HTTP ${resp.status}`;
|
|
71
107
|
throw new MushroomError(detail);
|
|
@@ -92,6 +128,9 @@ export class MushroomClient {
|
|
|
92
128
|
body: JSON.stringify({
|
|
93
129
|
cypher,
|
|
94
130
|
...(opts?.params ? { params: opts.params } : {}),
|
|
131
|
+
...(opts?.as_of !== undefined ? { as_of: opts.as_of } : {}),
|
|
132
|
+
...(opts?.mask ? { mask: opts.mask } : {}),
|
|
133
|
+
...(opts?.namespace ? { namespace: opts.namespace } : {}),
|
|
95
134
|
}),
|
|
96
135
|
});
|
|
97
136
|
}
|
|
@@ -170,6 +209,7 @@ export class MushroomClient {
|
|
|
170
209
|
* @throws {@link MushroomError} on `KeyNotFound` (old key) or `DuplicateKey` (new key taken).
|
|
171
210
|
*/
|
|
172
211
|
async renameNode(oldKey, newKey) {
|
|
212
|
+
this.checkPathSeg(oldKey);
|
|
173
213
|
await this.fetchJson(`/nodes/${encodeURIComponent(oldKey)}/rename`, {
|
|
174
214
|
method: "POST",
|
|
175
215
|
body: JSON.stringify({ new_key: newKey }),
|
|
@@ -205,17 +245,25 @@ export class MushroomClient {
|
|
|
205
245
|
* (unknown key). Other HTTP errors throw {@link MushroomError}.
|
|
206
246
|
*/
|
|
207
247
|
async node(key) {
|
|
248
|
+
this.checkPathSeg(key);
|
|
208
249
|
const resp = await fetch(this.url(`/node/${encodeURIComponent(key)}`), {
|
|
209
250
|
headers: {
|
|
210
251
|
Accept: "application/json",
|
|
211
252
|
...this.authHeaders(),
|
|
212
253
|
},
|
|
213
254
|
});
|
|
214
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
215
|
-
const body = await resp.json();
|
|
216
255
|
if (resp.status === 404) {
|
|
217
256
|
return null;
|
|
218
257
|
}
|
|
258
|
+
const text = await resp.text();
|
|
259
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
260
|
+
let body;
|
|
261
|
+
try {
|
|
262
|
+
body = text ? JSON.parse(text) : null;
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
body = null;
|
|
266
|
+
}
|
|
219
267
|
if (!resp.ok) {
|
|
220
268
|
const detail = typeof body?.error === "string" ? body.error : `HTTP ${resp.status}`;
|
|
221
269
|
throw new MushroomError(detail);
|
|
@@ -229,6 +277,7 @@ export class MushroomClient {
|
|
|
229
277
|
* (1). Columns are `key`, `label`, `depth`.
|
|
230
278
|
*/
|
|
231
279
|
async neighborhood(key, opts) {
|
|
280
|
+
this.checkPathSeg(key);
|
|
232
281
|
const qs = new URLSearchParams();
|
|
233
282
|
if (opts?.depth !== undefined) {
|
|
234
283
|
qs.set("depth", String(opts.depth));
|
|
@@ -237,6 +286,263 @@ export class MushroomClient {
|
|
|
237
286
|
const path = `/node/${encodeURIComponent(key)}/neighborhood${query ? `?${query}` : ""}`;
|
|
238
287
|
return this.fetchJson(path);
|
|
239
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* Get server liveness.
|
|
291
|
+
*
|
|
292
|
+
* Wraps `GET /health`. An unauthenticated caller receives only `{ ok: true }`.
|
|
293
|
+
* A full-access token also receives `nodes`, `edges` and `addr`.
|
|
294
|
+
*/
|
|
295
|
+
async health() {
|
|
296
|
+
return this.fetchJson("/health");
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Get server-wide runtime metrics.
|
|
300
|
+
*
|
|
301
|
+
* Wraps `GET /metrics`. Returns node/edge counts, WAL size, RSS, uptime
|
|
302
|
+
* and a slow-query ring buffer. Requires a full-access token; role-bound
|
|
303
|
+
* tokens receive 403.
|
|
304
|
+
*/
|
|
305
|
+
async metrics() {
|
|
306
|
+
return this.fetchJson("/metrics");
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Vector kNN search.
|
|
310
|
+
*
|
|
311
|
+
* Wraps `POST /find_similar`. Returns up to `k` nodes whose stored value for
|
|
312
|
+
* `field` has cosine similarity ≥ `min` to the query `vector`. Results are
|
|
313
|
+
* sorted by similarity descending.
|
|
314
|
+
*
|
|
315
|
+
* @param opts Query options — `field` and `vector` are required.
|
|
316
|
+
* @returns `{ hits: [node_key, similarity][] }`
|
|
317
|
+
*/
|
|
318
|
+
async findSimilar(opts) {
|
|
319
|
+
return this.fetchJson("/find_similar", {
|
|
320
|
+
method: "POST",
|
|
321
|
+
body: JSON.stringify(opts),
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Create a new node.
|
|
326
|
+
*
|
|
327
|
+
* Wraps `POST /nodes`. This is an **insert**, not an upsert. If a node with
|
|
328
|
+
* the same `key` already exists the server responds with 400
|
|
329
|
+
* "duplicate node key: <key>" and this method throws {@link MushroomError}.
|
|
330
|
+
*
|
|
331
|
+
* @param label Node label.
|
|
332
|
+
* @param key Node key — must be unique in the store.
|
|
333
|
+
* @param props Optional property map. Null values are silently dropped.
|
|
334
|
+
* @param namespace Optional namespace to assign the node to.
|
|
335
|
+
*/
|
|
336
|
+
async createNode(label, key, props, namespace) {
|
|
337
|
+
return this.fetchJson("/nodes", {
|
|
338
|
+
method: "POST",
|
|
339
|
+
body: JSON.stringify({
|
|
340
|
+
label,
|
|
341
|
+
key,
|
|
342
|
+
...(props ? { props } : {}),
|
|
343
|
+
...(namespace ? { namespace } : {}),
|
|
344
|
+
}),
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Delete a node by key.
|
|
349
|
+
*
|
|
350
|
+
* Wraps `DELETE /node/{key}`. The dense id is freed; all edges attached to
|
|
351
|
+
* this node are also removed. Throws {@link MushroomError} when the key does
|
|
352
|
+
* not exist.
|
|
353
|
+
*
|
|
354
|
+
* @param key The node key to delete.
|
|
355
|
+
*/
|
|
356
|
+
async deleteNode(key) {
|
|
357
|
+
this.checkPathSeg(key);
|
|
358
|
+
await this.fetchJson(`/node/${encodeURIComponent(key)}`, { method: "DELETE" });
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* List all edges attached to a node.
|
|
362
|
+
*
|
|
363
|
+
* Wraps `GET /node/{key}/edges`. Returns both asserted and derived edges in
|
|
364
|
+
* both directions. Throws {@link MushroomError} (404) when the key does not
|
|
365
|
+
* exist.
|
|
366
|
+
*
|
|
367
|
+
* @param key The node key.
|
|
368
|
+
* @param opts Optional filters:
|
|
369
|
+
* - `mask` — node-key allow-list; only edges whose **other** endpoint is
|
|
370
|
+
* in the list are returned (`key` itself need not be). Must be non-empty
|
|
371
|
+
* (an empty array throws {@link MushroomError}). A key must not contain
|
|
372
|
+
* a comma, be empty, or have surrounding whitespace: the server splits
|
|
373
|
+
* on commas and trims (use a `query()` with `mask` for such keys).
|
|
374
|
+
* - `stub_hidden` — when `true` and `mask` is set, edges to masked-out
|
|
375
|
+
* endpoints are **included** rather than omitted; those endpoints are
|
|
376
|
+
* returned as `{ key: string; restricted: true }` stubs rather than
|
|
377
|
+
* plain key strings. Without a mask this option is silently ignored by
|
|
378
|
+
* the server. Note that `as_of` (time-travel) does not compose with
|
|
379
|
+
* `stub_hidden`; the server rejects that combination.
|
|
380
|
+
*/
|
|
381
|
+
async nodeEdges(key, opts) {
|
|
382
|
+
this.checkPathSeg(key);
|
|
383
|
+
const qs = new URLSearchParams();
|
|
384
|
+
if (opts?.mask !== undefined) {
|
|
385
|
+
if (opts.mask.length === 0) {
|
|
386
|
+
throw new MushroomError("nodeEdges mask must not be empty — an empty allow-list is ambiguous; " +
|
|
387
|
+
"omit mask to return all edges, or use query() with mask:[] to hide all nodes");
|
|
388
|
+
}
|
|
389
|
+
for (const k of opts.mask) {
|
|
390
|
+
if (k === "" || k !== k.trim()) {
|
|
391
|
+
throw new MushroomError(`nodeEdges mask key ${JSON.stringify(k)} is empty or has surrounding ` +
|
|
392
|
+
"whitespace — the server trims each key, so it would match nothing or " +
|
|
393
|
+
"remove the mask altogether");
|
|
394
|
+
}
|
|
395
|
+
if (k.includes(",")) {
|
|
396
|
+
throw new MushroomError(`nodeEdges mask key "${k}" contains a comma — the server splits on commas ` +
|
|
397
|
+
"and cannot express a key with one; use query() with mask for such keys");
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
qs.set("mask", opts.mask.join(","));
|
|
401
|
+
}
|
|
402
|
+
if (opts?.stub_hidden !== undefined) {
|
|
403
|
+
qs.set("stub_hidden", String(opts.stub_hidden));
|
|
404
|
+
}
|
|
405
|
+
const query = qs.toString();
|
|
406
|
+
const path = `/node/${encodeURIComponent(key)}/edges${query ? `?${query}` : ""}`;
|
|
407
|
+
return this.fetchJson(path);
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Get WAL change history for a node.
|
|
411
|
+
*
|
|
412
|
+
* Wraps `GET /node/{key}/history`. Returns the sequence of WAL entries that
|
|
413
|
+
* touched this node, oldest first. Throws {@link MushroomError} (404) when
|
|
414
|
+
* the key does not exist.
|
|
415
|
+
*
|
|
416
|
+
* @param key The node key.
|
|
417
|
+
*/
|
|
418
|
+
async nodeHistory(key) {
|
|
419
|
+
this.checkPathSeg(key);
|
|
420
|
+
return this.fetchJson(`/node/${encodeURIComponent(key)}/history`);
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Get edge lifecycle between two nodes.
|
|
424
|
+
*
|
|
425
|
+
* Wraps `GET /history/edge?a=&b=`. Returns every time an edge was added or
|
|
426
|
+
* retracted between `a` and `b` (in either direction, any edge type).
|
|
427
|
+
*
|
|
428
|
+
* @param a Key of the first node.
|
|
429
|
+
* @param b Key of the second node.
|
|
430
|
+
*/
|
|
431
|
+
async edgeHistory(a, b) {
|
|
432
|
+
const qs = new URLSearchParams({ a, b });
|
|
433
|
+
return this.fetchJson(`/history/edge?${qs.toString()}`);
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Point-in-time edge check.
|
|
437
|
+
*
|
|
438
|
+
* Wraps `GET /history/was_linked?a=&b=&edge_type=&at_commit=`. Returns
|
|
439
|
+
* whether any edge of `edgeType` existed between `a` and `b` at the given
|
|
440
|
+
* WAL commit index. Throws {@link MushroomError} (400) when `atCommit` is
|
|
441
|
+
* outside the visible horizon.
|
|
442
|
+
*
|
|
443
|
+
* @param a Key of the first node.
|
|
444
|
+
* @param b Key of the second node.
|
|
445
|
+
* @param edgeType The edge type to check.
|
|
446
|
+
* @param atCommit WAL commit index (integer) or an RFC 3339 date string
|
|
447
|
+
* (e.g. `"2026-01-01T00:00:00Z"`); the server resolves the
|
|
448
|
+
* date to the nearest commit at or before that time.
|
|
449
|
+
*/
|
|
450
|
+
async wasLinked(a, b, edgeType, atCommit) {
|
|
451
|
+
const qs = new URLSearchParams({
|
|
452
|
+
a,
|
|
453
|
+
b,
|
|
454
|
+
edge_type: edgeType,
|
|
455
|
+
at_commit: String(atCommit),
|
|
456
|
+
});
|
|
457
|
+
return this.fetchJson(`/history/was_linked?${qs.toString()}`);
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Create an explicit edge.
|
|
461
|
+
*
|
|
462
|
+
* Wraps `POST /edges`. Both endpoint nodes must already exist; use
|
|
463
|
+
* {@link upsertEdge} to auto-create missing endpoints.
|
|
464
|
+
*
|
|
465
|
+
* @param type Edge type string.
|
|
466
|
+
* @param src Source node key.
|
|
467
|
+
* @param dst Destination node key.
|
|
468
|
+
*/
|
|
469
|
+
async createEdge(type, src, dst) {
|
|
470
|
+
await this.fetchJson("/edges", {
|
|
471
|
+
method: "POST",
|
|
472
|
+
body: JSON.stringify({ type, src, dst }),
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Delete an explicit edge.
|
|
477
|
+
*
|
|
478
|
+
* Wraps `DELETE /edges/{etype}/{src}/{dst}`. Returns silently when the edge
|
|
479
|
+
* does not exist (idempotent — the server answers 200). Throws
|
|
480
|
+
* {@link MushroomError} only when an endpoint node is missing
|
|
481
|
+
* (400 "node key not found: <key>").
|
|
482
|
+
*
|
|
483
|
+
* @param etype Edge type string.
|
|
484
|
+
* @param src Source node key.
|
|
485
|
+
* @param dst Destination node key.
|
|
486
|
+
*/
|
|
487
|
+
async deleteEdge(etype, src, dst) {
|
|
488
|
+
this.checkPathSeg(etype);
|
|
489
|
+
this.checkPathSeg(src);
|
|
490
|
+
this.checkPathSeg(dst);
|
|
491
|
+
await this.fetchJson(`/edges/${encodeURIComponent(etype)}/${encodeURIComponent(src)}/${encodeURIComponent(dst)}`, { method: "DELETE" });
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Set a property on a node.
|
|
495
|
+
*
|
|
496
|
+
* Wraps `PUT /node/{key}/prop/{field}`. Creates the property if absent,
|
|
497
|
+
* replaces its value if present. The value must be a non-null scalar, array
|
|
498
|
+
* or object; a null value is rejected with 400.
|
|
499
|
+
*
|
|
500
|
+
* @param key Node key.
|
|
501
|
+
* @param field Property field name.
|
|
502
|
+
* @param value New property value (non-null).
|
|
503
|
+
*/
|
|
504
|
+
async setNodeProp(key, field, value) {
|
|
505
|
+
this.checkPathSeg(key);
|
|
506
|
+
this.checkPathSeg(field);
|
|
507
|
+
await this.fetchJson(`/node/${encodeURIComponent(key)}/prop/${encodeURIComponent(field)}`, {
|
|
508
|
+
method: "PUT",
|
|
509
|
+
body: JSON.stringify({ value }),
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Remove a property from a node.
|
|
514
|
+
*
|
|
515
|
+
* Wraps `DELETE /node/{key}/prop/{field}`. Succeeds even when the property
|
|
516
|
+
* does not exist (the server is idempotent on prop removal).
|
|
517
|
+
*
|
|
518
|
+
* @param key Node key.
|
|
519
|
+
* @param field Property field name to remove.
|
|
520
|
+
*/
|
|
521
|
+
async removeNodeProp(key, field) {
|
|
522
|
+
this.checkPathSeg(key);
|
|
523
|
+
this.checkPathSeg(field);
|
|
524
|
+
await this.fetchJson(`/node/${encodeURIComponent(key)}/prop/${encodeURIComponent(field)}`, { method: "DELETE" });
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Trigger a consistent backup of the database.
|
|
528
|
+
*
|
|
529
|
+
* Wraps `POST /backup`. The server holds a read lock for the duration of
|
|
530
|
+
* the file copies. `dest` is a path relative to the backup root
|
|
531
|
+
* (`MUSHROOMDB_BACKUP_DIR`, or the server's working directory); `..`
|
|
532
|
+
* segments are rejected. Requires a full-access token.
|
|
533
|
+
*
|
|
534
|
+
* When `verified` is false in the response, the server answered 500 and
|
|
535
|
+
* throws {@link MushroomError}; the backup was written but the post-copy
|
|
536
|
+
* verification failed.
|
|
537
|
+
*
|
|
538
|
+
* @param dest Destination directory name or relative path.
|
|
539
|
+
*/
|
|
540
|
+
async backup(dest) {
|
|
541
|
+
return this.fetchJson("/backup", {
|
|
542
|
+
method: "POST",
|
|
543
|
+
body: JSON.stringify({ dest }),
|
|
544
|
+
});
|
|
545
|
+
}
|
|
240
546
|
// -------------------------------------------------------------------------
|
|
241
547
|
// WebSocket
|
|
242
548
|
// -------------------------------------------------------------------------
|
|
@@ -273,5 +579,38 @@ export class MushroomClient {
|
|
|
273
579
|
}
|
|
274
580
|
return wsSubscribe(url, opts, onEvent);
|
|
275
581
|
}
|
|
582
|
+
/**
|
|
583
|
+
* Subscribe to the raw mutation event stream over WebSocket (`GET /watch`).
|
|
584
|
+
*
|
|
585
|
+
* The server sends `{"subscribed":true}` immediately after the upgrade; no
|
|
586
|
+
* client subscribe message is required. After that, {@link MutationEvent}
|
|
587
|
+
* frames arrive for every write to the store.
|
|
588
|
+
*
|
|
589
|
+
* Unlike `/subscribe`, the `/watch` stream carries every mutation (nodes,
|
|
590
|
+
* edges, rules, batches, ingests) without filtering.
|
|
591
|
+
*
|
|
592
|
+
* **No auto-reconnect in v1.** Reconnect manually when the connection drops.
|
|
593
|
+
*
|
|
594
|
+
* **Always await `handle.close()`** to avoid dangling handles in tests.
|
|
595
|
+
*
|
|
596
|
+
* **Node.js < 21**: pass `wsConstructor` — see {@link WatchOptions}.
|
|
597
|
+
*
|
|
598
|
+
* @example
|
|
599
|
+
* ```ts
|
|
600
|
+
* import WS from 'ws';
|
|
601
|
+
* const handle = await client.watch(
|
|
602
|
+
* { wsConstructor: WS as WsConstructor },
|
|
603
|
+
* (ev) => console.log(ev),
|
|
604
|
+
* );
|
|
605
|
+
* await handle.close();
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
watch(opts, onEvent) {
|
|
609
|
+
let url = this.wsUrl("/watch");
|
|
610
|
+
if (this.token) {
|
|
611
|
+
url += `?token=${encodeURIComponent(this.token)}`;
|
|
612
|
+
}
|
|
613
|
+
return wsWatch(url, opts, onEvent);
|
|
614
|
+
}
|
|
276
615
|
}
|
|
277
616
|
//# sourceMappingURL=client.js.map
|
package/dist/client.js.map
CHANGED
|
@@ -1 +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,EAA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,SAAS,CAAe,SAAS,EAAE;YAC7C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,4EAA4E;IAC5E,YAAY;IACZ,4EAA4E;IAE5E;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,SAAS,CACP,IAAsB,EACtB,OAAsD;QAEtD,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACnC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,GAAG,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;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,KAAK,CACH,IAAkB,EAClB,OAAuC;QAEvC,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,GAAG,IAAI,UAAU,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACpD,CAAC;QACD,OAAO,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Entry point re-exports everything callers need.
|
|
5
5
|
*/
|
|
6
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";
|
|
7
|
+
export type { AlgoDir, AlgoReport, BackupReport, CellValue, ClientOptions, CreateNodeResult, DegreeConfig, DegreeReport, EdgeHistoryEntry, EdgeHistoryResult, EdgeInfo, Explanation, FindSimilarOptions, FindSimilarResult, HealthReport, HistoryChange, HistoryEntry, IngestEdge, IngestOptions, IngestReport, IngestRequest, MetricsReport, MutationEvent, Neighborhood, NodeEdgesResult, NodeHistoryResult, NodeInfo, PageRankConfig, PageRankReport, PredicateKind, PredicateSummary, QueryOptions, QueryParams, QueryResult, RuleDef, RulePredicate, RuleStats, RuleSuggestion, SlowQueryEntry, Stats, SuggestReport, WasLinkedResult, WccConfig, WccReport, } from "./client.js";
|
|
8
8
|
export type { DbEvent, SubscribeMessage, } from "./types.js";
|
|
9
|
-
export type { SubscribeHandle, SubscribeOptions, WsConstructor, WsLike, } from "./ws.js";
|
|
9
|
+
export type { SubscribeHandle, SubscribeOptions, WatchHandle, WatchOptions, WsConstructor, WsLike, } from "./ws.js";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +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"}
|
|
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,YAAY,EACZ,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,WAAW,EACX,OAAO,EACP,aAAa,EACb,SAAS,EACT,cAAc,EACd,cAAc,EACd,KAAK,EACL,aAAa,EACb,eAAe,EACf,SAAS,EACT,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,OAAO,EACP,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,MAAM,GACP,MAAM,SAAS,CAAC"}
|