@elqnt/kg 1.0.2 → 1.0.5

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.
@@ -0,0 +1,187 @@
1
+ import { ResponseMetadata } from '@elqnt/types';
2
+
3
+ interface KGNode {
4
+ id: string;
5
+ label: string;
6
+ fields: {
7
+ [key: string]: any;
8
+ };
9
+ relationships?: KGEdge[];
10
+ score?: number;
11
+ }
12
+ interface KGEdge {
13
+ id: string;
14
+ label: string;
15
+ fields: {
16
+ [key: string]: any;
17
+ };
18
+ from: string;
19
+ to: string;
20
+ }
21
+ interface KGNodeIngestRequest {
22
+ label: string;
23
+ keyField?: string;
24
+ reverseEdgeLabel?: string;
25
+ fields: {
26
+ [key: string]: any;
27
+ };
28
+ edges?: KGEdgeIngestRequest[];
29
+ duplicatePolicy?: DuplicatePolicy;
30
+ generateEmbeddings?: boolean;
31
+ embeddingsSource?: string;
32
+ embeddingsFields?: string[];
33
+ }
34
+ type DuplicatePolicy = string;
35
+ declare const DuplicatePolicyCreateIf: DuplicatePolicy;
36
+ declare const DuplicatePolicyIgnore: DuplicatePolicy;
37
+ declare const DuplicatePolicyReplace: DuplicatePolicy;
38
+ declare const DuplicatePolicyFail: DuplicatePolicy;
39
+ declare const DuplicatePolicyCreate: DuplicatePolicy;
40
+ interface KGEdgeIngestRequest {
41
+ label: string;
42
+ fields: {
43
+ [key: string]: any;
44
+ };
45
+ toLabel: string;
46
+ toFieldKey: string;
47
+ toFieldValue: any;
48
+ createReciprocal: boolean;
49
+ reciprocalLabel: string;
50
+ allowEmbeddingsSearch?: boolean;
51
+ }
52
+ interface KGQuery {
53
+ label: string;
54
+ fields: KGFieldQuery[];
55
+ limit: number;
56
+ depth: number;
57
+ sortBy: string;
58
+ sortOrder: string;
59
+ edges?: KGEdgeQuery[];
60
+ embeddingsSource?: string;
61
+ skipEmbedding?: boolean;
62
+ }
63
+ interface KGFieldQuery {
64
+ name: string;
65
+ value: any;
66
+ operator: KGFieldQueryOperator;
67
+ }
68
+ type KGFieldQueryOperator = string;
69
+ declare const KGFieldQueryOperatorEqual: KGFieldQueryOperator;
70
+ declare const KGFieldQueryOperatorNotEqual: KGFieldQueryOperator;
71
+ declare const KGFieldQueryOperatorGreater: KGFieldQueryOperator;
72
+ declare const KGFieldQueryOperatorLess: KGFieldQueryOperator;
73
+ declare const KGFieldQueryOperatorGreaterOrEqual: KGFieldQueryOperator;
74
+ declare const KGFieldQueryOperatorLessOrEqual: KGFieldQueryOperator;
75
+ declare const KGFieldQueryOperatorLike: KGFieldQueryOperator;
76
+ declare const KGFieldQueryOperatorSimilar: KGFieldQueryOperator;
77
+ /**
78
+ * KGFieldQueryOperatorGreaterOrEqual KGFieldQueryOperator = "gte"
79
+ * KGFieldQueryOperatorLessOrEqual KGFieldQueryOperator = "lte"
80
+ */
81
+ declare const KGFieldQueryOperatorIn: KGFieldQueryOperator;
82
+ declare const KGFieldQueryOperatorArrayContains: KGFieldQueryOperator;
83
+ type KGRelationshipDirection = string;
84
+ declare const KGRelationshipDirectionIncoming: KGRelationshipDirection;
85
+ declare const KGRelationshipDirectionOutgoing: KGRelationshipDirection;
86
+ interface KGEdgeQuery {
87
+ label: string;
88
+ direction: 'incoming' | 'outgoing';
89
+ fields?: {
90
+ [key: string]: any;
91
+ };
92
+ /**
93
+ * FromLabel string `json:"fromLabel"`
94
+ * FromFieldKey string `json:"fromFieldKey"`
95
+ * FromValue interface{} `json:"fromValue"`
96
+ */
97
+ toLabel: string;
98
+ toFieldKey: string;
99
+ toFieldValue: any;
100
+ }
101
+ interface KGQueryResult {
102
+ nodes: KGNode[];
103
+ edges: KGEdge[];
104
+ }
105
+ interface KGLabelInfo {
106
+ label: string;
107
+ count: number;
108
+ }
109
+ interface KGPropertyInfo {
110
+ property: string;
111
+ count: number;
112
+ }
113
+ interface KGPLabelSchema {
114
+ label: string;
115
+ keys: string[];
116
+ }
117
+ interface KGArticle {
118
+ id: string;
119
+ title: string;
120
+ content: string;
121
+ lang?: string;
122
+ docUrl?: string;
123
+ paragraphs?: string;
124
+ }
125
+ interface KGPropertyFilter {
126
+ property: string;
127
+ value: string;
128
+ }
129
+ interface KGPropertyFilterRequest {
130
+ label: string;
131
+ filters: KGPropertyFilter[];
132
+ }
133
+ interface DeleteDocumentRequest {
134
+ documentId: string;
135
+ }
136
+ interface DeleteDocumentResponse {
137
+ success: boolean;
138
+ deletedNodes: {
139
+ [key: string]: number;
140
+ };
141
+ totalDeleted: number;
142
+ error?: string;
143
+ }
144
+ /**
145
+ * KGSyncJob represents a sync job record in the database
146
+ */
147
+ interface KGSyncJob {
148
+ id: string;
149
+ title: string;
150
+ stats: {
151
+ [key: string]: any;
152
+ };
153
+ startTime: string;
154
+ endTime: string;
155
+ updatedAt?: string;
156
+ }
157
+ /**
158
+ * KGSyncJobUpdateRequest is used to insert or update a sync job
159
+ */
160
+ interface KGSyncJobUpdateRequest {
161
+ id: string;
162
+ title: string;
163
+ stats: {
164
+ [key: string]: any;
165
+ };
166
+ startTime: string;
167
+ endTime: string;
168
+ }
169
+ interface KGSyncJobUpdateResponse {
170
+ jobId: string;
171
+ metadata: ResponseMetadata;
172
+ }
173
+ interface KGSyncJobListResponse {
174
+ jobs: KGSyncJob[];
175
+ metadata: ResponseMetadata;
176
+ }
177
+ /**
178
+ * KGSyncJobListRequest is used to list sync jobs with filters
179
+ */
180
+ interface KGSyncJobListRequest {
181
+ limit?: number;
182
+ offset?: number;
183
+ startFrom?: string;
184
+ endTo?: string;
185
+ }
186
+
187
+ export { type DeleteDocumentRequest, type DeleteDocumentResponse, type DuplicatePolicy, DuplicatePolicyCreate, DuplicatePolicyCreateIf, DuplicatePolicyFail, DuplicatePolicyIgnore, DuplicatePolicyReplace, type KGArticle, type KGEdge, type KGEdgeIngestRequest, type KGEdgeQuery, type KGFieldQuery, type KGFieldQueryOperator, KGFieldQueryOperatorArrayContains, KGFieldQueryOperatorEqual, KGFieldQueryOperatorGreater, KGFieldQueryOperatorGreaterOrEqual, KGFieldQueryOperatorIn, KGFieldQueryOperatorLess, KGFieldQueryOperatorLessOrEqual, KGFieldQueryOperatorLike, KGFieldQueryOperatorNotEqual, KGFieldQueryOperatorSimilar, type KGLabelInfo, type KGNode, type KGNodeIngestRequest, type KGPLabelSchema, type KGPropertyFilter, type KGPropertyFilterRequest, type KGPropertyInfo, type KGQuery, type KGQueryResult, type KGRelationshipDirection, KGRelationshipDirectionIncoming, KGRelationshipDirectionOutgoing, type KGSyncJob, type KGSyncJobListRequest, type KGSyncJobListResponse, type KGSyncJobUpdateRequest, type KGSyncJobUpdateResponse };
@@ -0,0 +1,187 @@
1
+ import { ResponseMetadata } from '@elqnt/types';
2
+
3
+ interface KGNode {
4
+ id: string;
5
+ label: string;
6
+ fields: {
7
+ [key: string]: any;
8
+ };
9
+ relationships?: KGEdge[];
10
+ score?: number;
11
+ }
12
+ interface KGEdge {
13
+ id: string;
14
+ label: string;
15
+ fields: {
16
+ [key: string]: any;
17
+ };
18
+ from: string;
19
+ to: string;
20
+ }
21
+ interface KGNodeIngestRequest {
22
+ label: string;
23
+ keyField?: string;
24
+ reverseEdgeLabel?: string;
25
+ fields: {
26
+ [key: string]: any;
27
+ };
28
+ edges?: KGEdgeIngestRequest[];
29
+ duplicatePolicy?: DuplicatePolicy;
30
+ generateEmbeddings?: boolean;
31
+ embeddingsSource?: string;
32
+ embeddingsFields?: string[];
33
+ }
34
+ type DuplicatePolicy = string;
35
+ declare const DuplicatePolicyCreateIf: DuplicatePolicy;
36
+ declare const DuplicatePolicyIgnore: DuplicatePolicy;
37
+ declare const DuplicatePolicyReplace: DuplicatePolicy;
38
+ declare const DuplicatePolicyFail: DuplicatePolicy;
39
+ declare const DuplicatePolicyCreate: DuplicatePolicy;
40
+ interface KGEdgeIngestRequest {
41
+ label: string;
42
+ fields: {
43
+ [key: string]: any;
44
+ };
45
+ toLabel: string;
46
+ toFieldKey: string;
47
+ toFieldValue: any;
48
+ createReciprocal: boolean;
49
+ reciprocalLabel: string;
50
+ allowEmbeddingsSearch?: boolean;
51
+ }
52
+ interface KGQuery {
53
+ label: string;
54
+ fields: KGFieldQuery[];
55
+ limit: number;
56
+ depth: number;
57
+ sortBy: string;
58
+ sortOrder: string;
59
+ edges?: KGEdgeQuery[];
60
+ embeddingsSource?: string;
61
+ skipEmbedding?: boolean;
62
+ }
63
+ interface KGFieldQuery {
64
+ name: string;
65
+ value: any;
66
+ operator: KGFieldQueryOperator;
67
+ }
68
+ type KGFieldQueryOperator = string;
69
+ declare const KGFieldQueryOperatorEqual: KGFieldQueryOperator;
70
+ declare const KGFieldQueryOperatorNotEqual: KGFieldQueryOperator;
71
+ declare const KGFieldQueryOperatorGreater: KGFieldQueryOperator;
72
+ declare const KGFieldQueryOperatorLess: KGFieldQueryOperator;
73
+ declare const KGFieldQueryOperatorGreaterOrEqual: KGFieldQueryOperator;
74
+ declare const KGFieldQueryOperatorLessOrEqual: KGFieldQueryOperator;
75
+ declare const KGFieldQueryOperatorLike: KGFieldQueryOperator;
76
+ declare const KGFieldQueryOperatorSimilar: KGFieldQueryOperator;
77
+ /**
78
+ * KGFieldQueryOperatorGreaterOrEqual KGFieldQueryOperator = "gte"
79
+ * KGFieldQueryOperatorLessOrEqual KGFieldQueryOperator = "lte"
80
+ */
81
+ declare const KGFieldQueryOperatorIn: KGFieldQueryOperator;
82
+ declare const KGFieldQueryOperatorArrayContains: KGFieldQueryOperator;
83
+ type KGRelationshipDirection = string;
84
+ declare const KGRelationshipDirectionIncoming: KGRelationshipDirection;
85
+ declare const KGRelationshipDirectionOutgoing: KGRelationshipDirection;
86
+ interface KGEdgeQuery {
87
+ label: string;
88
+ direction: 'incoming' | 'outgoing';
89
+ fields?: {
90
+ [key: string]: any;
91
+ };
92
+ /**
93
+ * FromLabel string `json:"fromLabel"`
94
+ * FromFieldKey string `json:"fromFieldKey"`
95
+ * FromValue interface{} `json:"fromValue"`
96
+ */
97
+ toLabel: string;
98
+ toFieldKey: string;
99
+ toFieldValue: any;
100
+ }
101
+ interface KGQueryResult {
102
+ nodes: KGNode[];
103
+ edges: KGEdge[];
104
+ }
105
+ interface KGLabelInfo {
106
+ label: string;
107
+ count: number;
108
+ }
109
+ interface KGPropertyInfo {
110
+ property: string;
111
+ count: number;
112
+ }
113
+ interface KGPLabelSchema {
114
+ label: string;
115
+ keys: string[];
116
+ }
117
+ interface KGArticle {
118
+ id: string;
119
+ title: string;
120
+ content: string;
121
+ lang?: string;
122
+ docUrl?: string;
123
+ paragraphs?: string;
124
+ }
125
+ interface KGPropertyFilter {
126
+ property: string;
127
+ value: string;
128
+ }
129
+ interface KGPropertyFilterRequest {
130
+ label: string;
131
+ filters: KGPropertyFilter[];
132
+ }
133
+ interface DeleteDocumentRequest {
134
+ documentId: string;
135
+ }
136
+ interface DeleteDocumentResponse {
137
+ success: boolean;
138
+ deletedNodes: {
139
+ [key: string]: number;
140
+ };
141
+ totalDeleted: number;
142
+ error?: string;
143
+ }
144
+ /**
145
+ * KGSyncJob represents a sync job record in the database
146
+ */
147
+ interface KGSyncJob {
148
+ id: string;
149
+ title: string;
150
+ stats: {
151
+ [key: string]: any;
152
+ };
153
+ startTime: string;
154
+ endTime: string;
155
+ updatedAt?: string;
156
+ }
157
+ /**
158
+ * KGSyncJobUpdateRequest is used to insert or update a sync job
159
+ */
160
+ interface KGSyncJobUpdateRequest {
161
+ id: string;
162
+ title: string;
163
+ stats: {
164
+ [key: string]: any;
165
+ };
166
+ startTime: string;
167
+ endTime: string;
168
+ }
169
+ interface KGSyncJobUpdateResponse {
170
+ jobId: string;
171
+ metadata: ResponseMetadata;
172
+ }
173
+ interface KGSyncJobListResponse {
174
+ jobs: KGSyncJob[];
175
+ metadata: ResponseMetadata;
176
+ }
177
+ /**
178
+ * KGSyncJobListRequest is used to list sync jobs with filters
179
+ */
180
+ interface KGSyncJobListRequest {
181
+ limit?: number;
182
+ offset?: number;
183
+ startFrom?: string;
184
+ endTo?: string;
185
+ }
186
+
187
+ export { type DeleteDocumentRequest, type DeleteDocumentResponse, type DuplicatePolicy, DuplicatePolicyCreate, DuplicatePolicyCreateIf, DuplicatePolicyFail, DuplicatePolicyIgnore, DuplicatePolicyReplace, type KGArticle, type KGEdge, type KGEdgeIngestRequest, type KGEdgeQuery, type KGFieldQuery, type KGFieldQueryOperator, KGFieldQueryOperatorArrayContains, KGFieldQueryOperatorEqual, KGFieldQueryOperatorGreater, KGFieldQueryOperatorGreaterOrEqual, KGFieldQueryOperatorIn, KGFieldQueryOperatorLess, KGFieldQueryOperatorLessOrEqual, KGFieldQueryOperatorLike, KGFieldQueryOperatorNotEqual, KGFieldQueryOperatorSimilar, type KGLabelInfo, type KGNode, type KGNodeIngestRequest, type KGPLabelSchema, type KGPropertyFilter, type KGPropertyFilterRequest, type KGPropertyInfo, type KGQuery, type KGQueryResult, type KGRelationshipDirection, KGRelationshipDirectionIncoming, KGRelationshipDirectionOutgoing, type KGSyncJob, type KGSyncJobListRequest, type KGSyncJobListResponse, type KGSyncJobUpdateRequest, type KGSyncJobUpdateResponse };
@@ -0,0 +1,40 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+ var _chunkIB7XJMZPjs = require('../chunk-IB7XJMZP.js');
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ exports.DuplicatePolicyCreate = _chunkIB7XJMZPjs.DuplicatePolicyCreate; exports.DuplicatePolicyCreateIf = _chunkIB7XJMZPjs.DuplicatePolicyCreateIf; exports.DuplicatePolicyFail = _chunkIB7XJMZPjs.DuplicatePolicyFail; exports.DuplicatePolicyIgnore = _chunkIB7XJMZPjs.DuplicatePolicyIgnore; exports.DuplicatePolicyReplace = _chunkIB7XJMZPjs.DuplicatePolicyReplace; exports.KGFieldQueryOperatorArrayContains = _chunkIB7XJMZPjs.KGFieldQueryOperatorArrayContains; exports.KGFieldQueryOperatorEqual = _chunkIB7XJMZPjs.KGFieldQueryOperatorEqual; exports.KGFieldQueryOperatorGreater = _chunkIB7XJMZPjs.KGFieldQueryOperatorGreater; exports.KGFieldQueryOperatorGreaterOrEqual = _chunkIB7XJMZPjs.KGFieldQueryOperatorGreaterOrEqual; exports.KGFieldQueryOperatorIn = _chunkIB7XJMZPjs.KGFieldQueryOperatorIn; exports.KGFieldQueryOperatorLess = _chunkIB7XJMZPjs.KGFieldQueryOperatorLess; exports.KGFieldQueryOperatorLessOrEqual = _chunkIB7XJMZPjs.KGFieldQueryOperatorLessOrEqual; exports.KGFieldQueryOperatorLike = _chunkIB7XJMZPjs.KGFieldQueryOperatorLike; exports.KGFieldQueryOperatorNotEqual = _chunkIB7XJMZPjs.KGFieldQueryOperatorNotEqual; exports.KGFieldQueryOperatorSimilar = _chunkIB7XJMZPjs.KGFieldQueryOperatorSimilar; exports.KGRelationshipDirectionIncoming = _chunkIB7XJMZPjs.KGRelationshipDirectionIncoming; exports.KGRelationshipDirectionOutgoing = _chunkIB7XJMZPjs.KGRelationshipDirectionOutgoing;
40
+ //# sourceMappingURL=kg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/models/kg.js"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,m3CAAC","file":"/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/models/kg.js"}
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import {
3
+ DuplicatePolicyCreate,
4
+ DuplicatePolicyCreateIf,
5
+ DuplicatePolicyFail,
6
+ DuplicatePolicyIgnore,
7
+ DuplicatePolicyReplace,
8
+ KGFieldQueryOperatorArrayContains,
9
+ KGFieldQueryOperatorEqual,
10
+ KGFieldQueryOperatorGreater,
11
+ KGFieldQueryOperatorGreaterOrEqual,
12
+ KGFieldQueryOperatorIn,
13
+ KGFieldQueryOperatorLess,
14
+ KGFieldQueryOperatorLessOrEqual,
15
+ KGFieldQueryOperatorLike,
16
+ KGFieldQueryOperatorNotEqual,
17
+ KGFieldQueryOperatorSimilar,
18
+ KGRelationshipDirectionIncoming,
19
+ KGRelationshipDirectionOutgoing
20
+ } from "../chunk-HW6IMZII.mjs";
21
+ export {
22
+ DuplicatePolicyCreate,
23
+ DuplicatePolicyCreateIf,
24
+ DuplicatePolicyFail,
25
+ DuplicatePolicyIgnore,
26
+ DuplicatePolicyReplace,
27
+ KGFieldQueryOperatorArrayContains,
28
+ KGFieldQueryOperatorEqual,
29
+ KGFieldQueryOperatorGreater,
30
+ KGFieldQueryOperatorGreaterOrEqual,
31
+ KGFieldQueryOperatorIn,
32
+ KGFieldQueryOperatorLess,
33
+ KGFieldQueryOperatorLessOrEqual,
34
+ KGFieldQueryOperatorLike,
35
+ KGFieldQueryOperatorNotEqual,
36
+ KGFieldQueryOperatorSimilar,
37
+ KGRelationshipDirectionIncoming,
38
+ KGRelationshipDirectionOutgoing
39
+ };
40
+ //# sourceMappingURL=kg.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elqnt/kg",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "description": "Knowledge graph functionality for Eloquent platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -16,6 +16,11 @@
16
16
  "require": "./dist/models/index.js",
