@elqnt/kg 2.1.1 → 3.0.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.
Files changed (47) hide show
  1. package/README.md +357 -39
  2. package/dist/api/index.d.mts +248 -1
  3. package/dist/api/index.d.ts +248 -1
  4. package/dist/api/index.js +2 -2
  5. package/dist/api/index.mjs +1 -1
  6. package/dist/api/server.d.mts +219 -0
  7. package/dist/api/server.d.ts +219 -0
  8. package/dist/api/server.js +442 -0
  9. package/dist/api/server.js.map +1 -0
  10. package/dist/api/server.mjs +442 -0
  11. package/dist/api/server.mjs.map +1 -0
  12. package/dist/{chunk-4XIW5GLO.js → chunk-2TJCYLTP.js} +63 -68
  13. package/dist/chunk-2TJCYLTP.js.map +1 -0
  14. package/dist/chunk-7RW5MHP5.js +497 -0
  15. package/dist/chunk-7RW5MHP5.js.map +1 -0
  16. package/dist/chunk-ADIKUMMI.js +238 -0
  17. package/dist/chunk-ADIKUMMI.js.map +1 -0
  18. package/dist/chunk-CAXPQTKI.mjs +238 -0
  19. package/dist/chunk-CAXPQTKI.mjs.map +1 -0
  20. package/dist/{chunk-3AS6C7FW.mjs → chunk-HCDFJCQL.mjs} +62 -67
  21. package/dist/chunk-HCDFJCQL.mjs.map +1 -0
  22. package/dist/chunk-JZ7UXVRW.mjs +497 -0
  23. package/dist/chunk-JZ7UXVRW.mjs.map +1 -0
  24. package/dist/hooks/index.d.mts +109 -4
  25. package/dist/hooks/index.d.ts +109 -4
  26. package/dist/hooks/index.js +9 -3
  27. package/dist/hooks/index.js.map +1 -1
  28. package/dist/hooks/index.mjs +10 -4
  29. package/dist/index.d.mts +2 -1
  30. package/dist/index.d.ts +2 -1
  31. package/dist/index.js +21 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +22 -4
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/utils/index.d.mts +277 -0
  36. package/dist/utils/index.d.ts +277 -0
  37. package/dist/utils/index.js +44 -0
  38. package/dist/utils/index.js.map +1 -0
  39. package/dist/utils/index.mjs +44 -0
  40. package/dist/utils/index.mjs.map +1 -0
  41. package/package.json +15 -5
  42. package/dist/chunk-3AS6C7FW.mjs.map +0 -1
  43. package/dist/chunk-4XIW5GLO.js.map +0 -1
  44. package/dist/chunk-7HNJUCVW.js +0 -577
  45. package/dist/chunk-7HNJUCVW.js.map +0 -1
  46. package/dist/chunk-EW3NQGUZ.mjs +0 -577
  47. package/dist/chunk-EW3NQGUZ.mjs.map +0 -1
package/dist/api/index.js CHANGED
@@ -29,7 +29,7 @@
29
29
 
30
30
 
31
31
 
32
- var _chunk4XIW5GLOjs = require('../chunk-4XIW5GLO.js');
32
+ var _chunk2TJCYLTPjs = require('../chunk-2TJCYLTP.js');
33
33
 
34
34
 
35
35
 
@@ -60,5 +60,5 @@ var _chunk4XIW5GLOjs = require('../chunk-4XIW5GLO.js');
60
60
 
61
61
 
62
62
 
