@elqnt/kg 2.1.0 → 3.0.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.
Files changed (48) hide show
  1. package/README.md +357 -39
  2. package/dist/api/index.d.mts +250 -2
  3. package/dist/api/index.d.ts +250 -2
  4. package/dist/api/index.js +4 -2
  5. package/dist/api/index.js.map +1 -1
  6. package/dist/api/index.mjs +3 -1
  7. package/dist/api/server.d.mts +219 -0
  8. package/dist/api/server.d.ts +219 -0
  9. package/dist/api/server.js +442 -0
  10. package/dist/api/server.js.map +1 -0
  11. package/dist/api/server.mjs +442 -0
  12. package/dist/api/server.mjs.map +1 -0
  13. package/dist/{chunk-JSMI4PFC.js → chunk-2TJCYLTP.js} +67 -65
  14. package/dist/chunk-2TJCYLTP.js.map +1 -0
  15. package/dist/chunk-7RW5MHP5.js +497 -0
  16. package/dist/chunk-7RW5MHP5.js.map +1 -0
  17. package/dist/chunk-ADIKUMMI.js +238 -0
  18. package/dist/chunk-ADIKUMMI.js.map +1 -0
  19. package/dist/chunk-CAXPQTKI.mjs +238 -0
  20. package/dist/chunk-CAXPQTKI.mjs.map +1 -0
  21. package/dist/{chunk-55R4PZ5A.mjs → chunk-HCDFJCQL.mjs} +65 -63
  22. package/dist/chunk-HCDFJCQL.mjs.map +1 -0
  23. package/dist/chunk-JZ7UXVRW.mjs +497 -0
  24. package/dist/chunk-JZ7UXVRW.mjs.map +1 -0
  25. package/dist/hooks/index.d.mts +109 -4
  26. package/dist/hooks/index.d.ts +109 -4
  27. package/dist/hooks/index.js +9 -3
  28. package/dist/hooks/index.js.map +1 -1
  29. package/dist/hooks/index.mjs +10 -4
  30. package/dist/index.d.mts +3 -2
  31. package/dist/index.d.ts +3 -2
  32. package/dist/index.js +23 -3
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +24 -4
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/utils/index.d.mts +277 -0
  37. package/dist/utils/index.d.ts +277 -0
  38. package/dist/utils/index.js +44 -0
  39. package/dist/utils/index.js.map +1 -0
  40. package/dist/utils/index.mjs +44 -0
  41. package/dist/utils/index.mjs.map +1 -0
  42. package/package.json +15 -5
  43. package/dist/chunk-55R4PZ5A.mjs.map +0 -1
  44. package/dist/chunk-BQZLJ5LD.mjs +0 -577
  45. package/dist/chunk-BQZLJ5LD.mjs.map +0 -1
  46. package/dist/chunk-JSMI4PFC.js.map +0 -1
  47. package/dist/chunk-KATHAUDG.js +0 -577
  48. package/dist/chunk-KATHAUDG.js.map +0 -1