17
17
  "types": "./dist/models/index.d.ts"
18
18
  },
19
+ "./models/kg": {
20
+ "import": "./dist/models/kg.mjs",
21
+ "require": "./dist/models/kg.js",
22
+ "types": "./dist/models/kg.d.ts"
23
+ },
19
24
  "./models/kg-designer": {
20
25
  "import": "./dist/models/kg-designer.mjs",
21
26
  "require": "./dist/models/kg-designer.js",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-2VSBGCQQ.js","../models/kg.ts"],"names":[],"mappings":"AAAA;ACgCO,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;AA4B/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;AD9DxE;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-2VSBGCQQ.js","sourcesContent":[null,"// Code generated by tygo. DO NOT EDIT.\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: kg-models.go\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 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 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"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-HOOYDY65.js","../models/kg-designer.ts"],"names":[],"mappings":"AAAA;ACuDO,IAAM,qBAAA,EAAuB,yBAAA;AAC7B,IAAM,qBAAA,EAAuB,2BAAA;AAC7B,IAAM,qBAAA,EAAuB,2BAAA;AAC7B,IAAM,kBAAA,EAAoB,wBAAA;AAC1B,IAAM,mBAAA,EAAqB,uBAAA;AAI3B,IAAM,qBAAA,EAAuB,yBAAA;AAC7B,IAAM,qBAAA,EAAuB,2BAAA;AAC7B,IAAM,qBAAA,EAAuB,2BAAA;AAC7B,IAAM,kBAAA,EAAoB,wBAAA;AAC1B,IAAM,mBAAA,EAAqB,uBAAA;AAI3B,IAAM,WAAA,EAAa,cAAA;AAInB,IAAM,iBAAA,EAAmB,2BAAA;AAIzB,IAAM,gBAAA,EAAkB,oBAAA;AACxB,IAAM,cAAA,EAAgB,kBAAA;AAItB,IAAM,gBAAA,EAAkB,mBAAA;ADpE/B;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wsBAAC","file":"/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/chunk-HOOYDY65.js","sourcesContent":[null,"// Code generated by tygo. DO NOT EDIT.\n\n//////////\n// source: designer-models.go\n\n/**\n * GraphNodeDefinition represents a node type in the knowledge graph\n */\nexport interface GraphNodeDefinition {\n label: string;\n description: string;\n schema: { [key: string]: any};\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * GraphEdgeDefinition represents an edge type in the knowledge graph\n */\nexport interface GraphEdgeDefinition {\n label: string;\n description: string;\n fromNode: string;\n toNode: string;\n schema: { [key: string]: any};\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * Request/Response types\n */\nexport interface GraphNodeRequest {\n node: GraphNodeDefinition;\n}\nexport interface GraphNodeResponse {\n node?: GraphNodeDefinition;\n nodes?: GraphNodeDefinition[];\n success: boolean;\n error?: string;\n}\nexport interface GraphEdgeRequest {\n edge: GraphEdgeDefinition;\n}\nexport interface GraphEdgeResponse {\n edge?: GraphEdgeDefinition;\n edges?: GraphEdgeDefinition[];\n success: boolean;\n error?: string;\n}\n\n//////////\n// source: subjects.go\n\n/**\n * KG Designer Node subjects\n */\nexport const KGDesignerNodeCreate = \"kg.designer.node.create\";\nexport const KGDesignerNodeUpdate = \"kg.designer.node.update.*\";\nexport const KGDesignerNodeDelete = \"kg.designer.node.delete.*\";\nexport const KGDesignerNodeGet = \"kg.designer.node.get.*\";\nexport const KGDesignerNodeList = \"kg.designer.node.list\";\n/**\n * KG Designer Edge subjects\n */\nexport const KGDesignerEdgeCreate = \"kg.designer.edge.create\";\nexport const KGDesignerEdgeUpdate = \"kg.designer.edge.update.*\";\nexport const KGDesignerEdgeDelete = \"kg.designer.edge.delete.*\";\nexport const KGDesignerEdgeGet = \"kg.designer.edge.get.*\";\nexport const KGDesignerEdgeList = \"kg.designer.edge.list\";\n/**\n * KG Database subjects\n */\nexport const KGDBCreate = \"kg.db.create\";\n/**\n * KG Document subjects\n */\nexport const KGDocumentDelete = \"kg_ingest.document.delete\";\n/**\n * KG Sync Job subjects\n */\nexport const KGSyncJobUpdate = \"kg.sync.job.update\";\nexport const KGSyncJobList = \"kg.sync.job.list\";\n/**\n * KG Optimization subjects\n */\nexport const KGGraphOptimize = \"kg.graph.optimize\";\n"]}