mindgraph 0.1.7 → 0.1.8

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/index.d.mts CHANGED
@@ -318,6 +318,16 @@ interface IngestDocumentRequest {
318
318
  chunk_overlap?: number;
319
319
  layers?: string[];
320
320
  agent_id?: string;
321
+ /** Paper metadata */
322
+ authors?: string[];
323
+ abstract_text?: string;
324
+ doi?: string;
325
+ publication_date?: string;
326
+ journal?: string;
327
+ keywords?: string[];
328
+ citation_count?: number;
329
+ arxiv_id?: string;
330
+ language?: string;
321
331
  }
322
332
  interface IngestDocumentResponse {
323
333
  job_id: string;
@@ -577,6 +587,10 @@ declare class MindGraph {
577
587
  }): Promise<unknown>;
578
588
  getAgentNodes(agentId: string): Promise<GraphNode[]>;
579
589
  batch(req: BatchRequest): Promise<unknown>;
590
+ /** Fetch multiple nodes by UID in a single request. */
591
+ getNodesBatch(uids: string[]): Promise<GraphNode[]>;
592
+ /** Fetch all edges between a set of node UIDs. */
593
+ getEdgesBatch(uids: string[]): Promise<GraphEdge[]>;
580
594
  configureEmbeddings(body: {
581
595
  model: string;
582
596
  dimensions: number;
@@ -639,6 +653,17 @@ declare class MindGraph {
639
653
  listJobs(): Promise<Job[]>;
640
654
  getJob(id: string): Promise<Job>;
641
655
  cancelJob(id: string): Promise<unknown>;
656
+ /** Resume ingestion of a document that has failed chunks. */
657
+ resumeDocument(docUid: string, opts?: {
658
+ layers?: string[];
659
+ agent_id?: string;
660
+ }): Promise<{
661
+ job_id: string;
662
+ document_uid: string;
663
+ chunks_to_resume: number;
664
+ }>;
665
+ /** Delete a document and all its chunks and extracted nodes. */
666
+ deleteDocument(uid: string): Promise<unknown>;
642
667
  cleanupOrphans(): Promise<unknown>;
643
668
  embedAll(): Promise<unknown>;
644
669
  clearGraph(): Promise<ClearResponse>;
package/dist/index.d.ts CHANGED
@@ -318,6 +318,16 @@ interface IngestDocumentRequest {
318
318
  chunk_overlap?: number;
319
319
  layers?: string[];
320
320
  agent_id?: string;
321
+ /** Paper metadata */
322
+ authors?: string[];
323
+ abstract_text?: string;
324
+ doi?: string;
325
+ publication_date?: string;
326
+ journal?: string;
327
+ keywords?: string[];
328
+ citation_count?: number;
329
+ arxiv_id?: string;
330
+ language?: string;
321
331
  }
322
332
  interface IngestDocumentResponse {
323
333
  job_id: string;
@@ -577,6 +587,10 @@ declare class MindGraph {
577
587
  }): Promise<unknown>;
578
588
  getAgentNodes(agentId: string): Promise<GraphNode[]>;
579
589
  batch(req: BatchRequest): Promise<unknown>;
590
+ /** Fetch multiple nodes by UID in a single request. */
591
+ getNodesBatch(uids: string[]): Promise<GraphNode[]>;
592
+ /** Fetch all edges between a set of node UIDs. */
593
+ getEdgesBatch(uids: string[]): Promise<GraphEdge[]>;
580
594
  configureEmbeddings(body: {
581
595
  model: string;
582
596
  dimensions: number;
@@ -639,6 +653,17 @@ declare class MindGraph {
639
653
  listJobs(): Promise<Job[]>;
640
654
  getJob(id: string): Promise<Job>;
641
655
  cancelJob(id: string): Promise<unknown>;
656
+ /** Resume ingestion of a document that has failed chunks. */
657
+ resumeDocument(docUid: string, opts?: {
658
+ layers?: string[];
659
+ agent_id?: string;
660
+ }): Promise<{
661
+ job_id: string;
662
+ document_uid: string;
663
+ chunks_to_resume: number;
664
+ }>;
665
+ /** Delete a document and all its chunks and extracted nodes. */
666
+ deleteDocument(uid: string): Promise<unknown>;
642
667
  cleanupOrphans(): Promise<unknown>;
643
668
  embedAll(): Promise<unknown>;
644
669
  clearGraph(): Promise<ClearResponse>;
package/dist/index.js CHANGED
@@ -329,6 +329,14 @@ var MindGraph = class {
329
329
  async batch(req) {
330
330
  return this.post("/batch", req);
331
331
  }
332
+ /** Fetch multiple nodes by UID in a single request. */
333
+ async getNodesBatch(uids) {
334
+ return this.post("/nodes/batch", { uids });
335
+ }
336
+ /** Fetch all edges between a set of node UIDs. */
337
+ async getEdgesBatch(uids) {
338
+ return this.post("/edges/batch", { uids });
339
+ }
332
340
  // ---- Embeddings ----
333
341
  async configureEmbeddings(body) {
334
342
  return this.post("/embeddings/configure", body);
@@ -452,6 +460,14 @@ var MindGraph = class {
452
460
  async cancelJob(id) {
453
461
  return this.post(`/jobs/${id}/cancel`, {});
454
462
  }
463
+ /** Resume ingestion of a document that has failed chunks. */
464
+ async resumeDocument(docUid, opts) {
465
+ return this.post(`/ingest/resume/${docUid}`, opts ?? {});
466
+ }
467
+ /** Delete a document and all its chunks and extracted nodes. */
468
+ async deleteDocument(uid) {
469
+ return this.del(`/ingest/document/${uid}`);
470
+ }
455
471
  async cleanupOrphans() {
456
472
  return this.post("/ingest/cleanup", {});
457
473
  }
package/dist/index.mjs CHANGED
@@ -302,6 +302,14 @@ var MindGraph = class {
302
302
  async batch(req) {
303
303
  return this.post("/batch", req);
304
304
  }
305
+ /** Fetch multiple nodes by UID in a single request. */
306
+ async getNodesBatch(uids) {
307
+ return this.post("/nodes/batch", { uids });
308
+ }
309
+ /** Fetch all edges between a set of node UIDs. */
310
+ async getEdgesBatch(uids) {
311
+ return this.post("/edges/batch", { uids });
312
+ }
305
313
  // ---- Embeddings ----
306
314
  async configureEmbeddings(body) {
307
315
  return this.post("/embeddings/configure", body);
@@ -425,6 +433,14 @@ var MindGraph = class {
425
433
  async cancelJob(id) {
426
434
  return this.post(`/jobs/${id}/cancel`, {});
427
435
  }
436
+ /** Resume ingestion of a document that has failed chunks. */
437
+ async resumeDocument(docUid, opts) {
438
+ return this.post(`/ingest/resume/${docUid}`, opts ?? {});
439
+ }
440
+ /** Delete a document and all its chunks and extracted nodes. */
441
+ async deleteDocument(uid) {
442
+ return this.del(`/ingest/document/${uid}`);
443
+ }
428
444
  async cleanupOrphans() {
429
445
  return this.post("/ingest/cleanup", {});
430
446
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindgraph",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "TypeScript client for the MindGraph Cloud API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",