@@ -0,0 +1,442 @@
1
+ "use client";
2
+
3
+ // api/server.ts
4
+ import { serverApiRequest } from "@elqnt/api-client/server";
5
+ function buildQueryString(params) {
6
+ const searchParams = new URLSearchParams();
7
+ for (const [key, value] of Object.entries(params)) {
8
+ if (value !== void 0) {
9
+ searchParams.set(key, value);
10
+ }
11
+ }
12
+ const queryString = searchParams.toString();
13
+ return queryString ? `?${queryString}` : "";
14
+ }
15
+ function buildHeaders(graphId) {
16
+ return graphId ? { "X-Graph-ID": graphId } : void 0;
17
+ }
18
+ async function listGraphsServer(options) {
19
+ return serverApiRequest("/api/v1/kg/graphs", {
20
+ method: "GET",
21
+ gatewayUrl: options.gatewayUrl,
22
+ jwtSecret: options.jwtSecret,
23
+ orgId: options.orgId,
24
+ userId: options.userId,
25
+ userEmail: options.userEmail,
26
+ timeout: options.timeout,
27
+ cache: options.cache
28
+ });
29
+ }
30
+ async function getGraphServer(graphId, options) {
31
+ return serverApiRequest(`/api/v1/kg/graphs/${graphId}`, {
32
+ method: "GET",
33
+ gatewayUrl: options.gatewayUrl,
34
+ jwtSecret: options.jwtSecret,
35
+ orgId: options.orgId,
36
+ userId: options.userId,
37
+ userEmail: options.userEmail,
38
+ timeout: options.timeout,
39
+ cache: options.cache
40
+ });
41
+ }
42
+ async function createGraphServer(graph, options) {
43
+ return serverApiRequest("/api/v1/kg/graphs", {
44
+ method: "POST",
45
+ body: graph,
46
+ gatewayUrl: options.gatewayUrl,
47
+ jwtSecret: options.jwtSecret,
48
+ orgId: options.orgId,
49
+ userId: options.userId,
50
+ userEmail: options.userEmail,
51
+ timeout: options.timeout,
52
+ cache: options.cache
53
+ });
54
+ }
55
+ async function updateGraphServer(graphId, updates, options) {
56
+ return serverApiRequest(`/api/v1/kg/graphs/${graphId}`, {
57
+ method: "PUT",
58
+ body: updates,
59
+ gatewayUrl: options.gatewayUrl,
60
+ jwtSecret: options.jwtSecret,
61
+ orgId: options.orgId,
62
+ userId: options.userId,
63
+ userEmail: options.userEmail,
64
+ timeout: options.timeout,
65
+ cache: options.cache
66
+ });
67
+ }
68
+ async function deleteGraphServer(graphId, options) {
69
+ return serverApiRequest(`/api/v1/kg/graphs/${graphId}`, {
70
+ method: "DELETE",
71
+ gatewayUrl: options.gatewayUrl,
72
+ jwtSecret: options.jwtSecret,
73
+ orgId: options.orgId,
74
+ userId: options.userId,
75
+ userEmail: options.userEmail,
76
+ timeout: options.timeout,
77
+ cache: options.cache
78
+ });
79
+ }
80
+ async function queryGraphServer(query, options) {
81
+ return serverApiRequest("/api/v1/kg/query", {
82
+ method: "POST",
83
+ body: query,
84
+ gatewayUrl: options.gatewayUrl,
85
+ jwtSecret: options.jwtSecret,
86
+ orgId: options.orgId,
87
+ userId: options.userId,
88
+ userEmail: options.userEmail,
89
+ headers: buildHeaders(options.graphId),
90
+ timeout: options.timeout ?? 3e4,
91
+ cache: options.cache
92
+ });
93
+ }
94
+ async function getGraphLabelsServer(options) {
95
+ const queryString = buildQueryString({ graphId: options.graphId });
96
+ return serverApiRequest(`/api/v1/kg/labels${queryString}`, {
97
+ method: "GET",
98
+ gatewayUrl: options.gatewayUrl,
99
+ jwtSecret: options.jwtSecret,
100
+ orgId: options.orgId,
101
+ userId: options.userId,
102
+ userEmail: options.userEmail,
103
+ timeout: options.timeout,
104
+ cache: options.cache
105
+ });
106
+ }
107
+ async function getKGNodeServer(nodeId, options) {
108
+ const queryString = buildQueryString({ graphId: options.graphId });
109
+ return serverApiRequest(`/api/v1/kg/nodes/${nodeId}${queryString}`, {
110
+ method: "GET",
111
+ gatewayUrl: options.gatewayUrl,
112
+ jwtSecret: options.jwtSecret,
113
+ orgId: options.orgId,
114
+ userId: options.userId,
115
+ userEmail: options.userEmail,
116
+ timeout: options.timeout,
117
+ cache: options.cache
118
+ });
119
+ }
120
+ async function ingestKGNodeServer(node, options) {
121
+ return serverApiRequest("/api/v1/kg/nodes", {
122
+ method: "POST",
123
+ body: node,
124
+ gatewayUrl: options.gatewayUrl,
125
+ jwtSecret: options.jwtSecret,
126
+ orgId: options.orgId,
127
+ userId: options.userId,
128
+ userEmail: options.userEmail,
129
+ headers: buildHeaders(options.graphId),
130
+ timeout: options.timeout,
131
+ cache: options.cache
132
+ });
133
+ }
134
+ async function updateKGNodeServer(nodeId, updates, options) {
135
+ return serverApiRequest(`/api/v1/kg/nodes/${nodeId}`, {
136
+ method: "PUT",
137
+ body: updates,
138
+ gatewayUrl: options.gatewayUrl,
139
+ jwtSecret: options.jwtSecret,
140
+ orgId: options.orgId,
141
+ userId: options.userId,
142
+ userEmail: options.userEmail,
143
+ headers: buildHeaders(options.graphId),
144
+ timeout: options.timeout,
145
+ cache: options.cache
146
+ });
147
+ }
148
+ async function getNodeConnectionStatsServer(nodeId, edgeLabel, options) {
149
+ const queryString = buildQueryString({
150
+ edgeLabel,
151
+ graphId: options.graphId
152
+ });
153
+ return serverApiRequest(`/api/v1/kg/nodes/${nodeId}/connections${queryString}`, {
154
+ method: "GET",
155
+ gatewayUrl: options.gatewayUrl,
156
+ jwtSecret: options.jwtSecret,
157
+ orgId: options.orgId,
158
+ userId: options.userId,
159
+ userEmail: options.userEmail,
160
+ timeout: options.timeout,
161
+ cache: options.cache
162
+ });
163
+ }
164
+ async function ingestDocumentServer(document, options) {
165
+ return serverApiRequest("/api/v1/kg/ingest", {
166
+ method: "POST",
167
+ body: document,
168
+ gatewayUrl: options.gatewayUrl,
169
+ jwtSecret: options.jwtSecret,
170
+ orgId: options.orgId,
171
+ userId: options.userId,
172
+ userEmail: options.userEmail,
173
+ headers: buildHeaders(options.graphId),
174
+ timeout: options.timeout ?? 12e4,
175
+ cache: options.cache
176
+ });
177
+ }
178
+ async function deleteKGDocumentServer(documentId, options) {
179
+ const queryString = buildQueryString({ graphId: options.graphId });
180
+ return serverApiRequest(`/api/v1/kg/documents/${documentId}${queryString}`, {
181
+ method: "DELETE",
182
+ gatewayUrl: options.gatewayUrl,
183
+ jwtSecret: options.jwtSecret,
184
+ orgId: options.orgId,
185
+ userId: options.userId,
186
+ userEmail: options.userEmail,
187
+ timeout: options.timeout,
188
+ cache: options.cache
189
+ });
190
+ }
191
+ async function optimizeGraphServer(options) {
192
+ return serverApiRequest("/api/v1/kg/graph/optimize", {
193
+ method: "POST",
194
+ body: {},
195
+ gatewayUrl: options.gatewayUrl,
196
+ jwtSecret: options.jwtSecret,
197
+ orgId: options.orgId,
198
+ userId: options.userId,
199
+ userEmail: options.userEmail,
200
+ headers: buildHeaders(options.graphId),
201
+ timeout: options.timeout,
202
+ cache: options.cache
203
+ });
204
+ }
205
+ async function listDesignerNodesServer(options) {
206
+ const queryString = buildQueryString({ graphId: options.graphId });
207
+ return serverApiRequest(`/api/v1/kg/designer/nodes${queryString}`, {
208
+ method: "GET",
209
+ gatewayUrl: options.gatewayUrl,
210
+ jwtSecret: options.jwtSecret,
211
+ orgId: options.orgId,
212
+ userId: options.userId,
213
+ userEmail: options.userEmail,
214
+ timeout: options.timeout,
215
+ cache: options.cache
216
+ });
217
+ }
218
+ async function getDesignerNodeServer(label, options) {
219
+ const queryString = buildQueryString({ graphId: options.graphId });
220
+ return serverApiRequest(`/api/v1/kg/designer/nodes/${label}${queryString}`, {
221
+ method: "GET",
222
+ gatewayUrl: options.gatewayUrl,
223
+ jwtSecret: options.jwtSecret,
224
+ orgId: options.orgId,
225
+ userId: options.userId,
226
+ userEmail: options.userEmail,
227
+ timeout: options.timeout,
228
+ cache: options.cache
229
+ });
230
+ }
231
+ async function createDesignerNodeServer(node, options) {
232
+ return serverApiRequest("/api/v1/kg/designer/nodes", {
233
+ method: "POST",
234
+ body: { node },
235
+ gatewayUrl: options.gatewayUrl,
236
+ jwtSecret: options.jwtSecret,
237
+ orgId: options.orgId,
238
+ userId: options.userId,
239
+ userEmail: options.userEmail,
240
+ headers: buildHeaders(options.graphId),
241
+ timeout: options.timeout,
242
+ cache: options.cache
243
+ });
244
+ }
245
+ async function updateDesignerNodeServer(label, node, options) {
246
+ return serverApiRequest(`/api/v1/kg/designer/nodes/${label}`, {
247
+ method: "PUT",
248
+ body: { node },
249
+ gatewayUrl: options.gatewayUrl,
250
+ jwtSecret: options.jwtSecret,
251
+ orgId: options.orgId,
252
+ userId: options.userId,
253
+ userEmail: options.userEmail,
254
+ headers: buildHeaders(options.graphId),
255
+ timeout: options.timeout,
256
+ cache: options.cache
257
+ });
258
+ }
259
+ async function deleteDesignerNodeServer(label, options) {
260
+ const queryString = buildQueryString({ graphId: options.graphId });
261
+ return serverApiRequest(`/api/v1/kg/designer/nodes/${label}${queryString}`, {
262
+ method: "DELETE",
263
+ gatewayUrl: options.gatewayUrl,
264
+ jwtSecret: options.jwtSecret,
265
+ orgId: options.orgId,
266
+ userId: options.userId,
267
+ userEmail: options.userEmail,
268
+ timeout: options.timeout,
269
+ cache: options.cache
270
+ });
271
+ }
272
+ async function listDesignerEdgesServer(options) {
273
+ const queryString = buildQueryString({ graphId: options.graphId });
274
+ return serverApiRequest(`/api/v1/kg/designer/edges${queryString}`, {
275
+ method: "GET",
276
+ gatewayUrl: options.gatewayUrl,
277
+ jwtSecret: options.jwtSecret,
278
+ orgId: options.orgId,
279
+ userId: options.userId,
280
+ userEmail: options.userEmail,
281
+ timeout: options.timeout,
282
+ cache: options.cache
283
+ });
284
+ }
285
+ async function getDesignerEdgeServer(label, options) {
286
+ const queryString = buildQueryString({ graphId: options.graphId });
287
+ return serverApiRequest(`/api/v1/kg/designer/edges/${label}${queryString}`, {
288
+ method: "GET",
289
+ gatewayUrl: options.gatewayUrl,
290
+ jwtSecret: options.jwtSecret,
291
+ orgId: options.orgId,
292
+ userId: options.userId,
293
+ userEmail: options.userEmail,
294
+ timeout: options.timeout,
295
+ cache: options.cache
296
+ });
297
+ }
298
+ async function createDesignerEdgeServer(edge, options) {
299
+ return serverApiRequest("/api/v1/kg/designer/edges", {
300
+ method: "POST",
301
+ body: { edge },
302
+ gatewayUrl: options.gatewayUrl,
303
+ jwtSecret: options.jwtSecret,
304
+ orgId: options.orgId,
305
+ userId: options.userId,
306
+ userEmail: options.userEmail,
307
+ headers: buildHeaders(options.graphId),
308
+ timeout: options.timeout,
309
+ cache: options.cache
310
+ });
311
+ }
312
+ async function updateDesignerEdgeServer(label, edge, options) {
313
+ return serverApiRequest(`/api/v1/kg/designer/edges/${label}`, {
314
+ method: "PUT",
315
+ body: { edge },
316
+ gatewayUrl: options.gatewayUrl,
317
+ jwtSecret: options.jwtSecret,
318
+ orgId: options.orgId,
319
+ userId: options.userId,
320
+ userEmail: options.userEmail,
321
+ headers: buildHeaders(options.graphId),
322
+ timeout: options.timeout,
323
+ cache: options.cache
324
+ });
325
+ }
326
+ async function deleteDesignerEdgeServer(label, options) {
327
+ const queryString = buildQueryString({ graphId: options.graphId });
328
+ return serverApiRequest(`/api/v1/kg/designer/edges/${label}${queryString}`, {
329
+ method: "DELETE",
330
+ gatewayUrl: options.gatewayUrl,
331
+ jwtSecret: options.jwtSecret,
332
+ orgId: options.orgId,
333
+ userId: options.userId,
334
+ userEmail: options.userEmail,
335
+ timeout: options.timeout,
336
+ cache: options.cache
337
+ });
338
+ }
339
+ async function listCrawlJobsServer(options) {
340
+ const queryString = buildQueryString({
341
+ graphId: options.graphId,
342
+ limit: options.limit?.toString(),
343
+ offset: options.offset?.toString(),
344
+ status: options.status
345
+ });
346
+ return serverApiRequest(`/api/v1/kg/crawl/jobs${queryString}`, {
347
+ method: "GET",
348
+ gatewayUrl: options.gatewayUrl,
349
+ jwtSecret: options.jwtSecret,
350
+ orgId: options.orgId,
351
+ userId: options.userId,
352
+ userEmail: options.userEmail,
353
+ timeout: options.timeout,
354
+ cache: options.cache
355
+ });
356
+ }
357
+ async function startCrawlJobServer(params, options) {
358
+ return serverApiRequest("/api/v1/kg/crawl/jobs", {
359
+ method: "POST",
360
+ body: params,
361
+ gatewayUrl: options.gatewayUrl,
362
+ jwtSecret: options.jwtSecret,
363
+ orgId: options.orgId,
364
+ userId: options.userId,
365
+ userEmail: options.userEmail,
366
+ headers: buildHeaders(options.graphId),
367
+ timeout: options.timeout,
368
+ cache: options.cache
369
+ });
370
+ }
371
+ async function getCrawlJobStatusServer(jobId, options) {
372
+ const queryString = buildQueryString({ graphId: options.graphId });
373
+ return serverApiRequest(`/api/v1/kg/crawl/jobs/${jobId}${queryString}`, {
374
+ method: "GET",
375
+ gatewayUrl: options.gatewayUrl,
376
+ jwtSecret: options.jwtSecret,
377
+ orgId: options.orgId,
378
+ userId: options.userId,
379
+ userEmail: options.userEmail,
380
+ timeout: options.timeout,
381
+ cache: options.cache
382
+ });
383
+ }
384
+ async function cancelCrawlJobServer(jobId, options) {
385
+ return serverApiRequest(`/api/v1/kg/crawl/jobs/${jobId}/cancel`, {
386
+ method: "POST",
387
+ body: {},
388
+ gatewayUrl: options.gatewayUrl,
389
+ jwtSecret: options.jwtSecret,
390
+ orgId: options.orgId,
391
+ userId: options.userId,
392
+ userEmail: options.userEmail,
393
+ headers: buildHeaders(options.graphId),
394
+ timeout: options.timeout,
395
+ cache: options.cache
396
+ });
397
+ }
398
+ async function getCrawledPagesServer(jobId, options) {
399
+ const queryString = buildQueryString({ graphId: options.graphId });
400
+ return serverApiRequest(`/api/v1/kg/crawl/jobs/${jobId}/pages${queryString}`, {
401
+ method: "GET",
402
+ gatewayUrl: options.gatewayUrl,
403
+ jwtSecret: options.jwtSecret,
404
+ orgId: options.orgId,
405
+ userId: options.userId,
406
+ userEmail: options.userEmail,
407
+ timeout: options.timeout,
408
+ cache: options.cache
409
+ });
410
+ }
411
+ export {
412
+ cancelCrawlJobServer,
413
+ createDesignerEdgeServer,
414
+ createDesignerNodeServer,
415
+ createGraphServer,
416
+ deleteDesignerEdgeServer,
417
+ deleteDesignerNodeServer,
418
+ deleteGraphServer,
419
+ deleteKGDocumentServer,
420
+ getCrawlJobStatusServer,
421
+ getCrawledPagesServer,
422
+ getDesignerEdgeServer,
423
+ getDesignerNodeServer,
424
+ getGraphLabelsServer,
425
+ getGraphServer,
426
+ getKGNodeServer,
427
+ getNodeConnectionStatsServer,
428
+ ingestDocumentServer,
429
+ ingestKGNodeServer,
430
+ listCrawlJobsServer,
431
+ listDesignerEdgesServer,
432
+ listDesignerNodesServer,
433
+ listGraphsServer,
434
+ optimizeGraphServer,
435
+ queryGraphServer,
436
+ startCrawlJobServer,
437
+ updateDesignerEdgeServer,
438
+ updateDesignerNodeServer,
439
+ updateGraphServer,
440
+ updateKGNodeServer
441
+ };
442
+ //# sourceMappingURL=server.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../api/server.ts"],"sourcesContent":["/**\n * Knowledge Graph Server API\n *\n * Server-side API client for KG operations in server actions and SSR.\n * Uses @elqnt/api-client/server for HTTP requests with JWT token generation.\n *\n * @example\n * ```ts\n * // In a server action\n * import { listGraphsServer } from \"@elqnt/kg/api/server\";\n *\n * const graphs = await listGraphsServer({\n * gatewayUrl: process.env.API_GATEWAY_URL!,\n * jwtSecret: process.env.JWT_SECRET!,\n * orgId: orgId,\n * });\n * ```\n *\n * @packageDocumentation\n */\n\nimport { serverApiRequest } from \"@elqnt/api-client/server\";\nimport type { ApiResponse } from \"@elqnt/api-client\";\nimport type { ResponseMetadata } from \"@elqnt/types\";\nimport type {\n Graph,\n ListGraphsResult,\n GetGraphResult,\n CreateGraphResult,\n CreateGraphRequest,\n UpdateGraphResult,\n DeleteGraphResult,\n KGNode,\n KGQuery,\n KGQueryResult,\n KGLabelInfo,\n KGNodeIngestRequest,\n KGSyncIngestResponse,\n DeleteDocumentResponse,\n GraphNodeDefinition,\n GraphNodeResponse,\n GraphEdgeDefinition,\n GraphEdgeResponse,\n} from \"../models\";\nimport type {\n CrawlJob,\n CrawlJobsListResponse,\n CrawlJobStatusResponse,\n CrawlJobStartResponse,\n CrawledPagesResponse,\n} from \"./index\";\n\n// =============================================================================\n// TYPES\n// =============================================================================\n\n/**\n * Options for server-side KG API calls\n */\nexport interface ServerApiOptions {\n /** API Gateway URL */\n gatewayUrl: string;\n /** JWT secret for token generation */\n jwtSecret: string;\n /** Organization ID */\n orgId: string;\n /** Optional user ID (defaults to \"system\") */\n userId?: string;\n /** Optional user email */\n userEmail?: string;\n /** Optional graph ID for graph-scoped operations */\n graphId?: string;\n /** Request timeout in ms */\n timeout?: number;\n /** Request cache mode */\n cache?: RequestCache;\n}\n\n/**\n * Build query string from parameters, filtering out undefined values\n */\nfunction buildQueryString(params: Record<string, string | undefined>): string {\n const searchParams = new URLSearchParams();\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined) {\n searchParams.set(key, value);\n }\n }\n const queryString = searchParams.toString();\n return queryString ? `?${queryString}` : \"\";\n}\n\n/**\n * Build headers including X-Graph-ID if provided\n */\nfunction buildHeaders(graphId?: string): Record<string, string> | undefined {\n return graphId ? { \"X-Graph-ID\": graphId } : undefined;\n}\n\n// =============================================================================\n// GRAPHS\n// =============================================================================\n\n/**\n * List all knowledge graphs for the organization\n *\n * @example\n * ```ts\n * const response = await listGraphsServer({\n * gatewayUrl: \"http://api-gateway:80\",\n * jwtSecret: process.env.JWT_SECRET!,\n * orgId: \"org-123\",\n * });\n * if (response.data?.graphs) {\n * console.log(\"Graphs:\", response.data.graphs);\n * }\n * ```\n */\nexport async function listGraphsServer(\n options: ServerApiOptions\n): Promise<ApiResponse<ListGraphsResult>> {\n return serverApiRequest(\"/api/v1/kg/graphs\", {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Get a specific knowledge graph by ID\n */\nexport async function getGraphServer(\n graphId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<GetGraphResult>> {\n return serverApiRequest(`/api/v1/kg/graphs/${graphId}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Create a new knowledge graph\n */\nexport async function createGraphServer(\n graph: CreateGraphRequest,\n options: ServerApiOptions\n): Promise<ApiResponse<CreateGraphResult>> {\n return serverApiRequest(\"/api/v1/kg/graphs\", {\n method: \"POST\",\n body: graph,\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Update an existing knowledge graph\n */\nexport async function updateGraphServer(\n graphId: string,\n updates: Partial<Graph>,\n options: ServerApiOptions\n): Promise<ApiResponse<UpdateGraphResult>> {\n return serverApiRequest(`/api/v1/kg/graphs/${graphId}`, {\n method: \"PUT\",\n body: updates,\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Delete a knowledge graph\n */\nexport async function deleteGraphServer(\n graphId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<DeleteGraphResult>> {\n return serverApiRequest(`/api/v1/kg/graphs/${graphId}`, {\n method: \"DELETE\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n// =============================================================================\n// QUERY & LABELS\n// =============================================================================\n\n/**\n * Query knowledge graph nodes\n *\n * @example\n * ```ts\n * const response = await queryGraphServer(\n * { label: \"Person\", fields: [], limit: 10, depth: 1, sortBy: \"\", sortOrder: \"\" },\n * { gatewayUrl, jwtSecret, orgId, graphId }\n * );\n * ```\n */\nexport async function queryGraphServer(\n query: KGQuery,\n options: ServerApiOptions\n): Promise<ApiResponse<KGQueryResult>> {\n return serverApiRequest(\"/api/v1/kg/query\", {\n method: \"POST\",\n body: query,\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout ?? 30000,\n cache: options.cache,\n });\n}\n\n/**\n * Get all node labels in the knowledge graph\n */\nexport async function getGraphLabelsServer(\n options: ServerApiOptions\n): Promise<ApiResponse<{ labels: KGLabelInfo[] }>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/labels${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n// =============================================================================\n// NODES\n// =============================================================================\n\n/**\n * Get a specific KG node by ID\n */\nexport async function getKGNodeServer(\n nodeId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<{ node: KGNode }>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/nodes/${nodeId}${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Ingest a new node into the knowledge graph\n */\nexport async function ingestKGNodeServer(\n node: KGNodeIngestRequest,\n options: ServerApiOptions\n): Promise<ApiResponse<KGSyncIngestResponse>> {\n return serverApiRequest(\"/api/v1/kg/nodes\", {\n method: \"POST\",\n body: node,\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Update an existing KG node\n */\nexport async function updateKGNodeServer(\n nodeId: string,\n updates: Partial<KGNode>,\n options: ServerApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(`/api/v1/kg/nodes/${nodeId}`, {\n method: \"PUT\",\n body: updates,\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Get connection statistics for a node\n */\nexport async function getNodeConnectionStatsServer(\n nodeId: string,\n edgeLabel: string,\n options: ServerApiOptions\n): Promise<ApiResponse<Record<string, number>>> {\n const queryString = buildQueryString({\n edgeLabel,\n graphId: options.graphId,\n });\n return serverApiRequest(`/api/v1/kg/nodes/${nodeId}/connections${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n// =============================================================================\n// DOCUMENTS\n// =============================================================================\n\n/**\n * Ingest a document into the knowledge graph\n */\nexport async function ingestDocumentServer(\n document: { id: string; title: string; content: string; docUrl?: string; lang?: string },\n options: ServerApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(\"/api/v1/kg/ingest\", {\n method: \"POST\",\n body: document,\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout ?? 120000,\n cache: options.cache,\n });\n}\n\n/**\n * Delete a document from the knowledge graph\n */\nexport async function deleteKGDocumentServer(\n documentId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<DeleteDocumentResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/documents/${documentId}${queryString}`, {\n method: \"DELETE\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Optimize the knowledge graph\n */\nexport async function optimizeGraphServer(\n options: ServerApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return serverApiRequest(\"/api/v1/kg/graph/optimize\", {\n method: \"POST\",\n body: {},\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n// =============================================================================\n// DESIGNER - NODES\n// =============================================================================\n\n/**\n * List all node definitions in the graph designer\n */\nexport async function listDesignerNodesServer(\n options: ServerApiOptions\n): Promise<ApiResponse<GraphNodeResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/designer/nodes${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Get a specific node definition by label\n */\nexport async function getDesignerNodeServer(\n label: string,\n options: ServerApiOptions\n): Promise<ApiResponse<GraphNodeResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/designer/nodes/${label}${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Create a new node definition\n */\nexport async function createDesignerNodeServer(\n node: Omit<GraphNodeDefinition, \"createdAt\" | \"updatedAt\">,\n options: ServerApiOptions\n): Promise<ApiResponse<GraphNodeResponse>> {\n return serverApiRequest(\"/api/v1/kg/designer/nodes\", {\n method: \"POST\",\n body: { node },\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Update an existing node definition\n */\nexport async function updateDesignerNodeServer(\n label: string,\n node: Partial<GraphNodeDefinition>,\n options: ServerApiOptions\n): Promise<ApiResponse<GraphNodeResponse>> {\n return serverApiRequest(`/api/v1/kg/designer/nodes/${label}`, {\n method: \"PUT\",\n body: { node },\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Delete a node definition\n */\nexport async function deleteDesignerNodeServer(\n label: string,\n options: ServerApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/designer/nodes/${label}${queryString}`, {\n method: \"DELETE\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n// =============================================================================\n// DESIGNER - EDGES\n// =============================================================================\n\n/**\n * List all edge definitions in the graph designer\n */\nexport async function listDesignerEdgesServer(\n options: ServerApiOptions\n): Promise<ApiResponse<GraphEdgeResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/designer/edges${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Get a specific edge definition by label\n */\nexport async function getDesignerEdgeServer(\n label: string,\n options: ServerApiOptions\n): Promise<ApiResponse<GraphEdgeResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/designer/edges/${label}${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Create a new edge definition\n */\nexport async function createDesignerEdgeServer(\n edge: Omit<GraphEdgeDefinition, \"createdAt\" | \"updatedAt\">,\n options: ServerApiOptions\n): Promise<ApiResponse<GraphEdgeResponse>> {\n return serverApiRequest(\"/api/v1/kg/designer/edges\", {\n method: \"POST\",\n body: { edge },\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Update an existing edge definition\n */\nexport async function updateDesignerEdgeServer(\n label: string,\n edge: Partial<GraphEdgeDefinition>,\n options: ServerApiOptions\n): Promise<ApiResponse<GraphEdgeResponse>> {\n return serverApiRequest(`/api/v1/kg/designer/edges/${label}`, {\n method: \"PUT\",\n body: { edge },\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Delete an edge definition\n */\nexport async function deleteDesignerEdgeServer(\n label: string,\n options: ServerApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/designer/edges/${label}${queryString}`, {\n method: \"DELETE\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n// =============================================================================\n// CRAWL JOBS\n// =============================================================================\n\n/**\n * List crawl jobs\n */\nexport async function listCrawlJobsServer(\n options: ServerApiOptions & { limit?: number; offset?: number; status?: string }\n): Promise<ApiResponse<CrawlJobsListResponse>> {\n const queryString = buildQueryString({\n graphId: options.graphId,\n limit: options.limit?.toString(),\n offset: options.offset?.toString(),\n status: options.status,\n });\n return serverApiRequest(`/api/v1/kg/crawl/jobs${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Start a new crawl job\n */\nexport async function startCrawlJobServer(\n params: { baseUrl: string; depth: number; maxPages: number },\n options: ServerApiOptions\n): Promise<ApiResponse<CrawlJobStartResponse>> {\n return serverApiRequest(\"/api/v1/kg/crawl/jobs\", {\n method: \"POST\",\n body: params,\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Get crawl job status\n */\nexport async function getCrawlJobStatusServer(\n jobId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<CrawlJobStatusResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/crawl/jobs/${jobId}${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Cancel a crawl job\n */\nexport async function cancelCrawlJobServer(\n jobId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<CrawlJobStatusResponse>> {\n return serverApiRequest(`/api/v1/kg/crawl/jobs/${jobId}/cancel`, {\n method: \"POST\",\n body: {},\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n headers: buildHeaders(options.graphId),\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n\n/**\n * Get pages crawled by a job\n */\nexport async function getCrawledPagesServer(\n jobId: string,\n options: ServerApiOptions\n): Promise<ApiResponse<CrawledPagesResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return serverApiRequest(`/api/v1/kg/crawl/jobs/${jobId}/pages${queryString}`, {\n method: \"GET\",\n gatewayUrl: options.gatewayUrl,\n jwtSecret: options.jwtSecret,\n orgId: options.orgId,\n userId: options.userId,\n userEmail: options.userEmail,\n timeout: options.timeout,\n cache: options.cache,\n });\n}\n"],"mappings":";;;AAqBA,SAAS,wBAAwB;AA4DjC,SAAS,iBAAiB,QAAoD;AAC5E,QAAM,eAAe,IAAI,gBAAgB;AACzC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,MAAM,GAAG;AACjD,QAAI,UAAU,QAAW;AACvB,mBAAa,IAAI,KAAK,KAAK;AAAA,IAC7B;AAAA,EACF;AACA,QAAM,cAAc,aAAa,SAAS;AAC1C,SAAO,cAAc,IAAI,WAAW,KAAK;AAC3C;AAKA,SAAS,aAAa,SAAsD;AAC1E,SAAO,UAAU,EAAE,cAAc,QAAQ,IAAI;AAC/C;AAqBA,eAAsB,iBACpB,SACwC;AACxC,SAAO,iBAAiB,qBAAqB;AAAA,IAC3C,QAAQ;AAAA,IACR,YAAY,QAAQ;AAAA,IACpB,WAAW,QAAQ;AAAA,IACnB,OAAO,QAA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