@twin.org/auditable-item-graph-service 0.10.0 → 0.10.1-next.2
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/es/auditableItemGraphService.js +299 -120
- package/dist/es/auditableItemGraphService.js.map +1 -1
- package/dist/es/entities/auditableItemGraphAlias.js +2 -2
- package/dist/es/entities/auditableItemGraphAlias.js.map +1 -1
- package/dist/es/entities/auditableItemGraphChangeset.js +15 -5
- package/dist/es/entities/auditableItemGraphChangeset.js.map +1 -1
- package/dist/es/entities/auditableItemGraphEdge.js +2 -2
- package/dist/es/entities/auditableItemGraphEdge.js.map +1 -1
- package/dist/es/entities/auditableItemGraphPatch.js +3 -3
- package/dist/es/entities/auditableItemGraphPatch.js.map +1 -1
- package/dist/es/entities/auditableItemGraphResource.js +1 -1
- package/dist/es/entities/auditableItemGraphResource.js.map +1 -1
- package/dist/es/entities/auditableItemGraphVertex.js +4 -20
- package/dist/es/entities/auditableItemGraphVertex.js.map +1 -1
- package/dist/es/entities/auditableItemGraphVertexIndex.js +83 -0
- package/dist/es/entities/auditableItemGraphVertexIndex.js.map +1 -0
- package/dist/es/entities/auditableItemGraphVertexV1.js +113 -0
- package/dist/es/entities/auditableItemGraphVertexV1.js.map +1 -0
- package/dist/es/index.js +2 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphServiceConstructorOptions.js.map +1 -1
- package/dist/es/schema.js +4 -0
- package/dist/es/schema.js.map +1 -1
- package/dist/types/auditableItemGraphService.d.ts +3 -2
- package/dist/types/entities/auditableItemGraphVertex.d.ts +0 -8
- package/dist/types/entities/auditableItemGraphVertexIndex.d.ts +31 -0
- package/dist/types/entities/auditableItemGraphVertexV1.d.ts +58 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/IAuditableItemGraphServiceConstructorOptions.d.ts +5 -0
- package/docs/changelog.md +86 -0
- package/docs/open-api/spec.json +1 -1
- package/docs/reference/classes/AuditableItemGraphService.md +2 -1
- package/docs/reference/classes/AuditableItemGraphVertex.md +0 -16
- package/docs/reference/classes/AuditableItemGraphVertexIndex.md +63 -0
- package/docs/reference/classes/AuditableItemGraphVertexV1.md +109 -0
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IAuditableItemGraphServiceConstructorOptions.md +14 -0
- package/package.json +16 -16
|
@@ -36,11 +36,11 @@ let AuditableItemGraphAlias = class AuditableItemGraphAlias {
|
|
|
36
36
|
unique;
|
|
37
37
|
};
|
|
38
38
|
__decorate([
|
|
39
|
-
property({ type: "string" }),
|
|
39
|
+
property({ type: "string", maxLength: 255 }),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], AuditableItemGraphAlias.prototype, "id", void 0);
|
|
42
42
|
__decorate([
|
|
43
|
-
property({ type: "string", optional: true }),
|
|
43
|
+
property({ type: "string", maxLength: 128, optional: true }),
|
|
44
44
|
__metadata("design:type", String)
|
|
45
45
|
], AuditableItemGraphAlias.prototype, "aliasFormat", void 0);
|
|
46
46
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemGraphAlias.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphAlias.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACnC;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,gBAAgB,CAAqB;IAE5C;;OAEG;IAEI,MAAM,CAAW;CACxB,CAAA;AArCO;IADN,QAAQ,CAA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Q,EAAE,IAAI,EAAE,CAAC;;iEACtC;AAMrC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACtB;AAzCZ,uBAAuB;IADnC,MAAM,EAAE;GACI,uBAAuB,CA0CnC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { JsonLdTypes, type IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { entity, property } from \"@twin.org/entity\";\n\n/**\n * Class describing the auditable item graph alias.\n */\n@entity()\nexport class AuditableItemGraphAlias {\n\t/**\n\t * The alternative alias for the vertex.\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic id!: string;\n\n\t/**\n\t * The format of the alias for the vertex.\n\t */\n\t@property({ type: \"string\", maxLength: 128, optional: true })\n\tpublic aliasFormat?: string;\n\n\t/**\n\t * The date/time of when the alias was created.\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * The date/time of when the alias was last modified.\n\t */\n\t@property({ type: \"string\", format: \"date-time\", optional: true })\n\tpublic dateModified?: string;\n\n\t/**\n\t * The timestamp of when the alias was deleted, as we never actually remove items.\n\t */\n\t@property({ type: \"string\", format: \"date-time\", optional: true })\n\tpublic dateDeleted?: string;\n\n\t/**\n\t * Object to associate with the alias as JSON-LD.\n\t */\n\t@property({ type: \"object\", itemTypeRef: JsonLdTypes.NodeObject, optional: true })\n\tpublic annotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * Whether the alias should be unique across the graph, meaning that no other vertex can have the same alias. Defaults to false.\n\t */\n\t@property({ type: \"boolean\", optional: true })\n\tpublic unique?: boolean;\n}\n"]}
|
|
@@ -35,19 +35,29 @@ let AuditableItemGraphChangeset = class AuditableItemGraphChangeset {
|
|
|
35
35
|
version;
|
|
36
36
|
};
|
|
37
37
|
__decorate([
|
|
38
|
-
property({ type: "string", isPrimary: true }),
|
|
38
|
+
property({ type: "string", isPrimary: true, maxLength: 255 }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], AuditableItemGraphChangeset.prototype, "id", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
property({
|
|
42
|
+
property({
|
|
43
|
+
type: "string",
|
|
44
|
+
maxLength: 255,
|
|
45
|
+
isSecondary: true,
|
|
46
|
+
indexGroup: [{ name: "vertexDate", direction: SortDirection.Ascending, index: 0 }]
|
|
47
|
+
}),
|
|
43
48
|
__metadata("design:type", String)
|
|
44
49
|
], AuditableItemGraphChangeset.prototype, "vertexId", void 0);
|
|
45
50
|
__decorate([
|
|
46
|
-
property({
|
|
51
|
+
property({
|
|
52
|
+
type: "string",
|
|
53
|
+
format: "date-time",
|
|
54
|
+
sortDirection: SortDirection.Descending,
|
|
55
|
+
indexGroup: [{ name: "vertexDate", direction: SortDirection.Ascending, index: 1 }]
|
|
56
|
+
}),
|
|
47
57
|
__metadata("design:type", String)
|
|
48
58
|
], AuditableItemGraphChangeset.prototype, "dateCreated", void 0);
|
|
49
59
|
__decorate([
|
|
50
|
-
property({ type: "string", optional: true }),
|
|
60
|
+
property({ type: "string", maxLength: 255, optional: true }),
|
|
51
61
|
__metadata("design:type", String)
|
|
52
62
|
], AuditableItemGraphChangeset.prototype, "userIdentity", void 0);
|
|
53
63
|
__decorate([
|
|
@@ -55,7 +65,7 @@ __decorate([
|
|
|
55
65
|
__metadata("design:type", Array)
|
|
56
66
|
], AuditableItemGraphChangeset.prototype, "patches", void 0);
|
|
57
67
|
__decorate([
|
|
58
|
-
property({ type: "string", optional: true }),
|
|
68
|
+
property({ type: "string", maxLength: 255, optional: true }),
|
|
59
69
|
__metadata("design:type", String)
|
|
60
70
|
], AuditableItemGraphChangeset.prototype, "proofId", void 0);
|
|
61
71
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemGraphChangeset.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphChangeset.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGnE;;GAEG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACvC;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;
|
|
1
|
+
{"version":3,"file":"auditableItemGraphChangeset.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphChangeset.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGnE;;GAEG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACvC;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAOI,QAAQ,CAAU;IAEzB;;OAEG;IAOI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;OAEG;IAEI,OAAO,CAA6B;IAE3C;;OAEG;IAEI,OAAO,CAAU;IAExB;;OAEG;IAEI,OAAO,CAAU;CACxB,CAAA;AA/CO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;uDAC3C;AAWZ;IANN,QAAQ,CAAC;QACT,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,GAAG;QACd,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KAClF,CAAC;;6DACuB;AAWlB;IANN,QAAQ,CAAC;QACT,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,WAAW;QACnB,aAAa,EAAE,aAAa,CAAC,UAAU;QACvC,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KAClF,CAAC;;gEAC0B;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEAChC;AAMtB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;;4DACzB;AAMpC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACrC;AAMjB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;4DACzC;AAnDZ,2BAA2B;IADvC,MAAM,EAAE;GACI,2BAA2B,CAoDvC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\nimport type { AuditableItemGraphPatch } from \"./auditableItemGraphPatch.js\";\n\n/**\n * Class describing a set of updates to the vertex.\n */\n@entity()\nexport class AuditableItemGraphChangeset {\n\t/**\n\t * The id of the changeset.\n\t */\n\t@property({ type: \"string\", isPrimary: true, maxLength: 255 })\n\tpublic id!: string;\n\n\t/**\n\t * The vertex the changeset belongs to.\n\t */\n\t@property({\n\t\ttype: \"string\",\n\t\tmaxLength: 255,\n\t\tisSecondary: true,\n\t\tindexGroup: [{ name: \"vertexDate\", direction: SortDirection.Ascending, index: 0 }]\n\t})\n\tpublic vertexId!: string;\n\n\t/**\n\t * The date/time of when the changeset was created.\n\t */\n\t@property({\n\t\ttype: \"string\",\n\t\tformat: \"date-time\",\n\t\tsortDirection: SortDirection.Descending,\n\t\tindexGroup: [{ name: \"vertexDate\", direction: SortDirection.Ascending, index: 1 }]\n\t})\n\tpublic dateCreated!: string;\n\n\t/**\n\t * The identity of the user who made the changeset.\n\t */\n\t@property({ type: \"string\", maxLength: 255, optional: true })\n\tpublic userIdentity?: string;\n\n\t/**\n\t * The patches in the changeset.\n\t */\n\t@property({ type: \"array\", itemTypeRef: \"AuditableItemGraphPatch\" })\n\tpublic patches!: AuditableItemGraphPatch[];\n\n\t/**\n\t * The immutable proof id which contains the signature for this changeset.\n\t */\n\t@property({ type: \"string\", maxLength: 255, optional: true })\n\tpublic proofId?: string;\n\n\t/**\n\t * The version number of the vertex after this changeset was applied.\n\t */\n\t@property({ type: \"integer\", optional: true, isSecondary: true })\n\tpublic version?: number;\n}\n"]}
|
|
@@ -36,7 +36,7 @@ let AuditableItemGraphEdge = class AuditableItemGraphEdge {
|
|
|
36
36
|
annotationObject;
|
|
37
37
|
};
|
|
38
38
|
__decorate([
|
|
39
|
-
property({ type: "string" }),
|
|
39
|
+
property({ type: "string", maxLength: 255 }),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], AuditableItemGraphEdge.prototype, "id", void 0);
|
|
42
42
|
__decorate([
|
|
@@ -52,7 +52,7 @@ __decorate([
|
|
|
52
52
|
__metadata("design:type", String)
|
|
53
53
|
], AuditableItemGraphEdge.prototype, "dateDeleted", void 0);
|
|
54
54
|
__decorate([
|
|
55
|
-
property({ type: "string" }),
|
|
55
|
+
property({ type: "string", maxLength: 255 }),
|
|
56
56
|
__metadata("design:type", String)
|
|
57
57
|
], AuditableItemGraphEdge.prototype, "targetId", void 0);
|
|
58
58
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemGraphEdge.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphEdge.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAA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;;4DACrC;AAMtB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACtC;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;wDACpB;AAMlB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;iEACQ;AAM7B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACtC;AAzChC,sBAAsB;IADlC,MAAM,EAAE;GACI,sBAAsB,CA0ClC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { JsonLdTypes, type IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { entity, property } from \"@twin.org/entity\";\n\n/**\n * Class describing the auditable item graph edge.\n */\n@entity()\nexport class AuditableItemGraphEdge {\n\t/**\n\t * The id of the edge.\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic id!: string;\n\n\t/**\n\t * The date/time of when the edge was created.\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * The date/time of when the edge was last modified.\n\t */\n\t@property({ type: \"string\", format: \"date-time\", optional: true })\n\tpublic dateModified?: string;\n\n\t/**\n\t * The timestamp of when the edge was deleted, as we never actually remove items.\n\t */\n\t@property({ type: \"string\", format: \"date-time\", optional: true })\n\tpublic dateDeleted?: string;\n\n\t/**\n\t * The target id of the edge.\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic targetId!: string;\n\n\t/**\n\t * The relationships between the two vertices.\n\t */\n\t@property({ type: \"array\" })\n\tpublic edgeRelationships!: string[];\n\n\t/**\n\t * Object to associate with the edge as JSON-LD.\n\t */\n\t@property({ type: \"object\", itemTypeRef: JsonLdTypes.NodeObject, optional: true })\n\tpublic annotationObject?: IJsonLdNodeObject;\n}\n"]}
|
|
@@ -23,15 +23,15 @@ let AuditableItemGraphPatch = class AuditableItemGraphPatch {
|
|
|
23
23
|
value;
|
|
24
24
|
};
|
|
25
25
|
__decorate([
|
|
26
|
-
property({ type: "string" }),
|
|
26
|
+
property({ type: "string", maxLength: 10 }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], AuditableItemGraphPatch.prototype, "op", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
property({ type: "string" }),
|
|
30
|
+
property({ type: "string", maxLength: 1024 }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], AuditableItemGraphPatch.prototype, "path", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
property({ type: "string", optional: true }),
|
|
34
|
+
property({ type: "string", maxLength: 1024, optional: true }),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
36
|
], AuditableItemGraphPatch.prototype, "from", void 0);
|
|
37
37
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemGraphPatch.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphPatch.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACnC;;OAEG;IAEI,EAAE,CAA2D;IAEpE;;OAEG;IAEI,IAAI,CAAU;IAErB;;OAEG;IAEI,IAAI,CAAU;IAErB;;OAEG;IAEI,KAAK,CAAW;CACvB,CAAA;AAnBO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"auditableItemGraphPatch.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphPatch.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACnC;;OAEG;IAEI,EAAE,CAA2D;IAEpE;;OAEG;IAEI,IAAI,CAAU;IAErB;;OAEG;IAEI,IAAI,CAAU;IAErB;;OAEG;IAEI,KAAK,CAAW;CACvB,CAAA;AAnBO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;mDACwB;AAM7D;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;qDACzB;AAMd;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACzC;AAMd;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACtB;AAvBX,uBAAuB;IADnC,MAAM,EAAE;GACI,uBAAuB,CAwBnC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property } from \"@twin.org/entity\";\n\n/**\n * Class describing the auditable item graph patches.\n */\n@entity()\nexport class AuditableItemGraphPatch {\n\t/**\n\t * The operation for the patch.\n\t */\n\t@property({ type: \"string\", maxLength: 10 })\n\tpublic op!: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n\n\t/**\n\t * The path for the patch.\n\t */\n\t@property({ type: \"string\", maxLength: 1024 })\n\tpublic path!: string;\n\n\t/**\n\t * The from for the patch.\n\t */\n\t@property({ type: \"string\", maxLength: 1024, optional: true })\n\tpublic from?: string;\n\n\t/**\n\t * The value for the patch.\n\t */\n\t@property({ type: \"object\", optional: true })\n\tpublic value?: unknown;\n}\n"]}
|
|
@@ -28,7 +28,7 @@ let AuditableItemGraphResource = class AuditableItemGraphResource {
|
|
|
28
28
|
resourceObject;
|
|
29
29
|
};
|
|
30
30
|
__decorate([
|
|
31
|
-
property({ type: "string", optional: true }),
|
|
31
|
+
property({ type: "string", maxLength: 255, optional: true }),
|
|
32
32
|
__metadata("design:type", String)
|
|
33
33
|
], AuditableItemGraphResource.prototype, "id", void 0);
|
|
34
34
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemGraphResource.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphResource.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACtC;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,cAAc,CAAqB;CAC1C,CAAA;AAzBO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;
|
|
1
|
+
{"version":3,"file":"auditableItemGraphResource.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphResource.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;GAEG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACtC;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,YAAY,CAAU;IAE7B;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAEI,cAAc,CAAqB;CAC1C,CAAA;AAzBO;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC1C;AAMZ;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;;+DACtB;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACrC;AAMtB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+DACtC;AAMrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACxC;AA7B9B,0BAA0B;IADtC,MAAM,EAAE;GACI,0BAA0B,CA8BtC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { JsonLdTypes, type IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { entity, property } from \"@twin.org/entity\";\n\n/**\n * Class describing the auditable item graph vertex resource.\n */\n@entity()\nexport class AuditableItemGraphResource {\n\t/**\n\t * The id of the resource.\n\t */\n\t@property({ type: \"string\", maxLength: 255, optional: true })\n\tpublic id?: string;\n\n\t/**\n\t * The date/time of when the resource was created.\n\t */\n\t@property({ type: \"string\", format: \"date-time\" })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * The date/time of when the resource was last modified.\n\t */\n\t@property({ type: \"string\", format: \"date-time\", optional: true })\n\tpublic dateModified?: string;\n\n\t/**\n\t * The timestamp of when the resource was deleted, as we never actually remove items.\n\t */\n\t@property({ type: \"string\", format: \"date-time\", optional: true })\n\tpublic dateDeleted?: string;\n\n\t/**\n\t * Object to associate with the resource as JSON-LD.\n\t */\n\t@property({ type: \"object\", itemTypeRef: JsonLdTypes.NodeObject, optional: true })\n\tpublic resourceObject?: IJsonLdNodeObject;\n}\n"]}
|
|
@@ -24,14 +24,6 @@ let AuditableItemGraphVertex = class AuditableItemGraphVertex {
|
|
|
24
24
|
* How the mutations of the vertex are recorded, when absent the vertex behaves as audited.
|
|
25
25
|
*/
|
|
26
26
|
auditMode;
|
|
27
|
-
/**
|
|
28
|
-
* Combined alias index for the vertex used for querying.
|
|
29
|
-
*/
|
|
30
|
-
aliasIndex;
|
|
31
|
-
/**
|
|
32
|
-
* Combined resource type index for the vertex used for querying.
|
|
33
|
-
*/
|
|
34
|
-
resourceTypeIndex;
|
|
35
27
|
/**
|
|
36
28
|
* Object to associate with the vertex as JSON-LD.
|
|
37
29
|
*/
|
|
@@ -54,11 +46,11 @@ let AuditableItemGraphVertex = class AuditableItemGraphVertex {
|
|
|
54
46
|
version;
|
|
55
47
|
};
|
|
56
48
|
__decorate([
|
|
57
|
-
property({ type: "string", isPrimary: true }),
|
|
49
|
+
property({ type: "string", isPrimary: true, maxLength: 255 }),
|
|
58
50
|
__metadata("design:type", String)
|
|
59
51
|
], AuditableItemGraphVertex.prototype, "id", void 0);
|
|
60
52
|
__decorate([
|
|
61
|
-
property({ type: "string" }),
|
|
53
|
+
property({ type: "string", maxLength: 255 }),
|
|
62
54
|
__metadata("design:type", String)
|
|
63
55
|
], AuditableItemGraphVertex.prototype, "organizationIdentity", void 0);
|
|
64
56
|
__decorate([
|
|
@@ -75,17 +67,9 @@ __decorate([
|
|
|
75
67
|
__metadata("design:type", String)
|
|
76
68
|
], AuditableItemGraphVertex.prototype, "dateModified", void 0);
|
|
77
69
|
__decorate([
|
|
78
|
-
property({ type: "string", optional: true }),
|
|
70
|
+
property({ type: "string", maxLength: 10, optional: true }),
|
|
79
71
|
__metadata("design:type", String)
|
|
80
72
|
], AuditableItemGraphVertex.prototype, "auditMode", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
property({ type: "string", isSecondary: true, optional: true }),
|
|
83
|
-
__metadata("design:type", String)
|
|
84
|
-
], AuditableItemGraphVertex.prototype, "aliasIndex", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
property({ type: "string", isSecondary: true, optional: true }),
|
|
87
|
-
__metadata("design:type", String)
|
|
88
|
-
], AuditableItemGraphVertex.prototype, "resourceTypeIndex", void 0);
|
|
89
73
|
__decorate([
|
|
90
74
|
property({ type: "object", itemTypeRef: JsonLdTypes.NodeObject, optional: true }),
|
|
91
75
|
__metadata("design:type", Object)
|
|
@@ -107,7 +91,7 @@ __decorate([
|
|
|
107
91
|
__metadata("design:type", Number)
|
|
108
92
|
], AuditableItemGraphVertex.prototype, "version", void 0);
|
|
109
93
|
AuditableItemGraphVertex = __decorate([
|
|
110
|
-
entity({ version:
|
|
94
|
+
entity({ version: 2 })
|
|
111
95
|
], AuditableItemGraphVertex);
|
|
112
96
|
export { AuditableItemGraphVertex };
|
|
113
97
|
//# sourceMappingURL=auditableItemGraphVertex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemGraphVertex.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphVertex.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKnE;;GAEG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACpC;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAEI,oBAAoB,CAAU;IAErC;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAOI,YAAY,CAAU;IAE7B;;OAEG;IAEI,SAAS,CAA+B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QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACb;AAMxC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACtC;AAMrC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACrB;AAMpC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACvC;AAMzC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC3C;AAMjC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACtB;AAhEZ,wBAAwB;IADpC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;GACV,wBAAwB,CAiEpC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { AuditableItemGraphAuditMode } from \"@twin.org/auditable-item-graph-models\";\nimport { JsonLdTypes, type IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\nimport type { AuditableItemGraphAlias } from \"./auditableItemGraphAlias.js\";\nimport type { AuditableItemGraphEdge } from \"./auditableItemGraphEdge.js\";\nimport type { AuditableItemGraphResource } from \"./auditableItemGraphResource.js\";\n\n/**\n * Class describing the auditable item graph vertex.\n */\n@entity({ version: 2 })\nexport class AuditableItemGraphVertex {\n\t/**\n\t * The id of the vertex.\n\t */\n\t@property({ type: \"string\", isPrimary: true, maxLength: 255 })\n\tpublic id!: string;\n\n\t/**\n\t * The identity of the organization which controls the vertex.\n\t */\n\t@property({ type: \"string\", maxLength: 255 })\n\tpublic organizationIdentity!: string;\n\n\t/**\n\t * The date/time of when the vertex was created.\n\t */\n\t@property({ type: \"string\", format: \"date-time\", sortDirection: SortDirection.Descending })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * The date/time of when the vertex was last modified.\n\t */\n\t@property({\n\t\ttype: \"string\",\n\t\tformat: \"date-time\",\n\t\tsortDirection: SortDirection.Descending,\n\t\toptional: true\n\t})\n\tpublic dateModified?: string;\n\n\t/**\n\t * How the mutations of the vertex are recorded, when absent the vertex behaves as audited.\n\t */\n\t@property({ type: \"string\", maxLength: 10, optional: true })\n\tpublic auditMode?: AuditableItemGraphAuditMode;\n\n\t/**\n\t * Object to associate with the vertex as JSON-LD.\n\t */\n\t@property({ type: \"object\", itemTypeRef: JsonLdTypes.NodeObject, optional: true })\n\tpublic annotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * Alternative aliases that can be used to identify the vertex.\n\t */\n\t@property({ type: \"array\", itemType: \"string\", optional: true })\n\tpublic aliases?: AuditableItemGraphAlias[];\n\n\t/**\n\t * The resources attached to the vertex.\n\t */\n\t@property({ type: \"array\", itemTypeRef: \"AuditableItemGraphResource\", optional: true })\n\tpublic resources?: AuditableItemGraphResource[];\n\n\t/**\n\t * Edges connected to the vertex.\n\t */\n\t@property({ type: \"array\", itemTypeRef: \"AuditableItemGraphEdge\", optional: true })\n\tpublic edges?: AuditableItemGraphEdge[];\n\n\t/**\n\t * The current version of the vertex, incremented on each changeset.\n\t */\n\t@property({ type: \"integer\", optional: true })\n\tpublic version?: number;\n}\n"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Copyright 2026 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { entity, property, SortDirection } from "@twin.org/entity";
|
|
4
|
+
/**
|
|
5
|
+
* Class describing the auditable item graph vertex index.
|
|
6
|
+
*/
|
|
7
|
+
let AuditableItemGraphVertexIndex = class AuditableItemGraphVertexIndex {
|
|
8
|
+
/**
|
|
9
|
+
* The id of the index.
|
|
10
|
+
*/
|
|
11
|
+
id;
|
|
12
|
+
/**
|
|
13
|
+
* The id of the vertex this index refers to.
|
|
14
|
+
*/
|
|
15
|
+
vertexId;
|
|
16
|
+
/**
|
|
17
|
+
* Index type.
|
|
18
|
+
*/
|
|
19
|
+
type;
|
|
20
|
+
/**
|
|
21
|
+
* Index value, case folded so lookups do not depend on the column collation.
|
|
22
|
+
*/
|
|
23
|
+
value;
|
|
24
|
+
/**
|
|
25
|
+
* The date/time of when the vertex was created, copied so the index can order and page its
|
|
26
|
+
* own matches without reading the vertex.
|
|
27
|
+
*/
|
|
28
|
+
dateCreated;
|
|
29
|
+
/**
|
|
30
|
+
* The date/time of when the vertex was last modified, copied so a query ordered by the
|
|
31
|
+
* modified date can also be paged from the index.
|
|
32
|
+
*/
|
|
33
|
+
dateModified;
|
|
34
|
+
};
|
|
35
|
+
__decorate([
|
|
36
|
+
property({ type: "string", isPrimary: true, maxLength: 255 }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], AuditableItemGraphVertexIndex.prototype, "id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
property({ type: "string", maxLength: 255, isSecondary: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AuditableItemGraphVertexIndex.prototype, "vertexId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
property({
|
|
45
|
+
type: "string",
|
|
46
|
+
maxLength: 32,
|
|
47
|
+
isSecondary: true,
|
|
48
|
+
indexGroup: [{ name: "typeValue", direction: SortDirection.Ascending, index: 0 }]
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], AuditableItemGraphVertexIndex.prototype, "type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
property({
|
|
54
|
+
type: "string",
|
|
55
|
+
maxLength: 255,
|
|
56
|
+
isSecondary: true,
|
|
57
|
+
indexGroup: [{ name: "typeValue", direction: SortDirection.Ascending, index: 1 }]
|
|
58
|
+
}),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], AuditableItemGraphVertexIndex.prototype, "value", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
property({
|
|
63
|
+
type: "string",
|
|
64
|
+
format: "date-time",
|
|
65
|
+
sortDirection: SortDirection.Descending,
|
|
66
|
+
indexGroup: [{ name: "typeValue", direction: SortDirection.Descending, index: 2 }]
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], AuditableItemGraphVertexIndex.prototype, "dateCreated", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
property({
|
|
72
|
+
type: "string",
|
|
73
|
+
format: "date-time",
|
|
74
|
+
sortDirection: SortDirection.Descending,
|
|
75
|
+
optional: true
|
|
76
|
+
}),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], AuditableItemGraphVertexIndex.prototype, "dateModified", void 0);
|
|
79
|
+
AuditableItemGraphVertexIndex = __decorate([
|
|
80
|
+
entity()
|
|
81
|
+
], AuditableItemGraphVertexIndex);
|
|
82
|
+
export { AuditableItemGraphVertexIndex };
|
|
83
|
+
//# sourceMappingURL=auditableItemGraphVertexIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditableItemGraphVertexIndex.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphVertexIndex.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEnE;;GAEG;AAEI,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IACzC;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAEI,QAAQ,CAAU;IAEzB;;OAEG;IAOI,IAAI,CAAU;IAErB;;OAEG;IAOI,KAAK,CAAU;IAEtB;;;OAGG;IAOI,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Content":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\n\n/**\n * Class describing the auditable item graph vertex index.\n */\n@entity()\nexport class AuditableItemGraphVertexIndex {\n\t/**\n\t * The id of the index.\n\t */\n\t@property({ type: \"string\", isPrimary: true, maxLength: 255 })\n\tpublic id!: string;\n\n\t/**\n\t * The id of the vertex this index refers to.\n\t */\n\t@property({ type: \"string\", maxLength: 255, isSecondary: true })\n\tpublic vertexId!: string;\n\n\t/**\n\t * Index type.\n\t */\n\t@property({\n\t\ttype: \"string\",\n\t\tmaxLength: 32,\n\t\tisSecondary: true,\n\t\tindexGroup: [{ name: \"typeValue\", direction: SortDirection.Ascending, index: 0 }]\n\t})\n\tpublic type!: string;\n\n\t/**\n\t * Index value, case folded so lookups do not depend on the column collation.\n\t */\n\t@property({\n\t\ttype: \"string\",\n\t\tmaxLength: 255,\n\t\tisSecondary: true,\n\t\tindexGroup: [{ name: \"typeValue\", direction: SortDirection.Ascending, index: 1 }]\n\t})\n\tpublic value!: string;\n\n\t/**\n\t * The date/time of when the vertex was created, copied so the index can order and page its\n\t * own matches without reading the vertex.\n\t */\n\t@property({\n\t\ttype: \"string\",\n\t\tformat: \"date-time\",\n\t\tsortDirection: SortDirection.Descending,\n\t\tindexGroup: [{ name: \"typeValue\", direction: SortDirection.Descending, index: 2 }]\n\t})\n\tpublic dateCreated!: string;\n\n\t/**\n\t * The date/time of when the vertex was last modified, copied so a query ordered by the\n\t * modified date can also be paged from the index.\n\t */\n\t@property({\n\t\ttype: \"string\",\n\t\tformat: \"date-time\",\n\t\tsortDirection: SortDirection.Descending,\n\t\toptional: true\n\t})\n\tpublic dateModified?: string;\n}\n"]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { JsonLdTypes } from "@twin.org/data-json-ld";
|
|
2
|
+
import { entity, property, SortDirection } from "@twin.org/entity";
|
|
3
|
+
/**
|
|
4
|
+
* Class describing the auditable item graph vertex.
|
|
5
|
+
*/
|
|
6
|
+
let AuditableItemGraphVertexV1 = class AuditableItemGraphVertexV1 {
|
|
7
|
+
/**
|
|
8
|
+
* The id of the vertex.
|
|
9
|
+
*/
|
|
10
|
+
id;
|
|
11
|
+
/**
|
|
12
|
+
* The identity of the organization which controls the vertex.
|
|
13
|
+
*/
|
|
14
|
+
organizationIdentity;
|
|
15
|
+
/**
|
|
16
|
+
* The date/time of when the vertex was created.
|
|
17
|
+
*/
|
|
18
|
+
dateCreated;
|
|
19
|
+
/**
|
|
20
|
+
* The date/time of when the vertex was last modified.
|
|
21
|
+
*/
|
|
22
|
+
dateModified;
|
|
23
|
+
/**
|
|
24
|
+
* How the mutations of the vertex are recorded, when absent the vertex behaves as audited.
|
|
25
|
+
*/
|
|
26
|
+
auditMode;
|
|
27
|
+
/**
|
|
28
|
+
* Combined alias index for the vertex used for querying.
|
|
29
|
+
*/
|
|
30
|
+
aliasIndex;
|
|
31
|
+
/**
|
|
32
|
+
* Combined resource type index for the vertex used for querying.
|
|
33
|
+
*/
|
|
34
|
+
resourceTypeIndex;
|
|
35
|
+
/**
|
|
36
|
+
* Object to associate with the vertex as JSON-LD.
|
|
37
|
+
*/
|
|
38
|
+
annotationObject;
|
|
39
|
+
/**
|
|
40
|
+
* Alternative aliases that can be used to identify the vertex.
|
|
41
|
+
*/
|
|
42
|
+
aliases;
|
|
43
|
+
/**
|
|
44
|
+
* The resources attached to the vertex.
|
|
45
|
+
*/
|
|
46
|
+
resources;
|
|
47
|
+
/**
|
|
48
|
+
* Edges connected to the vertex.
|
|
49
|
+
*/
|
|
50
|
+
edges;
|
|
51
|
+
/**
|
|
52
|
+
* The current version of the vertex, incremented on each changeset.
|
|
53
|
+
*/
|
|
54
|
+
version;
|
|
55
|
+
};
|
|
56
|
+
__decorate([
|
|
57
|
+
property({ type: "string", isPrimary: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], AuditableItemGraphVertexV1.prototype, "id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
property({ type: "string" }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], AuditableItemGraphVertexV1.prototype, "organizationIdentity", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: "string", format: "date-time", sortDirection: SortDirection.Descending }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], AuditableItemGraphVertexV1.prototype, "dateCreated", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
property({
|
|
70
|
+
type: "string",
|
|
71
|
+
format: "date-time",
|
|
72
|
+
sortDirection: SortDirection.Descending,
|
|
73
|
+
optional: true
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], AuditableItemGraphVertexV1.prototype, "dateModified", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
property({ type: "string", optional: true }),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], AuditableItemGraphVertexV1.prototype, "auditMode", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
property({ type: "string", isSecondary: true, optional: true }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], AuditableItemGraphVertexV1.prototype, "aliasIndex", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: "string", isSecondary: true, optional: true }),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], AuditableItemGraphVertexV1.prototype, "resourceTypeIndex", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
property({ type: "object", itemTypeRef: JsonLdTypes.NodeObject, optional: true }),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], AuditableItemGraphVertexV1.prototype, "annotationObject", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
property({ type: "array", itemType: "string", optional: true }),
|
|
95
|
+
__metadata("design:type", Array)
|
|
96
|
+
], AuditableItemGraphVertexV1.prototype, "aliases", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
property({ type: "array", itemTypeRef: "AuditableItemGraphResource", optional: true }),
|
|
99
|
+
__metadata("design:type", Array)
|
|
100
|
+
], AuditableItemGraphVertexV1.prototype, "resources", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
property({ type: "array", itemTypeRef: "AuditableItemGraphEdge", optional: true }),
|
|
103
|
+
__metadata("design:type", Array)
|
|
104
|
+
], AuditableItemGraphVertexV1.prototype, "edges", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
property({ type: "integer", optional: true }),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], AuditableItemGraphVertexV1.prototype, "version", void 0);
|
|
109
|
+
AuditableItemGraphVertexV1 = __decorate([
|
|
110
|
+
entity({ version: 1 })
|
|
111
|
+
], AuditableItemGraphVertexV1);
|
|
112
|
+
export { AuditableItemGraphVertexV1 };
|
|
113
|
+
//# sourceMappingURL=auditableItemGraphVertexV1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditableItemGraphVertexV1.js","sourceRoot":"","sources":["../../../src/entities/auditableItemGraphVertexV1.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKnE;;GAEG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACtC;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAEI,oBAAoB,CAAU;IAErC;;OAEG;IAEI,WAAW,CAAU;IAE5B;;OAEG;IAOI,YAAY,CAAU;IAE7B;;OAEG;IAEI,SAAS,CAA+B;IAE/C;;OAEG;IAEI,UAAU,CAAU;IAE3B;;OAEG;IAEI,iBAAiB,CAAU;IAElC;;OAEG;IAEI,gBAAgB,CAAqB;IAE5C;;OAEG;IAEI,OAAO,CAA6B;IAE3C;;OAEG;IAEI,SAAS,CAAgC;IAEhD;;OAEG;IAEI,KAAK,CAA4B;IA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EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDAC3C;AAMjC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACtB;AA5EZ,0BAA0B;IADtC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;GACV,0BAA0B,CA6EtC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { AuditableItemGraphAuditMode } from \"@twin.org/auditable-item-graph-models\";\nimport { JsonLdTypes, type IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { entity, property, SortDirection } from \"@twin.org/entity\";\nimport type { AuditableItemGraphAlias } from \"./auditableItemGraphAlias.js\";\nimport type { AuditableItemGraphEdge } from \"./auditableItemGraphEdge.js\";\nimport type { AuditableItemGraphResource } from \"./auditableItemGraphResource.js\";\n\n/**\n * Class describing the auditable item graph vertex.\n */\n@entity({ version: 1 })\nexport class AuditableItemGraphVertexV1 {\n\t/**\n\t * The id of the vertex.\n\t */\n\t@property({ type: \"string\", isPrimary: true })\n\tpublic id!: string;\n\n\t/**\n\t * The identity of the organization which controls the vertex.\n\t */\n\t@property({ type: \"string\" })\n\tpublic organizationIdentity!: string;\n\n\t/**\n\t * The date/time of when the vertex was created.\n\t */\n\t@property({ type: \"string\", format: \"date-time\", sortDirection: SortDirection.Descending })\n\tpublic dateCreated!: string;\n\n\t/**\n\t * The date/time of when the vertex was last modified.\n\t */\n\t@property({\n\t\ttype: \"string\",\n\t\tformat: \"date-time\",\n\t\tsortDirection: SortDirection.Descending,\n\t\toptional: true\n\t})\n\tpublic dateModified?: string;\n\n\t/**\n\t * How the mutations of the vertex are recorded, when absent the vertex behaves as audited.\n\t */\n\t@property({ type: \"string\", optional: true })\n\tpublic auditMode?: AuditableItemGraphAuditMode;\n\n\t/**\n\t * Combined alias index for the vertex used for querying.\n\t */\n\t@property({ type: \"string\", isSecondary: true, optional: true })\n\tpublic aliasIndex?: string;\n\n\t/**\n\t * Combined resource type index for the vertex used for querying.\n\t */\n\t@property({ type: \"string\", isSecondary: true, optional: true })\n\tpublic resourceTypeIndex?: string;\n\n\t/**\n\t * Object to associate with the vertex as JSON-LD.\n\t */\n\t@property({ type: \"object\", itemTypeRef: JsonLdTypes.NodeObject, optional: true })\n\tpublic annotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * Alternative aliases that can be used to identify the vertex.\n\t */\n\t@property({ type: \"array\", itemType: \"string\", optional: true })\n\tpublic aliases?: AuditableItemGraphAlias[];\n\n\t/**\n\t * The resources attached to the vertex.\n\t */\n\t@property({ type: \"array\", itemTypeRef: \"AuditableItemGraphResource\", optional: true })\n\tpublic resources?: AuditableItemGraphResource[];\n\n\t/**\n\t * Edges connected to the vertex.\n\t */\n\t@property({ type: \"array\", itemTypeRef: \"AuditableItemGraphEdge\", optional: true })\n\tpublic edges?: AuditableItemGraphEdge[];\n\n\t/**\n\t * The current version of the vertex, incremented on each changeset.\n\t */\n\t@property({ type: \"integer\", optional: true })\n\tpublic version?: number;\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -8,7 +8,9 @@ export * from "./entities/auditableItemGraphEdge.js";
|
|
|
8
8
|
export * from "./entities/auditableItemGraphPatch.js";
|
|
9
9
|
export * from "./entities/auditableItemGraphResource.js";
|
|
10
10
|
export * from "./entities/auditableItemGraphVertex.js";
|
|
11
|
+
export * from "./entities/auditableItemGraphVertexIndex.js";
|
|
11
12
|
export * from "./entities/auditableItemGraphVertexV0.js";
|
|
13
|
+
export * from "./entities/auditableItemGraphVertexV1.js";
|
|
12
14
|
export * from "./models/IAuditableItemGraphServiceConfig.js";
|
|
13
15
|
export * from "./models/IAuditableItemGraphServiceConstructorOptions.js";
|
|
14
16
|
export * from "./restEntryPoints.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0DAA0D,CAAC;AACzE,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./auditableItemGraphRoutes.js\";\nexport * from \"./auditableItemGraphService.js\";\nexport * from \"./entities/auditableItemGraphAlias.js\";\nexport * from \"./entities/auditableItemGraphChangeset.js\";\nexport * from \"./entities/auditableItemGraphEdge.js\";\nexport * from \"./entities/auditableItemGraphPatch.js\";\nexport * from \"./entities/auditableItemGraphResource.js\";\nexport * from \"./entities/auditableItemGraphVertex.js\";\nexport * from \"./entities/auditableItemGraphVertexV0.js\";\nexport * from \"./models/IAuditableItemGraphServiceConfig.js\";\nexport * from \"./models/IAuditableItemGraphServiceConstructorOptions.js\";\nexport * from \"./restEntryPoints.js\";\nexport * from \"./schema.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0DAA0D,CAAC;AACzE,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./auditableItemGraphRoutes.js\";\nexport * from \"./auditableItemGraphService.js\";\nexport * from \"./entities/auditableItemGraphAlias.js\";\nexport * from \"./entities/auditableItemGraphChangeset.js\";\nexport * from \"./entities/auditableItemGraphEdge.js\";\nexport * from \"./entities/auditableItemGraphPatch.js\";\nexport * from \"./entities/auditableItemGraphResource.js\";\nexport * from \"./entities/auditableItemGraphVertex.js\";\nexport * from \"./entities/auditableItemGraphVertexIndex.js\";\nexport * from \"./entities/auditableItemGraphVertexV0.js\";\nexport * from \"./entities/auditableItemGraphVertexV1.js\";\nexport * from \"./models/IAuditableItemGraphServiceConfig.js\";\nexport * from \"./models/IAuditableItemGraphServiceConstructorOptions.js\";\nexport * from \"./restEntryPoints.js\";\nexport * from \"./schema.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditableItemGraphServiceConstructorOptions.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphServiceConstructorOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphServiceConfig } from \"./IAuditableItemGraphServiceConfig.js\";\n\n/**\n * Options for the constructor of the auditable item graph service.\n */\nexport interface IAuditableItemGraphServiceConstructorOptions {\n\t/**\n\t * The immutable proof component type.\n\t * @default immutable-proof\n\t */\n\timmutableProofComponentType?: string;\n\n\t/**\n\t * The entity storage for vertices.\n\t * @default auditable-item-graph-vertex\n\t */\n\tvertexEntityStorageType?: string;\n\n\t/**\n\t * The entity storage for changesets.\n\t * @default auditable-item-graph-changeset\n\t */\n\tchangesetEntityStorageType?: string;\n\n\t/**\n\t * The event bus component type, defaults to no event bus.\n\t */\n\teventBusComponentType?: string;\n\n\t/**\n\t * The component type for the optional telemetry component used for event metrics, defaults to no telemetry.\n\t */\n\ttelemetryComponentType?: string;\n\n\t/**\n\t * The configuration for the service.\n\t */\n\tconfig?: IAuditableItemGraphServiceConfig;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IAuditableItemGraphServiceConstructorOptions.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphServiceConstructorOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphServiceConfig } from \"./IAuditableItemGraphServiceConfig.js\";\n\n/**\n * Options for the constructor of the auditable item graph service.\n */\nexport interface IAuditableItemGraphServiceConstructorOptions {\n\t/**\n\t * The immutable proof component type.\n\t * @default immutable-proof\n\t */\n\timmutableProofComponentType?: string;\n\n\t/**\n\t * The entity storage for vertices.\n\t * @default auditable-item-graph-vertex\n\t */\n\tvertexEntityStorageType?: string;\n\n\t/**\n\t * The entity storage for vertex indices.\n\t * @default auditable-item-graph-vertex-index\n\t */\n\tvertexIndexEntityStorageType?: string;\n\n\t/**\n\t * The entity storage for changesets.\n\t * @default auditable-item-graph-changeset\n\t */\n\tchangesetEntityStorageType?: string;\n\n\t/**\n\t * The event bus component type, defaults to no event bus.\n\t */\n\teventBusComponentType?: string;\n\n\t/**\n\t * The component type for the optional telemetry component used for event metrics, defaults to no telemetry.\n\t */\n\ttelemetryComponentType?: string;\n\n\t/**\n\t * The configuration for the service.\n\t */\n\tconfig?: IAuditableItemGraphServiceConfig;\n}\n"]}
|
package/dist/es/schema.js
CHANGED
|
@@ -7,13 +7,17 @@ import { AuditableItemGraphEdge } from "./entities/auditableItemGraphEdge.js";
|
|
|
7
7
|
import { AuditableItemGraphPatch } from "./entities/auditableItemGraphPatch.js";
|
|
8
8
|
import { AuditableItemGraphResource } from "./entities/auditableItemGraphResource.js";
|
|
9
9
|
import { AuditableItemGraphVertex } from "./entities/auditableItemGraphVertex.js";
|
|
10
|
+
import { AuditableItemGraphVertexIndex } from "./entities/auditableItemGraphVertexIndex.js";
|
|
10
11
|
import { AuditableItemGraphVertexV0 } from "./entities/auditableItemGraphVertexV0.js";
|
|
12
|
+
import { AuditableItemGraphVertexV1 } from "./entities/auditableItemGraphVertexV1.js";
|
|
11
13
|
/**
|
|
12
14
|
* Initialize the schema for the auditable item graph entity storage connector.
|
|
13
15
|
*/
|
|
14
16
|
export function initSchema() {
|
|
15
17
|
EntitySchemaFactory.register("AuditableItemGraphVertex", () => EntitySchemaHelper.getSchema(AuditableItemGraphVertex));
|
|
16
18
|
EntitySchemaFactory.register("AuditableItemGraphVertexV0", () => EntitySchemaHelper.getSchema(AuditableItemGraphVertexV0));
|
|
19
|
+
EntitySchemaFactory.register("AuditableItemGraphVertexV1", () => EntitySchemaHelper.getSchema(AuditableItemGraphVertexV1));
|
|
20
|
+
EntitySchemaFactory.register("AuditableItemGraphVertexIndex", () => EntitySchemaHelper.getSchema(AuditableItemGraphVertexIndex));
|
|
17
21
|
EntitySchemaFactory.register("AuditableItemGraphAlias", () => EntitySchemaHelper.getSchema(AuditableItemGraphAlias));
|
|
18
22
|
EntitySchemaFactory.register("AuditableItemGraphResource", () => EntitySchemaHelper.getSchema(AuditableItemGraphResource));
|
|
19
23
|
EntitySchemaFactory.register("AuditableItemGraphEdge", () => EntitySchemaHelper.getSchema(AuditableItemGraphEdge));
|
package/dist/es/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAEtF;;GAEG;AACH,MAAM,UAAU,UAAU;IACzB,mBAAmB,CAAC,QAAQ,6BAAqC,GAAG,EAAE,CACrE,kBAAkB,CAAC,SAAS,CAAC,wBAAwB,CAAC,CACtD,CAAC;IACF,mBAAmB,CAAC,QAAQ,+BAAuC,GAAG,EAAE,CACvE,kBAAkB,CAAC,SAAS,CAAC,0BAA0B,CAAC,CACxD,CAAC;IACF,mBAAmB,CAAC,QAAQ,4BAAoC,GAAG,EAAE,CACpE,kBAAkB,CAAC,SAAS,CAAC,uBAAuB,CAAC,CACrD,CAAC;IACF,mBAAmB,CAAC,QAAQ,+BAAuC,GAAG,EAAE,CACvE,kBAAkB,CAAC,SAAS,CAAC,0BAA0B,CAAC,CACxD,CAAC;IACF,mBAAmB,CAAC,QAAQ,2BAAmC,GAAG,EAAE,CACnE,kBAAkB,CAAC,SAAS,CAAC,sBAAsB,CAAC,CACpD,CAAC;IACF,mBAAmB,CAAC,QAAQ,gCAAwC,GAAG,EAAE,CACxE,kBAAkB,CAAC,SAAS,CAAC,2BAA2B,CAAC,CACzD,CAAC;IACF,mBAAmB,CAAC,QAAQ,4BAAoC,GAAG,EAAE,CACpE,kBAAkB,CAAC,SAAS,CAAC,uBAAuB,CAAC,CACrD,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { EntitySchemaFactory, EntitySchemaHelper } from \"@twin.org/entity\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { AuditableItemGraphAlias } from \"./entities/auditableItemGraphAlias.js\";\nimport { AuditableItemGraphChangeset } from \"./entities/auditableItemGraphChangeset.js\";\nimport { AuditableItemGraphEdge } from \"./entities/auditableItemGraphEdge.js\";\nimport { AuditableItemGraphPatch } from \"./entities/auditableItemGraphPatch.js\";\nimport { AuditableItemGraphResource } from \"./entities/auditableItemGraphResource.js\";\nimport { AuditableItemGraphVertex } from \"./entities/auditableItemGraphVertex.js\";\nimport { AuditableItemGraphVertexV0 } from \"./entities/auditableItemGraphVertexV0.js\";\n\n/**\n * Initialize the schema for the auditable item graph entity storage connector.\n */\nexport function initSchema(): void {\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphVertex>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphVertex)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphVertexV0>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphVertexV0)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphAlias>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphAlias)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphResource>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphResource)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphEdge>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphEdge)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphChangeset>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphChangeset)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphPatch>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphPatch)\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,mBAAmB,EAAE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,EAAE,CACnE,kBAAkB,CAAC,SAAS,CAAC,sBAAsB,CAAC,CACpD,CAAC;IACF,mBAAmB,CAAC,QAAQ,gCAAwC,GAAG,EAAE,CACxE,kBAAkB,CAAC,SAAS,CAAC,2BAA2B,CAAC,CACzD,CAAC;IACF,mBAAmB,CAAC,QAAQ,4BAAoC,GAAG,EAAE,CACpE,kBAAkB,CAAC,SAAS,CAAC,uBAAuB,CAAC,CACrD,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { EntitySchemaFactory, EntitySchemaHelper } from \"@twin.org/entity\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { AuditableItemGraphAlias } from \"./entities/auditableItemGraphAlias.js\";\nimport { AuditableItemGraphChangeset } from \"./entities/auditableItemGraphChangeset.js\";\nimport { AuditableItemGraphEdge } from \"./entities/auditableItemGraphEdge.js\";\nimport { AuditableItemGraphPatch } from \"./entities/auditableItemGraphPatch.js\";\nimport { AuditableItemGraphResource } from \"./entities/auditableItemGraphResource.js\";\nimport { AuditableItemGraphVertex } from \"./entities/auditableItemGraphVertex.js\";\nimport { AuditableItemGraphVertexIndex } from \"./entities/auditableItemGraphVertexIndex.js\";\nimport { AuditableItemGraphVertexV0 } from \"./entities/auditableItemGraphVertexV0.js\";\nimport { AuditableItemGraphVertexV1 } from \"./entities/auditableItemGraphVertexV1.js\";\n\n/**\n * Initialize the schema for the auditable item graph entity storage connector.\n */\nexport function initSchema(): void {\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphVertex>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphVertex)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphVertexV0>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphVertexV0)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphVertexV1>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphVertexV1)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphVertexIndex>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphVertexIndex)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphAlias>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphAlias)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphResource>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphResource)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphEdge>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphEdge)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphChangeset>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphChangeset)\n\t);\n\tEntitySchemaFactory.register(nameof<AuditableItemGraphPatch>(), () =>\n\t\tEntitySchemaHelper.getSchema(AuditableItemGraphPatch)\n\t);\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type HealthApplicationCallback, type IHealth, type IHealthProviderComponent } from "@twin.org/api-models";
|
|
2
2
|
import { VerifyDepth, type IAuditableItemGraphChangeset, type IAuditableItemGraphChangesetList, type IAuditableItemGraphComponent, type IAuditableItemGraphPartialVertex, type IAuditableItemGraphVertex, type IAuditableItemGraphVertexList, type IAuditableItemGraphVertexVersionList } from "@twin.org/auditable-item-graph-models";
|
|
3
|
-
import { type EntityCondition
|
|
3
|
+
import { SortDirection, type EntityCondition } from "@twin.org/entity";
|
|
4
4
|
import type { IAuditableItemGraphServiceConstructorOptions } from "./models/IAuditableItemGraphServiceConstructorOptions.js";
|
|
5
5
|
/**
|
|
6
6
|
* Class for performing auditable item graph operations.
|
|
@@ -148,7 +148,8 @@ export declare class AuditableItemGraphService implements IAuditableItemGraphCom
|
|
|
148
148
|
* @param orderByDirection The direction for the order, defaults to desc.
|
|
149
149
|
* @param properties The properties to return, if not provided defaults to id, created, aliases and object.
|
|
150
150
|
* @param cursor The cursor to request the next chunk of entities.
|
|
151
|
-
* @param limit
|
|
151
|
+
* @param limit The maximum number of entities to return, a page can contain fewer so follow
|
|
152
|
+
* the cursor until it is absent to read them all.
|
|
152
153
|
* @returns The entities, which can be partial if a limited keys list was provided.
|
|
153
154
|
*/
|
|
154
155
|
query(options?: {
|
|
@@ -27,14 +27,6 @@ export declare class AuditableItemGraphVertex {
|
|
|
27
27
|
* How the mutations of the vertex are recorded, when absent the vertex behaves as audited.
|
|
28
28
|
*/
|
|
29
29
|
auditMode?: AuditableItemGraphAuditMode;
|
|
30
|
-
/**
|
|
31
|
-
* Combined alias index for the vertex used for querying.
|
|
32
|
-
*/
|
|
33
|
-
aliasIndex?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Combined resource type index for the vertex used for querying.
|
|
36
|
-
*/
|
|
37
|
-
resourceTypeIndex?: string;
|
|
38
30
|
/**
|
|
39
31
|
* Object to associate with the vertex as JSON-LD.
|
|
40
32
|
*/
|