@elqnt/kg 1.0.2 → 1.0.4
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-XNFIFIPQ.mjs → chunk-26VARHUJ.mjs} +1 -1
- package/dist/{chunk-2VSBGCQQ.js → chunk-5NCBQDAT.js} +1 -1
- package/dist/{chunk-2VSBGCQQ.js.map → chunk-5NCBQDAT.js.map} +1 -1
- package/dist/chunk-J3XZF6JO.mjs +1 -0
- package/dist/chunk-J3XZF6JO.mjs.map +1 -0
- package/dist/chunk-RDWVE6B2.js +1 -0
- package/dist/chunk-RDWVE6B2.js.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -18
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.d.mts +2 -187
- package/dist/models/index.d.ts +2 -187
- package/dist/models/index.js +5 -4
- package/dist/models/index.js.map +1 -1
- package/dist/models/index.mjs +19 -18
- package/dist/models/kg.d.mts +187 -0
- package/dist/models/kg.d.ts +187 -0
- package/dist/models/kg.js +39 -0
- package/dist/models/kg.js.map +1 -0
- package/dist/models/kg.mjs +39 -0
- package/dist/models/kg.mjs.map +1 -0
- package/package.json +6 -1
- /package/dist/{chunk-XNFIFIPQ.mjs.map → chunk-26VARHUJ.mjs.map} +0 -0
package/dist/models/index.d.ts
CHANGED
|
@@ -1,188 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export { DeleteDocumentRequest, DeleteDocumentResponse, DuplicatePolicy, DuplicatePolicyCreate, DuplicatePolicyCreateIf, DuplicatePolicyFail, DuplicatePolicyIgnore, DuplicatePolicyReplace, KGArticle, KGEdge, KGEdgeIngestRequest, KGEdgeQuery, KGFieldQuery, KGFieldQueryOperator, KGFieldQueryOperatorArrayContains, KGFieldQueryOperatorEqual, KGFieldQueryOperatorGreater, KGFieldQueryOperatorGreaterOrEqual, KGFieldQueryOperatorIn, KGFieldQueryOperatorLess, KGFieldQueryOperatorLessOrEqual, KGFieldQueryOperatorLike, KGFieldQueryOperatorNotEqual, KGFieldQueryOperatorSimilar, KGLabelInfo, KGNode, KGNodeIngestRequest, KGPLabelSchema, KGPropertyFilter, KGPropertyFilterRequest, KGPropertyInfo, KGQuery, KGQueryResult, KGRelationshipDirection, KGRelationshipDirectionIncoming, KGRelationshipDirectionOutgoing, KGSyncJob, KGSyncJobListRequest, KGSyncJobListResponse, KGSyncJobUpdateRequest, KGSyncJobUpdateResponse } from './kg.js';
|
|
2
2
|
export { GraphEdgeDefinition, GraphEdgeRequest, GraphEdgeResponse, GraphNodeDefinition, GraphNodeRequest, GraphNodeResponse, KGDBCreate, KGDesignerEdgeCreate, KGDesignerEdgeDelete, KGDesignerEdgeGet, KGDesignerEdgeList, KGDesignerEdgeUpdate, KGDesignerNodeCreate, KGDesignerNodeDelete, KGDesignerNodeGet, KGDesignerNodeList, KGDesignerNodeUpdate, KGDocumentDelete, KGGraphOptimize, KGSyncJobList, KGSyncJobUpdate } from './kg-designer.js';
|
|
3
|
-
|
|
4
|
-
interface KGNode {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
fields: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
relationships?: KGEdge[];
|
|
11
|
-
score?: number;
|
|
12
|
-
}
|
|
13
|
-
interface KGEdge {
|
|
14
|
-
id: string;
|
|
15
|
-
label: string;
|
|
16
|
-
fields: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
|
-
from: string;
|
|
20
|
-
to: string;
|
|
21
|
-
}
|
|
22
|
-
interface KGNodeIngestRequest {
|
|
23
|
-
label: string;
|
|
24
|
-
keyField?: string;
|
|
25
|
-
reverseEdgeLabel?: string;
|
|
26
|
-
fields: {
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
};
|
|
29
|
-
edges?: KGEdgeIngestRequest[];
|
|
30
|
-
duplicatePolicy?: DuplicatePolicy;
|
|
31
|
-
generateEmbeddings?: boolean;
|
|
32
|
-
embeddingsSource?: string;
|
|
33
|
-
embeddingsFields?: string[];
|
|
34
|
-
}
|
|
35
|
-
type DuplicatePolicy = string;
|
|
36
|
-
declare const DuplicatePolicyCreateIf: DuplicatePolicy;
|
|
37
|
-
declare const DuplicatePolicyIgnore: DuplicatePolicy;
|
|
38
|
-
declare const DuplicatePolicyReplace: DuplicatePolicy;
|
|
39
|
-
declare const DuplicatePolicyFail: DuplicatePolicy;
|
|
40
|
-
declare const DuplicatePolicyCreate: DuplicatePolicy;
|
|
41
|
-
interface KGEdgeIngestRequest {
|
|
42
|
-
label: string;
|
|
43
|
-
fields: {
|
|
44
|
-
[key: string]: any;
|
|
45
|
-
};
|
|
46
|
-
toLabel: string;
|
|
47
|
-
toFieldKey: string;
|
|
48
|
-
toFieldValue: any;
|
|
49
|
-
createReciprocal: boolean;
|
|
50
|
-
reciprocalLabel: string;
|
|
51
|
-
allowEmbeddingsSearch?: boolean;
|
|
52
|
-
}
|
|
53
|
-
interface KGQuery {
|
|
54
|
-
label: string;
|
|
55
|
-
fields: KGFieldQuery[];
|
|
56
|
-
limit: number;
|
|
57
|
-
depth: number;
|
|
58
|
-
sortBy: string;
|
|
59
|
-
sortOrder: string;
|
|
60
|
-
edges?: KGEdgeQuery[];
|
|
61
|
-
embeddingsSource?: string;
|
|
62
|
-
skipEmbedding?: boolean;
|
|
63
|
-
}
|
|
64
|
-
interface KGFieldQuery {
|
|
65
|
-
name: string;
|
|
66
|
-
value: any;
|
|
67
|
-
operator: KGFieldQueryOperator;
|
|
68
|
-
}
|
|
69
|
-
type KGFieldQueryOperator = string;
|
|
70
|
-
declare const KGFieldQueryOperatorEqual: KGFieldQueryOperator;
|
|
71
|
-
declare const KGFieldQueryOperatorNotEqual: KGFieldQueryOperator;
|
|
72
|
-
declare const KGFieldQueryOperatorGreater: KGFieldQueryOperator;
|
|
73
|
-
declare const KGFieldQueryOperatorLess: KGFieldQueryOperator;
|
|
74
|
-
declare const KGFieldQueryOperatorGreaterOrEqual: KGFieldQueryOperator;
|
|
75
|
-
declare const KGFieldQueryOperatorLessOrEqual: KGFieldQueryOperator;
|
|
76
|
-
declare const KGFieldQueryOperatorLike: KGFieldQueryOperator;
|
|
77
|
-
declare const KGFieldQueryOperatorSimilar: KGFieldQueryOperator;
|
|
78
|
-
/**
|
|
79
|
-
* KGFieldQueryOperatorGreaterOrEqual KGFieldQueryOperator = "gte"
|
|
80
|
-
* KGFieldQueryOperatorLessOrEqual KGFieldQueryOperator = "lte"
|
|
81
|
-
*/
|
|
82
|
-
declare const KGFieldQueryOperatorIn: KGFieldQueryOperator;
|
|
83
|
-
declare const KGFieldQueryOperatorArrayContains: KGFieldQueryOperator;
|
|
84
|
-
type KGRelationshipDirection = string;
|
|
85
|
-
declare const KGRelationshipDirectionIncoming: KGRelationshipDirection;
|
|
86
|
-
declare const KGRelationshipDirectionOutgoing: KGRelationshipDirection;
|
|
87
|
-
interface KGEdgeQuery {
|
|
88
|
-
label: string;
|
|
89
|
-
direction: 'incoming' | 'outgoing';
|
|
90
|
-
fields?: {
|
|
91
|
-
[key: string]: any;
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* FromLabel string `json:"fromLabel"`
|
|
95
|
-
* FromFieldKey string `json:"fromFieldKey"`
|
|
96
|
-
* FromValue interface{} `json:"fromValue"`
|
|
97
|
-
*/
|
|
98
|
-
toLabel: string;
|
|
99
|
-
toFieldKey: string;
|
|
100
|
-
toFieldValue: any;
|
|
101
|
-
}
|
|
102
|
-
interface KGQueryResult {
|
|
103
|
-
nodes: KGNode[];
|
|
104
|
-
edges: KGEdge[];
|
|
105
|
-
}
|
|
106
|
-
interface KGLabelInfo {
|
|
107
|
-
label: string;
|
|
108
|
-
count: number;
|
|
109
|
-
}
|
|
110
|
-
interface KGPropertyInfo {
|
|
111
|
-
property: string;
|
|
112
|
-
count: number;
|
|
113
|
-
}
|
|
114
|
-
interface KGPLabelSchema {
|
|
115
|
-
label: string;
|
|
116
|
-
keys: string[];
|
|
117
|
-
}
|
|
118
|
-
interface KGArticle {
|
|
119
|
-
id: string;
|
|
120
|
-
title: string;
|
|
121
|
-
content: string;
|
|
122
|
-
lang?: string;
|
|
123
|
-
docUrl?: string;
|
|
124
|
-
paragraphs?: string;
|
|
125
|
-
}
|
|
126
|
-
interface KGPropertyFilter {
|
|
127
|
-
property: string;
|
|
128
|
-
value: string;
|
|
129
|
-
}
|
|
130
|
-
interface KGPropertyFilterRequest {
|
|
131
|
-
label: string;
|
|
132
|
-
filters: KGPropertyFilter[];
|
|
133
|
-
}
|
|
134
|
-
interface DeleteDocumentRequest {
|
|
135
|
-
documentId: string;
|
|
136
|
-
}
|
|
137
|
-
interface DeleteDocumentResponse {
|
|
138
|
-
success: boolean;
|
|
139
|
-
deletedNodes: {
|
|
140
|
-
[key: string]: number;
|
|
141
|
-
};
|
|
142
|
-
totalDeleted: number;
|
|
143
|
-
error?: string;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* KGSyncJob represents a sync job record in the database
|
|
147
|
-
*/
|
|
148
|
-
interface KGSyncJob {
|
|
149
|
-
id: string;
|
|
150
|
-
title: string;
|
|
151
|
-
stats: {
|
|
152
|
-
[key: string]: any;
|
|
153
|
-
};
|
|
154
|
-
startTime: string;
|
|
155
|
-
endTime: string;
|
|
156
|
-
updatedAt?: string;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* KGSyncJobUpdateRequest is used to insert or update a sync job
|
|
160
|
-
*/
|
|
161
|
-
interface KGSyncJobUpdateRequest {
|
|
162
|
-
id: string;
|
|
163
|
-
title: string;
|
|
164
|
-
stats: {
|
|
165
|
-
[key: string]: any;
|
|
166
|
-
};
|
|
167
|
-
startTime: string;
|
|
168
|
-
endTime: string;
|
|
169
|
-
}
|
|
170
|
-
interface KGSyncJobUpdateResponse {
|
|
171
|
-
jobId: string;
|
|
172
|
-
metadata: ResponseMetadata;
|
|
173
|
-
}
|
|
174
|
-
interface KGSyncJobListResponse {
|
|
175
|
-
jobs: KGSyncJob[];
|
|
176
|
-
metadata: ResponseMetadata;
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* KGSyncJobListRequest is used to list sync jobs with filters
|
|
180
|
-
*/
|
|
181
|
-
interface KGSyncJobListRequest {
|
|
182
|
-
limit?: number;
|
|
183
|
-
offset?: number;
|
|
184
|
-
startFrom?: string;
|
|
185
|
-
endTo?: string;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
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 };
|
|
3
|
+
import '@elqnt/types';
|
package/dist/models/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-RDWVE6B2.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
var _chunkHOOYDY65js = require('../chunk-HOOYDY65.js');
|
|
18
19
|
|
|
19
|
-
var _chunk2VSBGCQQjs = require('../chunk-2VSBGCQQ.js');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -33,7 +33,8 @@ var _chunk2VSBGCQQjs = require('../chunk-2VSBGCQQ.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
var _chunk5NCBQDATjs = require('../chunk-5NCBQDAT.js');
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
|
|
@@ -67,5 +68,5 @@ var _chunkHOOYDY65js = require('../chunk-HOOYDY65.js');
|
|
|
67
68
|
|
|
68
69
|
|
|
69
70
|
|
|
70
|
-
exports.DuplicatePolicyCreate =
|
|
71
|
+
exports.DuplicatePolicyCreate = _chunk5NCBQDATjs.DuplicatePolicyCreate; exports.DuplicatePolicyCreateIf = _chunk5NCBQDATjs.DuplicatePolicyCreateIf; exports.DuplicatePolicyFail = _chunk5NCBQDATjs.DuplicatePolicyFail; exports.DuplicatePolicyIgnore = _chunk5NCBQDATjs.DuplicatePolicyIgnore; exports.DuplicatePolicyReplace = _chunk5NCBQDATjs.DuplicatePolicyReplace; exports.KGDBCreate = _chunkHOOYDY65js.KGDBCreate; exports.KGDesignerEdgeCreate = _chunkHOOYDY65js.KGDesignerEdgeCreate; exports.KGDesignerEdgeDelete = _chunkHOOYDY65js.KGDesignerEdgeDelete; exports.KGDesignerEdgeGet = _chunkHOOYDY65js.KGDesignerEdgeGet; exports.KGDesignerEdgeList = _chunkHOOYDY65js.KGDesignerEdgeList; exports.KGDesignerEdgeUpdate = _chunkHOOYDY65js.KGDesignerEdgeUpdate; exports.KGDesignerNodeCreate = _chunkHOOYDY65js.KGDesignerNodeCreate; exports.KGDesignerNodeDelete = _chunkHOOYDY65js.KGDesignerNodeDelete; exports.KGDesignerNodeGet = _chunkHOOYDY65js.KGDesignerNodeGet; exports.KGDesignerNodeList = _chunkHOOYDY65js.KGDesignerNodeList; exports.KGDesignerNodeUpdate = _chunkHOOYDY65js.KGDesignerNodeUpdate; exports.KGDocumentDelete = _chunkHOOYDY65js.KGDocumentDelete; exports.KGFieldQueryOperatorArrayContains = _chunk5NCBQDATjs.KGFieldQueryOperatorArrayContains; exports.KGFieldQueryOperatorEqual = _chunk5NCBQDATjs.KGFieldQueryOperatorEqual; exports.KGFieldQueryOperatorGreater = _chunk5NCBQDATjs.KGFieldQueryOperatorGreater; exports.KGFieldQueryOperatorGreaterOrEqual = _chunk5NCBQDATjs.KGFieldQueryOperatorGreaterOrEqual; exports.KGFieldQueryOperatorIn = _chunk5NCBQDATjs.KGFieldQueryOperatorIn; exports.KGFieldQueryOperatorLess = _chunk5NCBQDATjs.KGFieldQueryOperatorLess; exports.KGFieldQueryOperatorLessOrEqual = _chunk5NCBQDATjs.KGFieldQueryOperatorLessOrEqual; exports.KGFieldQueryOperatorLike = _chunk5NCBQDATjs.KGFieldQueryOperatorLike; exports.KGFieldQueryOperatorNotEqual = _chunk5NCBQDATjs.KGFieldQueryOperatorNotEqual; exports.KGFieldQueryOperatorSimilar = _chunk5NCBQDATjs.KGFieldQueryOperatorSimilar; exports.KGGraphOptimize = _chunkHOOYDY65js.KGGraphOptimize; exports.KGRelationshipDirectionIncoming = _chunk5NCBQDATjs.KGRelationshipDirectionIncoming; exports.KGRelationshipDirectionOutgoing = _chunk5NCBQDATjs.KGRelationshipDirectionOutgoing; exports.KGSyncJobList = _chunkHOOYDY65js.KGSyncJobList; exports.KGSyncJobUpdate = _chunkHOOYDY65js.KGSyncJobUpdate;
|
|
71
72
|
//# sourceMappingURL=index.js.map
|
package/dist/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/models/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/models/index.js"],"names":[],"mappings":"AAAA,yGAA6B;AAC7B;AACE;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,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,2zEAAC","file":"/home/runner/work/eloquent-packages/eloquent-packages/packages/kg/dist/models/index.js"}
|
package/dist/models/index.mjs
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
import "../chunk-J3XZF6JO.mjs";
|
|
2
|
+
import {
|
|
3
|
+
KGDBCreate,
|
|
4
|
+
KGDesignerEdgeCreate,
|
|
5
|
+
KGDesignerEdgeDelete,
|
|
6
|
+
KGDesignerEdgeGet,
|
|
7
|
+
KGDesignerEdgeList,
|
|
8
|
+
KGDesignerEdgeUpdate,
|
|
9
|
+
KGDesignerNodeCreate,
|
|
10
|
+
KGDesignerNodeDelete,
|
|
11
|
+
KGDesignerNodeGet,
|
|
12
|
+
KGDesignerNodeList,
|
|
13
|
+
KGDesignerNodeUpdate,
|
|
14
|
+
KGDocumentDelete,
|
|
15
|
+
KGGraphOptimize,
|
|
16
|
+
KGSyncJobList,
|
|
17
|
+
KGSyncJobUpdate
|
|
18
|
+
} from "../chunk-ZKSYF4EB.mjs";
|
|
1
19
|
import {
|
|
2
20
|
DuplicatePolicyCreate,
|
|
3
21
|
DuplicatePolicyCreateIf,
|
|
@@ -16,24 +34,7 @@ import {
|
|
|
16
34
|
KGFieldQueryOperatorSimilar,
|
|
17
35
|
KGRelationshipDirectionIncoming,
|
|
18
36
|
KGRelationshipDirectionOutgoing
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import {
|
|
21
|
-
KGDBCreate,
|
|
22
|
-
KGDesignerEdgeCreate,
|
|
23
|
-
KGDesignerEdgeDelete,
|
|
24
|
-
KGDesignerEdgeGet,
|
|
25
|
-
KGDesignerEdgeList,
|
|
26
|
-
KGDesignerEdgeUpdate,
|
|
27
|
-
KGDesignerNodeCreate,
|
|
28
|
-
KGDesignerNodeDelete,
|
|
29
|
-
KGDesignerNodeGet,
|
|
30
|
-
KGDesignerNodeList,
|
|
31
|
-
KGDesignerNodeUpdate,
|
|
32
|
-
KGDocumentDelete,
|
|
33
|
-
KGGraphOptimize,
|
|
34
|
-
KGSyncJobList,
|
|
35
|
-
KGSyncJobUpdate
|
|
36
|
-
} from "../chunk-ZKSYF4EB.mjs";
|
|
37
|
+
} from "../chunk-26VARHUJ.mjs";
|
|
37
38
|
export {
|
|
38
39
|
DuplicatePolicyCreate,
|
|
39
40
|
DuplicatePolicyCreateIf,
|
|
@@ -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,39 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var _chunk5NCBQDATjs = require('../chunk-5NCBQDAT.js');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
exports.DuplicatePolicyCreate = _chunk5NCBQDATjs.DuplicatePolicyCreate; exports.DuplicatePolicyCreateIf = _chunk5NCBQDATjs.DuplicatePolicyCreateIf; exports.DuplicatePolicyFail = _chunk5NCBQDATjs.DuplicatePolicyFail; exports.DuplicatePolicyIgnore = _chunk5NCBQDATjs.DuplicatePolicyIgnore; exports.DuplicatePolicyReplace = _chunk5NCBQDATjs.DuplicatePolicyReplace; exports.KGFieldQueryOperatorArrayContains = _chunk5NCBQDATjs.KGFieldQueryOperatorArrayContains; exports.KGFieldQueryOperatorEqual = _chunk5NCBQDATjs.KGFieldQueryOperatorEqual; exports.KGFieldQueryOperatorGreater = _chunk5NCBQDATjs.KGFieldQueryOperatorGreater; exports.KGFieldQueryOperatorGreaterOrEqual = _chunk5NCBQDATjs.KGFieldQueryOperatorGreaterOrEqual; exports.KGFieldQueryOperatorIn = _chunk5NCBQDATjs.KGFieldQueryOperatorIn; exports.KGFieldQueryOperatorLess = _chunk5NCBQDATjs.KGFieldQueryOperatorLess; exports.KGFieldQueryOperatorLessOrEqual = _chunk5NCBQDATjs.KGFieldQueryOperatorLessOrEqual; exports.KGFieldQueryOperatorLike = _chunk5NCBQDATjs.KGFieldQueryOperatorLike; exports.KGFieldQueryOperatorNotEqual = _chunk5NCBQDATjs.KGFieldQueryOperatorNotEqual; exports.KGFieldQueryOperatorSimilar = _chunk5NCBQDATjs.KGFieldQueryOperatorSimilar; exports.KGRelationshipDirectionIncoming = _chunk5NCBQDATjs.KGRelationshipDirectionIncoming; exports.KGRelationshipDirectionOutgoing = _chunk5NCBQDATjs.KGRelationshipDirectionOutgoing;
|
|
39
|
+
//# sourceMappingURL=kg.js.map
|