@elqnt/kg 3.0.0 → 3.0.2

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 (64) hide show
  1. package/dist/api/index.d.mts +94 -5
  2. package/dist/api/index.d.ts +94 -5
  3. package/dist/api/index.js +16 -2
  4. package/dist/api/index.js.map +1 -1
  5. package/dist/api/index.mjs +15 -1
  6. package/dist/api/server.d.mts +4 -3
  7. package/dist/api/server.d.ts +4 -3
  8. package/dist/api/server.js.map +1 -1
  9. package/dist/{chunk-HCDFJCQL.mjs → chunk-5D7RJC7D.mjs} +105 -5
  10. package/dist/chunk-5D7RJC7D.mjs.map +1 -0
  11. package/dist/chunk-67SUELDR.js.map +1 -1
  12. package/dist/chunk-ADIKUMMI.js.map +1 -1
  13. package/dist/chunk-B33SF6DB.js +2 -0
  14. package/dist/chunk-B33SF6DB.js.map +1 -0
  15. package/dist/chunk-BP2I7KWY.js +1031 -0
  16. package/dist/chunk-BP2I7KWY.js.map +1 -0
  17. package/dist/{chunk-2TJCYLTP.js → chunk-CNWOI7LX.js} +104 -4
  18. package/dist/chunk-CNWOI7LX.js.map +1 -0
  19. package/dist/chunk-MAEB7UOW.mjs +257 -0
  20. package/dist/chunk-MAEB7UOW.mjs.map +1 -0
  21. package/dist/chunk-SUDQ45LY.mjs +2 -0
  22. package/dist/chunk-UCKE66GB.js.map +1 -1
  23. package/dist/chunk-WYRCAPY4.js +257 -0
  24. package/dist/chunk-WYRCAPY4.js.map +1 -0
  25. package/dist/chunk-ZEPJC46Z.mjs +1031 -0
  26. package/dist/chunk-ZEPJC46Z.mjs.map +1 -0
  27. package/dist/hooks/index.d.mts +446 -79
  28. package/dist/hooks/index.d.ts +446 -79
  29. package/dist/hooks/index.js +8 -3
  30. package/dist/hooks/index.js.map +1 -1
  31. package/dist/hooks/index.mjs +9 -4
  32. package/dist/index.d.mts +4 -2
  33. package/dist/index.d.ts +4 -2
  34. package/dist/index.js +24 -5
  35. package/dist/index.js.map +1 -1
  36. package/dist/index.mjs +31 -12
  37. package/dist/index.mjs.map +1 -1
  38. package/dist/models/index.d.mts +213 -0
  39. package/dist/models/index.d.ts +213 -0
  40. package/dist/models/index.js +1 -1
  41. package/dist/models/index.js.map +1 -1
  42. package/dist/models/index.mjs +1 -1
  43. package/dist/models/kg-designer.js.map +1 -1
  44. package/dist/models/kg.js.map +1 -1
  45. package/dist/transport/index.d.mts +365 -0
  46. package/dist/transport/index.d.ts +365 -0
  47. package/dist/transport/index.js +10 -0
  48. package/dist/transport/index.js.map +1 -0
  49. package/dist/transport/index.mjs +10 -0
  50. package/dist/transport/index.mjs.map +1 -0
  51. package/dist/utils/index.js +1 -1
  52. package/dist/utils/index.js.map +1 -1
  53. package/dist/utils/index.mjs +1 -1
  54. package/package.json +15 -13
  55. package/dist/chunk-2TJCYLTP.js.map +0 -1
  56. package/dist/chunk-7RW5MHP5.js +0 -497
  57. package/dist/chunk-7RW5MHP5.js.map +0 -1
  58. package/dist/chunk-HCDFJCQL.mjs.map +0 -1
  59. package/dist/chunk-JZ7UXVRW.mjs +0 -497
  60. package/dist/chunk-JZ7UXVRW.mjs.map +0 -1
  61. package/dist/chunk-NJNBEGDB.mjs +0 -2
  62. package/dist/chunk-W4XVBGE7.js +0 -2
  63. package/dist/chunk-W4XVBGE7.js.map +0 -1
  64. /package/dist/{chunk-NJNBEGDB.mjs.map → chunk-SUDQ45LY.mjs.map} +0 -0
