@neo4j/graph-schema-utils 1.0.0-next.6 → 1.0.0-next.8
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 +190 -14
- package/dist/model/index.js +36 -4
- package/dist/model/index.js.map +1 -1
- package/package.json +4 -3
package/dist/model/index.d.ts
CHANGED
|
@@ -3,8 +3,151 @@ export declare class GraphSchemaRepresentation {
|
|
|
3
3
|
graphSchema: GraphSchema;
|
|
4
4
|
constructor(version: string, graphSchema: GraphSchema);
|
|
5
5
|
toJson(): string;
|
|
6
|
-
|
|
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
|
+
};
|
|
77
|
+
static parseJson(jsonString: string): GraphSchemaRepresentation;
|
|
78
|
+
static parseJsonStruct(json: {
|
|
79
|
+
graphSchemaRepresentation: GraphSchemaRepresentationJsonStruct;
|
|
80
|
+
}): GraphSchemaRepresentation;
|
|
7
81
|
}
|
|
82
|
+
export type GraphSchemaRepresentationJsonStruct = {
|
|
83
|
+
version: string;
|
|
84
|
+
graphSchema: {
|
|
85
|
+
nodeLabels: {
|
|
86
|
+
$id: string;
|
|
87
|
+
token: string;
|
|
88
|
+
}[];
|
|
89
|
+
relationshipTypes: {
|
|
90
|
+
$id: string;
|
|
91
|
+
token: string;
|
|
92
|
+
}[];
|
|
93
|
+
nodeObjectTypes: {
|
|
94
|
+
$id: string;
|
|
95
|
+
labels: {
|
|
96
|
+
$ref: string;
|
|
97
|
+
}[];
|
|
98
|
+
properties: {
|
|
99
|
+
token: string;
|
|
100
|
+
type: {
|
|
101
|
+
type: PrimitivePropertyTypes;
|
|
102
|
+
} | {
|
|
103
|
+
type: "array";
|
|
104
|
+
items: {
|
|
105
|
+
type: PrimitivePropertyTypes;
|
|
106
|
+
};
|
|
107
|
+
} | ({
|
|
108
|
+
type: PrimitivePropertyTypes;
|
|
109
|
+
} | {
|
|
110
|
+
type: "array";
|
|
111
|
+
items: {
|
|
112
|
+
type: PrimitivePropertyTypes;
|
|
113
|
+
};
|
|
114
|
+
})[];
|
|
115
|
+
nullable: boolean;
|
|
116
|
+
}[];
|
|
117
|
+
relationshipObjectTypes: {
|
|
118
|
+
$id: string;
|
|
119
|
+
type: {
|
|
120
|
+
$ref: string;
|
|
121
|
+
};
|
|
122
|
+
from: {
|
|
123
|
+
$ref: string;
|
|
124
|
+
};
|
|
125
|
+
to: {
|
|
126
|
+
$ref: string;
|
|
127
|
+
};
|
|
128
|
+
properties: {
|
|
129
|
+
token: string;
|
|
130
|
+
type: {
|
|
131
|
+
type: string;
|
|
132
|
+
} | {
|
|
133
|
+
type: "array";
|
|
134
|
+
items: {
|
|
135
|
+
type: "string";
|
|
136
|
+
};
|
|
137
|
+
} | ({
|
|
138
|
+
type: string;
|
|
139
|
+
} | {
|
|
140
|
+
type: "array";
|
|
141
|
+
items: {
|
|
142
|
+
type: "string";
|
|
143
|
+
};
|
|
144
|
+
})[];
|
|
145
|
+
nullable: boolean;
|
|
146
|
+
}[];
|
|
147
|
+
}[];
|
|
148
|
+
}[];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
8
151
|
export declare class GraphSchema {
|
|
9
152
|
nodeLabels: NodeLabel[];
|
|
10
153
|
relationshipTypes: RelationshipType[];
|
|
@@ -30,12 +173,16 @@ export declare class GraphSchema {
|
|
|
30
173
|
type: PrimitivePropertyTypes;
|
|
31
174
|
} | {
|
|
32
175
|
type: "array";
|
|
33
|
-
items:
|
|
176
|
+
items: {
|
|
177
|
+
type: PrimitivePropertyTypes;
|
|
178
|
+
};
|
|
34
179
|
} | ({
|
|
35
180
|
type: PrimitivePropertyTypes;
|
|
36
181
|
} | {
|
|
37
182
|
type: "array";
|
|
38
|
-
items:
|
|
183
|
+
items: {
|
|
184
|
+
type: PrimitivePropertyTypes;
|
|
185
|
+
};
|
|
39
186
|
})[];
|
|
40
187
|
token: string;
|
|
41
188
|
nullable: boolean;
|
|
@@ -57,18 +204,25 @@ export declare class GraphSchema {
|
|
|
57
204
|
type: PrimitivePropertyTypes;
|
|
58
205
|
} | {
|
|
59
206
|
type: "array";
|
|
60
|
-
items:
|
|
207
|
+
items: {
|
|
208
|
+
type: PrimitivePropertyTypes;
|
|
209
|
+
};
|
|
61
210
|
} | ({
|
|
62
211
|
type: PrimitivePropertyTypes;
|
|
63
212
|
} | {
|
|
64
213
|
type: "array";
|
|
65
|
-
items:
|
|
214
|
+
items: {
|
|
215
|
+
type: PrimitivePropertyTypes;
|
|
216
|
+
};
|
|
66
217
|
})[];
|
|
67
218
|
token: string;
|
|
68
219
|
nullable: boolean;
|
|
69
220
|
}[];
|
|
70
221
|
}[];
|
|
71
222
|
};
|
|
223
|
+
getAllNodeLabelTokens(): string[];
|
|
224
|
+
getAllRelationshipTypeTokens(): string[];
|
|
225
|
+
getAllPropertyTokens(): string[];
|
|
72
226
|
static fromJsonStruct(json: any): GraphSchema;
|
|
73
227
|
}
|
|
74
228
|
export declare class NodeLabel {
|
|
@@ -110,12 +264,16 @@ export declare class NodeObjectType {
|
|
|
110
264
|
type: PrimitivePropertyTypes;
|
|
111
265
|
} | {
|
|
112
266
|
type: "array";
|
|
113
|
-
items:
|
|
267
|
+
items: {
|
|
268
|
+
type: PrimitivePropertyTypes;
|
|
269
|
+
};
|
|
114
270
|
} | ({
|
|
115
271
|
type: PrimitivePropertyTypes;
|
|
116
272
|
} | {
|
|
117
273
|
type: "array";
|
|
118
|
-
items:
|
|
274
|
+
items: {
|
|
275
|
+
type: PrimitivePropertyTypes;
|
|
276
|
+
};
|
|
119
277
|
})[];
|
|
120
278
|
token: string;
|
|
121
279
|
nullable: boolean;
|
|
@@ -124,6 +282,7 @@ export declare class NodeObjectType {
|
|
|
124
282
|
toRef(): {
|
|
125
283
|
$ref: string;
|
|
126
284
|
};
|
|
285
|
+
getPropertyTokens(): string[];
|
|
127
286
|
}
|
|
128
287
|
export declare class RelationshipObjectType {
|
|
129
288
|
$id: string;
|
|
@@ -148,40 +307,55 @@ export declare class RelationshipObjectType {
|
|
|
148
307
|
type: PrimitivePropertyTypes;
|
|
149
308
|
} | {
|
|
150
309
|
type: "array";
|
|
151
|
-
items:
|
|
310
|
+
items: {
|
|
311
|
+
type: PrimitivePropertyTypes;
|
|
312
|
+
};
|
|
152
313
|
} | ({
|
|
153
314
|
type: PrimitivePropertyTypes;
|
|
154
315
|
} | {
|
|
155
316
|
type: "array";
|
|
156
|
-
items:
|
|
317
|
+
items: {
|
|
318
|
+
type: PrimitivePropertyTypes;
|
|
319
|
+
};
|
|
157
320
|
})[];
|
|
158
321
|
token: string;
|
|
159
322
|
nullable: boolean;
|
|
160
323
|
}[];
|
|
161
324
|
};
|
|
325
|
+
toRef(): {
|
|
326
|
+
$ref: string;
|
|
327
|
+
};
|
|
328
|
+
getPropertyTokens(): string[];
|
|
162
329
|
}
|
|
163
330
|
export type PropertyTypes = PropertyBaseType | PropertyArrayType;
|
|
164
331
|
export declare class Property {
|
|
165
332
|
token: string;
|
|
166
333
|
type: PropertyTypes | PropertyTypes[];
|
|
167
|
-
nullable: boolean
|
|
334
|
+
nullable: boolean;
|
|
168
335
|
$id: string | undefined;
|
|
169
|
-
constructor(token: string, type:
|
|
336
|
+
constructor(token: string, type: PropertyTypes | PropertyTypes[], nullable: boolean, $id?: string);
|
|
170
337
|
toJsonStruct(): {
|
|
171
338
|
type: {
|
|
172
339
|
type: PrimitivePropertyTypes;
|
|
173
340
|
} | {
|
|
174
341
|
type: "array";
|
|
175
|
-
items:
|
|
342
|
+
items: {
|
|
343
|
+
type: PrimitivePropertyTypes;
|
|
344
|
+
};
|
|
176
345
|
} | ({
|
|
177
346
|
type: PrimitivePropertyTypes;
|
|
178
347
|
} | {
|
|
179
348
|
type: "array";
|
|
180
|
-
items:
|
|
349
|
+
items: {
|
|
350
|
+
type: PrimitivePropertyTypes;
|
|
351
|
+
};
|
|
181
352
|
})[];
|
|
182
353
|
token: string;
|
|
183
354
|
nullable: boolean;
|
|
184
355
|
};
|
|
356
|
+
toRef(): {
|
|
357
|
+
$ref: string;
|
|
358
|
+
};
|
|
185
359
|
}
|
|
186
360
|
export declare class PropertyBaseType {
|
|
187
361
|
type: PrimitivePropertyTypes;
|
|
@@ -196,7 +370,9 @@ export declare class PropertyArrayType {
|
|
|
196
370
|
constructor(items: PropertyBaseType);
|
|
197
371
|
toJsonStruct(): {
|
|
198
372
|
type: "array";
|
|
199
|
-
items:
|
|
373
|
+
items: {
|
|
374
|
+
type: PrimitivePropertyTypes;
|
|
375
|
+
};
|
|
200
376
|
};
|
|
201
377
|
}
|
|
202
378
|
export declare class PropertyType {
|
package/dist/model/index.js
CHANGED
|
@@ -4,15 +4,21 @@ 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);
|
|
19
|
+
return this.parseJsonStruct(json);
|
|
20
|
+
}
|
|
21
|
+
static parseJsonStruct(json) {
|
|
16
22
|
const version = json.graphSchemaRepresentation.version;
|
|
17
23
|
const graphSchema = GraphSchema.fromJsonStruct(json.graphSchemaRepresentation.graphSchema);
|
|
18
24
|
return new GraphSchemaRepresentation(version, graphSchema);
|
|
@@ -33,6 +39,18 @@ export class GraphSchema {
|
|
|
33
39
|
relationshipObjectTypes: this.relationshipObjectTypes.map((relationshipObjectType) => relationshipObjectType.toJsonStruct()),
|
|
34
40
|
};
|
|
35
41
|
}
|
|
42
|
+
getAllNodeLabelTokens() {
|
|
43
|
+
return this.nodeLabels.map((nodeLabel) => nodeLabel.token);
|
|
44
|
+
}
|
|
45
|
+
getAllRelationshipTypeTokens() {
|
|
46
|
+
return this.relationshipTypes.map((relationshipType) => relationshipType.token);
|
|
47
|
+
}
|
|
48
|
+
getAllPropertyTokens() {
|
|
49
|
+
const nodeProperties = this.nodeObjectTypes.flatMap((nodeObjectType) => nodeObjectType.getPropertyTokens());
|
|
50
|
+
const relationshipProperties = this.relationshipObjectTypes.flatMap((relationshipObjectType) => relationshipObjectType.getPropertyTokens());
|
|
51
|
+
// return all tokens without duplicates
|
|
52
|
+
return [...new Set([...nodeProperties, ...relationshipProperties])];
|
|
53
|
+
}
|
|
36
54
|
static fromJsonStruct(json) {
|
|
37
55
|
const nodeLabels = json.nodeLabels.map((nodeLabel) => new NodeLabel(nodeLabel.$id, nodeLabel.token));
|
|
38
56
|
const relationshipTypes = json.relationshipTypes.map((relationshipType) => new RelationshipType(relationshipType.$id, relationshipType.token));
|
|
@@ -119,6 +137,9 @@ export class NodeObjectType {
|
|
|
119
137
|
$ref: `#${this.$id}`,
|
|
120
138
|
};
|
|
121
139
|
}
|
|
140
|
+
getPropertyTokens() {
|
|
141
|
+
return this.properties.map((property) => property.token);
|
|
142
|
+
}
|
|
122
143
|
}
|
|
123
144
|
export class RelationshipObjectType {
|
|
124
145
|
constructor(id, type, from, to, properties = []) {
|
|
@@ -146,6 +167,14 @@ export class RelationshipObjectType {
|
|
|
146
167
|
properties: this.properties.map((property) => property.toJsonStruct()),
|
|
147
168
|
};
|
|
148
169
|
}
|
|
170
|
+
toRef() {
|
|
171
|
+
return {
|
|
172
|
+
$ref: `#${this.$id}`,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
getPropertyTokens() {
|
|
176
|
+
return this.properties.map((property) => property.token);
|
|
177
|
+
}
|
|
149
178
|
}
|
|
150
179
|
export class Property {
|
|
151
180
|
constructor(token, type, nullable, $id) {
|
|
@@ -168,6 +197,9 @@ export class Property {
|
|
|
168
197
|
}
|
|
169
198
|
return out;
|
|
170
199
|
}
|
|
200
|
+
toRef() {
|
|
201
|
+
return this.$id !== undefined ? { $ref: `#${this.$id}` } : null;
|
|
202
|
+
}
|
|
171
203
|
}
|
|
172
204
|
export class PropertyBaseType {
|
|
173
205
|
constructor(type) {
|
|
@@ -187,7 +219,7 @@ export class PropertyArrayType {
|
|
|
187
219
|
toJsonStruct() {
|
|
188
220
|
return {
|
|
189
221
|
type: this.type,
|
|
190
|
-
items: this.items,
|
|
222
|
+
items: this.items.toJsonStruct(),
|
|
191
223
|
};
|
|
192
224
|
}
|
|
193
225
|
}
|
|
@@ -197,7 +229,7 @@ export class PropertyType {
|
|
|
197
229
|
return json.map((item) => PropertyType.fromJsonStruct(item));
|
|
198
230
|
}
|
|
199
231
|
if (json.type === "array") {
|
|
200
|
-
return new PropertyArrayType(json.items);
|
|
232
|
+
return new PropertyArrayType(new PropertyBaseType(json.items.type));
|
|
201
233
|
}
|
|
202
234
|
return new PropertyBaseType(json.type);
|
|
203
235
|
}
|
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,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EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAClE,CAAC;CACF;AAED,MAAM,OAAO,gBAAgB;IAE3B,YAAY,IAA4B;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,YAAY;QACV,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,iBAAiB;IAI5B,YAAY,KAAuB;QACjC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACD,YAAY;QACV,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;SACjC,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,YAAY;IACvB,MAAM,CAAC,cAAc,CAAC,IAAI;QACxB,IAAI,KAAK,CAAC,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.8",
|
|
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
|
}
|