@elqnt/kg 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-OZU7UCOQ.mjs → chunk-EF7YJ7LL.mjs} +1 -1
- package/dist/chunk-EF7YJ7LL.mjs.map +1 -0
- package/dist/{chunk-AV4H2BKO.js → chunk-WEMVDZJ3.js} +1 -1
- package/dist/chunk-WEMVDZJ3.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/models/index.js +2 -2
- package/dist/models/index.mjs +1 -1
- package/dist/models/kg.d.mts +10 -2
- package/dist/models/kg.d.ts +10 -2
- package/dist/models/kg.js +2 -2
- package/dist/models/kg.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-AV4H2BKO.js.map +0 -1
- package/dist/chunk-OZU7UCOQ.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../models/kg.ts"],"sourcesContent":["// Code generated by tygo. DO NOT EDIT.\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: kg-models.go\n\n/**\n * Graph represents a knowledge graph within an organization\n */\nexport interface Graph {\n id: string;\n name: string;\n description: string;\n isDefault: boolean;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * CreateGraphRequest is the request to create a new graph\n */\nexport interface CreateGraphRequest {\n id?: string; // Optional: if provided, use as graph ID (must be valid UUID)\n name: string;\n description: string;\n}\n/**\n * CreateGraphResult is the response for creating a graph\n */\nexport interface CreateGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * GetGraphResult is the response for getting a single graph\n */\nexport interface GetGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * ListGraphsResult is the response for listing graphs\n */\nexport interface ListGraphsResult {\n graphs?: Graph[];\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * UpdateGraphResult is the response for updating a graph\n */\nexport interface UpdateGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * DeleteGraphResult is the response for deleting a graph\n */\nexport interface DeleteGraphResult {\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\nexport interface KGNode {\n id: string;\n label: string;\n fields: { [key: string]: any};\n relationships?: KGEdge[];\n score?: number /* float64 */;\n}\nexport interface KGEdge {\n id: string;\n label: string;\n fields: { [key: string]: any};\n from: string;\n to: string;\n}\n/**\n * KGNodeIngestRequest represents a request to ingest a node into the knowledge graph.\n * Note: graphId should be passed via NATS header, not in the body.\n */\nexport interface KGNodeIngestRequest {\n label: string;\n keyField?: string;\n reverseEdgeLabel?: string;\n fields: { [key: string]: any};\n edges?: KGEdgeIngestRequest[];\n duplicatePolicy?: DuplicatePolicy;\n generateEmbeddings?: boolean;\n embeddingsSource?: string;\n embeddingsFields?: string[];\n}\nexport type DuplicatePolicy = string;\nexport const DuplicatePolicyCreateIf: DuplicatePolicy = \"createIfNotExist\";\nexport const DuplicatePolicyIgnore: DuplicatePolicy = \"ignore\";\nexport const DuplicatePolicyReplace: DuplicatePolicy = \"replace\";\nexport const DuplicatePolicyFail: DuplicatePolicy = \"fail\";\nexport const DuplicatePolicyCreate: DuplicatePolicy = \"create\";\nexport interface KGEdgeIngestRequest {\n label: string;\n fields: { [key: string]: any};\n toLabel: string;\n toFieldKey: string;\n toFieldValue: any;\n createReciprocal: boolean;\n reciprocalLabel: string;\n allowEmbeddingsSearch?: boolean;\n}\n/**\n * KGQuery represents a query to the knowledge graph.\n * Note: graphId should be passed via NATS header, not in the body.\n */\nexport interface KGQuery {\n label: string;\n fields: KGFieldQuery[];\n limit: number /* int */;\n depth: number /* int */;\n sortBy: string;\n sortOrder: string;\n edges?: KGEdgeQuery[];\n embeddingsSource?: string;\n skipEmbedding?: boolean;\n summaryOnly?: boolean; // Filter out heavy fields (text, embeddings, etc.) for UI performance\n}\nexport interface KGFieldQuery {\n name: string;\n value: any;\n operator: KGFieldQueryOperator;\n}\nexport type KGFieldQueryOperator = string;\nexport const KGFieldQueryOperatorEqual: KGFieldQueryOperator = \"eq\";\nexport const KGFieldQueryOperatorNotEqual: KGFieldQueryOperator = \"neq\";\nexport const KGFieldQueryOperatorGreater: KGFieldQueryOperator = \"gt\";\nexport const KGFieldQueryOperatorLess: KGFieldQueryOperator = \"lt\";\nexport const KGFieldQueryOperatorGreaterOrEqual: KGFieldQueryOperator = \"gte\";\nexport const KGFieldQueryOperatorLessOrEqual: KGFieldQueryOperator = \"lte\";\nexport const KGFieldQueryOperatorLike: KGFieldQueryOperator = \"like\";\nexport const KGFieldQueryOperatorSimilar: KGFieldQueryOperator = \"similar\";\n/**\n * KGFieldQueryOperatorGreaterOrEqual KGFieldQueryOperator = \"gte\"\n * KGFieldQueryOperatorLessOrEqual KGFieldQueryOperator = \"lte\"\n */\nexport const KGFieldQueryOperatorIn: KGFieldQueryOperator = \"in\";\nexport const KGFieldQueryOperatorArrayContains: KGFieldQueryOperator = \"arrayContains\";\nexport type KGRelationshipDirection = string;\nexport const KGRelationshipDirectionIncoming: KGRelationshipDirection = \"incoming\";\nexport const KGRelationshipDirectionOutgoing: KGRelationshipDirection = \"outgoing\";\nexport interface KGEdgeQuery {\n label: string;\n direction: 'incoming' | 'outgoing';\n fields?: { [key: string]: any};\n /**\n * FromLabel string `json:\"fromLabel\"`\n * FromFieldKey string `json:\"fromFieldKey\"`\n * FromValue interface{} `json:\"fromValue\"`\n */\n toLabel: string;\n toFieldKey: string;\n toFieldValue: any;\n}\nexport interface KGQueryResult {\n nodes: KGNode[];\n edges: KGEdge[];\n}\nexport interface KGLabelInfo {\n label: string;\n count: number /* uint64 */;\n}\nexport interface KGPropertyInfo {\n property: string;\n count: number /* uint64 */;\n}\nexport interface KGPLabelSchema {\n label: string;\n keys: string[];\n}\nexport interface KGArticle {\n id: string;\n title: string;\n content: string;\n lang?: string;\n docUrl?: string;\n paragraphs?: string;\n}\nexport interface KGPropertyFilter {\n property: string;\n value: string;\n}\nexport interface KGPropertyFilterRequest {\n label: string;\n filters: KGPropertyFilter[];\n}\nexport interface DeleteDocumentRequest {\n documentId: string;\n}\nexport interface DeleteDocumentResponse {\n success: boolean;\n deletedNodes: { [key: string]: number /* int */};\n totalDeleted: number /* int */;\n error?: string;\n}\n/**\n * KGSyncJob represents a sync job record in the database\n */\nexport interface KGSyncJob {\n id: string;\n title: string;\n stats: { [key: string]: any};\n startTime: string;\n endTime: string;\n updatedAt?: string;\n}\n/**\n * KGSyncJobUpdateRequest is used to insert or update a sync job\n */\nexport interface KGSyncJobUpdateRequest {\n id: string;\n title: string;\n stats: { [key: string]: any};\n startTime: string;\n endTime: string;\n}\nexport interface KGSyncJobUpdateResponse {\n jobId: string;\n metadata: ResponseMetadata;\n}\nexport interface KGSyncJobListResponse {\n jobs: KGSyncJob[];\n metadata: ResponseMetadata;\n}\n/**\n * KGSyncJobListRequest is used to list sync jobs with filters\n */\nexport interface KGSyncJobListRequest {\n limit?: number /* int */;\n offset?: number /* int */;\n startFrom?: string;\n endTo?: string;\n}\n/**\n * KGSyncIngestResponse is the response for synchronous single node ingestion\n */\nexport interface KGSyncIngestResponse {\n success: boolean;\n nodeId?: string;\n error?: string;\n metadata: ResponseMetadata;\n}\n/**\n * KGBatchSyncIngestResponse is the response for synchronous batch node ingestion\n */\nexport interface KGBatchSyncIngestResponse {\n success: boolean;\n ingestedCount: number /* int */;\n nodeIds?: string[];\n errors?: string[];\n metadata: ResponseMetadata;\n}\n"],"mappings":";AAmGO,IAAM,0BAA2C;AACjD,IAAM,wBAAyC;AAC/C,IAAM,yBAA0C;AAChD,IAAM,sBAAuC;AAC7C,IAAM,wBAAyC;AAiC/C,IAAM,4BAAkD;AACxD,IAAM,+BAAqD;AAC3D,IAAM,8BAAoD;AAC1D,IAAM,2BAAiD;AACvD,IAAM,qCAA2D;AACjE,IAAM,kCAAwD;AAC9D,IAAM,2BAAiD;AACvD,IAAM,8BAAoD;AAK1D,IAAM,yBAA+C;AACrD,IAAM,oCAA0D;AAEhE,IAAM,kCAA2D;AACjE,IAAM,kCAA2D;","names":[]}
|
|
@@ -36,4 +36,4 @@ var KGRelationshipDirectionOutgoing = "outgoing";
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
exports.DuplicatePolicyCreateIf = DuplicatePolicyCreateIf; exports.DuplicatePolicyIgnore = DuplicatePolicyIgnore; exports.DuplicatePolicyReplace = DuplicatePolicyReplace; exports.DuplicatePolicyFail = DuplicatePolicyFail; exports.DuplicatePolicyCreate = DuplicatePolicyCreate; exports.KGFieldQueryOperatorEqual = KGFieldQueryOperatorEqual; exports.KGFieldQueryOperatorNotEqual = KGFieldQueryOperatorNotEqual; exports.KGFieldQueryOperatorGreater = KGFieldQueryOperatorGreater; exports.KGFieldQueryOperatorLess = KGFieldQueryOperatorLess; exports.KGFieldQueryOperatorGreaterOrEqual = KGFieldQueryOperatorGreaterOrEqual; exports.KGFieldQueryOperatorLessOrEqual = KGFieldQueryOperatorLessOrEqual; exports.KGFieldQueryOperatorLike = KGFieldQueryOperatorLike; exports.KGFieldQueryOperatorSimilar = KGFieldQueryOperatorSimilar; exports.KGFieldQueryOperatorIn = KGFieldQueryOperatorIn; exports.KGFieldQueryOperatorArrayContains = KGFieldQueryOperatorArrayContains; exports.KGRelationshipDirectionIncoming = KGRelationshipDirectionIncoming; exports.KGRelationshipDirectionOutgoing = KGRelationshipDirectionOutgoing;
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-WEMVDZJ3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-WEMVDZJ3.js","../models/kg.ts"],"names":[],"mappings":"AAAA;ACmGO,IAAM,wBAAA,EAA2C,kBAAA;AACjD,IAAM,sBAAA,EAAyC,QAAA;AAC/C,IAAM,uBAAA,EAA0C,SAAA;AAChD,IAAM,oBAAA,EAAuC,MAAA;AAC7C,IAAM,sBAAA,EAAyC,QAAA;AAiC/C,IAAM,0BAAA,EAAkD,IAAA;AACxD,IAAM,6BAAA,EAAqD,KAAA;AAC3D,IAAM,4BAAA,EAAoD,IAAA;AAC1D,IAAM,yBAAA,EAAiD,IAAA;AACvD,IAAM,mCAAA,EAA2D,KAAA;AACjE,IAAM,gCAAA,EAAwD,KAAA;AAC9D,IAAM,yBAAA,EAAiD,MAAA;AACvD,IAAM,4BAAA,EAAoD,SAAA;AAK1D,IAAM,uBAAA,EAA+C,IAAA;AACrD,IAAM,kCAAA,EAA0D,eAAA;AAEhE,IAAM,gCAAA,EAA2D,UAAA;AACjE,IAAM,gCAAA,EAA2D,UAAA;ADtIxE;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,klCAAC","file":"/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-WEMVDZJ3.js","sourcesContent":[null,"// Code generated by tygo. DO NOT EDIT.\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: kg-models.go\n\n/**\n * Graph represents a knowledge graph within an organization\n */\nexport interface Graph {\n id: string;\n name: string;\n description: string;\n isDefault: boolean;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * CreateGraphRequest is the request to create a new graph\n */\nexport interface CreateGraphRequest {\n id?: string; // Optional: if provided, use as graph ID (must be valid UUID)\n name: string;\n description: string;\n}\n/**\n * CreateGraphResult is the response for creating a graph\n */\nexport interface CreateGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * GetGraphResult is the response for getting a single graph\n */\nexport interface GetGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * ListGraphsResult is the response for listing graphs\n */\nexport interface ListGraphsResult {\n graphs?: Graph[];\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * UpdateGraphResult is the response for updating a graph\n */\nexport interface UpdateGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * DeleteGraphResult is the response for deleting a graph\n */\nexport interface DeleteGraphResult {\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\nexport interface KGNode {\n id: string;\n label: string;\n fields: { [key: string]: any};\n relationships?: KGEdge[];\n score?: number /* float64 */;\n}\nexport interface KGEdge {\n id: string;\n label: string;\n fields: { [key: string]: any};\n from: string;\n to: string;\n}\n/**\n * KGNodeIngestRequest represents a request to ingest a node into the knowledge graph.\n * Note: graphId should be passed via NATS header, not in the body.\n */\nexport interface KGNodeIngestRequest {\n label: string;\n keyField?: string;\n reverseEdgeLabel?: string;\n fields: { [key: string]: any};\n edges?: KGEdgeIngestRequest[];\n duplicatePolicy?: DuplicatePolicy;\n generateEmbeddings?: boolean;\n embeddingsSource?: string;\n embeddingsFields?: string[];\n}\nexport type DuplicatePolicy = string;\nexport const DuplicatePolicyCreateIf: DuplicatePolicy = \"createIfNotExist\";\nexport const DuplicatePolicyIgnore: DuplicatePolicy = \"ignore\";\nexport const DuplicatePolicyReplace: DuplicatePolicy = \"replace\";\nexport const DuplicatePolicyFail: DuplicatePolicy = \"fail\";\nexport const DuplicatePolicyCreate: DuplicatePolicy = \"create\";\nexport interface KGEdgeIngestRequest {\n label: string;\n fields: { [key: string]: any};\n toLabel: string;\n toFieldKey: string;\n toFieldValue: any;\n createReciprocal: boolean;\n reciprocalLabel: string;\n allowEmbeddingsSearch?: boolean;\n}\n/**\n * KGQuery represents a query to the knowledge graph.\n * Note: graphId should be passed via NATS header, not in the body.\n */\nexport interface KGQuery {\n label: string;\n fields: KGFieldQuery[];\n limit: number /* int */;\n depth: number /* int */;\n sortBy: string;\n sortOrder: string;\n edges?: KGEdgeQuery[];\n embeddingsSource?: string;\n skipEmbedding?: boolean;\n summaryOnly?: boolean; // Filter out heavy fields (text, embeddings, etc.) for UI performance\n}\nexport interface KGFieldQuery {\n name: string;\n value: any;\n operator: KGFieldQueryOperator;\n}\nexport type KGFieldQueryOperator = string;\nexport const KGFieldQueryOperatorEqual: KGFieldQueryOperator = \"eq\";\nexport const KGFieldQueryOperatorNotEqual: KGFieldQueryOperator = \"neq\";\nexport const KGFieldQueryOperatorGreater: KGFieldQueryOperator = \"gt\";\nexport const KGFieldQueryOperatorLess: KGFieldQueryOperator = \"lt\";\nexport const KGFieldQueryOperatorGreaterOrEqual: KGFieldQueryOperator = \"gte\";\nexport const KGFieldQueryOperatorLessOrEqual: KGFieldQueryOperator = \"lte\";\nexport const KGFieldQueryOperatorLike: KGFieldQueryOperator = \"like\";\nexport const KGFieldQueryOperatorSimilar: KGFieldQueryOperator = \"similar\";\n/**\n * KGFieldQueryOperatorGreaterOrEqual KGFieldQueryOperator = \"gte\"\n * KGFieldQueryOperatorLessOrEqual KGFieldQueryOperator = \"lte\"\n */\nexport const KGFieldQueryOperatorIn: KGFieldQueryOperator = \"in\";\nexport const KGFieldQueryOperatorArrayContains: KGFieldQueryOperator = \"arrayContains\";\nexport type KGRelationshipDirection = string;\nexport const KGRelationshipDirectionIncoming: KGRelationshipDirection = \"incoming\";\nexport const KGRelationshipDirectionOutgoing: KGRelationshipDirection = \"outgoing\";\nexport interface KGEdgeQuery {\n label: string;\n direction: 'incoming' | 'outgoing';\n fields?: { [key: string]: any};\n /**\n * FromLabel string `json:\"fromLabel\"`\n * FromFieldKey string `json:\"fromFieldKey\"`\n * FromValue interface{} `json:\"fromValue\"`\n */\n toLabel: string;\n toFieldKey: string;\n toFieldValue: any;\n}\nexport interface KGQueryResult {\n nodes: KGNode[];\n edges: KGEdge[];\n}\nexport interface KGLabelInfo {\n label: string;\n count: number /* uint64 */;\n}\nexport interface KGPropertyInfo {\n property: string;\n count: number /* uint64 */;\n}\nexport interface KGPLabelSchema {\n label: string;\n keys: string[];\n}\nexport interface KGArticle {\n id: string;\n title: string;\n content: string;\n lang?: string;\n docUrl?: string;\n paragraphs?: string;\n}\nexport interface KGPropertyFilter {\n property: string;\n value: string;\n}\nexport interface KGPropertyFilterRequest {\n label: string;\n filters: KGPropertyFilter[];\n}\nexport interface DeleteDocumentRequest {\n documentId: string;\n}\nexport interface DeleteDocumentResponse {\n success: boolean;\n deletedNodes: { [key: string]: number /* int */};\n totalDeleted: number /* int */;\n error?: string;\n}\n/**\n * KGSyncJob represents a sync job record in the database\n */\nexport interface KGSyncJob {\n id: string;\n title: string;\n stats: { [key: string]: any};\n startTime: string;\n endTime: string;\n updatedAt?: string;\n}\n/**\n * KGSyncJobUpdateRequest is used to insert or update a sync job\n */\nexport interface KGSyncJobUpdateRequest {\n id: string;\n title: string;\n stats: { [key: string]: any};\n startTime: string;\n endTime: string;\n}\nexport interface KGSyncJobUpdateResponse {\n jobId: string;\n metadata: ResponseMetadata;\n}\nexport interface KGSyncJobListResponse {\n jobs: KGSyncJob[];\n metadata: ResponseMetadata;\n}\n/**\n * KGSyncJobListRequest is used to list sync jobs with filters\n */\nexport interface KGSyncJobListRequest {\n limit?: number /* int */;\n offset?: number /* int */;\n startFrom?: string;\n endTo?: string;\n}\n/**\n * KGSyncIngestResponse is the response for synchronous single node ingestion\n */\nexport interface KGSyncIngestResponse {\n success: boolean;\n nodeId?: string;\n error?: string;\n metadata: ResponseMetadata;\n}\n/**\n * KGBatchSyncIngestResponse is the response for synchronous batch node ingestion\n */\nexport interface KGBatchSyncIngestResponse {\n success: boolean;\n ingestedCount: number /* int */;\n nodeIds?: string[];\n errors?: string[];\n metadata: ResponseMetadata;\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var _chunk2OYIMLE4js = require('./chunk-2OYIMLE4.js');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkWEMVDZJ3js = require('./chunk-WEMVDZJ3.js');
|
|
45
45
|
|
|
46
46
|
// consts.ts
|
|
47
47
|
var Test = "hi";
|
|
@@ -477,5 +477,5 @@ var useKnowledgeGraphContext = () => {
|
|
|
477
477
|
|
|
478
478
|
|
|
479
479
|
|
|
480
|
-
exports.DuplicatePolicyCreate =
|
|
480
|
+
exports.DuplicatePolicyCreate = _chunkWEMVDZJ3js.DuplicatePolicyCreate; exports.DuplicatePolicyCreateIf = _chunkWEMVDZJ3js.DuplicatePolicyCreateIf; exports.DuplicatePolicyFail = _chunkWEMVDZJ3js.DuplicatePolicyFail; exports.DuplicatePolicyIgnore = _chunkWEMVDZJ3js.DuplicatePolicyIgnore; exports.DuplicatePolicyReplace = _chunkWEMVDZJ3js.DuplicatePolicyReplace; exports.KGDBCreate = _chunk2OYIMLE4js.KGDBCreate; exports.KGDesignerEdgeCreate = _chunk2OYIMLE4js.KGDesignerEdgeCreate; exports.KGDesignerEdgeDelete = _chunk2OYIMLE4js.KGDesignerEdgeDelete; exports.KGDesignerEdgeGet = _chunk2OYIMLE4js.KGDesignerEdgeGet; exports.KGDesignerEdgeList = _chunk2OYIMLE4js.KGDesignerEdgeList; exports.KGDesignerEdgeUpdate = _chunk2OYIMLE4js.KGDesignerEdgeUpdate; exports.KGDesignerNodeCreate = _chunk2OYIMLE4js.KGDesignerNodeCreate; exports.KGDesignerNodeDelete = _chunk2OYIMLE4js.KGDesignerNodeDelete; exports.KGDesignerNodeGet = _chunk2OYIMLE4js.KGDesignerNodeGet; exports.KGDesignerNodeList = _chunk2OYIMLE4js.KGDesignerNodeList; exports.KGDesignerNodeUpdate = _chunk2OYIMLE4js.KGDesignerNodeUpdate; exports.KGDocumentDelete = _chunk2OYIMLE4js.KGDocumentDelete; exports.KGFieldQueryOperatorArrayContains = _chunkWEMVDZJ3js.KGFieldQueryOperatorArrayContains; exports.KGFieldQueryOperatorEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorEqual; exports.KGFieldQueryOperatorGreater = _chunkWEMVDZJ3js.KGFieldQueryOperatorGreater; exports.KGFieldQueryOperatorGreaterOrEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorGreaterOrEqual; exports.KGFieldQueryOperatorIn = _chunkWEMVDZJ3js.KGFieldQueryOperatorIn; exports.KGFieldQueryOperatorLess = _chunkWEMVDZJ3js.KGFieldQueryOperatorLess; exports.KGFieldQueryOperatorLessOrEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorLessOrEqual; exports.KGFieldQueryOperatorLike = _chunkWEMVDZJ3js.KGFieldQueryOperatorLike; exports.KGFieldQueryOperatorNotEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorNotEqual; exports.KGFieldQueryOperatorSimilar = _chunkWEMVDZJ3js.KGFieldQueryOperatorSimilar; exports.KGGraphCreate = _chunk2OYIMLE4js.KGGraphCreate; exports.KGGraphDelete = _chunk2OYIMLE4js.KGGraphDelete; exports.KGGraphGet = _chunk2OYIMLE4js.KGGraphGet; exports.KGGraphList = _chunk2OYIMLE4js.KGGraphList; exports.KGGraphOptimize = _chunk2OYIMLE4js.KGGraphOptimize; exports.KGGraphUpdate = _chunk2OYIMLE4js.KGGraphUpdate; exports.KGIngestBatchSync = _chunk2OYIMLE4js.KGIngestBatchSync; exports.KGIngestNodeSync = _chunk2OYIMLE4js.KGIngestNodeSync; exports.KGRelationshipDirectionIncoming = _chunkWEMVDZJ3js.KGRelationshipDirectionIncoming; exports.KGRelationshipDirectionOutgoing = _chunkWEMVDZJ3js.KGRelationshipDirectionOutgoing; exports.KGSyncJobList = _chunk2OYIMLE4js.KGSyncJobList; exports.KGSyncJobUpdate = _chunk2OYIMLE4js.KGSyncJobUpdate; exports.KnowledgeGraphContext = KnowledgeGraphContext; exports.KnowledgeGraphContextProvider = KnowledgeGraphContextProvider; exports.Test = Test; exports.useKnowledgeGraph = useKnowledgeGraph; exports.useKnowledgeGraphAnalytics = useKnowledgeGraphAnalytics; exports.useKnowledgeGraphContext = useKnowledgeGraphContext;
|
|
481
481
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
package/dist/models/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var _chunk2OYIMLE4js = require('../chunk-2OYIMLE4.js');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkWEMVDZJ3js = require('../chunk-WEMVDZJ3.js');
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
@@ -82,5 +82,5 @@ var _chunkAV4H2BKOjs = require('../chunk-AV4H2BKO.js');
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
exports.DuplicatePolicyCreate =
|
|
85
|
+
exports.DuplicatePolicyCreate = _chunkWEMVDZJ3js.DuplicatePolicyCreate; exports.DuplicatePolicyCreateIf = _chunkWEMVDZJ3js.DuplicatePolicyCreateIf; exports.DuplicatePolicyFail = _chunkWEMVDZJ3js.DuplicatePolicyFail; exports.DuplicatePolicyIgnore = _chunkWEMVDZJ3js.DuplicatePolicyIgnore; exports.DuplicatePolicyReplace = _chunkWEMVDZJ3js.DuplicatePolicyReplace; exports.KGDBCreate = _chunk2OYIMLE4js.KGDBCreate; exports.KGDesignerEdgeCreate = _chunk2OYIMLE4js.KGDesignerEdgeCreate; exports.KGDesignerEdgeDelete = _chunk2OYIMLE4js.KGDesignerEdgeDelete; exports.KGDesignerEdgeGet = _chunk2OYIMLE4js.KGDesignerEdgeGet; exports.KGDesignerEdgeList = _chunk2OYIMLE4js.KGDesignerEdgeList; exports.KGDesignerEdgeUpdate = _chunk2OYIMLE4js.KGDesignerEdgeUpdate; exports.KGDesignerNodeCreate = _chunk2OYIMLE4js.KGDesignerNodeCreate; exports.KGDesignerNodeDelete = _chunk2OYIMLE4js.KGDesignerNodeDelete; exports.KGDesignerNodeGet = _chunk2OYIMLE4js.KGDesignerNodeGet; exports.KGDesignerNodeList = _chunk2OYIMLE4js.KGDesignerNodeList; exports.KGDesignerNodeUpdate = _chunk2OYIMLE4js.KGDesignerNodeUpdate; exports.KGDocumentDelete = _chunk2OYIMLE4js.KGDocumentDelete; exports.KGFieldQueryOperatorArrayContains = _chunkWEMVDZJ3js.KGFieldQueryOperatorArrayContains; exports.KGFieldQueryOperatorEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorEqual; exports.KGFieldQueryOperatorGreater = _chunkWEMVDZJ3js.KGFieldQueryOperatorGreater; exports.KGFieldQueryOperatorGreaterOrEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorGreaterOrEqual; exports.KGFieldQueryOperatorIn = _chunkWEMVDZJ3js.KGFieldQueryOperatorIn; exports.KGFieldQueryOperatorLess = _chunkWEMVDZJ3js.KGFieldQueryOperatorLess; exports.KGFieldQueryOperatorLessOrEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorLessOrEqual; exports.KGFieldQueryOperatorLike = _chunkWEMVDZJ3js.KGFieldQueryOperatorLike; exports.KGFieldQueryOperatorNotEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorNotEqual; exports.KGFieldQueryOperatorSimilar = _chunkWEMVDZJ3js.KGFieldQueryOperatorSimilar; exports.KGGraphCreate = _chunk2OYIMLE4js.KGGraphCreate; exports.KGGraphDelete = _chunk2OYIMLE4js.KGGraphDelete; exports.KGGraphGet = _chunk2OYIMLE4js.KGGraphGet; exports.KGGraphList = _chunk2OYIMLE4js.KGGraphList; exports.KGGraphOptimize = _chunk2OYIMLE4js.KGGraphOptimize; exports.KGGraphUpdate = _chunk2OYIMLE4js.KGGraphUpdate; exports.KGIngestBatchSync = _chunk2OYIMLE4js.KGIngestBatchSync; exports.KGIngestNodeSync = _chunk2OYIMLE4js.KGIngestNodeSync; exports.KGRelationshipDirectionIncoming = _chunkWEMVDZJ3js.KGRelationshipDirectionIncoming; exports.KGRelationshipDirectionOutgoing = _chunkWEMVDZJ3js.KGRelationshipDirectionOutgoing; exports.KGSyncJobList = _chunk2OYIMLE4js.KGSyncJobList; exports.KGSyncJobUpdate = _chunk2OYIMLE4js.KGSyncJobUpdate;
|
|
86
86
|
//# sourceMappingURL=index.js.map
|
package/dist/models/index.mjs
CHANGED
package/dist/models/kg.d.mts
CHANGED
|
@@ -15,6 +15,7 @@ interface Graph {
|
|
|
15
15
|
* CreateGraphRequest is the request to create a new graph
|
|
16
16
|
*/
|
|
17
17
|
interface CreateGraphRequest {
|
|
18
|
+
id?: string;
|
|
18
19
|
name: string;
|
|
19
20
|
description: string;
|
|
20
21
|
}
|
|
@@ -80,8 +81,11 @@ interface KGEdge {
|
|
|
80
81
|
from: string;
|
|
81
82
|
to: string;
|
|
82
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* KGNodeIngestRequest represents a request to ingest a node into the knowledge graph.
|
|
86
|
+
* Note: graphId should be passed via NATS header, not in the body.
|
|
87
|
+
*/
|
|
83
88
|
interface KGNodeIngestRequest {
|
|
84
|
-
graphId?: string;
|
|
85
89
|
label: string;
|
|
86
90
|
keyField?: string;
|
|
87
91
|
reverseEdgeLabel?: string;
|
|
@@ -112,8 +116,11 @@ interface KGEdgeIngestRequest {
|
|
|
112
116
|
reciprocalLabel: string;
|
|
113
117
|
allowEmbeddingsSearch?: boolean;
|
|
114
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* KGQuery represents a query to the knowledge graph.
|
|
121
|
+
* Note: graphId should be passed via NATS header, not in the body.
|
|
122
|
+
*/
|
|
115
123
|
interface KGQuery {
|
|
116
|
-
graphId?: string;
|
|
117
124
|
label: string;
|
|
118
125
|
fields: KGFieldQuery[];
|
|
119
126
|
limit: number;
|
|
@@ -123,6 +130,7 @@ interface KGQuery {
|
|
|
123
130
|
edges?: KGEdgeQuery[];
|
|
124
131
|
embeddingsSource?: string;
|
|
125
132
|
skipEmbedding?: boolean;
|
|
133
|
+
summaryOnly?: boolean;
|
|
126
134
|
}
|
|
127
135
|
interface KGFieldQuery {
|
|
128
136
|
name: string;
|
package/dist/models/kg.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ interface Graph {
|
|
|
15
15
|
* CreateGraphRequest is the request to create a new graph
|
|
16
16
|
*/
|
|
17
17
|
interface CreateGraphRequest {
|
|
18
|
+
id?: string;
|
|
18
19
|
name: string;
|
|
19
20
|
description: string;
|
|
20
21
|
}
|
|
@@ -80,8 +81,11 @@ interface KGEdge {
|
|
|
80
81
|
from: string;
|
|
81
82
|
to: string;
|
|
82
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* KGNodeIngestRequest represents a request to ingest a node into the knowledge graph.
|
|
86
|
+
* Note: graphId should be passed via NATS header, not in the body.
|
|
87
|
+
*/
|
|
83
88
|
interface KGNodeIngestRequest {
|
|
84
|
-
graphId?: string;
|
|
85
89
|
label: string;
|
|
86
90
|
keyField?: string;
|
|
87
91
|
reverseEdgeLabel?: string;
|
|
@@ -112,8 +116,11 @@ interface KGEdgeIngestRequest {
|
|
|
112
116
|
reciprocalLabel: string;
|
|
113
117
|
allowEmbeddingsSearch?: boolean;
|
|
114
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* KGQuery represents a query to the knowledge graph.
|
|
121
|
+
* Note: graphId should be passed via NATS header, not in the body.
|
|
122
|
+
*/
|
|
115
123
|
interface KGQuery {
|
|
116
|
-
graphId?: string;
|
|
117
124
|
label: string;
|
|
118
125
|
fields: KGFieldQuery[];
|
|
119
126
|
limit: number;
|
|
@@ -123,6 +130,7 @@ interface KGQuery {
|
|
|
123
130
|
edges?: KGEdgeQuery[];
|
|
124
131
|
embeddingsSource?: string;
|
|
125
132
|
skipEmbedding?: boolean;
|
|
133
|
+
summaryOnly?: boolean;
|
|
126
134
|
}
|
|
127
135
|
interface KGFieldQuery {
|
|
128
136
|
name: string;
|
package/dist/models/kg.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkWEMVDZJ3js = require('../chunk-WEMVDZJ3.js');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -35,5 +35,5 @@ var _chunkAV4H2BKOjs = require('../chunk-AV4H2BKO.js');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.DuplicatePolicyCreate =
|
|
38
|
+
exports.DuplicatePolicyCreate = _chunkWEMVDZJ3js.DuplicatePolicyCreate; exports.DuplicatePolicyCreateIf = _chunkWEMVDZJ3js.DuplicatePolicyCreateIf; exports.DuplicatePolicyFail = _chunkWEMVDZJ3js.DuplicatePolicyFail; exports.DuplicatePolicyIgnore = _chunkWEMVDZJ3js.DuplicatePolicyIgnore; exports.DuplicatePolicyReplace = _chunkWEMVDZJ3js.DuplicatePolicyReplace; exports.KGFieldQueryOperatorArrayContains = _chunkWEMVDZJ3js.KGFieldQueryOperatorArrayContains; exports.KGFieldQueryOperatorEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorEqual; exports.KGFieldQueryOperatorGreater = _chunkWEMVDZJ3js.KGFieldQueryOperatorGreater; exports.KGFieldQueryOperatorGreaterOrEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorGreaterOrEqual; exports.KGFieldQueryOperatorIn = _chunkWEMVDZJ3js.KGFieldQueryOperatorIn; exports.KGFieldQueryOperatorLess = _chunkWEMVDZJ3js.KGFieldQueryOperatorLess; exports.KGFieldQueryOperatorLessOrEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorLessOrEqual; exports.KGFieldQueryOperatorLike = _chunkWEMVDZJ3js.KGFieldQueryOperatorLike; exports.KGFieldQueryOperatorNotEqual = _chunkWEMVDZJ3js.KGFieldQueryOperatorNotEqual; exports.KGFieldQueryOperatorSimilar = _chunkWEMVDZJ3js.KGFieldQueryOperatorSimilar; exports.KGRelationshipDirectionIncoming = _chunkWEMVDZJ3js.KGRelationshipDirectionIncoming; exports.KGRelationshipDirectionOutgoing = _chunkWEMVDZJ3js.KGRelationshipDirectionOutgoing;
|
|
39
39
|
//# sourceMappingURL=kg.js.map
|
package/dist/models/kg.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-AV4H2BKO.js","../models/kg.ts"],"names":[],"mappings":"AAAA;AC+FO,IAAM,wBAAA,EAA2C,kBAAA;AACjD,IAAM,sBAAA,EAAyC,QAAA;AAC/C,IAAM,uBAAA,EAA0C,SAAA;AAChD,IAAM,oBAAA,EAAuC,MAAA;AAC7C,IAAM,sBAAA,EAAyC,QAAA;AA6B/C,IAAM,0BAAA,EAAkD,IAAA;AACxD,IAAM,6BAAA,EAAqD,KAAA;AAC3D,IAAM,4BAAA,EAAoD,IAAA;AAC1D,IAAM,yBAAA,EAAiD,IAAA;AACvD,IAAM,mCAAA,EAA2D,KAAA;AACjE,IAAM,gCAAA,EAAwD,KAAA;AAC9D,IAAM,yBAAA,EAAiD,MAAA;AACvD,IAAM,4BAAA,EAAoD,SAAA;AAK1D,IAAM,uBAAA,EAA+C,IAAA;AACrD,IAAM,kCAAA,EAA0D,eAAA;AAEhE,IAAM,gCAAA,EAA2D,UAAA;AACjE,IAAM,gCAAA,EAA2D,UAAA;AD9HxE;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,klCAAC","file":"/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-AV4H2BKO.js","sourcesContent":[null,"// Code generated by tygo. DO NOT EDIT.\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: kg-models.go\n\n/**\n * Graph represents a knowledge graph within an organization\n */\nexport interface Graph {\n id: string;\n name: string;\n description: string;\n isDefault: boolean;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * CreateGraphRequest is the request to create a new graph\n */\nexport interface CreateGraphRequest {\n name: string;\n description: string;\n}\n/**\n * CreateGraphResult is the response for creating a graph\n */\nexport interface CreateGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * GetGraphResult is the response for getting a single graph\n */\nexport interface GetGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * ListGraphsResult is the response for listing graphs\n */\nexport interface ListGraphsResult {\n graphs?: Graph[];\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * UpdateGraphResult is the response for updating a graph\n */\nexport interface UpdateGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * DeleteGraphResult is the response for deleting a graph\n */\nexport interface DeleteGraphResult {\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\nexport interface KGNode {\n id: string;\n label: string;\n fields: { [key: string]: any};\n relationships?: KGEdge[];\n score?: number /* float64 */;\n}\nexport interface KGEdge {\n id: string;\n label: string;\n fields: { [key: string]: any};\n from: string;\n to: string;\n}\nexport interface KGNodeIngestRequest {\n graphId?: string; // Optional - defaults to \"default\" for backwards compatibility\n label: string;\n keyField?: string;\n reverseEdgeLabel?: string;\n fields: { [key: string]: any};\n edges?: KGEdgeIngestRequest[];\n duplicatePolicy?: DuplicatePolicy;\n generateEmbeddings?: boolean;\n embeddingsSource?: string;\n embeddingsFields?: string[];\n}\nexport type DuplicatePolicy = string;\nexport const DuplicatePolicyCreateIf: DuplicatePolicy = \"createIfNotExist\";\nexport const DuplicatePolicyIgnore: DuplicatePolicy = \"ignore\";\nexport const DuplicatePolicyReplace: DuplicatePolicy = \"replace\";\nexport const DuplicatePolicyFail: DuplicatePolicy = \"fail\";\nexport const DuplicatePolicyCreate: DuplicatePolicy = \"create\";\nexport interface KGEdgeIngestRequest {\n label: string;\n fields: { [key: string]: any};\n toLabel: string;\n toFieldKey: string;\n toFieldValue: any;\n createReciprocal: boolean;\n reciprocalLabel: string;\n allowEmbeddingsSearch?: boolean;\n}\nexport interface KGQuery {\n graphId?: string; // Optional - defaults to \"default\" for backwards compatibility\n label: string;\n fields: KGFieldQuery[];\n limit: number /* int */;\n depth: number /* int */;\n sortBy: string;\n sortOrder: string;\n edges?: KGEdgeQuery[];\n embeddingsSource?: string;\n skipEmbedding?: boolean;\n}\nexport interface KGFieldQuery {\n name: string;\n value: any;\n operator: KGFieldQueryOperator;\n}\nexport type KGFieldQueryOperator = string;\nexport const KGFieldQueryOperatorEqual: KGFieldQueryOperator = \"eq\";\nexport const KGFieldQueryOperatorNotEqual: KGFieldQueryOperator = \"neq\";\nexport const KGFieldQueryOperatorGreater: KGFieldQueryOperator = \"gt\";\nexport const KGFieldQueryOperatorLess: KGFieldQueryOperator = \"lt\";\nexport const KGFieldQueryOperatorGreaterOrEqual: KGFieldQueryOperator = \"gte\";\nexport const KGFieldQueryOperatorLessOrEqual: KGFieldQueryOperator = \"lte\";\nexport const KGFieldQueryOperatorLike: KGFieldQueryOperator = \"like\";\nexport const KGFieldQueryOperatorSimilar: KGFieldQueryOperator = \"similar\";\n/**\n * KGFieldQueryOperatorGreaterOrEqual KGFieldQueryOperator = \"gte\"\n * KGFieldQueryOperatorLessOrEqual KGFieldQueryOperator = \"lte\"\n */\nexport const KGFieldQueryOperatorIn: KGFieldQueryOperator = \"in\";\nexport const KGFieldQueryOperatorArrayContains: KGFieldQueryOperator = \"arrayContains\";\nexport type KGRelationshipDirection = string;\nexport const KGRelationshipDirectionIncoming: KGRelationshipDirection = \"incoming\";\nexport const KGRelationshipDirectionOutgoing: KGRelationshipDirection = \"outgoing\";\nexport interface KGEdgeQuery {\n label: string;\n direction: 'incoming' | 'outgoing';\n fields?: { [key: string]: any};\n /**\n * FromLabel string `json:\"fromLabel\"`\n * FromFieldKey string `json:\"fromFieldKey\"`\n * FromValue interface{} `json:\"fromValue\"`\n */\n toLabel: string;\n toFieldKey: string;\n toFieldValue: any;\n}\nexport interface KGQueryResult {\n nodes: KGNode[];\n edges: KGEdge[];\n}\nexport interface KGLabelInfo {\n label: string;\n count: number /* uint64 */;\n}\nexport interface KGPropertyInfo {\n property: string;\n count: number /* uint64 */;\n}\nexport interface KGPLabelSchema {\n label: string;\n keys: string[];\n}\nexport interface KGArticle {\n id: string;\n title: string;\n content: string;\n lang?: string;\n docUrl?: string;\n paragraphs?: string;\n}\nexport interface KGPropertyFilter {\n property: string;\n value: string;\n}\nexport interface KGPropertyFilterRequest {\n label: string;\n filters: KGPropertyFilter[];\n}\nexport interface DeleteDocumentRequest {\n documentId: string;\n}\nexport interface DeleteDocumentResponse {\n success: boolean;\n deletedNodes: { [key: string]: number /* int */};\n totalDeleted: number /* int */;\n error?: string;\n}\n/**\n * KGSyncJob represents a sync job record in the database\n */\nexport interface KGSyncJob {\n id: string;\n title: string;\n stats: { [key: string]: any};\n startTime: string;\n endTime: string;\n updatedAt?: string;\n}\n/**\n * KGSyncJobUpdateRequest is used to insert or update a sync job\n */\nexport interface KGSyncJobUpdateRequest {\n id: string;\n title: string;\n stats: { [key: string]: any};\n startTime: string;\n endTime: string;\n}\nexport interface KGSyncJobUpdateResponse {\n jobId: string;\n metadata: ResponseMetadata;\n}\nexport interface KGSyncJobListResponse {\n jobs: KGSyncJob[];\n metadata: ResponseMetadata;\n}\n/**\n * KGSyncJobListRequest is used to list sync jobs with filters\n */\nexport interface KGSyncJobListRequest {\n limit?: number /* int */;\n offset?: number /* int */;\n startFrom?: string;\n endTo?: string;\n}\n/**\n * KGSyncIngestResponse is the response for synchronous single node ingestion\n */\nexport interface KGSyncIngestResponse {\n success: boolean;\n nodeId?: string;\n error?: string;\n metadata: ResponseMetadata;\n}\n/**\n * KGBatchSyncIngestResponse is the response for synchronous batch node ingestion\n */\nexport interface KGBatchSyncIngestResponse {\n success: boolean;\n ingestedCount: number /* int */;\n nodeIds?: string[];\n errors?: string[];\n metadata: ResponseMetadata;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../models/kg.ts"],"sourcesContent":["// Code generated by tygo. DO NOT EDIT.\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: kg-models.go\n\n/**\n * Graph represents a knowledge graph within an organization\n */\nexport interface Graph {\n id: string;\n name: string;\n description: string;\n isDefault: boolean;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * CreateGraphRequest is the request to create a new graph\n */\nexport interface CreateGraphRequest {\n name: string;\n description: string;\n}\n/**\n * CreateGraphResult is the response for creating a graph\n */\nexport interface CreateGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * GetGraphResult is the response for getting a single graph\n */\nexport interface GetGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * ListGraphsResult is the response for listing graphs\n */\nexport interface ListGraphsResult {\n graphs?: Graph[];\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * UpdateGraphResult is the response for updating a graph\n */\nexport interface UpdateGraphResult {\n graph?: Graph;\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\n/**\n * DeleteGraphResult is the response for deleting a graph\n */\nexport interface DeleteGraphResult {\n success: boolean;\n error?: string;\n metadata?: ResponseMetadata;\n}\nexport interface KGNode {\n id: string;\n label: string;\n fields: { [key: string]: any};\n relationships?: KGEdge[];\n score?: number /* float64 */;\n}\nexport interface KGEdge {\n id: string;\n label: string;\n fields: { [key: string]: any};\n from: string;\n to: string;\n}\nexport interface KGNodeIngestRequest {\n graphId?: string; // Optional - defaults to \"default\" for backwards compatibility\n label: string;\n keyField?: string;\n reverseEdgeLabel?: string;\n fields: { [key: string]: any};\n edges?: KGEdgeIngestRequest[];\n duplicatePolicy?: DuplicatePolicy;\n generateEmbeddings?: boolean;\n embeddingsSource?: string;\n embeddingsFields?: string[];\n}\nexport type DuplicatePolicy = string;\nexport const DuplicatePolicyCreateIf: DuplicatePolicy = \"createIfNotExist\";\nexport const DuplicatePolicyIgnore: DuplicatePolicy = \"ignore\";\nexport const DuplicatePolicyReplace: DuplicatePolicy = \"replace\";\nexport const DuplicatePolicyFail: DuplicatePolicy = \"fail\";\nexport const DuplicatePolicyCreate: DuplicatePolicy = \"create\";\nexport interface KGEdgeIngestRequest {\n label: string;\n fields: { [key: string]: any};\n toLabel: string;\n toFieldKey: string;\n toFieldValue: any;\n createReciprocal: boolean;\n reciprocalLabel: string;\n allowEmbeddingsSearch?: boolean;\n}\nexport interface KGQuery {\n graphId?: string; // Optional - defaults to \"default\" for backwards compatibility\n label: string;\n fields: KGFieldQuery[];\n limit: number /* int */;\n depth: number /* int */;\n sortBy: string;\n sortOrder: string;\n edges?: KGEdgeQuery[];\n embeddingsSource?: string;\n skipEmbedding?: boolean;\n}\nexport interface KGFieldQuery {\n name: string;\n value: any;\n operator: KGFieldQueryOperator;\n}\nexport type KGFieldQueryOperator = string;\nexport const KGFieldQueryOperatorEqual: KGFieldQueryOperator = \"eq\";\nexport const KGFieldQueryOperatorNotEqual: KGFieldQueryOperator = \"neq\";\nexport const KGFieldQueryOperatorGreater: KGFieldQueryOperator = \"gt\";\nexport const KGFieldQueryOperatorLess: KGFieldQueryOperator = \"lt\";\nexport const KGFieldQueryOperatorGreaterOrEqual: KGFieldQueryOperator = \"gte\";\nexport const KGFieldQueryOperatorLessOrEqual: KGFieldQueryOperator = \"lte\";\nexport const KGFieldQueryOperatorLike: KGFieldQueryOperator = \"like\";\nexport const KGFieldQueryOperatorSimilar: KGFieldQueryOperator = \"similar\";\n/**\n * KGFieldQueryOperatorGreaterOrEqual KGFieldQueryOperator = \"gte\"\n * KGFieldQueryOperatorLessOrEqual KGFieldQueryOperator = \"lte\"\n */\nexport const KGFieldQueryOperatorIn: KGFieldQueryOperator = \"in\";\nexport const KGFieldQueryOperatorArrayContains: KGFieldQueryOperator = \"arrayContains\";\nexport type KGRelationshipDirection = string;\nexport const KGRelationshipDirectionIncoming: KGRelationshipDirection = \"incoming\";\nexport const KGRelationshipDirectionOutgoing: KGRelationshipDirection = \"outgoing\";\nexport interface KGEdgeQuery {\n label: string;\n direction: 'incoming' | 'outgoing';\n fields?: { [key: string]: any};\n /**\n * FromLabel string `json:\"fromLabel\"`\n * FromFieldKey string `json:\"fromFieldKey\"`\n * FromValue interface{} `json:\"fromValue\"`\n */\n toLabel: string;\n toFieldKey: string;\n toFieldValue: any;\n}\nexport interface KGQueryResult {\n nodes: KGNode[];\n edges: KGEdge[];\n}\nexport interface KGLabelInfo {\n label: string;\n count: number /* uint64 */;\n}\nexport interface KGPropertyInfo {\n property: string;\n count: number /* uint64 */;\n}\nexport interface KGPLabelSchema {\n label: string;\n keys: string[];\n}\nexport interface KGArticle {\n id: string;\n title: string;\n content: string;\n lang?: string;\n docUrl?: string;\n paragraphs?: string;\n}\nexport interface KGPropertyFilter {\n property: string;\n value: string;\n}\nexport interface KGPropertyFilterRequest {\n label: string;\n filters: KGPropertyFilter[];\n}\nexport interface DeleteDocumentRequest {\n documentId: string;\n}\nexport interface DeleteDocumentResponse {\n success: boolean;\n deletedNodes: { [key: string]: number /* int */};\n totalDeleted: number /* int */;\n error?: string;\n}\n/**\n * KGSyncJob represents a sync job record in the database\n */\nexport interface KGSyncJob {\n id: string;\n title: string;\n stats: { [key: string]: any};\n startTime: string;\n endTime: string;\n updatedAt?: string;\n}\n/**\n * KGSyncJobUpdateRequest is used to insert or update a sync job\n */\nexport interface KGSyncJobUpdateRequest {\n id: string;\n title: string;\n stats: { [key: string]: any};\n startTime: string;\n endTime: string;\n}\nexport interface KGSyncJobUpdateResponse {\n jobId: string;\n metadata: ResponseMetadata;\n}\nexport interface KGSyncJobListResponse {\n jobs: KGSyncJob[];\n metadata: ResponseMetadata;\n}\n/**\n * KGSyncJobListRequest is used to list sync jobs with filters\n */\nexport interface KGSyncJobListRequest {\n limit?: number /* int */;\n offset?: number /* int */;\n startFrom?: string;\n endTo?: string;\n}\n/**\n * KGSyncIngestResponse is the response for synchronous single node ingestion\n */\nexport interface KGSyncIngestResponse {\n success: boolean;\n nodeId?: string;\n error?: string;\n metadata: ResponseMetadata;\n}\n/**\n * KGBatchSyncIngestResponse is the response for synchronous batch node ingestion\n */\nexport interface KGBatchSyncIngestResponse {\n success: boolean;\n ingestedCount: number /* int */;\n nodeIds?: string[];\n errors?: string[];\n metadata: ResponseMetadata;\n}\n"],"mappings":";AA+FO,IAAM,0BAA2C;AACjD,IAAM,wBAAyC;AAC/C,IAAM,yBAA0C;AAChD,IAAM,sBAAuC;AAC7C,IAAM,wBAAyC;AA6B/C,IAAM,4BAAkD;AACxD,IAAM,+BAAqD;AAC3D,IAAM,8BAAoD;AAC1D,IAAM,2BAAiD;AACvD,IAAM,qCAA2D;AACjE,IAAM,kCAAwD;AAC9D,IAAM,2BAAiD;AACvD,IAAM,8BAAoD;AAK1D,IAAM,yBAA+C;AACrD,IAAM,oCAA0D;AAEhE,IAAM,kCAA2D;AACjE,IAAM,kCAA2D;","names":[]}
|