mindgraph 0.2.0 → 0.2.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/dist/index.d.mts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +18 -0
- package/dist/index.mjs +18 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -619,6 +619,25 @@ declare class MindGraph {
|
|
|
619
619
|
agent_id?: string;
|
|
620
620
|
}): Promise<GraphNode>;
|
|
621
621
|
deleteNode(uid: string): Promise<void>;
|
|
622
|
+
batchDeleteNodes(params: {
|
|
623
|
+
uids?: string[];
|
|
624
|
+
agentId?: string;
|
|
625
|
+
filter?: {
|
|
626
|
+
nodeType?: string;
|
|
627
|
+
nodeTypes?: string[];
|
|
628
|
+
layer?: string;
|
|
629
|
+
labelContains?: string;
|
|
630
|
+
propEquals?: [string, string];
|
|
631
|
+
};
|
|
632
|
+
reason?: string;
|
|
633
|
+
by?: string;
|
|
634
|
+
hardPurge?: boolean;
|
|
635
|
+
}): Promise<{
|
|
636
|
+
nodes_tombstoned: number;
|
|
637
|
+
edges_tombstoned: number;
|
|
638
|
+
nodes_purged: number;
|
|
639
|
+
edges_purged: number;
|
|
640
|
+
}>;
|
|
622
641
|
getNodeHistory(uid: string): Promise<unknown[]>;
|
|
623
642
|
getNodeAtVersion(uid: string, version: number): Promise<GraphNode>;
|
|
624
643
|
addLink(body: {
|
package/dist/index.d.ts
CHANGED
|
@@ -619,6 +619,25 @@ declare class MindGraph {
|
|
|
619
619
|
agent_id?: string;
|
|
620
620
|
}): Promise<GraphNode>;
|
|
621
621
|
deleteNode(uid: string): Promise<void>;
|
|
622
|
+
batchDeleteNodes(params: {
|
|
623
|
+
uids?: string[];
|
|
624
|
+
agentId?: string;
|
|
625
|
+
filter?: {
|
|
626
|
+
nodeType?: string;
|
|
627
|
+
nodeTypes?: string[];
|
|
628
|
+
layer?: string;
|
|
629
|
+
labelContains?: string;
|
|
630
|
+
propEquals?: [string, string];
|
|
631
|
+
};
|
|
632
|
+
reason?: string;
|
|
633
|
+
by?: string;
|
|
634
|
+
hardPurge?: boolean;
|
|
635
|
+
}): Promise<{
|
|
636
|
+
nodes_tombstoned: number;
|
|
637
|
+
edges_tombstoned: number;
|
|
638
|
+
nodes_purged: number;
|
|
639
|
+
edges_purged: number;
|
|
640
|
+
}>;
|
|
622
641
|
getNodeHistory(uid: string): Promise<unknown[]>;
|
|
623
642
|
getNodeAtVersion(uid: string, version: number): Promise<GraphNode>;
|
|
624
643
|
addLink(body: {
|
package/dist/index.js
CHANGED
|
@@ -318,6 +318,24 @@ var MindGraph = class {
|
|
|
318
318
|
async deleteNode(uid) {
|
|
319
319
|
await this.del(`/node/${uid}`);
|
|
320
320
|
}
|
|
321
|
+
async batchDeleteNodes(params) {
|
|
322
|
+
const body = {};
|
|
323
|
+
if (params.uids) body.uids = params.uids;
|
|
324
|
+
if (params.agentId) body.agent_id = params.agentId;
|
|
325
|
+
if (params.filter) {
|
|
326
|
+
body.filter = {
|
|
327
|
+
node_type: params.filter.nodeType,
|
|
328
|
+
node_types: params.filter.nodeTypes,
|
|
329
|
+
layer: params.filter.layer,
|
|
330
|
+
label_contains: params.filter.labelContains,
|
|
331
|
+
prop_equals: params.filter.propEquals
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
if (params.reason) body.reason = params.reason;
|
|
335
|
+
if (params.by) body.by = params.by;
|
|
336
|
+
if (params.hardPurge) body.hard_purge = params.hardPurge;
|
|
337
|
+
return this.post("/nodes/delete", body);
|
|
338
|
+
}
|
|
321
339
|
async getNodeHistory(uid) {
|
|
322
340
|
return this.get(`/node/${uid}/history`);
|
|
323
341
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -291,6 +291,24 @@ var MindGraph = class {
|
|
|
291
291
|
async deleteNode(uid) {
|
|
292
292
|
await this.del(`/node/${uid}`);
|
|
293
293
|
}
|
|
294
|
+
async batchDeleteNodes(params) {
|
|
295
|
+
const body = {};
|
|
296
|
+
if (params.uids) body.uids = params.uids;
|
|
297
|
+
if (params.agentId) body.agent_id = params.agentId;
|
|
298
|
+
if (params.filter) {
|
|
299
|
+
body.filter = {
|
|
300
|
+
node_type: params.filter.nodeType,
|
|
301
|
+
node_types: params.filter.nodeTypes,
|
|
302
|
+
layer: params.filter.layer,
|
|
303
|
+
label_contains: params.filter.labelContains,
|
|
304
|
+
prop_equals: params.filter.propEquals
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
if (params.reason) body.reason = params.reason;
|
|
308
|
+
if (params.by) body.by = params.by;
|
|
309
|
+
if (params.hardPurge) body.hard_purge = params.hardPurge;
|
|
310
|
+
return this.post("/nodes/delete", body);
|
|
311
|
+
}
|
|
294
312
|
async getNodeHistory(uid) {
|
|
295
313
|
return this.get(`/node/${uid}/history`);
|
|
296
314
|
}
|