63
- exports.cancelCrawlJobApi = _chunk4XIW5GLOjs.cancelCrawlJobApi; exports.createDesignerEdgeApi = _chunk4XIW5GLOjs.createDesignerEdgeApi; exports.createDesignerNodeApi = _chunk4XIW5GLOjs.createDesignerNodeApi; exports.createGraphApi = _chunk4XIW5GLOjs.createGraphApi; exports.deleteDesignerEdgeApi = _chunk4XIW5GLOjs.deleteDesignerEdgeApi; exports.deleteDesignerNodeApi = _chunk4XIW5GLOjs.deleteDesignerNodeApi; exports.deleteGraphApi = _chunk4XIW5GLOjs.deleteGraphApi; exports.deleteKGDocumentApi = _chunk4XIW5GLOjs.deleteKGDocumentApi; exports.getCrawlJobStatusApi = _chunk4XIW5GLOjs.getCrawlJobStatusApi; exports.getCrawledPagesApi = _chunk4XIW5GLOjs.getCrawledPagesApi; exports.getDesignerEdgeApi = _chunk4XIW5GLOjs.getDesignerEdgeApi; exports.getDesignerNodeApi = _chunk4XIW5GLOjs.getDesignerNodeApi; exports.getGraphApi = _chunk4XIW5GLOjs.getGraphApi; exports.getGraphLabelsApi = _chunk4XIW5GLOjs.getGraphLabelsApi; exports.getKGNodeApi = _chunk4XIW5GLOjs.getKGNodeApi; exports.getNodeConnectionStatsApi = _chunk4XIW5GLOjs.getNodeConnectionStatsApi; exports.ingestDocumentApi = _chunk4XIW5GLOjs.ingestDocumentApi; exports.ingestKGNodeApi = _chunk4XIW5GLOjs.ingestKGNodeApi; exports.listCrawlJobsApi = _chunk4XIW5GLOjs.listCrawlJobsApi; exports.listDesignerEdgesApi = _chunk4XIW5GLOjs.listDesignerEdgesApi; exports.listDesignerNodesApi = _chunk4XIW5GLOjs.listDesignerNodesApi; exports.listGraphsApi = _chunk4XIW5GLOjs.listGraphsApi; exports.optimizeGraphApi = _chunk4XIW5GLOjs.optimizeGraphApi; exports.queryGraphApi = _chunk4XIW5GLOjs.queryGraphApi; exports.startCrawlJobApi = _chunk4XIW5GLOjs.startCrawlJobApi; exports.updateDesignerEdgeApi = _chunk4XIW5GLOjs.updateDesignerEdgeApi; exports.updateDesignerNodeApi = _chunk4XIW5GLOjs.updateDesignerNodeApi; exports.updateGraphApi = _chunk4XIW5GLOjs.updateGraphApi; exports.updateKGNodeApi = _chunk4XIW5GLOjs.updateKGNodeApi;
63
+ exports.cancelCrawlJobApi = _chunk2TJCYLTPjs.cancelCrawlJobApi; exports.createDesignerEdgeApi = _chunk2TJCYLTPjs.createDesignerEdgeApi; exports.createDesignerNodeApi = _chunk2TJCYLTPjs.createDesignerNodeApi; exports.createGraphApi = _chunk2TJCYLTPjs.createGraphApi; exports.deleteDesignerEdgeApi = _chunk2TJCYLTPjs.deleteDesignerEdgeApi; exports.deleteDesignerNodeApi = _chunk2TJCYLTPjs.deleteDesignerNodeApi; exports.deleteGraphApi = _chunk2TJCYLTPjs.deleteGraphApi; exports.deleteKGDocumentApi = _chunk2TJCYLTPjs.deleteKGDocumentApi; exports.getCrawlJobStatusApi = _chunk2TJCYLTPjs.getCrawlJobStatusApi; exports.getCrawledPagesApi = _chunk2TJCYLTPjs.getCrawledPagesApi; exports.getDesignerEdgeApi = _chunk2TJCYLTPjs.getDesignerEdgeApi; exports.getDesignerNodeApi = _chunk2TJCYLTPjs.getDesignerNodeApi; exports.getGraphApi = _chunk2TJCYLTPjs.getGraphApi; exports.getGraphLabelsApi = _chunk2TJCYLTPjs.getGraphLabelsApi; exports.getKGNodeApi = _chunk2TJCYLTPjs.getKGNodeApi; exports.getNodeConnectionStatsApi = _chunk2TJCYLTPjs.getNodeConnectionStatsApi; exports.ingestDocumentApi = _chunk2TJCYLTPjs.ingestDocumentApi; exports.ingestKGNodeApi = _chunk2TJCYLTPjs.ingestKGNodeApi; exports.listCrawlJobsApi = _chunk2TJCYLTPjs.listCrawlJobsApi; exports.listDesignerEdgesApi = _chunk2TJCYLTPjs.listDesignerEdgesApi; exports.listDesignerNodesApi = _chunk2TJCYLTPjs.listDesignerNodesApi; exports.listGraphsApi = _chunk2TJCYLTPjs.listGraphsApi; exports.optimizeGraphApi = _chunk2TJCYLTPjs.optimizeGraphApi; exports.queryGraphApi = _chunk2TJCYLTPjs.queryGraphApi; exports.startCrawlJobApi = _chunk2TJCYLTPjs.startCrawlJobApi; exports.updateDesignerEdgeApi = _chunk2TJCYLTPjs.updateDesignerEdgeApi; exports.updateDesignerNodeApi = _chunk2TJCYLTPjs.updateDesignerNodeApi; exports.updateGraphApi = _chunk2TJCYLTPjs.updateGraphApi; exports.updateKGNodeApi = _chunk2TJCYLTPjs.updateKGNodeApi;
64
64
  //# sourceMappingURL=index.js.map
