mushroomdb-client 0.8.1 → 0.9.0

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/dist/types.d.ts CHANGED
@@ -35,7 +35,7 @@ export interface QueryResult {
35
35
  /**
36
36
  * Per-rule statistics.
37
37
  *
38
- * Mirrors `core_api::db::RuleStats`.
38
+ * Mirrors `mushroomdb::db::RuleStats`.
39
39
  */
40
40
  export interface RuleStats {
41
41
  name: string;
@@ -47,7 +47,7 @@ export interface RuleStats {
47
47
  /**
48
48
  * Database-wide counters returned by `GET /stats`.
49
49
  *
50
- * Mirrors `core_api::db::Stats`.
50
+ * Mirrors `mushroomdb::db::Stats`.
51
51
  */
52
52
  export interface Stats {
53
53
  nodes_live: number;
@@ -58,7 +58,7 @@ export interface Stats {
58
58
  /**
59
59
  * Options for `POST /ingest`.
60
60
  *
61
- * Mirrors `core_api::IngestOptions` (serialised by `crates/server/src/http.rs::ingest_options`).
61
+ * Mirrors `mushroomdb::IngestOptions` (serialised by `crates/server/src/http.rs::ingest_options`).
62
62
  */
63
63
  export interface IngestOptions {
64
64
  /** Name of the field to use as the node key. Defaults to "key". */
@@ -116,7 +116,7 @@ export interface PredicateSummary {
116
116
  /**
117
117
  * One rule-derived edge between two nodes from `GET /explain?a=&b=`.
118
118
  *
119
- * Mirrors `core_api::db::Explanation`.
119
+ * Mirrors `mushroomdb::db::Explanation`.
120
120
  */
121
121
  export interface Explanation {
122
122
  rule: string;
@@ -224,13 +224,13 @@ export interface SuggestReport {
224
224
  /**
225
225
  * Edge direction for graph algorithms.
226
226
  *
227
- * Mirrors `core_api::algo::AlgoDir` (serialises as lowercase string).
227
+ * Mirrors `mushroomdb::algo::AlgoDir` (serialises as lowercase string).
228
228
  */
229
229
  export type AlgoDir = "out" | "in" | "both";
230
230
  /**
231
231
  * Config for `POST /algo/pagerank`.
232
232
  *
233
- * Mirrors `core_api::algo::PageRankConfig`. All fields are optional — the
233
+ * Mirrors `mushroomdb::algo::PageRankConfig`. All fields are optional — the
234
234
  * server applies defaults (damping=0.85, max_iters=50, tol=1e-6,
235
235
  * edge_type=null, direction="out", budget_ms=5000).
236
236
  */
@@ -245,7 +245,7 @@ export interface PageRankConfig {
245
245
  /**
246
246
  * Result of `POST /algo/pagerank`.
247
247
  *
248
- * Mirrors `core_api::algo::PageRankReport`.
248
+ * Mirrors `mushroomdb::algo::PageRankReport`.
249
249
  */
250
250
  export interface PageRankReport {
251
251
  /** [node_key, score] pairs, sorted by score descending (ties: key asc). */
@@ -256,7 +256,7 @@ export interface PageRankReport {
256
256
  /**
257
257
  * Config for `POST /algo/wcc`.
258
258
  *
259
- * Mirrors `core_api::algo::WccConfig`. Defaults: edge_type=null, budget_ms=5000.
259
+ * Mirrors `mushroomdb::algo::WccConfig`. Defaults: edge_type=null, budget_ms=5000.
260
260
  */
261
261
  export interface WccConfig {
262
262
  edge_type?: string | null;
@@ -265,7 +265,7 @@ export interface WccConfig {
265
265
  /**
266
266
  * Result of `POST /algo/wcc`.
267
267
  *
268
- * Mirrors `core_api::algo::WccReport`.
268
+ * Mirrors `mushroomdb::algo::WccReport`.
269
269
  */
270
270
  export interface WccReport {
271
271
  /** [node_key, component_id] pairs. component_id is the smallest key in the component. */
@@ -275,7 +275,7 @@ export interface WccReport {
275
275
  /**
276
276
  * Config for `POST /algo/degree`.
277
277
  *
278
- * Mirrors `core_api::algo::DegreeConfig`. Defaults: edge_type=null, direction="both", budget_ms=5000.
278
+ * Mirrors `mushroomdb::algo::DegreeConfig`. Defaults: edge_type=null, direction="both", budget_ms=5000.
279
279
  */
280
280
  export interface DegreeConfig {
281
281
  edge_type?: string | null;
@@ -285,7 +285,7 @@ export interface DegreeConfig {
285
285
  /**
286
286
  * Result of `POST /algo/degree`.
287
287
  *
288
- * Mirrors `core_api::algo::DegreeReport`.
288
+ * Mirrors `mushroomdb::algo::DegreeReport`.
289
289
  */
290
290
  export interface DegreeReport {
291
291
  /**
@@ -315,7 +315,7 @@ export type AlgoReport = PageRankReport | WccReport | DegreeReport;
315
315
  /**
316
316
  * A post-commit event delivered over the `/subscribe` WebSocket.
317
317
  *
318
- * Mirrors `core_api::subscription::DbEvent` — serialised as internally-tagged
318
+ * Mirrors `mushroomdb::subscription::DbEvent` — serialised as internally-tagged
319
319
  * JSON with `"type"` as the discriminant.
320
320
  *
321
321
  * All variants except `lagged` carry `commit_seq: number` (Rust: `u64`).
@@ -429,7 +429,7 @@ export interface MetricsReport {
429
429
  * A property filter accepted by `POST /find_similar`'s `where` field and by
430
430
  * the server's role-definition API.
431
431
  *
432
- * Mirrors `core_api::roles::PropPredicate` (a flat struct serialised as a JSON
432
+ * Mirrors `mushroomdb::roles::PropPredicate` (a flat struct serialised as a JSON
433
433
  * object with `field` required and exactly one of `eq` or `in`).
434
434
  *
435
435
  * The server also accepts the graph's own tagged Value form for the values:
@@ -514,7 +514,7 @@ export type NodeKeyOrStub = string | {
514
514
  /**
515
515
  * One edge entry from `GET /node/{key}/edges`.
516
516
  *
517
- * Mirrors `core_api::EdgeInfo` as serialised by
517
+ * Mirrors `mushroomdb::EdgeInfo` as serialised by
518
518
  * `crates/server/src/json.rs::node_edges_json` (unmasked call) or
519
519
  * `json.rs::masked_edges_json` (call with `mask`/`stub_hidden`).
520
520
  *
@@ -539,7 +539,7 @@ export interface NodeEdgesResult {
539
539
  /**
540
540
  * One change entry in a node's history.
541
541
  *
542
- * Mirrors `core_api::HistoryChange` via
542
+ * Mirrors `mushroomdb::HistoryChange` via
543
543
  * `crates/server/src/json.rs::history_change_json`.
544
544
  * The `"type"` field is the discriminant.
545
545
  */
@@ -592,7 +592,7 @@ export interface NodeHistoryResult {
592
592
  /**
593
593
  * One event in the lifecycle of an edge from `GET /history/edge?a=&b=`.
594
594
  *
595
- * Mirrors `core_api::EdgeHistoryEvent` as serialised by
595
+ * Mirrors `mushroomdb::EdgeHistoryEvent` as serialised by
596
596
  * `crates/server/src/json.rs::edge_history_result_json`.
597
597
  */
598
598
  export interface EdgeHistoryEntry {
@@ -657,7 +657,7 @@ export interface BackupReport {
657
657
  /**
658
658
  * A mutation event delivered over the `/watch` WebSocket.
659
659
  *
660
- * Mirrors `core_api::MutationEvent` — serialised as externally-tagged
660
+ * Mirrors `mushroomdb::MutationEvent` — serialised as externally-tagged
661
661
  * snake_case JSON (`{"node_inserted":{"label":"A","key":"k"}}`).
662
662
  *
663
663
  * The `lagged` variant (`{"lagged": N}`) is not produced by serde but by the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mushroomdb-client",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "TypeScript client for the mushroomdb graph database HTTP + WebSocket API",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "repository": {
package/src/types.ts CHANGED
@@ -50,7 +50,7 @@ export interface QueryResult {
50
50
  /**
51
51
  * Per-rule statistics.
52
52
  *
53
- * Mirrors `core_api::db::RuleStats`.
53
+ * Mirrors `mushroomdb::db::RuleStats`.
54
54
  */
55
55
  export interface RuleStats {
56
56
  name: string;
@@ -63,7 +63,7 @@ export interface RuleStats {
63
63
  /**
64
64
  * Database-wide counters returned by `GET /stats`.
65
65
  *
66
- * Mirrors `core_api::db::Stats`.
66
+ * Mirrors `mushroomdb::db::Stats`.
67
67
  */
68
68
  export interface Stats {
69
69
  nodes_live: number;
@@ -79,7 +79,7 @@ export interface Stats {
79
79
  /**
80
80
  * Options for `POST /ingest`.
81
81
  *
82
- * Mirrors `core_api::IngestOptions` (serialised by `crates/server/src/http.rs::ingest_options`).
82
+ * Mirrors `mushroomdb::IngestOptions` (serialised by `crates/server/src/http.rs::ingest_options`).
83
83
  */
84
84
  export interface IngestOptions {
85
85
  /** Name of the field to use as the node key. Defaults to "key". */
@@ -153,7 +153,7 @@ export interface PredicateSummary {
153
153
  /**
154
154
  * One rule-derived edge between two nodes from `GET /explain?a=&b=`.
155
155
  *
156
- * Mirrors `core_api::db::Explanation`.
156
+ * Mirrors `mushroomdb::db::Explanation`.
157
157
  */
158
158
  export interface Explanation {
159
159
  rule: string;
@@ -251,14 +251,14 @@ export interface SuggestReport {
251
251
  /**
252
252
  * Edge direction for graph algorithms.
253
253
  *
254
- * Mirrors `core_api::algo::AlgoDir` (serialises as lowercase string).
254
+ * Mirrors `mushroomdb::algo::AlgoDir` (serialises as lowercase string).
255
255
  */
256
256
  export type AlgoDir = "out" | "in" | "both";
257
257
 
258
258
  /**
259
259
  * Config for `POST /algo/pagerank`.
260
260
  *
261
- * Mirrors `core_api::algo::PageRankConfig`. All fields are optional — the
261
+ * Mirrors `mushroomdb::algo::PageRankConfig`. All fields are optional — the
262
262
  * server applies defaults (damping=0.85, max_iters=50, tol=1e-6,
263
263
  * edge_type=null, direction="out", budget_ms=5000).
264
264
  */
@@ -274,7 +274,7 @@ export interface PageRankConfig {
274
274
  /**
275
275
  * Result of `POST /algo/pagerank`.
276
276
  *
277
- * Mirrors `core_api::algo::PageRankReport`.
277
+ * Mirrors `mushroomdb::algo::PageRankReport`.
278
278
  */
279
279
  export interface PageRankReport {
280
280
  /** [node_key, score] pairs, sorted by score descending (ties: key asc). */
@@ -286,7 +286,7 @@ export interface PageRankReport {
286
286
  /**
287
287
  * Config for `POST /algo/wcc`.
288
288
  *
289
- * Mirrors `core_api::algo::WccConfig`. Defaults: edge_type=null, budget_ms=5000.
289
+ * Mirrors `mushroomdb::algo::WccConfig`. Defaults: edge_type=null, budget_ms=5000.
290
290
  */
291
291
  export interface WccConfig {
292
292
  edge_type?: string | null;
@@ -296,7 +296,7 @@ export interface WccConfig {
296
296
  /**
297
297
  * Result of `POST /algo/wcc`.
298
298
  *
299
- * Mirrors `core_api::algo::WccReport`.
299
+ * Mirrors `mushroomdb::algo::WccReport`.
300
300
  */
301
301
  export interface WccReport {
302
302
  /** [node_key, component_id] pairs. component_id is the smallest key in the component. */
@@ -307,7 +307,7 @@ export interface WccReport {
307
307
  /**
308
308
  * Config for `POST /algo/degree`.
309
309
  *
310
- * Mirrors `core_api::algo::DegreeConfig`. Defaults: edge_type=null, direction="both", budget_ms=5000.
310
+ * Mirrors `mushroomdb::algo::DegreeConfig`. Defaults: edge_type=null, direction="both", budget_ms=5000.
311
311
  */
312
312
  export interface DegreeConfig {
313
313
  edge_type?: string | null;
@@ -318,7 +318,7 @@ export interface DegreeConfig {
318
318
  /**
319
319
  * Result of `POST /algo/degree`.
320
320
  *
321
- * Mirrors `core_api::algo::DegreeReport`.
321
+ * Mirrors `mushroomdb::algo::DegreeReport`.
322
322
  */
323
323
  export interface DegreeReport {
324
324
  /**
@@ -349,7 +349,7 @@ export type AlgoReport = PageRankReport | WccReport | DegreeReport;
349
349
  /**
350
350
  * A post-commit event delivered over the `/subscribe` WebSocket.
351
351
  *
352
- * Mirrors `core_api::subscription::DbEvent` — serialised as internally-tagged
352
+ * Mirrors `mushroomdb::subscription::DbEvent` — serialised as internally-tagged
353
353
  * JSON with `"type"` as the discriminant.
354
354
  *
355
355
  * All variants except `lagged` carry `commit_seq: number` (Rust: `u64`).
@@ -488,7 +488,7 @@ export interface MetricsReport {
488
488
  * A property filter accepted by `POST /find_similar`'s `where` field and by
489
489
  * the server's role-definition API.
490
490
  *
491
- * Mirrors `core_api::roles::PropPredicate` (a flat struct serialised as a JSON
491
+ * Mirrors `mushroomdb::roles::PropPredicate` (a flat struct serialised as a JSON
492
492
  * object with `field` required and exactly one of `eq` or `in`).
493
493
  *
494
494
  * The server also accepts the graph's own tagged Value form for the values:
@@ -576,7 +576,7 @@ export type NodeKeyOrStub = string | { key: string; restricted: true };
576
576
  /**
577
577
  * One edge entry from `GET /node/{key}/edges`.
578
578
  *
579
- * Mirrors `core_api::EdgeInfo` as serialised by
579
+ * Mirrors `mushroomdb::EdgeInfo` as serialised by
580
580
  * `crates/server/src/json.rs::node_edges_json` (unmasked call) or
581
581
  * `json.rs::masked_edges_json` (call with `mask`/`stub_hidden`).
582
582
  *
@@ -607,7 +607,7 @@ export interface NodeEdgesResult {
607
607
  /**
608
608
  * One change entry in a node's history.
609
609
  *
610
- * Mirrors `core_api::HistoryChange` via
610
+ * Mirrors `mushroomdb::HistoryChange` via
611
611
  * `crates/server/src/json.rs::history_change_json`.
612
612
  * The `"type"` field is the discriminant.
613
613
  */
@@ -651,7 +651,7 @@ export interface NodeHistoryResult {
651
651
  /**
652
652
  * One event in the lifecycle of an edge from `GET /history/edge?a=&b=`.
653
653
  *
654
- * Mirrors `core_api::EdgeHistoryEvent` as serialised by
654
+ * Mirrors `mushroomdb::EdgeHistoryEvent` as serialised by
655
655
  * `crates/server/src/json.rs::edge_history_result_json`.
656
656
  */
657
657
  export interface EdgeHistoryEntry {
@@ -737,7 +737,7 @@ export interface BackupReport {
737
737
  /**
738
738
  * A mutation event delivered over the `/watch` WebSocket.
739
739
  *
740
- * Mirrors `core_api::MutationEvent` — serialised as externally-tagged
740
+ * Mirrors `mushroomdb::MutationEvent` — serialised as externally-tagged
741
741
  * snake_case JSON (`{"node_inserted":{"label":"A","key":"k"}}`).
742
742
  *
743
743
  * The `lagged` variant (`{"lagged": N}`) is not produced by serde but by the