@@ -1,497 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
- var _chunk2TJCYLTPjs = require('./chunk-2TJCYLTP.js');
28
-
29
- // hooks/index.ts
30
- var _react = require('react');
31
-
32
- // hooks/use-async.ts
33
-
34
- function extractFromResponse(response, extractor, defaultValue) {
35
- if (response.error) {
36
- return [defaultValue, response.error];
37
- }
38
- if (!response.data) {
39
- return [defaultValue, null];
40
- }
41
- return [extractor(response.data), null];
42
- }
43
- function useAsync(asyncFn, options) {
44
- const [loading, setLoading] = _react.useState.call(void 0, false);
45
- const [error, setError] = _react.useState.call(void 0, null);
46
- const requestCount = _react.useRef.call(void 0, 0);
47
- const execute = _react.useCallback.call(void 0,
48
- async (...args) => {
49
- requestCount.current += 1;
50
- setLoading(true);
51
- setError(null);
52
- try {
53
- const result = await asyncFn(...args);
54
- return result;
55
- } catch (err) {
56
- const message = err instanceof Error ? err.message : "An error occurred";
57
- setError(message);
58
- _optionalChain([options, 'optionalAccess', _ => _.onError, 'optionalCall', _2 => _2(message)]);
59
- throw err;
60
- } finally {
61
- requestCount.current -= 1;
62
- if (requestCount.current === 0) {
63
- setLoading(false);
64
- }
65
- }
66
- },
67
- [asyncFn, options]
68
- );
69
- const clearError = _react.useCallback.call(void 0, () => {
70
- setError(null);
71
- }, []);
72
- return { execute, loading, error, clearError };
73
- }
74
- function useApiAsync(asyncFn, extractor, defaultValue, options) {
75
- const [loading, setLoading] = _react.useState.call(void 0, false);
76
- const [error, setError] = _react.useState.call(void 0, null);
77
- const requestCount = _react.useRef.call(void 0, 0);
78
- const execute = _react.useCallback.call(void 0,
79
- async (...args) => {
80
- requestCount.current += 1;
81
- setLoading(true);
82
- setError(null);
83
- try {
84
- const response = await asyncFn(...args);
85
- const [result, errorMessage] = extractFromResponse(response, extractor, defaultValue);
86
- if (errorMessage) {
87
- setError(errorMessage);
88
- _optionalChain([options, 'optionalAccess', _3 => _3.onError, 'optionalCall', _4 => _4(errorMessage)]);
89
- return defaultValue;
90
- }
91
- return result;
92
- } catch (err) {
93
- const message = err instanceof Error ? err.message : "An error occurred";
94
- setError(message);
95
- _optionalChain([options, 'optionalAccess', _5 => _5.onError, 'optionalCall', _6 => _6(message)]);
96
- return defaultValue;
97
- } finally {
98
- requestCount.current -= 1;
99
- if (requestCount.current === 0) {
100
- setLoading(false);
101
- }
102
- }
103
- },
104
- [asyncFn, extractor, defaultValue, options]
105
- );
106
- const clearError = _react.useCallback.call(void 0, () => {
107
- setError(null);
108
- }, []);
109
- return { execute, loading, error, clearError };
110
- }
111
-
112
- // hooks/use-options-ref.ts
113
-
114
- function useOptionsRef(options) {
115
- const ref = _react.useRef.call(void 0, options);
116
- _react.useEffect.call(void 0, () => {
117
- ref.current = options;
118
- }, [options]);
119
- return ref;
120
- }
121
-
122
- // hooks/index.ts
123
- function useGraphs(options) {
124
- const optionsRef = useOptionsRef(options);
125
- const {
126
- execute: listGraphs,
127
- loading: listLoading,
128
- error: listError
129
- } = useApiAsync(
130
- () => _chunk2TJCYLTPjs.listGraphsApi.call(void 0, optionsRef.current),
131
- (data) => data.graphs || [],
132
- []
133
- );
134
- const {
135
- execute: getGraphInternal,
136
- loading: getLoading,
137
- error: getError
138
- } = useApiAsync(
139
- (graphId) => _chunk2TJCYLTPjs.getGraphApi.call(void 0, graphId, optionsRef.current),
140
- (data) => data.graph || null,
141
- null
142
- );
143
- const getGraph = _react.useCallback.call(void 0, (graphId) => getGraphInternal(graphId), [getGraphInternal]);
144
- const {
145
- execute: createGraphInternal,
146
- loading: createLoading,
147
- error: createError
148
- } = useApiAsync(
149
- (graph) => _chunk2TJCYLTPjs.createGraphApi.call(void 0, graph, optionsRef.current),
150
- (data) => data.graph || null,
151
- null
152
- );
153
- const createGraph = _react.useCallback.call(void 0,
154
- (graph) => createGraphInternal(graph),
155
- [createGraphInternal]
156
- );
157
- const {
158
- execute: updateGraphInternal,
159
- loading: updateLoading,
160
- error: updateError
161
- } = useApiAsync(
162
- (graphId, updates) => _chunk2TJCYLTPjs.updateGraphApi.call(void 0, graphId, updates, optionsRef.current),
163
- (data) => data.graph || null,
164
- null
165
- );
166
- const updateGraph = _react.useCallback.call(void 0,
167
- (graphId, updates) => updateGraphInternal(graphId, updates),
168
- [updateGraphInternal]
169
- );
170
- const {
171
- execute: deleteGraphInternal,
172
- loading: deleteLoading,
173
- error: deleteError
174
- } = useApiAsync(
175
- (graphId) => _chunk2TJCYLTPjs.deleteGraphApi.call(void 0, graphId, optionsRef.current),
176
- (data) => _nullishCoalesce(data.success, () => ( true)),
177
- false
178
- );
179
- const deleteGraph = _react.useCallback.call(void 0,
180
- (graphId) => deleteGraphInternal(graphId),
181
- [deleteGraphInternal]
182
- );
183
- const loading = listLoading || getLoading || createLoading || updateLoading || deleteLoading;
184
- const error = listError || getError || createError || updateError || deleteError;
185
- return _react.useMemo.call(void 0,
186
- () => ({
187
- loading,
188
- error,
189
- listGraphs,
190
- getGraph,
191
- createGraph,
192
- updateGraph,
193
- deleteGraph
194
- }),
195
- [loading, error, listGraphs, getGraph, createGraph, updateGraph, deleteGraph]
196
- );
197
- }
198
- function useKGQuery(options) {
199
- const optionsRef = useOptionsRef(options);
200
- const {
201
- execute: queryInternal,
202
- loading: queryLoading,
203
- error: queryError
204
- } = useApiAsync(
205
- (queryParams) => _chunk2TJCYLTPjs.queryGraphApi.call(void 0, queryParams, optionsRef.current),
206
- (data) => data,
207
- null
208
- );
209
- const query = _react.useCallback.call(void 0,
210
- (queryParams) => queryInternal(queryParams),
211
- [queryInternal]
212
- );
213
- const {
214
- execute: getLabels,
215
- loading: labelsLoading,
216
- error: labelsError
217
- } = useApiAsync(
218
- () => _chunk2TJCYLTPjs.getGraphLabelsApi.call(void 0, optionsRef.current),
219
- (data) => data.labels || [],
220
- []
221
- );
222
- const {
223
- execute: getNodeInternal,
224
- loading: nodeLoading,
225
- error: nodeError
226
- } = useApiAsync(
227
- (nodeId) => _chunk2TJCYLTPjs.getKGNodeApi.call(void 0, nodeId, optionsRef.current),
228
- (data) => data.node || null,
229
- null
230
- );
231
- const getNode = _react.useCallback.call(void 0, (nodeId) => getNodeInternal(nodeId), [getNodeInternal]);
232
- const {
233
- execute: ingestNodeInternal,
234
- loading: ingestLoading,
235
- error: ingestError
236
- } = useApiAsync(
237
- (node) => _chunk2TJCYLTPjs.ingestKGNodeApi.call(void 0, node, optionsRef.current),
238
- (data) => data.nodeId || null,
239
- null
240
- );
241
- const ingestNode = _react.useCallback.call(void 0,
242
- (node) => ingestNodeInternal(node),
243
- [ingestNodeInternal]
244
- );
245
- const {
246
- execute: updateNodeInternal,
247
- loading: updateLoading,
248
- error: updateError
249
- } = useApiAsync(
250
- (nodeId, updates) => _chunk2TJCYLTPjs.updateKGNodeApi.call(void 0, nodeId, updates, optionsRef.current),
251
- (data) => _nullishCoalesce(data.success, () => ( true)),
252
- false
253
- );
254
- const updateNode = _react.useCallback.call(void 0,
255
- (nodeId, updates) => updateNodeInternal(nodeId, updates),
256
- [updateNodeInternal]
257
- );
258
- const loading = queryLoading || labelsLoading || nodeLoading || ingestLoading || updateLoading;
259
- const error = queryError || labelsError || nodeError || ingestError || updateError;
260
- return _react.useMemo.call(void 0,
261
- () => ({
262
- loading,
263
- error,
264
- query,
265
- getLabels,
266
- getNode,
267
- ingestNode,
268
- updateNode
269
- }),
270
- [loading, error, query, getLabels, getNode, ingestNode, updateNode]
271
- );
272
- }
273
- function useKGDesigner(options) {
274
- const optionsRef = useOptionsRef(options);
275
- const {
276
- execute: listNodes,
277
- loading: listNodesLoading,
278
- error: listNodesError
279
- } = useApiAsync(
280
- () => _chunk2TJCYLTPjs.listDesignerNodesApi.call(void 0, optionsRef.current),
281
- (data) => data.nodes || [],
282
- []
283
- );
284
- const {
285
- execute: getNodeInternal,
286
- loading: getNodeLoading,
287
- error: getNodeError
288
- } = useApiAsync(
289
- (label) => _chunk2TJCYLTPjs.getDesignerNodeApi.call(void 0, label, optionsRef.current),
290
- (data) => data.node || null,
291
- null
292
- );
293
- const getNode = _react.useCallback.call(void 0, (label) => getNodeInternal(label), [getNodeInternal]);
294
- const {
295
- execute: createNodeInternal,
296
- loading: createNodeLoading,
297
- error: createNodeError
298
- } = useApiAsync(
299
- (node) => _chunk2TJCYLTPjs.createDesignerNodeApi.call(void 0, node, optionsRef.current),
300
- (data) => data.node || null,
301
- null
302
- );
303
- const createNode = _react.useCallback.call(void 0,
304
- (node) => createNodeInternal(node),
305
- [createNodeInternal]
306
- );
307
- const {
308
- execute: updateNodeInternal,
309
- loading: updateNodeLoading,
310
- error: updateNodeError
311
- } = useApiAsync(
312
- (label, updates) => _chunk2TJCYLTPjs.updateDesignerNodeApi.call(void 0, label, updates, optionsRef.current),
313
- (data) => data.node || null,
314
- null
315
- );
316
- const updateNode = _react.useCallback.call(void 0,
317
- (label, updates) => updateNodeInternal(label, updates),
318
- [updateNodeInternal]
319
- );
320
- const {
321
- execute: deleteNodeInternal,
322
- loading: deleteNodeLoading,
323
- error: deleteNodeError
324
- } = useApiAsync(
325
- (label) => _chunk2TJCYLTPjs.deleteDesignerNodeApi.call(void 0, label, optionsRef.current),
326
- (data) => _nullishCoalesce(data.success, () => ( true)),
327
- false
328
- );
329
- const deleteNode = _react.useCallback.call(void 0, (label) => deleteNodeInternal(label), [deleteNodeInternal]);
330
- const {
331
- execute: listEdges,
332
- loading: listEdgesLoading,
333
- error: listEdgesError
334
- } = useApiAsync(
335
- () => _chunk2TJCYLTPjs.listDesignerEdgesApi.call(void 0, optionsRef.current),
336
- (data) => data.edges || [],
337
- []
338
- );
339
- const {
340
- execute: createEdgeInternal,
341
- loading: createEdgeLoading,
342
- error: createEdgeError
343
- } = useApiAsync(
344
- (edge) => _chunk2TJCYLTPjs.createDesignerEdgeApi.call(void 0, edge, optionsRef.current),
345
- (data) => data.edge || null,
346
- null
347
- );
348
- const createEdge = _react.useCallback.call(void 0,
349
- (edge) => createEdgeInternal(edge),
350
- [createEdgeInternal]
351
- );
352
- const {
353
- execute: updateEdgeInternal,
354
- loading: updateEdgeLoading,
355
- error: updateEdgeError
356
- } = useApiAsync(
357
- (label, updates) => _chunk2TJCYLTPjs.updateDesignerEdgeApi.call(void 0, label, updates, optionsRef.current),
358
- (data) => data.edge || null,
359
- null
360
- );
361
- const updateEdge = _react.useCallback.call(void 0,
362
- (label, updates) => updateEdgeInternal(label, updates),
363
- [updateEdgeInternal]
364
- );
365
- const {
366
- execute: deleteEdgeInternal,
367
- loading: deleteEdgeLoading,
368
- error: deleteEdgeError
369
- } = useApiAsync(
370
- (label) => _chunk2TJCYLTPjs.deleteDesignerEdgeApi.call(void 0, label, optionsRef.current),
371
- (data) => _nullishCoalesce(data.success, () => ( true)),
372
- false
373
- );
374
- const deleteEdge = _react.useCallback.call(void 0, (label) => deleteEdgeInternal(label), [deleteEdgeInternal]);
375
- const loading = listNodesLoading || getNodeLoading || createNodeLoading || updateNodeLoading || deleteNodeLoading || listEdgesLoading || createEdgeLoading || updateEdgeLoading || deleteEdgeLoading;
376
- const error = listNodesError || getNodeError || createNodeError || updateNodeError || deleteNodeError || listEdgesError || createEdgeError || updateEdgeError || deleteEdgeError;
377
- return _react.useMemo.call(void 0,
378
- () => ({
379
- loading,
380
- error,
381
- // Nodes
382
- listNodes,
383
- getNode,
384
- createNode,
385
- updateNode,
386
- deleteNode,
387
- // Edges
388
- listEdges,
389
- createEdge,
390
- updateEdge,
391
- deleteEdge
392
- }),
393
- [
394
- loading,
395
- error,
396
- listNodes,
397
- getNode,
398
- createNode,
399
- updateNode,
400
- deleteNode,
401
- listEdges,
402
- createEdge,
403
- updateEdge,
404
- deleteEdge
405
- ]
406
- );
407
- }
408
- function useCrawlJobs(options) {
409
- const optionsRef = useOptionsRef(options);
410
- const {
411
- execute: listJobsInternal,
412
- loading: listLoading,
413
- error: listError
414
- } = useApiAsync(
415
- (params) => _chunk2TJCYLTPjs.listCrawlJobsApi.call(void 0, { ...optionsRef.current, ...params }),
416
- (data) => ({ jobs: data.jobs || [], total: data.total || 0 }),
417
- { jobs: [], total: 0 }
418
- );
419
- const listJobs = _react.useCallback.call(void 0,
420
- (params) => listJobsInternal(params),
421
- [listJobsInternal]
422
- );
423
- const {
424
- execute: startJobInternal,
425
- loading: startLoading,
426
- error: startError
427
- } = useApiAsync(
428
- (params) => _chunk2TJCYLTPjs.startCrawlJobApi.call(void 0, params, optionsRef.current),
429
- (data) => data.jobId || null,
430
- null
431
- );
432
- const startJob = _react.useCallback.call(void 0,
433
- (params) => startJobInternal(params),
434
- [startJobInternal]
435
- );
436
- const {
437
- execute: getJobStatusInternal,
438
- loading: statusLoading,
439
- error: statusError
440
- } = useApiAsync(
441
- (jobId) => _chunk2TJCYLTPjs.getCrawlJobStatusApi.call(void 0, jobId, optionsRef.current),
442
- (data) => data.job || null,
443
- null
444
- );
445
- const getJobStatus = _react.useCallback.call(void 0,
446
- (jobId) => getJobStatusInternal(jobId),
447
- [getJobStatusInternal]
448
- );
449
- const {
450
- execute: cancelJobInternal,
451
- loading: cancelLoading,
452
- error: cancelError
453
- } = useApiAsync(
454
- (jobId) => _chunk2TJCYLTPjs.cancelCrawlJobApi.call(void 0, jobId, optionsRef.current),
455
- (data) => _nullishCoalesce(data.success, () => ( true)),
456
- false
457
- );
458
- const cancelJob = _react.useCallback.call(void 0, (jobId) => cancelJobInternal(jobId), [cancelJobInternal]);
459
- const {
460
- execute: getCrawledPagesInternal,
461
- loading: pagesLoading,
462
- error: pagesError
463
- } = useApiAsync(
464
- (jobId) => _chunk2TJCYLTPjs.getCrawledPagesApi.call(void 0, jobId, optionsRef.current),
465
- (data) => data.pages || [],
466
- []
467
- );
468
- const getCrawledPages = _react.useCallback.call(void 0,
469
- (jobId) => getCrawledPagesInternal(jobId),
470
- [getCrawledPagesInternal]
471
- );
472
- const loading = listLoading || startLoading || statusLoading || cancelLoading || pagesLoading;
473
- const error = listError || startError || statusError || cancelError || pagesError;
474
- return _react.useMemo.call(void 0,
475
- () => ({
476
- loading,
477
- error,
478
- listJobs,
479
- startJob,
480
- getJobStatus,
481
- cancelJob,
482
- getCrawledPages
483
- }),
484
- [loading, error, listJobs, startJob, getJobStatus, cancelJob, getCrawledPages]
485
- );
486
- }
487
-
488
-
489
-
490
-
491
-
492
-
493
-
494
-
495
-
496
- exports.useAsync = useAsync; exports.useApiAsync = useApiAsync; exports.useOptionsRef = useOptionsRef; exports.useGraphs = useGraphs; exports.useKGQuery = useKGQuery; exports.useKGDesigner = useKGDesigner; exports.useCrawlJobs = useCrawlJobs;
497
- //# sourceMappingURL=chunk-7RW5MHP5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-7RW5MHP5.js","../hooks/index.ts","../hooks/use-async.ts","../hooks/use-options-ref.ts"],"names":["useRef","useCallback"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACA;ACjBA,8BAAqC;ADmBrC;AACA;AEpBA;AAuBA,SAAS,mBAAA,CACP,QAAA,EACA,SAAA,EACA,YAAA,EAC0B;AAC1B,EAAA,GAAA,CAAI,QAAA,CAAS,KAAA,EAAO;AAClB,IAAA,OAAO,CAAC,YAAA,EAAc,QAAA,CAAS,KAAK,CAAA;AAAA,EACtC;AACA,EAAA,GAAA,CAAI,CAAC,QAAA,CAAS,IAAA,EAAM;AAClB,IAAA,OAAO,CAAC,YAAA,EAAc,IAAI,CAAA;AAAA,EAC5B;AACA,EAAA,OAAO,CAAC,SAAA,CAAU,QAAA,CAAS,IAAI,CAAA,EAAG,IAAI,CAAA;AACxC;AAoBO,SAAS,QAAA,CACd,OAAA,EACA,OAAA,EACgC;AAChC,EAAA,MAAM,CAAC,OAAA,E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A,CAAC,OAAA,EAAS,KAAA,EAAO,QAAA,EAAU,QAAA,EAAU,YAAA,EAAc,SAAA,EAAW,eAAe;AAAA,EAC/E,CAAA;AACF;AD9EA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,kPAAC","file":"/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-7RW5MHP5.js","sourcesContent":[null,"\"use client\";\n\n/**\n * Knowledge Graph React Hooks\n *\n * Provides React hooks for KG operations with loading/error states.\n * All hooks use the useOptionsRef pattern to always access the latest options.\n *\n * @packageDocumentation\n */\n\nimport { useCallback, useMemo } from \"react\";\nimport type { ApiClientOptions } from \"@elqnt/api-client\";\nimport type {\n Graph,\n CreateGraphRequest,\n KGNode,\n KGQuery,\n KGQueryResult,\n KGLabelInfo,\n KGNodeIngestRequest,\n GraphNodeDefinition,\n GraphEdgeDefinition,\n} from \"../models\";\nimport {\n listGraphsApi,\n getGraphApi,\n createGraphApi,\n updateGraphApi,\n deleteGraphApi,\n queryGraphApi,\n getGraphLabelsApi,\n getKGNodeApi,\n ingestKGNodeApi,\n updateKGNodeApi,\n listDesignerNodesApi,\n getDesignerNodeApi,\n createDesignerNodeApi,\n updateDesignerNodeApi,\n deleteDesignerNodeApi,\n listDesignerEdgesApi,\n createDesignerEdgeApi,\n updateDesignerEdgeApi,\n deleteDesignerEdgeApi,\n listCrawlJobsApi,\n startCrawlJobApi,\n getCrawlJobStatusApi,\n cancelCrawlJobApi,\n getCrawledPagesApi,\n type KGApiOptions,\n type CrawlJob,\n} from \"../api\";\nimport { useApiAsync } from \"./use-async\";\nimport { useOptionsRef } from \"./use-options-ref\";\n\n// Re-export utilities for external use\nexport { useApiAsync, useAsync } from \"./use-async\";\nexport type { UseAsyncOptions, UseAsyncReturn } from \"./use-async\";\nexport { useOptionsRef } from \"./use-options-ref\";\n\n// =============================================================================\n// TYPES\n// =============================================================================\n\n/** Options for KG hooks that require a graph ID */\nexport type UseKGOptions = ApiClientOptions & { graphId?: string };\n\n// =============================================================================\n// USE GRAPHS HOOK\n// =============================================================================\n\n/**\n * Hook for knowledge graph CRUD operations\n *\n * @example\n * ```tsx\n * const { loading, error, listGraphs, createGraph } = useGraphs({\n * baseUrl: apiGatewayUrl,\n * orgId: selectedOrgId,\n * });\n *\n * const graphs = await listGraphs();\n * ```\n */\nexport function useGraphs(options: ApiClientOptions) {\n const optionsRef = useOptionsRef(options);\n\n const {\n execute: listGraphs,\n loading: listLoading,\n error: listError,\n } = useApiAsync(\n () => listGraphsApi(optionsRef.current),\n (data) => data.graphs || [],\n []\n );\n\n const {\n execute: getGraphInternal,\n loading: getLoading,\n error: getError,\n } = useApiAsync(\n (graphId: string) => getGraphApi(graphId, optionsRef.current),\n (data) => data.graph || null,\n null\n );\n const getGraph = useCallback((graphId: string) => getGraphInternal(graphId), [getGraphInternal]);\n\n const {\n execute: createGraphInternal,\n loading: createLoading,\n error: createError,\n } = useApiAsync(\n (graph: CreateGraphRequest) => createGraphApi(graph, optionsRef.current),\n (data) => data.graph || null,\n null\n );\n const createGraph = useCallback(\n (graph: CreateGraphRequest) => createGraphInternal(graph),\n [createGraphInternal]\n );\n\n const {\n execute: updateGraphInternal,\n loading: updateLoading,\n error: updateError,\n } = useApiAsync(\n (graphId: string, updates: Partial<Graph>) => updateGraphApi(graphId, updates, optionsRef.current),\n (data) => data.graph || null,\n null\n );\n const updateGraph = useCallback(\n (graphId: string, updates: Partial<Graph>) => updateGraphInternal(graphId, updates),\n [updateGraphInternal]\n );\n\n const {\n execute: deleteGraphInternal,\n loading: deleteLoading,\n error: deleteError,\n } = useApiAsync(\n (graphId: string) => deleteGraphApi(graphId, optionsRef.current),\n (data) => data.success ?? true,\n false\n );\n const deleteGraph = useCallback(\n (graphId: string) => deleteGraphInternal(graphId),\n [deleteGraphInternal]\n );\n\n // Combine loading and error states\n const loading = listLoading || getLoading || createLoading || updateLoading || deleteLoading;\n const error = listError || getError || createError || updateError || deleteError;\n\n return useMemo(\n () => ({\n loading,\n error,\n listGraphs,\n getGraph,\n createGraph,\n updateGraph,\n deleteGraph,\n }),\n [loading, error, listGraphs, getGraph, createGraph, updateGraph, deleteGraph]\n );\n}\n\n// =============================================================================\n// USE KG QUERY HOOK\n// =============================================================================\n\n/**\n * Hook for querying knowledge graph nodes\n *\n * @example\n * ```tsx\n * const { query, getLabels, loading, error } = useKGQuery({\n * baseUrl: apiGatewayUrl,\n * orgId: selectedOrgId,\n * graphId: selectedGraphId,\n * });\n *\n * const result = await query({ label: \"Person\", fields: [], limit: 10 });\n * ```\n */\nexport function useKGQuery(options: UseKGOptions) {\n const optionsRef = useOptionsRef(options);\n\n const {\n execute: queryInternal,\n loading: queryLoading,\n error: queryError,\n } = useApiAsync(\n (queryParams: KGQuery) => queryGraphApi(queryParams, optionsRef.current),\n (data) => data,\n null\n );\n const query = useCallback(\n (queryParams: KGQuery): Promise<KGQueryResult | null> => queryInternal(queryParams),\n [queryInternal]\n );\n\n const {\n execute: getLabels,\n loading: labelsLoading,\n error: labelsError,\n } = useApiAsync(\n () => getGraphLabelsApi(optionsRef.current),\n (data) => data.labels || [],\n []\n );\n\n const {\n execute: getNodeInternal,\n loading: nodeLoading,\n error: nodeError,\n } = useApiAsync(\n (nodeId: string) => getKGNodeApi(nodeId, optionsRef.current),\n (data) => data.node || null,\n null\n );\n const getNode = useCallback((nodeId: string) => getNodeInternal(nodeId), [getNodeInternal]);\n\n const {\n execute: ingestNodeInternal,\n loading: ingestLoading,\n error: ingestError,\n } = useApiAsync(\n (node: KGNodeIngestRequest) => ingestKGNodeApi(node, optionsRef.current),\n (data) => data.nodeId || null,\n null\n );\n const ingestNode = useCallback(\n (node: KGNodeIngestRequest) => ingestNodeInternal(node),\n [ingestNodeInternal]\n );\n\n const {\n execute: updateNodeInternal,\n loading: updateLoading,\n error: updateError,\n } = useApiAsync(\n (nodeId: string, updates: Partial<KGNode>) => updateKGNodeApi(nodeId, updates, optionsRef.current),\n (data) => data.success ?? true,\n false\n );\n const updateNode = useCallback(\n (nodeId: string, updates: Partial<KGNode>) => updateNodeInternal(nodeId, updates),\n [updateNodeInternal]\n );\n\n const loading = queryLoading || labelsLoading || nodeLoading || ingestLoading || updateLoading;\n const error = queryError || labelsError || nodeError || ingestError || updateError;\n\n return useMemo(\n () => ({\n loading,\n error,\n query,\n getLabels,\n getNode,\n ingestNode,\n updateNode,\n }),\n [loading, error, query, getLabels, getNode, ingestNode, updateNode]\n );\n}\n\n// =============================================================================\n// USE KG DESIGNER HOOK\n// =============================================================================\n\n/**\n * Hook for KG designer operations (node and edge definitions)\n *\n * @example\n * ```tsx\n * const { listNodes, createNode, listEdges, createEdge } = useKGDesigner({\n * baseUrl: apiGatewayUrl,\n * orgId: selectedOrgId,\n * graphId: selectedGraphId,\n * });\n *\n * const nodes = await listNodes();\n * ```\n */\nexport function useKGDesigner(options: UseKGOptions) {\n const optionsRef = useOptionsRef(options);\n\n // Node operations\n const {\n execute: listNodes,\n loading: listNodesLoading,\n error: listNodesError,\n } = useApiAsync(\n () => listDesignerNodesApi(optionsRef.current),\n (data) => data.nodes || [],\n []\n );\n\n const {\n execute: getNodeInternal,\n loading: getNodeLoading,\n error: getNodeError,\n } = useApiAsync(\n (label: string) => getDesignerNodeApi(label, optionsRef.current),\n (data) => data.node || null,\n null\n );\n const getNode = useCallback((label: string) => getNodeInternal(label), [getNodeInternal]);\n\n const {\n execute: createNodeInternal,\n loading: createNodeLoading,\n error: createNodeError,\n } = useApiAsync(\n (node: Omit<GraphNodeDefinition, \"createdAt\" | \"updatedAt\">) =>\n createDesignerNodeApi(node, optionsRef.current),\n (data) => data.node || null,\n null\n );\n const createNode = useCallback(\n (node: Omit<GraphNodeDefinition, \"createdAt\" | \"updatedAt\">) => createNodeInternal(node),\n [createNodeInternal]\n );\n\n const {\n execute: updateNodeInternal,\n loading: updateNodeLoading,\n error: updateNodeError,\n } = useApiAsync(\n (label: string, updates: Partial<GraphNodeDefinition>) =>\n updateDesignerNodeApi(label, updates, optionsRef.current),\n (data) => data.node || null,\n null\n );\n const updateNode = useCallback(\n (label: string, updates: Partial<GraphNodeDefinition>) => updateNodeInternal(label, updates),\n [updateNodeInternal]\n );\n\n const {\n execute: deleteNodeInternal,\n loading: deleteNodeLoading,\n error: deleteNodeError,\n } = useApiAsync(\n (label: string) => deleteDesignerNodeApi(label, optionsRef.current),\n (data) => data.success ?? true,\n false\n );\n const deleteNode = useCallback((label: string) => deleteNodeInternal(label), [deleteNodeInternal]);\n\n // Edge operations\n const {\n execute: listEdges,\n loading: listEdgesLoading,\n error: listEdgesError,\n } = useApiAsync(\n () => listDesignerEdgesApi(optionsRef.current),\n (data) => data.edges || [],\n []\n );\n\n const {\n execute: createEdgeInternal,\n loading: createEdgeLoading,\n error: createEdgeError,\n } = useApiAsync(\n (edge: Omit<GraphEdgeDefinition, \"createdAt\" | \"updatedAt\">) =>\n createDesignerEdgeApi(edge, optionsRef.current),\n (data) => data.edge || null,\n null\n );\n const createEdge = useCallback(\n (edge: Omit<GraphEdgeDefinition, \"createdAt\" | \"updatedAt\">) => createEdgeInternal(edge),\n [createEdgeInternal]\n );\n\n const {\n execute: updateEdgeInternal,\n loading: updateEdgeLoading,\n error: updateEdgeError,\n } = useApiAsync(\n (label: string, updates: Partial<GraphEdgeDefinition>) =>\n updateDesignerEdgeApi(label, updates, optionsRef.current),\n (data) => data.edge || null,\n null\n );\n const updateEdge = useCallback(\n (label: string, updates: Partial<GraphEdgeDefinition>) => updateEdgeInternal(label, updates),\n [updateEdgeInternal]\n );\n\n const {\n execute: deleteEdgeInternal,\n loading: deleteEdgeLoading,\n error: deleteEdgeError,\n } = useApiAsync(\n (label: string) => deleteDesignerEdgeApi(label, optionsRef.current),\n (data) => data.success ?? true,\n false\n );\n const deleteEdge = useCallback((label: string) => deleteEdgeInternal(label), [deleteEdgeInternal]);\n\n const loading =\n listNodesLoading ||\n getNodeLoading ||\n createNodeLoading ||\n updateNodeLoading ||\n deleteNodeLoading ||\n listEdgesLoading ||\n createEdgeLoading ||\n updateEdgeLoading ||\n deleteEdgeLoading;\n\n const error =\n listNodesError ||\n getNodeError ||\n createNodeError ||\n updateNodeError ||\n deleteNodeError ||\n listEdgesError ||\n createEdgeError ||\n updateEdgeError ||\n deleteEdgeError;\n\n return useMemo(\n () => ({\n loading,\n error,\n // Nodes\n listNodes,\n getNode,\n createNode,\n updateNode,\n deleteNode,\n // Edges\n listEdges,\n createEdge,\n updateEdge,\n deleteEdge,\n }),\n [\n loading,\n error,\n listNodes,\n getNode,\n createNode,\n updateNode,\n deleteNode,\n listEdges,\n createEdge,\n updateEdge,\n deleteEdge,\n ]\n );\n}\n\n// =============================================================================\n// USE CRAWL JOBS HOOK\n// =============================================================================\n\n/**\n * Hook for web crawl job operations\n *\n * @example\n * ```tsx\n * const { listJobs, startJob, getJobStatus } = useCrawlJobs({\n * baseUrl: apiGatewayUrl,\n * orgId: selectedOrgId,\n * graphId: selectedGraphId,\n * });\n *\n * const jobId = await startJob({ baseUrl: \"https://example.com\", depth: 2, maxPages: 100 });\n * ```\n */\nexport function useCrawlJobs(options: UseKGOptions) {\n const optionsRef = useOptionsRef(options);\n\n const {\n execute: listJobsInternal,\n loading: listLoading,\n error: listError,\n } = useApiAsync(\n (params?: { limit?: number; offset?: number; status?: string }) =>\n listCrawlJobsApi({ ...optionsRef.current, ...params }),\n (data) => ({ jobs: data.jobs || [], total: data.total || 0 }),\n { jobs: [], total: 0 }\n );\n const listJobs = useCallback(\n (params?: { limit?: number; offset?: number; status?: string }) => listJobsInternal(params),\n [listJobsInternal]\n );\n\n const {\n execute: startJobInternal,\n loading: startLoading,\n error: startError,\n } = useApiAsync(\n (params: { baseUrl: string; depth: number; maxPages: number }) =>\n startCrawlJobApi(params, optionsRef.current),\n (data) => data.jobId || null,\n null\n );\n const startJob = useCallback(\n (params: { baseUrl: string; depth: number; maxPages: number }) => startJobInternal(params),\n [startJobInternal]\n );\n\n const {\n execute: getJobStatusInternal,\n loading: statusLoading,\n error: statusError,\n } = useApiAsync(\n (jobId: string) => getCrawlJobStatusApi(jobId, optionsRef.current),\n (data) => data.job || null,\n null\n );\n const getJobStatus = useCallback(\n (jobId: string): Promise<CrawlJob | null> => getJobStatusInternal(jobId),\n [getJobStatusInternal]\n );\n\n const {\n execute: cancelJobInternal,\n loading: cancelLoading,\n error: cancelError,\n } = useApiAsync(\n (jobId: string) => cancelCrawlJobApi(jobId, optionsRef.current),\n (data) => data.success ?? true,\n false\n );\n const cancelJob = useCallback((jobId: string) => cancelJobInternal(jobId), [cancelJobInternal]);\n\n const {\n execute: getCrawledPagesInternal,\n loading: pagesLoading,\n error: pagesError,\n } = useApiAsync(\n (jobId: string) => getCrawledPagesApi(jobId, optionsRef.current),\n (data) => data.pages || [],\n []\n );\n const getCrawledPages = useCallback(\n (jobId: string) => getCrawledPagesInternal(jobId),\n [getCrawledPagesInternal]\n );\n\n const loading = listLoading || startLoading || statusLoading || cancelLoading || pagesLoading;\n const error = listError || startError || statusError || cancelError || pagesError;\n\n return useMemo(\n () => ({\n loading,\n error,\n listJobs,\n startJob,\n getJobStatus,\n cancelJob,\n getCrawledPages,\n }),\n [loading, error, listJobs, startJob, getJobStatus, cancelJob, getCrawledPages]\n );\n}\n","\"use client\";\n\n/**\n * Generic async operation hook with loading/error state management\n *\n * Reduces boilerplate for async operations by handling:\n * - Loading state with request counter (handles concurrent calls correctly)\n * - Error state management\n * - Automatic error extraction from ApiResponse or Error objects\n */\n\nimport { useState, useCallback, useRef } from \"react\";\nimport type { ApiResponse } from \"@elqnt/api-client\";\n\nexport interface UseAsyncOptions {\n /** Custom error handler - called in addition to setting error state */\n onError?: (error: string) => void;\n}\n\nexport interface UseAsyncReturn<TResult, TArgs extends unknown[]> {\n /** Execute the async function */\n execute: (...args: TArgs) => Promise<TResult>;\n /** Whether any request is currently in flight */\n loading: boolean;\n /** Last error message, or null if no error */\n error: string | null;\n /** Clear the current error */\n clearError: () => void;\n}\n\n/**\n * Extract data from an ApiResponse, handling errors\n * @returns [data, errorMessage]\n */\nfunction extractFromResponse<T, TResult>(\n response: ApiResponse<T>,\n extractor: (data: T) => TResult,\n defaultValue: TResult\n): [TResult, string | null] {\n if (response.error) {\n return [defaultValue, response.error];\n }\n if (!response.data) {\n return [defaultValue, null];\n }\n return [extractor(response.data), null];\n}\n\n/**\n * Create an async operation handler with loading and error states\n *\n * This hook wraps async functions to automatically manage:\n * - Loading state (using request counter for concurrent calls)\n * - Error state (extracted from ApiResponse or Error)\n *\n * @example\n * ```tsx\n * const { execute: fetchGraphs, loading, error } = useAsync(\n * async () => {\n * const response = await listGraphsApi(options);\n * if (response.error) throw new Error(response.error);\n * return response.data?.graphs || [];\n * }\n * );\n * ```\n */\nexport function useAsync<TResult, TArgs extends unknown[] = []>(\n asyncFn: (...args: TArgs) => Promise<TResult>,\n options?: UseAsyncOptions\n): UseAsyncReturn<TResult, TArgs> {\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const requestCount = useRef(0);\n\n const execute = useCallback(\n async (...args: TArgs): Promise<TResult> => {\n requestCount.current += 1;\n setLoading(true);\n setError(null);\n\n try {\n const result = await asyncFn(...args);\n return result;\n } catch (err) {\n const message = err instanceof Error ? err.message : \"An error occurred\";\n setError(message);\n options?.onError?.(message);\n throw err;\n } finally {\n requestCount.current -= 1;\n if (requestCount.current === 0) {\n setLoading(false);\n }\n }\n },\n [asyncFn, options]\n );\n\n const clearError = useCallback(() => {\n setError(null);\n }, []);\n\n return { execute, loading, error, clearError };\n}\n\n/**\n * Create an async operation handler specifically for ApiResponse-returning functions\n *\n * Unlike useAsync, this handles the ApiResponse unwrapping automatically:\n * - Extracts data using the provided extractor\n * - Sets error state from response.error\n * - Returns default value on error\n *\n * @example\n * ```tsx\n * const { execute: fetchGraphs, loading, error } = useApiAsync(\n * () => listGraphsApi(optionsRef.current),\n * (data) => data.graphs || [],\n * []\n * );\n * ```\n */\nexport function useApiAsync<TResponse, TResult, TArgs extends unknown[] = []>(\n asyncFn: (...args: TArgs) => Promise<ApiResponse<TResponse>>,\n extractor: (data: TResponse) => TResult,\n defaultValue: TResult,\n options?: UseAsyncOptions\n): UseAsyncReturn<TResult, TArgs> {\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const requestCount = useRef(0);\n\n const execute = useCallback(\n async (...args: TArgs): Promise<TResult> => {\n requestCount.current += 1;\n setLoading(true);\n setError(null);\n\n try {\n const response = await asyncFn(...args);\n const [result, errorMessage] = extractFromResponse(response, extractor, defaultValue);\n\n if (errorMessage) {\n setError(errorMessage);\n options?.onError?.(errorMessage);\n return defaultValue;\n }\n\n return result;\n } catch (err) {\n const message = err instanceof Error ? err.message : \"An error occurred\";\n setError(message);\n options?.onError?.(message);\n return defaultValue;\n } finally {\n requestCount.current -= 1;\n if (requestCount.current === 0) {\n setLoading(false);\n }\n }\n },\n [asyncFn, extractor, defaultValue, options]\n );\n\n const clearError = useCallback(() => {\n setError(null);\n }, []);\n\n return { execute, loading, error, clearError };\n}\n","\"use client\";\n\n/**\n * Hook to keep a mutable ref of options in sync\n *\n * This pattern allows callbacks created with useCallback to always access\n * the latest options without needing to re-create the callback when options change.\n *\n * This is useful for API hooks where:\n * - Options (baseUrl, orgId, graphId) may change over time\n * - Callbacks are memoized and shouldn't be recreated on every options change\n * - The callback should always use the current options when called\n */\n\nimport { useRef, useEffect } from \"react\";\n\n/**\n * Keep a mutable ref synchronized with the latest value\n *\n * @example\n * ```tsx\n * function useGraphs(options: ApiClientOptions) {\n * const optionsRef = useOptionsRef(options);\n *\n * const listGraphs = useCallback(async () => {\n * // Always uses latest options\n * return listGraphsApi(optionsRef.current);\n * }, []); // No dependency on options - callback never changes\n *\n * return { listGraphs };\n * }\n * ```\n */\nexport function useOptionsRef<T>(options: T): React.MutableRefObject<T> {\n const ref = useRef(options);\n\n useEffect(() => {\n ref.current = options;\n }, [options]);\n\n return ref;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../api/index.ts"],"sourcesContent":["/**\n * Knowledge Graph Browser API\n *\n * Browser-side API client for KG operations.\n * Uses @elqnt/api-client for HTTP requests with automatic token management.\n *\n * @example\n * ```ts\n * import { listGraphsApi, queryGraphApi } from \"@elqnt/kg/api\";\n *\n * const graphs = await listGraphsApi({ baseUrl, orgId });\n * const result = await queryGraphApi(query, { baseUrl, orgId, graphId });\n * ```\n *\n * @packageDocumentation\n */\n\nimport { browserApiRequest } from \"@elqnt/api-client/browser\";\nimport type { ApiResponse, ApiClientOptions } 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\";\n\n// =============================================================================\n// TYPES\n// =============================================================================\n\n/**\n * Options for KG API calls that may include a graph ID\n */\nexport interface KGApiOptions extends ApiClientOptions {\n /** Optional graph ID for graph-scoped operations */\n graphId?: string;\n}\n\n/**\n * Crawl job information\n */\nexport interface CrawlJob {\n id: string;\n baseUrl: string;\n depth: number;\n maxPages: number;\n status: string;\n pagesProcessed: number;\n createdAt: string;\n updatedAt: string;\n}\n\n/**\n * Response for listing crawl jobs\n */\nexport interface CrawlJobsListResponse {\n jobs: CrawlJob[];\n total: number;\n}\n\n/**\n * Response for crawl job status\n */\nexport interface CrawlJobStatusResponse {\n job: CrawlJob;\n success: boolean;\n}\n\n/**\n * Response for starting a crawl job\n */\nexport interface CrawlJobStartResponse {\n jobId: string;\n success: boolean;\n}\n\n/**\n * Response for listing crawled pages\n */\nexport interface CrawledPagesResponse {\n pages: Array<{\n url: string;\n title: string;\n status: string;\n processedAt: string;\n }>;\n total: number;\n}\n\n// =============================================================================\n// UTILITIES\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 * @param options - API client options (baseUrl, orgId)\n * @returns List of graphs\n *\n * @example\n * ```ts\n * const response = await listGraphsApi({ baseUrl: \"http://api-gateway:80\", orgId: \"org-123\" });\n * if (response.data?.graphs) {\n * console.log(\"Graphs:\", response.data.graphs);\n * }\n * ```\n */\nexport async function listGraphsApi(options: ApiClientOptions): Promise<ApiResponse<ListGraphsResult>> {\n return browserApiRequest(\"/api/v1/kg/graphs\", { method: \"GET\", ...options });\n}\n\n/**\n * Get a specific knowledge graph by ID\n *\n * @param graphId - The graph ID\n * @param options - API client options\n * @returns The graph details\n */\nexport async function getGraphApi(graphId: string, options: ApiClientOptions): Promise<ApiResponse<GetGraphResult>> {\n return browserApiRequest(`/api/v1/kg/graphs/${graphId}`, { method: \"GET\", ...options });\n}\n\n/**\n * Create a new knowledge graph\n *\n * @param graph - Graph creation request\n * @param options - API client options\n * @returns The created graph\n */\nexport async function createGraphApi(graph: CreateGraphRequest, options: ApiClientOptions): Promise<ApiResponse<CreateGraphResult>> {\n return browserApiRequest(\"/api/v1/kg/graphs\", { method: \"POST\", body: graph, ...options });\n}\n\n/**\n * Update an existing knowledge graph\n *\n * @param graphId - The graph ID to update\n * @param updates - Partial graph updates\n * @param options - API client options\n * @returns The updated graph\n */\nexport async function updateGraphApi(\n graphId: string,\n updates: Partial<Graph>,\n options: ApiClientOptions\n): Promise<ApiResponse<UpdateGraphResult>> {\n return browserApiRequest(`/api/v1/kg/graphs/${graphId}`, { method: \"PUT\", body: updates, ...options });\n}\n\n/**\n * Delete a knowledge graph\n *\n * @param graphId - The graph ID to delete\n * @param options - API client options\n * @returns Success/failure result\n */\nexport async function deleteGraphApi(graphId: string, options: ApiClientOptions): Promise<ApiResponse<DeleteGraphResult>> {\n return browserApiRequest(`/api/v1/kg/graphs/${graphId}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// QUERY & LABELS\n// =============================================================================\n\n/**\n * Query knowledge graph nodes\n *\n * @param query - The KG query parameters\n * @param options - API options including optional graphId\n * @returns Query results with matching nodes and edges\n *\n * @example\n * ```ts\n * const result = await queryGraphApi(\n * { label: \"Person\", fields: [], limit: 10, depth: 1, sortBy: \"\", sortOrder: \"\" },\n * { baseUrl, orgId, graphId }\n * );\n * ```\n */\nexport async function queryGraphApi(query: KGQuery, options: KGApiOptions): Promise<ApiResponse<KGQueryResult>> {\n return browserApiRequest(\"/api/v1/kg/query\", {\n method: \"POST\",\n body: query,\n timeout: 30000,\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Get all node labels in the knowledge graph\n *\n * @param options - API options including optional graphId\n * @returns List of labels with counts\n */\nexport async function getGraphLabelsApi(options: KGApiOptions): Promise<ApiResponse<{ labels: KGLabelInfo[] }>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/labels${queryString}`, { method: \"GET\", ...options });\n}\n\n// =============================================================================\n// NODES\n// =============================================================================\n\n/**\n * Get a specific KG node by ID\n *\n * @param nodeId - The node ID\n * @param options - API options including optional graphId\n * @returns The node details\n */\nexport async function getKGNodeApi(\n nodeId: string,\n options: KGApiOptions\n): Promise<ApiResponse<{ node: KGNode }>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/nodes/${nodeId}${queryString}`, { method: \"GET\", ...options });\n}\n\n/**\n * Ingest a new node into the knowledge graph\n *\n * @param node - Node ingest request\n * @param options - API options including optional graphId\n * @returns The created node ID\n */\nexport async function ingestKGNodeApi(\n node: KGNodeIngestRequest,\n options: KGApiOptions\n): Promise<ApiResponse<KGSyncIngestResponse>> {\n return browserApiRequest(\"/api/v1/kg/nodes\", {\n method: \"POST\",\n body: node,\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Update an existing KG node\n *\n * @param nodeId - The node ID to update\n * @param updates - Partial node updates\n * @param options - API options including optional graphId\n * @returns Success/failure result\n */\nexport async function updateKGNodeApi(\n nodeId: string,\n updates: Partial<KGNode>,\n options: KGApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(`/api/v1/kg/nodes/${nodeId}`, {\n method: \"PUT\",\n body: updates,\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Get connection statistics for a node\n *\n * @param nodeId - The node ID\n * @param edgeLabel - The edge label to filter by\n * @param options - API options including optional graphId\n * @returns Connection counts by label\n */\nexport async function getNodeConnectionStatsApi(\n nodeId: string,\n edgeLabel: string,\n options: KGApiOptions\n): Promise<ApiResponse<Record<string, number>>> {\n const queryString = buildQueryString({ edgeLabel, graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/nodes/${nodeId}/connections${queryString}`, { method: \"GET\", ...options });\n}\n\n// =============================================================================\n// DOCUMENTS\n// =============================================================================\n\n/**\n * Ingest a document into the knowledge graph\n *\n * @param document - Document to ingest\n * @param options - API options including optional graphId\n * @returns Success/failure result\n */\nexport async function ingestDocumentApi(\n document: { id: string; title: string; content: string; docUrl?: string; lang?: string },\n options: KGApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(\"/api/v1/kg/ingest\", {\n method: \"POST\",\n body: document,\n timeout: 120000,\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Delete a document from the knowledge graph\n *\n * @param documentId - The document ID to delete\n * @param options - API options including optional graphId\n * @returns Deletion result with counts\n */\nexport async function deleteKGDocumentApi(\n documentId: string,\n options: KGApiOptions\n): Promise<ApiResponse<DeleteDocumentResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/documents/${documentId}${queryString}`, { method: \"DELETE\", ...options });\n}\n\n/**\n * Optimize the knowledge graph\n *\n * @param options - API options including optional graphId\n * @returns Success/failure result\n */\nexport async function optimizeGraphApi(options: KGApiOptions): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n return browserApiRequest(\"/api/v1/kg/graph/optimize\", {\n method: \"POST\",\n body: {},\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n// =============================================================================\n// DESIGNER - NODES\n// =============================================================================\n\n/**\n * List all node definitions in the graph designer\n *\n * @param options - API options including optional graphId\n * @returns List of node definitions\n */\nexport async function listDesignerNodesApi(options: KGApiOptions): Promise<ApiResponse<GraphNodeResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/designer/nodes${queryString}`, { method: \"GET\", ...options });\n}\n\n/**\n * Get a specific node definition by label\n *\n * @param label - The node label\n * @param options - API options including optional graphId\n * @returns The node definition\n */\nexport async function getDesignerNodeApi(label: string, options: KGApiOptions): Promise<ApiResponse<GraphNodeResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/designer/nodes/${label}${queryString}`, { method: \"GET\", ...options });\n}\n\n/**\n * Create a new node definition\n *\n * @param node - Node definition to create\n * @param options - API options including optional graphId\n * @returns The created node definition\n */\nexport async function createDesignerNodeApi(\n node: Omit<GraphNodeDefinition, \"createdAt\" | \"updatedAt\">,\n options: KGApiOptions\n): Promise<ApiResponse<GraphNodeResponse>> {\n return browserApiRequest(\"/api/v1/kg/designer/nodes\", {\n method: \"POST\",\n body: { node },\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Update an existing node definition\n *\n * @param label - The node label to update\n * @param node - Partial node definition updates\n * @param options - API options including optional graphId\n * @returns The updated node definition\n */\nexport async function updateDesignerNodeApi(\n label: string,\n node: Partial<GraphNodeDefinition>,\n options: KGApiOptions\n): Promise<ApiResponse<GraphNodeResponse>> {\n return browserApiRequest(`/api/v1/kg/designer/nodes/${label}`, {\n method: \"PUT\",\n body: { node },\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Delete a node definition\n *\n * @param label - The node label to delete\n * @param options - API options including optional graphId\n * @returns Success/failure result\n */\nexport async function deleteDesignerNodeApi(\n label: string,\n options: KGApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/designer/nodes/${label}${queryString}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// DESIGNER - EDGES\n// =============================================================================\n\n/**\n * List all edge definitions in the graph designer\n *\n * @param options - API options including optional graphId\n * @returns List of edge definitions\n */\nexport async function listDesignerEdgesApi(options: KGApiOptions): Promise<ApiResponse<GraphEdgeResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/designer/edges${queryString}`, { method: \"GET\", ...options });\n}\n\n/**\n * Get a specific edge definition by label\n *\n * @param label - The edge label\n * @param options - API options including optional graphId\n * @returns The edge definition\n */\nexport async function getDesignerEdgeApi(label: string, options: KGApiOptions): Promise<ApiResponse<GraphEdgeResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/designer/edges/${label}${queryString}`, { method: \"GET\", ...options });\n}\n\n/**\n * Create a new edge definition\n *\n * @param edge - Edge definition to create\n * @param options - API options including optional graphId\n * @returns The created edge definition\n */\nexport async function createDesignerEdgeApi(\n edge: Omit<GraphEdgeDefinition, \"createdAt\" | \"updatedAt\">,\n options: KGApiOptions\n): Promise<ApiResponse<GraphEdgeResponse>> {\n return browserApiRequest(\"/api/v1/kg/designer/edges\", {\n method: \"POST\",\n body: { edge },\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Update an existing edge definition\n *\n * @param label - The edge label to update\n * @param edge - Partial edge definition updates\n * @param options - API options including optional graphId\n * @returns The updated edge definition\n */\nexport async function updateDesignerEdgeApi(\n label: string,\n edge: Partial<GraphEdgeDefinition>,\n options: KGApiOptions\n): Promise<ApiResponse<GraphEdgeResponse>> {\n return browserApiRequest(`/api/v1/kg/designer/edges/${label}`, {\n method: \"PUT\",\n body: { edge },\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Delete an edge definition\n *\n * @param label - The edge label to delete\n * @param options - API options including optional graphId\n * @returns Success/failure result\n */\nexport async function deleteDesignerEdgeApi(\n label: string,\n options: KGApiOptions\n): Promise<ApiResponse<{ success: boolean; metadata: ResponseMetadata }>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/designer/edges/${label}${queryString}`, { method: \"DELETE\", ...options });\n}\n\n// =============================================================================\n// CRAWL JOBS\n// =============================================================================\n\n/**\n * List crawl jobs\n *\n * @param options - API options including optional graphId, limit, offset, status\n * @returns List of crawl jobs with total count\n */\nexport async function listCrawlJobsApi(\n options: KGApiOptions & { 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 browserApiRequest(`/api/v1/kg/crawl/jobs${queryString}`, { method: \"GET\", ...options });\n}\n\n/**\n * Start a new crawl job\n *\n * @param params - Crawl job parameters\n * @param options - API options including optional graphId\n * @returns The created job ID\n */\nexport async function startCrawlJobApi(\n params: { baseUrl: string; depth: number; maxPages: number },\n options: KGApiOptions\n): Promise<ApiResponse<CrawlJobStartResponse>> {\n return browserApiRequest(\"/api/v1/kg/crawl/jobs\", {\n method: \"POST\",\n body: params,\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Get crawl job status\n *\n * @param jobId - The job ID\n * @param options - API options including optional graphId\n * @returns The job status\n */\nexport async function getCrawlJobStatusApi(\n jobId: string,\n options: KGApiOptions\n): Promise<ApiResponse<CrawlJobStatusResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/crawl/jobs/${jobId}${queryString}`, { method: \"GET\", ...options });\n}\n\n/**\n * Cancel a crawl job\n *\n * @param jobId - The job ID to cancel\n * @param options - API options including optional graphId\n * @returns The updated job status\n */\nexport async function cancelCrawlJobApi(\n jobId: string,\n options: KGApiOptions\n): Promise<ApiResponse<CrawlJobStatusResponse>> {\n return browserApiRequest(`/api/v1/kg/crawl/jobs/${jobId}/cancel`, {\n method: \"POST\",\n body: {},\n headers: buildHeaders(options.graphId),\n ...options,\n });\n}\n\n/**\n * Get pages crawled by a job\n *\n * @param jobId - The job ID\n * @param options - API options including optional graphId\n * @returns List of crawled pages\n */\nexport async function getCrawledPagesApi(\n jobId: string,\n options: KGApiOptions\n): Promise<ApiResponse<CrawledPagesResponse>> {\n const queryString = buildQueryString({ graphId: options.graphId });\n return browserApiRequest(`/api/v1/kg/crawl/jobs/${jobId}/pages${queryString}`, { method: \"GET\", ...options });\n}\n"],"mappings":";;;AAiBA,SAAS,yBAAyB;AA8FlC,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;AAoBA,eAAsB,cAAc,SAAmE;AACrG,SAAO,kBAAkB,qBAAqB,EAAE,QAAQ,OAAO,GAAG,QAAQ,CAAC;AA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