@neo4j/graph-schema-utils 1.0.0-next.6 → 1.0.0-next.7
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/model/index.d.ts +117 -13
- package/dist/model/index.js +33 -4
- package/dist/model/index.js.map +1 -1
- package/package.json +4 -3
package/dist/model/index.d.ts
CHANGED
|
@@ -3,6 +3,77 @@ export declare class GraphSchemaRepresentation {
|
|
|
3
3
|
graphSchema: GraphSchema;
|
|
4
4
|
constructor(version: string, graphSchema: GraphSchema);
|
|
5
5
|
toJson(): string;
|
|
6
|
+
toJsonStruct(): {
|
|
7
|
+
graphSchemaRepresentation: {
|
|
8
|
+
version: string;
|
|
9
|
+
graphSchema: {
|
|
10
|
+
nodeLabels: {
|
|
11
|
+
$id: string;
|
|
12
|
+
token: string;
|
|
13
|
+
}[];
|
|
14
|
+
relationshipTypes: {
|
|
15
|
+
$id: string;
|
|
16
|
+
token: string;
|
|
17
|
+
}[];
|
|
18
|
+
nodeObjectTypes: {
|
|
19
|
+
$id: string;
|
|
20
|
+
labels: {
|
|
21
|
+
$ref: string;
|
|
22
|
+
}[];
|
|
23
|
+
properties: {
|
|
24
|
+
type: {
|
|
25
|
+
type: PrimitivePropertyTypes;
|
|
26
|
+
} | {
|
|
27
|
+
type: "array";
|
|
28
|
+
items: {
|
|
29
|
+
type: PrimitivePropertyTypes;
|
|
30
|
+
};
|
|
31
|
+
} | ({
|
|
32
|
+
type: PrimitivePropertyTypes;
|
|
33
|
+
} | {
|
|
34
|
+
type: "array";
|
|
35
|
+
items: {
|
|
36
|
+
type: PrimitivePropertyTypes;
|
|
37
|
+
};
|
|
38
|
+
})[];
|
|
39
|
+
token: string;
|
|
40
|
+
nullable: boolean;
|
|
41
|
+
}[];
|
|
42
|
+
}[];
|
|
43
|
+
relationshipObjectTypes: {
|
|
44
|
+
$id: string;
|
|
45
|
+
type: {
|
|
46
|
+
$ref: string;
|
|
47
|
+
};
|
|
48
|
+
from: {
|
|
49
|
+
$ref: string;
|
|
50
|
+
};
|
|
51
|
+
to: {
|
|
52
|
+
$ref: string;
|
|
53
|
+
};
|
|
54
|
+
properties: {
|
|
55
|
+
type: {
|
|
56
|
+
type: PrimitivePropertyTypes;
|
|
57
|
+
} | {
|
|
58
|
+
type: "array";
|
|
59
|
+
items: {
|
|
60
|
+
type: PrimitivePropertyTypes;
|
|
61
|
+
};
|
|
62
|
+
} | ({
|
|
63
|
+
type: PrimitivePropertyTypes;
|
|
64
|
+
} | {
|
|
65
|
+
type: "array";
|
|
66
|
+
items: {
|
|
67
|
+
type: PrimitivePropertyTypes;
|
|
68
|
+
};
|
|
69
|
+
})[];
|
|
70
|
+
token: string;
|
|
71
|
+
nullable: boolean;
|
|
72
|
+
}[];
|
|
73
|
+
}[];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
6
77
|
static parseJson(jsonString: any): GraphSchemaRepresentation;
|
|
7
78
|
}
|
|
8
79
|
export declare class GraphSchema {
|
|
@@ -30,12 +101,16 @@ export declare class GraphSchema {
|
|
|
30
101
|
type: PrimitivePropertyTypes;
|
|
31
102
|
} | {
|
|
32
103
|
type: "array";
|
|
33
|
-
items:
|
|
104
|
+
items: {
|
|
105
|
+
type: PrimitivePropertyTypes;
|
|
106
|
+
};
|
|
34
107
|
} | ({
|
|
35
108
|
type: PrimitivePropertyTypes;
|
|
36
109
|
} | {
|
|
37
110
|
type: "array";
|
|
38
|
-
items:
|
|
111
|
+
items: {
|
|
112
|
+
type: PrimitivePropertyTypes;
|
|
113
|
+
};
|
|
39
114
|
})[];
|
|
40
115
|
token: string;
|
|
41
116
|
nullable: boolean;
|
|
@@ -57,18 +132,25 @@ export declare class GraphSchema {
|
|
|
57
132
|
type: PrimitivePropertyTypes;
|
|
58
133
|
} | {
|
|
59
134
|
type: "array";
|
|
60
|
-
items:
|
|
135
|
+
items: {
|
|
136
|
+
type: PrimitivePropertyTypes;
|
|
137
|
+
};
|
|
61
138
|
} | ({
|
|
62
139
|
type: PrimitivePropertyTypes;
|
|
63
140
|
} | {
|
|
64
141
|
type: "array";
|
|
65
|
-
items:
|
|
142
|
+
items: {
|
|
143
|
+
type: PrimitivePropertyTypes;
|
|
144
|
+
};
|
|
66
145
|
})[];
|
|
67
146
|
token: string;
|
|
68
147
|
nullable: boolean;
|
|
69
148
|
}[];
|
|
70
149
|
}[];
|
|
71
150
|
};
|
|
151
|
+
getAllNodeLabelTokens(): string[];
|
|
152
|
+
getAllRelationshipTypeTokens(): string[];
|
|
153
|
+
getAllPropertyTokens(): string[];
|
|
72
154
|
static fromJsonStruct(json: any): GraphSchema;
|
|
73
155
|
}
|
|
74
156
|
export declare class NodeLabel {
|
|
@@ -110,12 +192,16 @@ export declare class NodeObjectType {
|
|
|
110
192
|
type: PrimitivePropertyTypes;
|
|
111
193
|
} | {
|
|
112
194
|
type: "array";
|
|
113
|
-
items:
|
|
195
|
+
items: {
|
|
196
|
+
type: PrimitivePropertyTypes;
|
|
197
|
+
};
|
|
114
198
|
} | ({
|
|
115
199
|
type: PrimitivePropertyTypes;
|
|
116
200
|
} | {
|
|
117
201
|
type: "array";
|
|
118
|
-
items:
|
|
202
|
+
items: {
|
|
203
|
+
type: PrimitivePropertyTypes;
|
|
204
|
+
};
|
|
119
205
|
})[];
|
|
120
206
|
token: string;
|
|
121
207
|
nullable: boolean;
|
|
@@ -124,6 +210,7 @@ export declare class NodeObjectType {
|
|
|
124
210
|
toRef(): {
|
|
125
211
|
$ref: string;
|
|
126
212
|
};
|
|
213
|
+
getPropertyTokens(): string[];
|
|
127
214
|
}
|
|
128
215
|
export declare class RelationshipObjectType {
|
|
129
216
|
$id: string;
|
|
@@ -148,40 +235,55 @@ export declare class RelationshipObjectType {
|
|
|
148
235
|
type: PrimitivePropertyTypes;
|
|
149
236
|
} | {
|
|
150
237
|
type: "array";
|
|
151
|
-
items:
|
|
238
|
+
items: {
|
|
239
|
+
type: PrimitivePropertyTypes;
|
|
240
|
+
};
|
|
152
241
|
} | ({
|
|
153
242
|
type: PrimitivePropertyTypes;
|
|
154
243
|
} | {
|
|
155
244
|
type: "array";
|
|
156
|
-
items:
|
|
245
|
+
items: {
|
|
246
|
+
type: PrimitivePropertyTypes;
|
|
247
|
+
};
|
|
157
248
|
})[];
|
|
158
249
|
token: string;
|
|
159
250
|
nullable: boolean;
|
|
160
251
|
}[];
|
|
161
252
|
};
|
|
253
|
+
toRef(): {
|
|
254
|
+
$ref: string;
|
|
255
|
+
};
|
|
256
|
+
getPropertyTokens(): string[];
|
|
162
257
|
}
|
|
163
258
|
export type PropertyTypes = PropertyBaseType | PropertyArrayType;
|
|
164
259
|
export declare class Property {
|
|
165
260
|
token: string;
|
|
166
261
|
type: PropertyTypes | PropertyTypes[];
|
|
167
|
-
nullable: boolean
|
|
262
|
+
nullable: boolean;
|
|
168
263
|
$id: string | undefined;
|
|
169
|
-
constructor(token: string, type:
|
|
264
|
+
constructor(token: string, type: PropertyTypes | PropertyTypes[], nullable: boolean, $id?: string);
|
|
170
265
|
toJsonStruct(): {
|
|
171
266
|
type: {
|
|
172
267
|
type: PrimitivePropertyTypes;
|
|
173
268
|
} | {
|
|
174
269
|
type: "array";
|
|
175
|
-
items:
|
|
270
|
+
items: {
|
|
271
|
+
type: PrimitivePropertyTypes;
|
|
272
|
+
};
|
|
176
273
|
} | ({
|
|
177
274
|
type: PrimitivePropertyTypes;
|
|
178
275
|
} | {
|
|
179
276
|
type: "array";
|
|
180
|
-
items:
|
|
277
|
+
items: {
|
|
278
|
+
type: PrimitivePropertyTypes;
|
|
279
|
+
};
|
|
181
280
|
})[];
|
|
182
281
|
token: string;
|
|
183
282
|
nullable: boolean;
|
|
184
283
|
};
|
|
284
|
+
toRef(): {
|
|
285
|
+
$ref: string;
|
|
286
|
+
};
|
|
185
287
|
}
|
|
186
288
|
export declare class PropertyBaseType {
|
|
187
289
|
type: PrimitivePropertyTypes;
|
|
@@ -196,7 +298,9 @@ export declare class PropertyArrayType {
|
|
|
196
298
|
constructor(items: PropertyBaseType);
|
|
197
299
|
toJsonStruct(): {
|
|
198
300
|
type: "array";
|
|
199
|
-
items:
|
|
301
|
+
items: {
|
|
302
|
+
type: PrimitivePropertyTypes;
|
|
303
|
+
};
|
|
200
304
|
};
|
|
201
305
|
}
|
|
202
306
|
export declare class PropertyType {
|
package/dist/model/index.js
CHANGED
|
@@ -4,12 +4,15 @@ export class GraphSchemaRepresentation {
|
|
|
4
4
|
this.graphSchema = graphSchema;
|
|
5
5
|
}
|
|
6
6
|
toJson() {
|
|
7
|
-
return JSON.stringify(
|
|
7
|
+
return JSON.stringify(this.toJsonStruct());
|
|
8
|
+
}
|
|
9
|
+
toJsonStruct() {
|
|
10
|
+
return {
|
|
8
11
|
graphSchemaRepresentation: {
|
|
9
12
|
version: this.version,
|
|
10
13
|
graphSchema: this.graphSchema.toJsonStruct(),
|
|
11
14
|
},
|
|
12
|
-
}
|
|
15
|
+
};
|
|
13
16
|
}
|
|
14
17
|
static parseJson(jsonString) {
|
|
15
18
|
const json = JSON.parse(jsonString);
|
|
@@ -33,6 +36,18 @@ export class GraphSchema {
|
|
|
33
36
|
relationshipObjectTypes: this.relationshipObjectTypes.map((relationshipObjectType) => relationshipObjectType.toJsonStruct()),
|
|
34
37
|
};
|
|
35
38
|
}
|
|
39
|
+
getAllNodeLabelTokens() {
|
|
40
|
+
return this.nodeLabels.map((nodeLabel) => nodeLabel.token);
|
|
41
|
+
}
|
|
42
|
+
getAllRelationshipTypeTokens() {
|
|
43
|
+
return this.relationshipTypes.map((relationshipType) => relationshipType.token);
|
|
44
|
+
}
|
|
45
|
+
getAllPropertyTokens() {
|
|
46
|
+
const nodeProperties = this.nodeObjectTypes.flatMap((nodeObjectType) => nodeObjectType.getPropertyTokens());
|
|
47
|
+
const relationshipProperties = this.relationshipObjectTypes.flatMap((relationshipObjectType) => relationshipObjectType.getPropertyTokens());
|
|
48
|
+
// return all tokens without duplicates
|
|
49
|
+
return [...new Set([...nodeProperties, ...relationshipProperties])];
|
|
50
|
+
}
|
|
36
51
|
static fromJsonStruct(json) {
|
|
37
52
|
const nodeLabels = json.nodeLabels.map((nodeLabel) => new NodeLabel(nodeLabel.$id, nodeLabel.token));
|
|
38
53
|
const relationshipTypes = json.relationshipTypes.map((relationshipType) => new RelationshipType(relationshipType.$id, relationshipType.token));
|
|
@@ -119,6 +134,9 @@ export class NodeObjectType {
|
|
|
119
134
|
$ref: `#${this.$id}`,
|
|
120
135
|
};
|
|
121
136
|
}
|
|
137
|
+
getPropertyTokens() {
|
|
138
|
+
return this.properties.map((property) => property.token);
|
|
139
|
+
}
|
|
122
140
|
}
|
|
123
141
|
export class RelationshipObjectType {
|
|
124
142
|
constructor(id, type, from, to, properties = []) {
|
|
@@ -146,6 +164,14 @@ export class RelationshipObjectType {
|
|
|
146
164
|
properties: this.properties.map((property) => property.toJsonStruct()),
|
|
147
165
|
};
|
|
148
166
|
}
|
|
167
|
+
toRef() {
|
|
168
|
+
return {
|
|
169
|
+
$ref: `#${this.$id}`,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
getPropertyTokens() {
|
|
173
|
+
return this.properties.map((property) => property.token);
|
|
174
|
+
}
|
|
149
175
|
}
|
|
150
176
|
export class Property {
|
|
151
177
|
constructor(token, type, nullable, $id) {
|
|
@@ -168,6 +194,9 @@ export class Property {
|
|
|
168
194
|
}
|
|
169
195
|
return out;
|
|
170
196
|
}
|
|
197
|
+
toRef() {
|
|
198
|
+
return this.$id !== undefined ? { $ref: `#${this.$id}` } : null;
|
|
199
|
+
}
|
|
171
200
|
}
|
|
172
201
|
export class PropertyBaseType {
|
|
173
202
|
constructor(type) {
|
|
@@ -187,7 +216,7 @@ export class PropertyArrayType {
|
|
|
187
216
|
toJsonStruct() {
|
|
188
217
|
return {
|
|
189
218
|
type: this.type,
|
|
190
|
-
items: this.items,
|
|
219
|
+
items: this.items.toJsonStruct(),
|
|
191
220
|
};
|
|
192
221
|
}
|
|
193
222
|
}
|
|
@@ -197,7 +226,7 @@ export class PropertyType {
|
|
|
197
226
|
return json.map((item) => PropertyType.fromJsonStruct(item));
|
|
198
227
|
}
|
|
199
228
|
if (json.type === "array") {
|
|
200
|
-
return new PropertyArrayType(json.items);
|
|
229
|
+
return new PropertyArrayType(new PropertyBaseType(json.items.type));
|
|
201
230
|
}
|
|
202
231
|
return new PropertyBaseType(json.type);
|
|
203
232
|
}
|
package/dist/model/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,yBAAyB;IAIpC,YAAY,OAAe,EAAE,WAAwB;QACnD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,yBAAyB;IAIpC,YAAY,OAAe,EAAE,WAAwB;QACnD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,YAAY;QACV,OAAO;YACL,yBAAyB,EAAE;gBACzB,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE;aAC7C;SACF,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,UAAU;QACzB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC;QACvD,MAAM,WAAW,GAAG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C,OAAO,CAAC,IAAI,CAAC,EAAE;YACvB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;SAC9D;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;YACzB,OAAO,IAAI,iBAAiB,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;SACrE;QACD,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j/graph-schema-utils",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.7",
|
|
4
4
|
"description": "Utilities for Neo4j Graph Schema JSON representation",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"test:watch": "vitest",
|
|
16
16
|
"test": "vitest run",
|
|
17
|
-
"build": "tsc"
|
|
17
|
+
"build": "tsc --project tsconfig.build.json",
|
|
18
|
+
"check": "tsc --project tsconfig.check.json"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
20
21
|
"dist"
|
|
@@ -37,6 +38,6 @@
|
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@vitest/coverage-c8": "^0.25.3",
|
|
39
40
|
"vitest": "^0.25.3",
|
|
40
|
-
"@neo4j/graph-json-schema": "1.0.0-next.
|
|
41
|
+
"@neo4j/graph-json-schema": "1.0.0-next.3"
|
|
41
42
|
}
|
|
42
43
|
}
|