@@ -29,7 +29,7 @@ import {
29
29
  updateDesignerNodeApi,
30
30
  updateGraphApi,
31
31
  updateKGNodeApi
32
- } from "../chunk-3AS6C7FW.mjs";
32
+ } from "../chunk-HCDFJCQL.mjs";
33
33
  export {
34
34
  cancelCrawlJobApi,
35
35
  createDesignerEdgeApi,
@@ -0,0 +1,219 @@
1
+ import { ApiResponse } from '@elqnt/api-client';
2
+ import { ResponseMetadata } from '@elqnt/types';
3
+ import { CreateGraphRequest, CreateGraphResult, DeleteGraphResult, DeleteDocumentResponse, KGLabelInfo, GetGraphResult, KGNode, KGNodeIngestRequest, KGSyncIngestResponse, ListGraphsResult, KGQuery, KGQueryResult, Graph, UpdateGraphResult } from '../models/kg.mjs';
4
+ import { GraphEdgeDefinition, GraphEdgeResponse, GraphNodeDefinition, GraphNodeResponse } from '../models/kg-designer.mjs';
5
+ import { CrawlJobStatusResponse, CrawledPagesResponse, CrawlJobsListResponse, CrawlJobStartResponse } from './index.mjs';
6
+
7
+ /**
8
+ * Knowledge Graph Server API
9
+ *
10
+ * Server-side API client for KG operations in server actions and SSR.
11
+ * Uses @elqnt/api-client/server for HTTP requests with JWT token generation.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * // In a server action
16
+ * import { listGraphsServer } from "@elqnt/kg/api/server";
17
+ *
18
+ * const graphs = await listGraphsServer({
19
+ * gatewayUrl: process.env.API_GATEWAY_URL!,
20
+ * jwtSecret: process.env.JWT_SECRET!,
21
+ * orgId: orgId,
22
+ * });
23
+ * ```
24
+ *
25
+ * @packageDocumentation
26
+ */
27
+
28
+ /**
29
+ * Options for server-side KG API calls
30
+ */
31
+ interface ServerApiOptions {
32
+ /** API Gateway URL */
33
+ gatewayUrl: string;
34
+ /** JWT secret for token generation */
35
+ jwtSecret: string;
36
+ /** Organization ID */
37
+ orgId: string;
38
+ /** Optional user ID (defaults to "system") */
39
+ userId?: string;
40
+ /** Optional user email */
41
+ userEmail?: string;
42
+ /** Optional graph ID for graph-scoped operations */
43
+ graphId?: string;
44
+ /** Request timeout in ms */
45
+ timeout?: number;
46
+ /** Request cache mode */
47
+ cache?: RequestCache;
48
+ }
49
+ /**
50
+ * List all knowledge graphs for the organization
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const response = await listGraphsServer({
55
+ * gatewayUrl: "http://api-gateway:80",
56
+ * jwtSecret: process.env.JWT_SECRET!,
57
+ * orgId: "org-123",
58
+ * });
59
+ * if (response.data?.graphs) {
60
+ * console.log("Graphs:", response.data.graphs);
61
+ * }
62
+ * ```
63
+ */
64
+ declare function listGraphsServer(options: ServerApiOptions): Promise<ApiResponse<ListGraphsResult>>;
65
+ /**
66
+ * Get a specific knowledge graph by ID
67
+ */
68
+ declare function getGraphServer(graphId: string, options: ServerApiOptions): Promise<ApiResponse<GetGraphResult>>;
69
+ /**
70
+ * Create a new knowledge graph
71
+ */
72
+ declare function createGraphServer(graph: CreateGraphRequest, options: ServerApiOptions): Promise<ApiResponse<CreateGraphResult>>;
73
+ /**
74
+ * Update an existing knowledge graph
75
+ */
76
+ declare function updateGraphServer(graphId: string, updates: Partial<Graph>, options: ServerApiOptions): Promise<ApiResponse<UpdateGraphResult>>;
77
+ /**
78
+ * Delete a knowledge graph
79
+ */
80
+ declare function deleteGraphServer(graphId: string, options: ServerApiOptions): Promise<ApiResponse<DeleteGraphResult>>;
81
+ /**
82
+ * Query knowledge graph nodes
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const response = await queryGraphServer(
87
+ * { label: "Person", fields: [], limit: 10, depth: 1, sortBy: "", sortOrder: "" },
88
+ * { gatewayUrl, jwtSecret, orgId, graphId }
89
+ * );
90
+ * ```
91
+ */
92
+ declare function queryGraphServer(query: KGQuery, options: ServerApiOptions): Promise<ApiResponse<KGQueryResult>>;
93
+ /**
94
+ * Get all node labels in the knowledge graph
95
+ */
96
+ declare function getGraphLabelsServer(options: ServerApiOptions): Promise<ApiResponse<{
97
+ labels: KGLabelInfo[];
98
+ }>>;
99
+ /**
100
+ * Get a specific KG node by ID
101
+ */
102
+ declare function getKGNodeServer(nodeId: string, options: ServerApiOptions): Promise<ApiResponse<{
103
+ node: KGNode;
104
+ }>>;
105
+ /**
106
+ * Ingest a new node into the knowledge graph
107
+ */
108
+ declare function ingestKGNodeServer(node: KGNodeIngestRequest, options: ServerApiOptions): Promise<ApiResponse<KGSyncIngestResponse>>;
109
+ /**
110
+ * Update an existing KG node
111
+ */
112
+ declare function updateKGNodeServer(nodeId: string, updates: Partial<KGNode>, options: ServerApiOptions): Promise<ApiResponse<{
113
+ success: boolean;
114
+ metadata: ResponseMetadata;
115
+ }>>;
116
+ /**
117
+ * Get connection statistics for a node
118
+ */
119
+ declare function getNodeConnectionStatsServer(nodeId: string, edgeLabel: string, options: ServerApiOptions): Promise<ApiResponse<Record<string, number>>>;
120
+ /**
121
+ * Ingest a document into the knowledge graph
122
+ */
123
+ declare function ingestDocumentServer(document: {
124
+ id: string;
125
+ title: string;
126
+ content: string;
127
+ docUrl?: string;
128
+ lang?: string;
129
+ }, options: ServerApiOptions): Promise<ApiResponse<{
130
+ success: boolean;
131
+ metadata: ResponseMetadata;
132
+ }>>;
133
+ /**
134
+ * Delete a document from the knowledge graph
135
+ */
136
+ declare function deleteKGDocumentServer(documentId: string, options: ServerApiOptions): Promise<ApiResponse<DeleteDocumentResponse>>;
137
+ /**
138
+ * Optimize the knowledge graph
139
+ */
140
+ declare function optimizeGraphServer(options: ServerApiOptions): Promise<ApiResponse<{
141
+ success: boolean;
142
+ metadata: ResponseMetadata;
143
+ }>>;
144
+ /**
145
+ * List all node definitions in the graph designer
146
+ */
147
+ declare function listDesignerNodesServer(options: ServerApiOptions): Promise<ApiResponse<GraphNodeResponse>>;
148
+ /**
149
+ * Get a specific node definition by label
150
+ */
151
+ declare function getDesignerNodeServer(label: string, options: ServerApiOptions): Promise<ApiResponse<GraphNodeResponse>>;
152
+ /**
153
+ * Create a new node definition
154
+ */
155
+ declare function createDesignerNodeServer(node: Omit<GraphNodeDefinition, "createdAt" | "updatedAt">, options: ServerApiOptions): Promise<ApiResponse<GraphNodeResponse>>;
156
+ /**
157
+ * Update an existing node definition
158
+ */
159
+ declare function updateDesignerNodeServer(label: string, node: Partial<GraphNodeDefinition>, options: ServerApiOptions): Promise<ApiResponse<GraphNodeResponse>>;
160
+ /**
161
+ * Delete a node definition
162
+ */
163
+ declare function deleteDesignerNodeServer(label: string, options: ServerApiOptions): Promise<ApiResponse<{
164
+ success: boolean;
165
+ metadata: ResponseMetadata;
166
+ }>>;
167
+ /**
168
+ * List all edge definitions in the graph designer
169
+ */
170
+ declare function listDesignerEdgesServer(options: ServerApiOptions): Promise<ApiResponse<GraphEdgeResponse>>;
171
+ /**
172
+ * Get a specific edge definition by label
173
+ */
174
+ declare function getDesignerEdgeServer(label: string, options: ServerApiOptions): Promise<ApiResponse<GraphEdgeResponse>>;
175
+ /**
176
+ * Create a new edge definition
177
+ */
178
+ declare function createDesignerEdgeServer(edge: Omit<GraphEdgeDefinition, "createdAt" | "updatedAt">, options: ServerApiOptions): Promise<ApiResponse<GraphEdgeResponse>>;
179
+ /**
180
+ * Update an existing edge definition
181
+ */
182
+ declare function updateDesignerEdgeServer(label: string, edge: Partial<GraphEdgeDefinition>, options: ServerApiOptions): Promise<ApiResponse<GraphEdgeResponse>>;
183
+ /**
184
+ * Delete an edge definition
185
+ */
186
+ declare function deleteDesignerEdgeServer(label: string, options: ServerApiOptions): Promise<ApiResponse<{
187
+ success: boolean;
188
+ metadata: ResponseMetadata;
189
+ }>>;
190
+ /**
191
+ * List crawl jobs
192
+ */
193
+ declare function listCrawlJobsServer(options: ServerApiOptions & {
194
+ limit?: number;
195
+ offset?: number;
196
+ status?: string;
197
+ }): Promise<ApiResponse<CrawlJobsListResponse>>;
198
+ /**
199
+ * Start a new crawl job
200
+ */
201
+ declare function startCrawlJobServer(params: {
202
+ baseUrl: string;
203
+ depth: number;
204
+ maxPages: number;
205
+ }, options: ServerApiOptions): Promise<ApiResponse<CrawlJobStartResponse>>;
206
+ /**
207
+ * Get crawl job status
208
+ */
209
+ declare function getCrawlJobStatusServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<CrawlJobStatusResponse>>;
210
+ /**
211
+ * Cancel a crawl job
212
+ */
213
+ declare function cancelCrawlJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<CrawlJobStatusResponse>>;
214
+ /**
215
+ * Get pages crawled by a job
216
+ */
217
+ declare function getCrawledPagesServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<CrawledPagesResponse>>;
218
+
219
+ export { type ServerApiOptions, cancelCrawlJobServer, createDesignerEdgeServer, createDesignerNodeServer, createGraphServer, deleteDesignerEdgeServer, deleteDesignerNodeServer, deleteGraphServer, deleteKGDocumentServer, getCrawlJobStatusServer, getCrawledPagesServer, getDesignerEdgeServer, getDesignerNodeServer, getGraphLabelsServer, getGraphServer, getKGNodeServer, getNodeConnectionStatsServer, ingestDocumentServer, ingestKGNodeServer, listCrawlJobsServer, listDesignerEdgesServer, listDesignerNodesServer, listGraphsServer, optimizeGraphServer, queryGraphServer, startCrawlJobServer, updateDesignerEdgeServer, updateDesignerNodeServer, updateGraphServer, updateKGNodeServer };
@@ -0,0 +1,219 @@
1
+ import { ApiResponse } from '@elqnt/api-client';
2
+ import { ResponseMetadata } from '@elqnt/types';
3
+ import { CreateGraphRequest, CreateGraphResult, DeleteGraphResult, DeleteDocumentResponse, KGLabelInfo, GetGraphResult, KGNode, KGNodeIngestRequest, KGSyncIngestResponse, ListGraphsResult, KGQuery, KGQueryResult, Graph, UpdateGraphResult } from '../models/kg.js';
4
+ import { GraphEdgeDefinition, GraphEdgeResponse, GraphNodeDefinition, GraphNodeResponse } from '../models/kg-designer.js';
5
+ import { CrawlJobStatusResponse, CrawledPagesResponse, CrawlJobsListResponse, CrawlJobStartResponse } from './index.js';
6
+
7
+ /**
8
+ * Knowledge Graph Server API
9
+ *
10
+ * Server-side API client for KG operations in server actions and SSR.
11
+ * Uses @elqnt/api-client/server for HTTP requests with JWT token generation.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * // In a server action
16
+ * import { listGraphsServer } from "@elqnt/kg/api/server";
17
+ *
18
+ * const graphs = await listGraphsServer({
19
+ * gatewayUrl: process.env.API_GATEWAY_URL!,
20
+ * jwtSecret: process.env.JWT_SECRET!,
21
+ * orgId: orgId,
22
+ * });
23
+ * ```
24
+ *
25
+ * @packageDocumentation
26
+ */
27
+
28
+ /**
29
+ * Options for server-side KG API calls
30
+ */
31
+ interface ServerApiOptions {
32
+ /** API Gateway URL */
33
+ gatewayUrl: string;
34
+ /** JWT secret for token generation */
35
+ jwtSecret: string;
36
+ /** Organization ID */
37
+ orgId: string;
38
+ /** Optional user ID (defaults to "system") */
39
+ userId?: string;
40
+ /** Optional user email */
41
+ userEmail?: string;
42
+ /** Optional graph ID for graph-scoped operations */
43
+ graphId?: string;
44
+ /** Request timeout in ms */
45
+ timeout?: number;
46
+ /** Request cache mode */
47
+ cache?: RequestCache;
48
+ }
49
+ /**
50
+ * List all knowledge graphs for the organization
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const response = await listGraphsServer({
55
+ * gatewayUrl: "http://api-gateway:80",
56
+ * jwtSecret: process.env.JWT_SECRET!,
57
+ * orgId: "org-123",
58
+ * });
59
+ * if (response.data?.graphs) {
60
+ * console.log("Graphs:", response.data.graphs);
61
+ * }
62
+ * ```
63
+ */
64
+ declare function listGraphsServer(options: ServerApiOptions): Promise<ApiResponse<ListGraphsResult>>;
65
+ /**
66
+ * Get a specific knowledge graph by ID
67
+ */
68
+ declare function getGraphServer(graphId: string, options: ServerApiOptions): Promise<ApiResponse<GetGraphResult>>;
69
+ /**
70
+ * Create a new knowledge graph
71
+ */
72
+ declare function createGraphServer(graph: CreateGraphRequest, options: ServerApiOptions): Promise<ApiResponse<CreateGraphResult>>;
73
+ /**
74
+ * Update an existing knowledge graph
75
+ */
76
+ declare function updateGraphServer(graphId: string, updates: Partial<Graph>, options: ServerApiOptions): Promise<ApiResponse<UpdateGraphResult>>;
77
+ /**
78
+ * Delete a knowledge graph
79
+ */
80
+ declare function deleteGraphServer(graphId: string, options: ServerApiOptions): Promise<ApiResponse<DeleteGraphResult>>;
81
+ /**
82
+ * Query knowledge graph nodes
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const response = await queryGraphServer(
87
+ * { label: "Person", fields: [], limit: 10, depth: 1, sortBy: "", sortOrder: "" },
88
+ * { gatewayUrl, jwtSecret, orgId, graphId }
89
+ * );
90
+ * ```
91
+ */
92
+ declare function queryGraphServer(query: KGQuery, options: ServerApiOptions): Promise<ApiResponse<KGQueryResult>>;
93
+ /**
94
+ * Get all node labels in the knowledge graph
95
+ */
96
+ declare function getGraphLabelsServer(options: ServerApiOptions): Promise<ApiResponse<{
97
+ labels: KGLabelInfo[];
98
+ }>>;
99
+ /**
100
+ * Get a specific KG node by ID
101
+ */
102
+ declare function getKGNodeServer(nodeId: string, options: ServerApiOptions): Promise<ApiResponse<{
103
+ node: KGNode;
104
+ }>>;
105
+ /**
106
+ * Ingest a new node into the knowledge graph
107
+ */
108
+ declare function ingestKGNodeServer(node: KGNodeIngestRequest, options: ServerApiOptions): Promise<ApiResponse<KGSyncIngestResponse>>;
109
+ /**
110
+ * Update an existing KG node
111
+ */
112
+ declare function updateKGNodeServer(nodeId: string, updates: Partial<KGNode>, options: ServerApiOptions): Promise<ApiResponse<{
113
+ success: boolean;
114
+ metadata: ResponseMetadata;
115
+ }>>;
116
+ /**
117
+ * Get connection statistics for a node
118
+ */
119
+ declare function getNodeConnectionStatsServer(nodeId: string, edgeLabel: string, options: ServerApiOptions): Promise<ApiResponse<Record<string, number>>>;
120
+ /**
121
+ * Ingest a document into the knowledge graph
122
+ */
123
+ declare function ingestDocumentServer(document: {
124
+ id: string;
125
+ title: string;
126
+ content: string;
127
+ docUrl?: string;
128
+ lang?: string;
129
+ }, options: ServerApiOptions): Promise<ApiResponse<{
130
+ success: boolean;
131
+ metadata: ResponseMetadata;
132
+ }>>;
133
+ /**
134
+ * Delete a document from the knowledge graph
135
+ */
136
+ declare function deleteKGDocumentServer(documentId: string, options: ServerApiOptions): Promise<ApiResponse<DeleteDocumentResponse>>;
137
+ /**
138
+ * Optimize the knowledge graph
139
+ */
140
+ declare function optimizeGraphServer(options: ServerApiOptions): Promise<ApiResponse<{
141
+ success: boolean;
142
+ metadata: ResponseMetadata;
143
+ }>>;
144
+ /**
145
+ * List all node definitions in the graph designer
146
+ */
147
+ declare function listDesignerNodesServer(options: ServerApiOptions): Promise<ApiResponse<GraphNodeResponse>>;
148
+ /**
149
+ * Get a specific node definition by label
150
+ */
151
+ declare function getDesignerNodeServer(label: string, options: ServerApiOptions): Promise<ApiResponse<GraphNodeResponse>>;
152
+ /**
153
+ * Create a new node definition
154
+ */
155
+ declare function createDesignerNodeServer(node: Omit<GraphNodeDefinition, "createdAt" | "updatedAt">, options: ServerApiOptions): Promise<ApiResponse<GraphNodeResponse>>;
156
+ /**
157
+ * Update an existing node definition
158
+ */
159
+ declare function updateDesignerNodeServer(label: string, node: Partial<GraphNodeDefinition>, options: ServerApiOptions): Promise<ApiResponse<GraphNodeResponse>>;
160
+ /**
161
+ * Delete a node definition
162
+ */
163
+ declare function deleteDesignerNodeServer(label: string, options: ServerApiOptions): Promise<ApiResponse<{
164
+ success: boolean;
165
+ metadata: ResponseMetadata;
166
+ }>>;
167
+ /**
168
+ * List all edge definitions in the graph designer
169
+ */
170
+ declare function listDesignerEdgesServer(options: ServerApiOptions): Promise<ApiResponse<GraphEdgeResponse>>;
171
+ /**
172
+ * Get a specific edge definition by label
173
+ */
174
+ declare function getDesignerEdgeServer(label: string, options: ServerApiOptions): Promise<ApiResponse<GraphEdgeResponse>>;
175
+ /**
176
+ * Create a new edge definition
177
+ */
178
+ declare function createDesignerEdgeServer(edge: Omit<GraphEdgeDefinition, "createdAt" | "updatedAt">, options: ServerApiOptions): Promise<ApiResponse<GraphEdgeResponse>>;
179
+ /**
180
+ * Update an existing edge definition
181
+ */
182
+ declare function updateDesignerEdgeServer(label: string, edge: Partial<GraphEdgeDefinition>, options: ServerApiOptions): Promise<ApiResponse<GraphEdgeResponse>>;
183
+ /**
184
+ * Delete an edge definition
185
+ */
186
+ declare function deleteDesignerEdgeServer(label: string, options: ServerApiOptions): Promise<ApiResponse<{
187
+ success: boolean;
188
+ metadata: ResponseMetadata;
189
+ }>>;
190
+ /**
191
+ * List crawl jobs
192
+ */
193
+ declare function listCrawlJobsServer(options: ServerApiOptions & {
194
+ limit?: number;
195
+ offset?: number;
196
+ status?: string;
197
+ }): Promise<ApiResponse<CrawlJobsListResponse>>;
198
+ /**
199
+ * Start a new crawl job
200
+ */
201
+ declare function startCrawlJobServer(params: {
202
+ baseUrl: string;
203
+ depth: number;
204
+ maxPages: number;
205
+ }, options: ServerApiOptions): Promise<ApiResponse<CrawlJobStartResponse>>;
206
+ /**
207
+ * Get crawl job status
208
+ */
209
+ declare function getCrawlJobStatusServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<CrawlJobStatusResponse>>;
210
+ /**
211
+ * Cancel a crawl job
212
+ */
213
+ declare function cancelCrawlJobServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<CrawlJobStatusResponse>>;
214
+ /**
215
+ * Get pages crawled by a job
216
+ */
217
+ declare function getCrawledPagesServer(jobId: string, options: ServerApiOptions): Promise<ApiResponse<CrawledPagesResponse>>;
218
+
219
+ export { type ServerApiOptions, cancelCrawlJobServer, createDesignerEdgeServer, createDesignerNodeServer, createGraphServer, deleteDesignerEdgeServer, deleteDesignerNodeServer, deleteGraphServer, deleteKGDocumentServer, getCrawlJobStatusServer, getCrawledPagesServer, getDesignerEdgeServer, getDesignerNodeServer, getGraphLabelsServer, getGraphServer, getKGNodeServer, getNodeConnectionStatsServer, ingestDocumentServer, ingestKGNodeServer, listCrawlJobsServer, listDesignerEdgesServer, listDesignerNodesServer, listGraphsServer, optimizeGraphServer, queryGraphServer, startCrawlJobServer, updateDesignerEdgeServer, updateDesignerNodeServer, updateGraphServer, updateKGNodeServer };