@twin.org/auditable-item-graph-models 0.0.3-next.11 → 0.0.3-next.12

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.
Files changed (65) hide show
  1. package/README.md +3 -1
  2. package/dist/es/dataTypes/auditableItemGraphDataTypes.js +37 -43
  3. package/dist/es/dataTypes/auditableItemGraphDataTypes.js.map +1 -1
  4. package/dist/es/models/IAuditableItemGraphAlias.js.map +1 -1
  5. package/dist/es/models/IAuditableItemGraphAuditedElement.js.map +1 -1
  6. package/dist/es/models/IAuditableItemGraphChangeset.js.map +1 -1
  7. package/dist/es/models/IAuditableItemGraphChangesetList.js.map +1 -1
  8. package/dist/es/models/IAuditableItemGraphComponent.js.map +1 -1
  9. package/dist/es/models/IAuditableItemGraphEdge.js.map +1 -1
  10. package/dist/es/models/IAuditableItemGraphPatchOperation.js.map +1 -1
  11. package/dist/es/models/IAuditableItemGraphResource.js.map +1 -1
  12. package/dist/es/models/IAuditableItemGraphVertex.js.map +1 -1
  13. package/dist/es/models/IAuditableItemGraphVertexList.js.map +1 -1
  14. package/dist/es/models/api/IAuditableItemGraphCreateRequest.js.map +1 -1
  15. package/dist/es/models/api/IAuditableItemGraphUpdateRequest.js.map +1 -1
  16. package/dist/es/schemas/AuditableItemGraphAlias.json +18 -24
  17. package/dist/es/schemas/AuditableItemGraphAuditedElement.json +25 -0
  18. package/dist/es/schemas/AuditableItemGraphChangeset.json +9 -11
  19. package/dist/es/schemas/AuditableItemGraphEdge.json +15 -25
  20. package/dist/es/schemas/AuditableItemGraphPatchOperation.json +26 -17
  21. package/dist/es/schemas/AuditableItemGraphResource.json +9 -23
  22. package/dist/es/schemas/AuditableItemGraphVertex.json +35 -28
  23. package/dist/es/schemas/AuditableItemGraphVertexList.json +16 -18
  24. package/dist/types/models/IAuditableItemGraphAlias.d.ts +8 -3
  25. package/dist/types/models/IAuditableItemGraphAuditedElement.d.ts +3 -3
  26. package/dist/types/models/IAuditableItemGraphChangeset.d.ts +5 -5
  27. package/dist/types/models/IAuditableItemGraphChangesetList.d.ts +1 -1
  28. package/dist/types/models/IAuditableItemGraphComponent.d.ts +2 -39
  29. package/dist/types/models/IAuditableItemGraphEdge.d.ts +4 -4
  30. package/dist/types/models/IAuditableItemGraphPatchOperation.d.ts +4 -4
  31. package/dist/types/models/IAuditableItemGraphResource.d.ts +2 -2
  32. package/dist/types/models/IAuditableItemGraphVertex.d.ts +6 -6
  33. package/dist/types/models/IAuditableItemGraphVertexList.d.ts +1 -1
  34. package/dist/types/models/api/IAuditableItemGraphCreateRequest.d.ts +2 -31
  35. package/dist/types/models/api/IAuditableItemGraphUpdateRequest.d.ts +2 -32
  36. package/docs/changelog.md +8 -1
  37. package/docs/examples.md +22 -1
  38. package/docs/reference/classes/AuditableItemGraphDataTypes.md +1 -1
  39. package/docs/reference/interfaces/IAuditableItemGraphAlias.md +22 -19
  40. package/docs/reference/interfaces/IAuditableItemGraphAuditedElement.md +8 -11
  41. package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +12 -17
  42. package/docs/reference/interfaces/IAuditableItemGraphChangesetGetRequest.md +6 -6
  43. package/docs/reference/interfaces/IAuditableItemGraphChangesetGetResponse.md +3 -3
  44. package/docs/reference/interfaces/IAuditableItemGraphChangesetList.md +3 -4
  45. package/docs/reference/interfaces/IAuditableItemGraphChangesetListRequest.md +8 -8
  46. package/docs/reference/interfaces/IAuditableItemGraphChangesetListResponse.md +4 -4
  47. package/docs/reference/interfaces/IAuditableItemGraphComponent.md +13 -63
  48. package/docs/reference/interfaces/IAuditableItemGraphCreateRequest.md +2 -26
  49. package/docs/reference/interfaces/IAuditableItemGraphEdge.md +15 -21
  50. package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexCreated.md +1 -1
  51. package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexUpdated.md +2 -2
  52. package/docs/reference/interfaces/IAuditableItemGraphGetRequest.md +7 -7
  53. package/docs/reference/interfaces/IAuditableItemGraphGetResponse.md +3 -3
  54. package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +14 -14
  55. package/docs/reference/interfaces/IAuditableItemGraphListResponse.md +4 -4
  56. package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +9 -13
  57. package/docs/reference/interfaces/IAuditableItemGraphResource.md +13 -17
  58. package/docs/reference/interfaces/IAuditableItemGraphUpdateRequest.md +3 -27
  59. package/docs/reference/interfaces/IAuditableItemGraphVertex.md +21 -30
  60. package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +3 -4
  61. package/docs/reference/variables/AuditableItemGraphContexts.md +6 -6
  62. package/docs/reference/variables/AuditableItemGraphTopics.md +2 -2
  63. package/docs/reference/variables/AuditableItemGraphTypes.md +8 -8
  64. package/docs/reference/variables/VerifyDepth.md +3 -3
  65. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # TWIN Auditable Item Graph Models
2
2
 
3
- Models which define the structure of the auditable item graph contracts and connectors.
3
+ This package defines the shared contracts used by the wider graph ecosystem, including typed interfaces, JSON schemas, and JSON-LD contexts.
4
+
5
+ It provides the common data foundation needed to exchange graph items and audit structures reliably across services and clients.
4
6
 
5
7
  ## Installation
6
8
 
@@ -1,9 +1,10 @@
1
1
  // Copyright 2024 IOTA Stiftung.
2
2
  // SPDX-License-Identifier: Apache-2.0.
3
- import { DataTypeHandlerFactory } from "@twin.org/data-core";
3
+ import { DataTypeHelper } from "@twin.org/data-core";
4
4
  import { AuditableItemGraphContexts } from "../models/auditableItemGraphContexts.js";
5
5
  import { AuditableItemGraphTypes } from "../models/auditableItemGraphTypes.js";
6
6
  import AuditableItemGraphAliasSchema from "../schemas/AuditableItemGraphAlias.json" with { type: "json" };
7
+ import AuditableItemGraphAuditedElementSchema from "../schemas/AuditableItemGraphAuditedElement.json" with { type: "json" };
7
8
  import AuditableItemGraphChangesetSchema from "../schemas/AuditableItemGraphChangeset.json" with { type: "json" };
8
9
  import AuditableItemGraphEdgeSchema from "../schemas/AuditableItemGraphEdge.json" with { type: "json" };
9
10
  import AuditableItemGraphPatchOperationSchema from "../schemas/AuditableItemGraphPatchOperation.json" with { type: "json" };
@@ -18,48 +19,41 @@ export class AuditableItemGraphDataTypes {
18
19
  * Register all the data types.
19
20
  */
20
21
  static registerTypes() {
21
- DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Vertex}`, () => ({
22
- namespace: AuditableItemGraphContexts.Namespace,
23
- type: AuditableItemGraphTypes.Vertex,
24
- defaultValue: {},
25
- jsonSchema: async () => AuditableItemGraphVertexSchema
26
- }));
27
- DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.VertexList}`, () => ({
28
- namespace: AuditableItemGraphContexts.Namespace,
29
- type: AuditableItemGraphTypes.VertexList,
30
- defaultValue: {},
31
- jsonSchema: async () => AuditableItemGraphVertexListSchema
32
- }));
33
- DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Alias}`, () => ({
34
- namespace: AuditableItemGraphContexts.Namespace,
35
- type: AuditableItemGraphTypes.Alias,
36
- defaultValue: {},
37
- jsonSchema: async () => AuditableItemGraphAliasSchema
38
- }));
39
- DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Resource}`, () => ({
40
- namespace: AuditableItemGraphContexts.Namespace,
41
- type: AuditableItemGraphTypes.Resource,
42
- defaultValue: {},
43
- jsonSchema: async () => AuditableItemGraphResourceSchema
44
- }));
45
- DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Edge}`, () => ({
46
- namespace: AuditableItemGraphContexts.Namespace,
47
- type: AuditableItemGraphTypes.Edge,
48
- defaultValue: {},
49
- jsonSchema: async () => AuditableItemGraphEdgeSchema
50
- }));
51
- DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Changeset}`, () => ({
52
- namespace: AuditableItemGraphContexts.Namespace,
53
- type: AuditableItemGraphTypes.Changeset,
54
- defaultValue: {},
55
- jsonSchema: async () => AuditableItemGraphChangesetSchema
56
- }));
57
- DataTypeHandlerFactory.register(`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.PatchOperation}`, () => ({
58
- namespace: AuditableItemGraphContexts.Namespace,
59
- type: AuditableItemGraphTypes.PatchOperation,
60
- defaultValue: {},
61
- jsonSchema: async () => AuditableItemGraphPatchOperationSchema
62
- }));
22
+ const types = [
23
+ {
24
+ type: AuditableItemGraphTypes.Vertex,
25
+ schema: AuditableItemGraphVertexSchema
26
+ },
27
+ {
28
+ type: AuditableItemGraphTypes.VertexList,
29
+ schema: AuditableItemGraphVertexListSchema
30
+ },
31
+ {
32
+ type: AuditableItemGraphTypes.Alias,
33
+ schema: AuditableItemGraphAliasSchema
34
+ },
35
+ {
36
+ type: AuditableItemGraphTypes.Resource,
37
+ schema: AuditableItemGraphResourceSchema
38
+ },
39
+ {
40
+ type: AuditableItemGraphTypes.Edge,
41
+ schema: AuditableItemGraphEdgeSchema
42
+ },
43
+ {
44
+ type: AuditableItemGraphTypes.Changeset,
45
+ schema: AuditableItemGraphChangesetSchema
46
+ },
47
+ {
48
+ type: AuditableItemGraphTypes.PatchOperation,
49
+ schema: AuditableItemGraphPatchOperationSchema
50
+ },
51
+ {
52
+ type: "AuditableItemGraphAuditedElement",
53
+ schema: AuditableItemGraphAuditedElementSchema
54
+ }
55
+ ];
56
+ DataTypeHelper.registerTypes(AuditableItemGraphContexts.Namespace, AuditableItemGraphContexts.JsonLdContext, types.map(t => ({ type: t.type, schema: t.schema })));
63
57
  }
64
58
  }
65
59
  //# sourceMappingURL=auditableItemGraphDataTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auditableItemGraphDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/auditableItemGraphDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,6BAA6B,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1G,OAAO,iCAAiC,MAAM,6CAA6C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClH,OAAO,4BAA4B,MAAM,wCAAwC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxG,OAAO,sCAAsC,MAAM,kDAAkD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5H,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChH,OAAO,8BAA8B,MAAM,0CAA0C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5G,OAAO,kCAAkC,MAAM,8CAA8C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEpH;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACvC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,0BAA0B,CAAC,SAAS,GAAG,uBAAuB,CAAC,MAAM,EAAE,EAC1E,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,0BAA0B,CAAC,SAAS;YAC/C,IAAI,EAAE,uBAAuB,CAAC,MAAM;YACpC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,8BAA6C;SACrE,CAAC,CACF,CAAC;QACF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,0BAA0B,CAAC,SAAS,GAAG,uBAAuB,CAAC,UAAU,EAAE,EAC9E,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,0BAA0B,CAAC,SAAS;YAC/C,IAAI,EAAE,uBAAuB,CAAC,UAAU;YACxC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,kCAAiD;SACzE,CAAC,CACF,CAAC;QACF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,0BAA0B,CAAC,SAAS,GAAG,uBAAuB,CAAC,KAAK,EAAE,EACzE,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,0BAA0B,CAAC,SAAS;YAC/C,IAAI,EAAE,uBAAuB,CAAC,KAAK;YACnC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,6BAA4C;SACpE,CAAC,CACF,CAAC;QACF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,0BAA0B,CAAC,SAAS,GAAG,uBAAuB,CAAC,QAAQ,EAAE,EAC5E,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,0BAA0B,CAAC,SAAS;YAC/C,IAAI,EAAE,uBAAuB,CAAC,QAAQ;YACtC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,gCAA+C;SACvE,CAAC,CACF,CAAC;QACF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,0BAA0B,CAAC,SAAS,GAAG,uBAAuB,CAAC,IAAI,EAAE,EACxE,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,0BAA0B,CAAC,SAAS;YAC/C,IAAI,EAAE,uBAAuB,CAAC,IAAI;YAClC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,4BAA2C;SACnE,CAAC,CACF,CAAC;QACF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,0BAA0B,CAAC,SAAS,GAAG,uBAAuB,CAAC,SAAS,EAAE,EAC7E,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,0BAA0B,CAAC,SAAS;YAC/C,IAAI,EAAE,uBAAuB,CAAC,SAAS;YACvC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,iCAAgD;SACxE,CAAC,CACF,CAAC;QACF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,0BAA0B,CAAC,SAAS,GAAG,uBAAuB,CAAC,cAAc,EAAE,EAClF,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,0BAA0B,CAAC,SAAS;YAC/C,IAAI,EAAE,uBAAuB,CAAC,cAAc;YAC5C,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,sCAAqD;SAC7E,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory, type IJsonSchema } from \"@twin.org/data-core\";\nimport { AuditableItemGraphContexts } from \"../models/auditableItemGraphContexts.js\";\nimport { AuditableItemGraphTypes } from \"../models/auditableItemGraphTypes.js\";\nimport AuditableItemGraphAliasSchema from \"../schemas/AuditableItemGraphAlias.json\" with { type: \"json\" };\nimport AuditableItemGraphChangesetSchema from \"../schemas/AuditableItemGraphChangeset.json\" with { type: \"json\" };\nimport AuditableItemGraphEdgeSchema from \"../schemas/AuditableItemGraphEdge.json\" with { type: \"json\" };\nimport AuditableItemGraphPatchOperationSchema from \"../schemas/AuditableItemGraphPatchOperation.json\" with { type: \"json\" };\nimport AuditableItemGraphResourceSchema from \"../schemas/AuditableItemGraphResource.json\" with { type: \"json\" };\nimport AuditableItemGraphVertexSchema from \"../schemas/AuditableItemGraphVertex.json\" with { type: \"json\" };\nimport AuditableItemGraphVertexListSchema from \"../schemas/AuditableItemGraphVertexList.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for auditable item graph.\n */\nexport class AuditableItemGraphDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Vertex}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AuditableItemGraphContexts.Namespace,\n\t\t\t\ttype: AuditableItemGraphTypes.Vertex,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AuditableItemGraphVertexSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.VertexList}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AuditableItemGraphContexts.Namespace,\n\t\t\t\ttype: AuditableItemGraphTypes.VertexList,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AuditableItemGraphVertexListSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Alias}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AuditableItemGraphContexts.Namespace,\n\t\t\t\ttype: AuditableItemGraphTypes.Alias,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AuditableItemGraphAliasSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Resource}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AuditableItemGraphContexts.Namespace,\n\t\t\t\ttype: AuditableItemGraphTypes.Resource,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AuditableItemGraphResourceSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Edge}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AuditableItemGraphContexts.Namespace,\n\t\t\t\ttype: AuditableItemGraphTypes.Edge,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AuditableItemGraphEdgeSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.Changeset}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AuditableItemGraphContexts.Namespace,\n\t\t\t\ttype: AuditableItemGraphTypes.Changeset,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AuditableItemGraphChangesetSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${AuditableItemGraphContexts.Namespace}${AuditableItemGraphTypes.PatchOperation}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: AuditableItemGraphContexts.Namespace,\n\t\t\t\ttype: AuditableItemGraphTypes.PatchOperation,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => AuditableItemGraphPatchOperationSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"auditableItemGraphDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/auditableItemGraphDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,6BAA6B,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1G,OAAO,sCAAsC,MAAM,kDAAkD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5H,OAAO,iCAAiC,MAAM,6CAA6C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClH,OAAO,4BAA4B,MAAM,wCAAwC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxG,OAAO,sCAAsC,MAAM,kDAAkD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5H,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChH,OAAO,8BAA8B,MAAM,0CAA0C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5G,OAAO,kCAAkC,MAAM,8CAA8C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEpH;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACvC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,uBAAuB,CAAC,MAAM;gBACpC,MAAM,EAAE,8BAA8B;aACtC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,UAAU;gBACxC,MAAM,EAAE,kCAAkC;aAC1C;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,KAAK;gBACnC,MAAM,EAAE,6BAA6B;aACrC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,QAAQ;gBACtC,MAAM,EAAE,gCAAgC;aACxC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,IAAI;gBAClC,MAAM,EAAE,4BAA4B;aACpC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,SAAS;gBACvC,MAAM,EAAE,iCAAiC;aACzC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,cAAc;gBAC5C,MAAM,EAAE,sCAAsC;aAC9C;YACD;gBACC,IAAI,EAAE,kCAAkC;gBACxC,MAAM,EAAE,sCAAsC;aAC9C;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,0BAA0B,CAAC,SAAS,EACpC,0BAA0B,CAAC,aAAa,EACxC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CACpD,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { AuditableItemGraphContexts } from \"../models/auditableItemGraphContexts.js\";\nimport { AuditableItemGraphTypes } from \"../models/auditableItemGraphTypes.js\";\nimport AuditableItemGraphAliasSchema from \"../schemas/AuditableItemGraphAlias.json\" with { type: \"json\" };\nimport AuditableItemGraphAuditedElementSchema from \"../schemas/AuditableItemGraphAuditedElement.json\" with { type: \"json\" };\nimport AuditableItemGraphChangesetSchema from \"../schemas/AuditableItemGraphChangeset.json\" with { type: \"json\" };\nimport AuditableItemGraphEdgeSchema from \"../schemas/AuditableItemGraphEdge.json\" with { type: \"json\" };\nimport AuditableItemGraphPatchOperationSchema from \"../schemas/AuditableItemGraphPatchOperation.json\" with { type: \"json\" };\nimport AuditableItemGraphResourceSchema from \"../schemas/AuditableItemGraphResource.json\" with { type: \"json\" };\nimport AuditableItemGraphVertexSchema from \"../schemas/AuditableItemGraphVertex.json\" with { type: \"json\" };\nimport AuditableItemGraphVertexListSchema from \"../schemas/AuditableItemGraphVertexList.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for auditable item graph.\n */\nexport class AuditableItemGraphDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Vertex,\n\t\t\t\tschema: AuditableItemGraphVertexSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.VertexList,\n\t\t\t\tschema: AuditableItemGraphVertexListSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Alias,\n\t\t\t\tschema: AuditableItemGraphAliasSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Resource,\n\t\t\t\tschema: AuditableItemGraphResourceSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Edge,\n\t\t\t\tschema: AuditableItemGraphEdgeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Changeset,\n\t\t\t\tschema: AuditableItemGraphChangesetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.PatchOperation,\n\t\t\t\tschema: AuditableItemGraphPatchOperationSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"AuditableItemGraphAuditedElement\",\n\t\t\t\tschema: AuditableItemGraphAuditedElementSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tAuditableItemGraphContexts.Namespace,\n\t\t\tAuditableItemGraphContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: t.type, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphAlias.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphAlias.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAuditedElement } from \"./IAuditableItemGraphAuditedElement.js\";\n\n/**\n * Interface describing an alias for a vertex.\n */\nexport interface IAuditableItemGraphAlias extends IAuditableItemGraphAuditedElement {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\":\n\t\t| typeof AuditableItemGraphContexts.Context\n\t\t| [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];\n\n\t/**\n\t * The id of the element.\n\t */\n\tid: string;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Alias;\n\n\t/**\n\t * The JSON-LD annotation object for the alias.\n\t * json-ld namespace:twin-common\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The format of the id in the alias.\n\t * json-ld type:sch:Text\n\t */\n\taliasFormat?: string;\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphAlias.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphAlias.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAuditedElement } from \"./IAuditableItemGraphAuditedElement.js\";\n\n/**\n * Interface describing an alias for a vertex.\n */\nexport interface IAuditableItemGraphAlias extends IAuditableItemGraphAuditedElement {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof AuditableItemGraphContexts.Context\n\t\t| [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];\n\n\t/**\n\t * The id of the element.\n\t */\n\tid: string;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Alias;\n\n\t/**\n\t * The JSON-LD annotation object for the alias.\n\t * @json-ld namespace:twin-common\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The format of the id in the alias.\n\t * @json-ld type:sch:Text\n\t */\n\taliasFormat?: string;\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 * @json-ld type:sch:Boolean\n\t */\n\tunique?: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphAuditedElement.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphAuditedElement.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing the base properties for auditable elements.\n */\nexport interface IAuditableItemGraphAuditedElement {\n\t/**\n\t * The id of the element.\n\t */\n\tid?: string;\n\n\t/**\n\t * The date/time of when the element was created.\n\t * json-ld namespace:sch\n\t */\n\tdateCreated?: string;\n\n\t/**\n\t * The date/time of when the element was modified.\n\t * json-ld namespace:sch\n\t */\n\tdateModified?: string;\n\n\t/**\n\t * The date/time of when the element was deleted, as we never actually remove items.\n\t * json-ld namespace:sch\n\t */\n\tdateDeleted?: string;\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphAuditedElement.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphAuditedElement.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing the base properties for auditable elements.\n */\nexport interface IAuditableItemGraphAuditedElement {\n\t/**\n\t * The id of the element.\n\t */\n\tid?: string;\n\n\t/**\n\t * The date/time of when the element was created.\n\t * @json-ld namespace:sch\n\t */\n\tdateCreated?: string;\n\n\t/**\n\t * The date/time of when the element was modified.\n\t * @json-ld namespace:sch\n\t */\n\tdateModified?: string;\n\n\t/**\n\t * The date/time of when the element was deleted, as we never actually remove items.\n\t * @json-ld namespace:sch\n\t */\n\tdateDeleted?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphChangeset.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphChangeset.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { IImmutableProofVerification } from \"@twin.org/immutable-proof-models\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphPatchOperation } from \"./IAuditableItemGraphPatchOperation.js\";\n\n/**\n * Interface describing a set of changes to the vertex.\n */\nexport interface IAuditableItemGraphChangeset {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?: [\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Changeset;\n\n\t/**\n\t * The id of the changeset.\n\t */\n\tid: string;\n\n\t/**\n\t * The date/time of when the changeset was created.\n\t * json-ld namespace:sch\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The user identity that created the changes.\n\t * json-ld namespace:twin-common\n\t */\n\tuserIdentity?: string;\n\n\t/**\n\t * The patches in the changeset.\n\t * json-ld container:set\n\t */\n\tpatches: IAuditableItemGraphPatchOperation[];\n\n\t/**\n\t * The immutable proof id which contains the signature for this changeset.\n\t * json-ld type:sch:identifier\n\t */\n\tproofId?: string;\n\n\t/**\n\t * The verification for the changeset.\n\t * json-ld id\n\t */\n\tverification?: IImmutableProofVerification;\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphChangeset.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphChangeset.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { IImmutableProofVerification } from \"@twin.org/immutable-proof-models\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphPatchOperation } from \"./IAuditableItemGraphPatchOperation.js\";\n\n/**\n * Interface describing a set of changes to the vertex.\n */\nexport interface IAuditableItemGraphChangeset {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?: [\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Changeset;\n\n\t/**\n\t * The id of the changeset.\n\t */\n\tid: string;\n\n\t/**\n\t * The date/time of when the changeset was created.\n\t * @json-ld namespace:sch\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The user identity that created the changes.\n\t * @json-ld namespace:twin-common\n\t */\n\tuserIdentity?: string;\n\n\t/**\n\t * The patches in the changeset.\n\t * @json-ld container:set\n\t */\n\tpatches: IAuditableItemGraphPatchOperation[];\n\n\t/**\n\t * The immutable proof id which contains the signature for this changeset.\n\t * @json-ld type:sch:identifier\n\t */\n\tproofId?: string;\n\n\t/**\n\t * The verification for the changeset.\n\t * @json-ld id\n\t */\n\tverification?: IImmutableProofVerification;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphChangesetList.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphChangesetList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphChangeset } from \"./IAuditableItemGraphChangeset.js\";\n\n/**\n * Interface describing an auditable item graph changeset list.\n */\nexport interface IAuditableItemGraphChangesetList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.ChangesetList];\n\n\t/**\n\t * The list of changesets.\n\t * json-ld namespace:sch\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IAuditableItemGraphChangeset[];\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphChangesetList.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphChangesetList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphChangeset } from \"./IAuditableItemGraphChangeset.js\";\n\n/**\n * Interface describing an auditable item graph changeset list.\n */\nexport interface IAuditableItemGraphChangesetList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.ChangesetList];\n\n\t/**\n\t * The list of changesets.\n\t * @json-ld namespace:sch\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IAuditableItemGraphChangeset[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphComponent.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IComparator, SortDirection } from \"@twin.org/entity\";\nimport type { IAuditableItemGraphChangeset } from \"./IAuditableItemGraphChangeset.js\";\nimport type { IAuditableItemGraphChangesetList } from \"./IAuditableItemGraphChangesetList.js\";\nimport type { IAuditableItemGraphVertex } from \"./IAuditableItemGraphVertex.js\";\nimport type { IAuditableItemGraphVertexList } from \"./IAuditableItemGraphVertexList.js\";\nimport type { VerifyDepth } from \"./verifyDepth.js\";\n\n/**\n * Interface describing an auditable item graph contract.\n */\nexport interface IAuditableItemGraphComponent extends IComponent {\n\t/**\n\t * Create a new graph vertex.\n\t * @param vertex The vertex to create.\n\t * @param vertex.annotationObject The annotation object for the vertex as JSON-LD.\n\t * @param vertex.aliases Alternative aliases that can be used to identify the vertex.\n\t * @param vertex.resources The resources attached to the vertex.\n\t * @param vertex.edges The edges connected to the vertex.\n\t * @returns The id of the new graph item.\n\t */\n\tcreate(vertex: {\n\t\tannotationObject?: IJsonLdNodeObject;\n\t\taliases?: {\n\t\t\tid: string;\n\t\t\taliasFormat?: string;\n\t\t\tunique?: boolean;\n\t\t\tannotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\t\tresources?: {\n\t\t\tid?: string;\n\t\t\tresourceObject?: IJsonLdNodeObject;\n\t\t}[];\n\t\tedges?: {\n\t\t\ttargetId: string;\n\t\t\tedgeRelationships: string[];\n\t\t\tannotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\t}): Promise<string>;\n\n\t/**\n\t * Update a graph vertex.\n\t * @param vertex The vertex to update.\n\t * @param vertex.id The id of the vertex to update.\n\t * @param vertex.annotationObject The annotation object for the vertex as JSON-LD.\n\t * @param vertex.aliases Alternative aliases that can be used to identify the vertex.\n\t * @param vertex.resources The resources attached to the vertex.\n\t * @param vertex.edges The edges connected to the vertex.\n\t * @returns Nothing.\n\t */\n\tupdate(vertex: {\n\t\tid: string;\n\t\tannotationObject?: IJsonLdNodeObject;\n\t\taliases?: {\n\t\t\tid: string;\n\t\t\taliasFormat?: string;\n\t\t\tunique?: boolean;\n\t\t\tannotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\t\tresources?: {\n\t\t\tid?: string;\n\t\t\tresourceObject?: IJsonLdNodeObject;\n\t\t}[];\n\t\tedges?: {\n\t\t\tid?: string;\n\t\t\ttargetId: string;\n\t\t\tedgeRelationships: string[];\n\t\t\tannotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\t}): Promise<void>;\n\n\t/**\n\t * Get a graph vertex.\n\t * @param id The id of the vertex to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeDeleted Whether to include deleted aliases, resource, edges, defaults to false.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The vertex if found.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tget(\n\t\tid: string,\n\t\toptions?: {\n\t\t\tincludeDeleted?: boolean;\n\t\t\tverifySignatureDepth?: VerifyDepth;\n\t\t}\n\t): Promise<IAuditableItemGraphVertex>;\n\n\t/**\n\t * Get a graph vertex changeset list.\n\t * @param id The id of the vertex to get.\n\t * @param cursor The optional cursor to get next chunk.\n\t * @param limit Limit the number of entities to return.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The changeset if found.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tgetChangesets(\n\t\tid: string,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\toptions?: {\n\t\t\tverifySignatureDepth?: VerifyDepth;\n\t\t}\n\t): Promise<{\n\t\tchangesets: IAuditableItemGraphChangesetList;\n\t\tcursor?: string;\n\t}>;\n\n\t/**\n\t * Get a graph vertex changeset.\n\t * @param id The id of the vertex to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The changeset if found.\n\t * @throws NotFoundError if the vertex or changeset is not found.\n\t */\n\tgetChangeset(\n\t\tid: string,\n\t\toptions?: { verifySignatureDepth?: VerifyDepth }\n\t): Promise<IAuditableItemGraphChangeset>;\n\n\t/**\n\t * Remove the verifiable storage for an item.\n\t * @param id The id of the vertex to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tremoveVerifiable(id: string): Promise<void>;\n\n\t/**\n\t * Query the graph for vertices.\n\t * @param options The query options.\n\t * @param options.id The optional id to look for.\n\t * @param options.idMode Look in id, alias or both, defaults to both.\n\t * @param options.idExact Find only exact matches, default to false meaning partial matching.\n\t * @param options.resourceTypes Include vertices with specific resource types.\n\t * @param conditions Conditions to use in the query.\n\t * @param orderBy The order for the results, defaults to dateCreated.\n\t * @param orderByDirection The direction for the order, defaults to descending.\n\t * @param properties The properties to return, if not provided defaults to id, dateCreated, aliases and object.\n\t * @param cursor The cursor to request the next chunk of entities.\n\t * @param limit Limit the number of entities to return.\n\t * @returns The entities, which can be partial if a limited keys list was provided.\n\t */\n\tquery(\n\t\toptions?: {\n\t\t\tid?: string;\n\t\t\tidMode?: \"id\" | \"alias\" | \"both\";\n\t\t\tidExact?: boolean;\n\t\t\tresourceTypes?: string[];\n\t\t},\n\t\tconditions?: IComparator[],\n\t\torderBy?: keyof Pick<IAuditableItemGraphVertex, \"dateCreated\" | \"dateModified\">,\n\t\torderByDirection?: SortDirection,\n\t\tproperties?: (keyof IAuditableItemGraphVertex)[],\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAuditableItemGraphVertexList;\n\t\tcursor?: string;\n\t}>;\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphComponent.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IComparator, SortDirection } from \"@twin.org/entity\";\nimport type { IAuditableItemGraphChangeset } from \"./IAuditableItemGraphChangeset.js\";\nimport type { IAuditableItemGraphChangesetList } from \"./IAuditableItemGraphChangesetList.js\";\nimport type { IAuditableItemGraphVertex } from \"./IAuditableItemGraphVertex.js\";\nimport type { IAuditableItemGraphVertexList } from \"./IAuditableItemGraphVertexList.js\";\nimport type { VerifyDepth } from \"./verifyDepth.js\";\n\n/**\n * Interface describing an auditable item graph contract.\n */\nexport interface IAuditableItemGraphComponent extends IComponent {\n\t/**\n\t * Create a new graph vertex.\n\t * @param vertex The vertex to create.\n\t * @param vertex.annotationObject The annotation object for the vertex as JSON-LD.\n\t * @param vertex.aliases Alternative aliases that can be used to identify the vertex.\n\t * @param vertex.resources The resources attached to the vertex.\n\t * @param vertex.edges The edges connected to the vertex.\n\t * @returns The id of the new graph item.\n\t */\n\tcreate(vertex: Omit<IAuditableItemGraphVertex, \"id\">): Promise<string>;\n\n\t/**\n\t * Update a graph vertex.\n\t * @param vertex The vertex to update.\n\t * @param vertex.id The id of the vertex to update.\n\t * @param vertex.annotationObject The annotation object for the vertex as JSON-LD.\n\t * @param vertex.aliases Alternative aliases that can be used to identify the vertex.\n\t * @param vertex.resources The resources attached to the vertex.\n\t * @param vertex.edges The edges connected to the vertex.\n\t * @returns Nothing.\n\t */\n\tupdate(vertex: IAuditableItemGraphVertex): Promise<void>;\n\n\t/**\n\t * Get a graph vertex.\n\t * @param id The id of the vertex to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeDeleted Whether to include deleted aliases, resource, edges, defaults to false.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The vertex if found.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tget(\n\t\tid: string,\n\t\toptions?: {\n\t\t\tincludeDeleted?: boolean;\n\t\t\tverifySignatureDepth?: VerifyDepth;\n\t\t}\n\t): Promise<IAuditableItemGraphVertex>;\n\n\t/**\n\t * Get a graph vertex changeset list.\n\t * @param id The id of the vertex to get.\n\t * @param cursor The optional cursor to get next chunk.\n\t * @param limit Limit the number of entities to return.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The changeset if found.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tgetChangesets(\n\t\tid: string,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\toptions?: {\n\t\t\tverifySignatureDepth?: VerifyDepth;\n\t\t}\n\t): Promise<{\n\t\tchangesets: IAuditableItemGraphChangesetList;\n\t\tcursor?: string;\n\t}>;\n\n\t/**\n\t * Get a graph vertex changeset.\n\t * @param id The id of the vertex to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The changeset if found.\n\t * @throws NotFoundError if the vertex or changeset is not found.\n\t */\n\tgetChangeset(\n\t\tid: string,\n\t\toptions?: { verifySignatureDepth?: VerifyDepth }\n\t): Promise<IAuditableItemGraphChangeset>;\n\n\t/**\n\t * Remove the verifiable storage for an item.\n\t * @param id The id of the vertex to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tremoveVerifiable(id: string): Promise<void>;\n\n\t/**\n\t * Query the graph for vertices.\n\t * @param options The query options.\n\t * @param options.id The optional id to look for.\n\t * @param options.idMode Look in id, alias or both, defaults to both.\n\t * @param options.idExact Find only exact matches, default to false meaning partial matching.\n\t * @param options.resourceTypes Include vertices with specific resource types.\n\t * @param conditions Conditions to use in the query.\n\t * @param orderBy The order for the results, defaults to dateCreated.\n\t * @param orderByDirection The direction for the order, defaults to descending.\n\t * @param properties The properties to return, if not provided defaults to id, dateCreated, aliases and object.\n\t * @param cursor The cursor to request the next chunk of entities.\n\t * @param limit Limit the number of entities to return.\n\t * @returns The entities, which can be partial if a limited keys list was provided.\n\t */\n\tquery(\n\t\toptions?: {\n\t\t\tid?: string;\n\t\t\tidMode?: \"id\" | \"alias\" | \"both\";\n\t\t\tidExact?: boolean;\n\t\t\tresourceTypes?: string[];\n\t\t},\n\t\tconditions?: IComparator[],\n\t\torderBy?: keyof Pick<IAuditableItemGraphVertex, \"dateCreated\" | \"dateModified\">,\n\t\torderByDirection?: SortDirection,\n\t\tproperties?: (keyof IAuditableItemGraphVertex)[],\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAuditableItemGraphVertexList;\n\t\tcursor?: string;\n\t}>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphEdge.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphEdge.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAuditedElement } from \"./IAuditableItemGraphAuditedElement.js\";\n\n/**\n * Interface describing an edge between two vertices in an auditable item graph.\n */\nexport interface IAuditableItemGraphEdge extends IAuditableItemGraphAuditedElement {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\":\n\t\t| typeof AuditableItemGraphContexts.Context\n\t\t| [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];\n\n\t/**\n\t * The id of the element.\n\t */\n\tid?: string;\n\n\t/**\n\t * The target vertex id the edge connects to.\n\t * json-ld type:@id\n\t */\n\ttargetId: string;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Edge;\n\n\t/**\n\t * The JSON-LD annotation object for the edge.\n\t * json-ld namespace:twin-common\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The relationships between the two vertices.\n\t * json-ld container:set\n\t */\n\tedgeRelationships: string[];\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphEdge.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphEdge.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAuditedElement } from \"./IAuditableItemGraphAuditedElement.js\";\n\n/**\n * Interface describing an edge between two vertices in an auditable item graph.\n */\nexport interface IAuditableItemGraphEdge extends IAuditableItemGraphAuditedElement {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof AuditableItemGraphContexts.Context\n\t\t| [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];\n\n\t/**\n\t * The id of the element.\n\t */\n\tid?: string;\n\n\t/**\n\t * The target vertex id the edge connects to.\n\t * @json-ld type:@id\n\t */\n\ttargetId: string;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Edge;\n\n\t/**\n\t * The JSON-LD annotation object for the edge.\n\t * @json-ld namespace:twin-common\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The relationships between the two vertices.\n\t * @json-ld container:set\n\t */\n\tedgeRelationships: string[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphPatchOperation.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphPatchOperation.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\n\n/**\n * The patch operation for JSON diffs.\n */\nexport interface IAuditableItemGraphPatchOperation {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof AuditableItemGraphContexts.Context\n\t\t| [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.PatchOperation;\n\n\t/**\n\t * The operation that was performed on the item.\n\t * json-ld type:sch:Text\n\t */\n\tpatchOperation: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n\n\t/**\n\t * The path to the object that was changed.\n\t * json-ld type:sch:Text\n\t */\n\tpatchPath: string;\n\n\t/**\n\t * The path the value was copied or moved from.\n\t * json-ld type:sch:Text\n\t */\n\tpatchFrom?: string;\n\n\t/**\n\t * The value to add.\n\t * json-ld type:json\n\t */\n\tpatchValue?: unknown;\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphPatchOperation.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphPatchOperation.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\n\n/**\n * The patch operation for JSON diffs.\n */\nexport interface IAuditableItemGraphPatchOperation {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof AuditableItemGraphContexts.Context\n\t\t| [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.PatchOperation;\n\n\t/**\n\t * The operation that was performed on the item.\n\t * @json-ld type:sch:Text\n\t */\n\tpatchOperation: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n\n\t/**\n\t * The path to the object that was changed.\n\t * @json-ld type:sch:Text\n\t */\n\tpatchPath: string;\n\n\t/**\n\t * The path the value was copied or moved from.\n\t * @json-ld type:sch:Text\n\t */\n\tpatchFrom?: string;\n\n\t/**\n\t * The value to add.\n\t * @json-ld type:json\n\t */\n\tpatchValue?: unknown;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphResource.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphResource.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAuditedElement } from \"./IAuditableItemGraphAuditedElement.js\";\n\n/**\n * Interface describing an auditable item graph vertex resource.\n */\nexport interface IAuditableItemGraphResource extends IAuditableItemGraphAuditedElement {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\":\n\t\t| typeof AuditableItemGraphContexts.Context\n\t\t| [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Resource;\n\n\t/**\n\t * The JSON-LD object for the resource.\n\t * json-ld type:json\n\t */\n\tresourceObject?: IJsonLdNodeObject;\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphResource.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphResource.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAuditedElement } from \"./IAuditableItemGraphAuditedElement.js\";\n\n/**\n * Interface describing an auditable item graph vertex resource.\n */\nexport interface IAuditableItemGraphResource extends IAuditableItemGraphAuditedElement {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\"?:\n\t\t| typeof AuditableItemGraphContexts.Context\n\t\t| [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Resource;\n\n\t/**\n\t * The JSON-LD object for the resource.\n\t * @json-ld type:json\n\t */\n\tresourceObject?: IJsonLdNodeObject;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphVertex.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphVertex.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAlias } from \"./IAuditableItemGraphAlias.js\";\nimport type { IAuditableItemGraphAuditedElement } from \"./IAuditableItemGraphAuditedElement.js\";\nimport type { IAuditableItemGraphEdge } from \"./IAuditableItemGraphEdge.js\";\nimport type { IAuditableItemGraphResource } from \"./IAuditableItemGraphResource.js\";\n\n/**\n * Interface describing an auditable item graph vertex.\n */\nexport interface IAuditableItemGraphVertex\n\textends Omit<IAuditableItemGraphAuditedElement, \"deleted\"> {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * The id of the element.\n\t */\n\tid: string;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Vertex;\n\n\t/**\n\t * The identity of the organization which controls the vertex.\n\t * json-ld namespace:twin-common\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The JSON-LD annotation object for the vertex.\n\t * json-ld namespace:twin-common\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * Alternative aliases that can be used to identify the vertex.\n\t * json-ld container:set\n\t */\n\taliases?: IAuditableItemGraphAlias[];\n\n\t/**\n\t * The resources attached to the vertex.\n\t * json-ld container:set\n\t */\n\tresources?: IAuditableItemGraphResource[];\n\n\t/**\n\t * Edges connected to the vertex.\n\t * json-ld container:set\n\t */\n\tedges?: IAuditableItemGraphEdge[];\n\n\t/**\n\t * Is the vertex verified, will only be populated when verification is requested.\n\t * json-ld namespace:twin-common\n\t */\n\tverified?: boolean;\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphVertex.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphVertex.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAlias } from \"./IAuditableItemGraphAlias.js\";\nimport type { IAuditableItemGraphAuditedElement } from \"./IAuditableItemGraphAuditedElement.js\";\nimport type { IAuditableItemGraphEdge } from \"./IAuditableItemGraphEdge.js\";\nimport type { IAuditableItemGraphResource } from \"./IAuditableItemGraphResource.js\";\n\n/**\n * Interface describing an auditable item graph vertex.\n */\nexport interface IAuditableItemGraphVertex extends Omit<\n\tIAuditableItemGraphAuditedElement,\n\t\"deleted\"\n> {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * The id of the element.\n\t */\n\tid: string;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof AuditableItemGraphTypes.Vertex;\n\n\t/**\n\t * The identity of the organization which controls the vertex.\n\t * @json-ld namespace:twin-common\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The JSON-LD annotation object for the vertex.\n\t * @json-ld namespace:twin-common\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * Alternative aliases that can be used to identify the vertex.\n\t * @json-ld container:set\n\t */\n\taliases?: IAuditableItemGraphAlias[];\n\n\t/**\n\t * The resources attached to the vertex.\n\t * @json-ld container:set\n\t */\n\tresources?: IAuditableItemGraphResource[];\n\n\t/**\n\t * Edges connected to the vertex.\n\t * @json-ld container:set\n\t */\n\tedges?: IAuditableItemGraphEdge[];\n\n\t/**\n\t * Is the vertex verified, will only be populated when verification is requested.\n\t * @json-ld namespace:twin-common\n\t */\n\tverified?: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphVertexList.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphVertexList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphVertex } from \"./IAuditableItemGraphVertex.js\";\n\n/**\n * Interface describing an auditable item graph vertex list.\n */\nexport interface IAuditableItemGraphVertexList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexList];\n\n\t/**\n\t * The list of vertices.\n\t * json-ld namespace:sch\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IAuditableItemGraphVertex[];\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphVertexList.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphVertexList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphVertex } from \"./IAuditableItemGraphVertex.js\";\n\n/**\n * Interface describing an auditable item graph vertex list.\n */\nexport interface IAuditableItemGraphVertexList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexList];\n\n\t/**\n\t * The list of vertices.\n\t * @json-ld namespace:sch\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IAuditableItemGraphVertex[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Create an auditable item graph vertex.\n */\nexport interface IAuditableItemGraphCreateRequest {\n\t/**\n\t * The data to be used in the vertex.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The object to be used in the vertex as JSON-LD.\n\t\t */\n\t\tannotationObject?: IJsonLdNodeObject;\n\n\t\t/**\n\t\t * Alternative aliases that can be used to identify the vertex.\n\t\t */\n\t\taliases?: {\n\t\t\tid: string;\n\t\t\taliasFormat?: string;\n\t\t\tunique?: boolean;\n\t\t\tannotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\n\t\t/**\n\t\t * The resources attached to the vertex.\n\t\t */\n\t\tresources?: {\n\t\t\tid?: string;\n\t\t\tresourceObject?: IJsonLdNodeObject;\n\t\t}[];\n\n\t\t/**\n\t\t * The edges connected to the vertex.\n\t\t */\n\t\tedges?: {\n\t\t\ttargetId: string;\n\t\t\tedgeRelationships: string[];\n\t\t\tannotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\t};\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphCreateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphCreateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphVertex } from \"../IAuditableItemGraphVertex.js\";\n\n/**\n * Create an auditable item graph vertex.\n */\nexport interface IAuditableItemGraphCreateRequest {\n\t/**\n\t * The data to be used in the vertex.\n\t */\n\tbody: Omit<IAuditableItemGraphVertex, \"id\">;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphUpdateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphUpdateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\n\n/**\n * Update an auditable item graph vertex.\n */\nexport interface IAuditableItemGraphUpdateRequest {\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the vertex to update.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The data to be used in the vertex.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The object to be used in the vertex as JSON-LD.\n\t\t */\n\t\tannotationObject?: IJsonLdNodeObject;\n\n\t\t/**\n\t\t * Alternative aliases that can be used to identify the vertex.\n\t\t */\n\t\taliases?: {\n\t\t\tid: string;\n\t\t\taliasFormat?: string;\n\t\t\tunique?: boolean;\n\t\t\tannotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\n\t\t/**\n\t\t * The resources attached to the vertex.\n\t\t */\n\t\tresources?: {\n\t\t\tid?: string;\n\t\t\tresourceObject?: IJsonLdNodeObject;\n\t\t}[];\n\n\t\t/**\n\t\t * The edges connected to the vertex.\n\t\t */\n\t\tedges?: {\n\t\t\tid?: string;\n\t\t\ttargetId: string;\n\t\t\tedgeRelationships: string[];\n\t\t\tannotationObject?: IJsonLdNodeObject;\n\t\t}[];\n\t};\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphUpdateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphUpdateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphVertex } from \"../IAuditableItemGraphVertex.js\";\n\n/**\n * Update an auditable item graph vertex.\n */\nexport interface IAuditableItemGraphUpdateRequest {\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the vertex to update.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The data to be used in the vertex.\n\t */\n\tbody: Omit<IAuditableItemGraphVertex, \"id\">;\n}\n"]}
@@ -1,64 +1,58 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/aig/AuditableItemGraphAlias",
4
+ "title": "AuditableItemGraphAlias",
4
5
  "description": "Interface describing an alias for a vertex.",
5
6
  "type": "object",
6
7
  "properties": {
7
- "id": {
8
- "type": "string",
9
- "description": "The id of the element."
10
- },
11
- "dateCreated": {
12
- "type": "string",
13
- "description": "The date/time of when the element was created. json-ld namespace:sch"
14
- },
15
- "dateModified": {
16
- "type": "string",
17
- "description": "The date/time of when the element was modified. json-ld namespace:sch"
18
- },
19
- "dateDeleted": {
20
- "type": "string",
21
- "description": "The date/time of when the element was deleted, as we never actually remove items. json-ld namespace:sch"
22
- },
23
8
  "@context": {
24
9
  "anyOf": [
25
10
  {
26
- "type": "string",
27
11
  "const": "https://schema.twindev.org/aig/"
28
12
  },
29
13
  {
30
14
  "type": "array",
31
- "minItems": 1,
32
15
  "prefixItems": [
33
16
  {
34
- "type": "string",
35
17
  "const": "https://schema.twindev.org/aig/"
36
18
  }
37
19
  ],
38
20
  "items": {
39
21
  "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
40
- }
22
+ },
23
+ "minItems": 1
41
24
  }
42
25
  ],
43
26
  "description": "JSON-LD Context."
44
27
  },
45
- "type": {
28
+ "id": {
46
29
  "type": "string",
30
+ "description": "The id of the element."
31
+ },
32
+ "type": {
47
33
  "const": "AuditableItemGraphAlias",
48
34
  "description": "JSON-LD Type."
49
35
  },
50
36
  "annotationObject": {
51
37
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
52
- "description": "The JSON-LD annotation object for the alias. json-ld namespace:twin-common"
38
+ "description": "The JSON-LD annotation object for the alias."
53
39
  },
54
40
  "aliasFormat": {
55
41
  "type": "string",
56
- "description": "The format of the id in the alias. json-ld type:sch:Text"
42
+ "description": "The format of the id in the alias."
43
+ },
44
+ "unique": {
45
+ "type": "boolean",
46
+ "description": "Whether the alias should be unique across the graph, meaning that no other vertex can have the same alias. Defaults to false."
57
47
  }
58
48
  },
59
49
  "required": [
60
- "@context",
61
50
  "id",
62
51
  "type"
52
+ ],
53
+ "allOf": [
54
+ {
55
+ "$ref": "https://schema.twindev.org/aig/AuditableItemGraphAuditedElement"
56
+ }
63
57
  ]
64
58
  }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/aig/AuditableItemGraphAuditedElement",
4
+ "title": "AuditableItemGraphAuditedElement",
5
+ "description": "Interface describing the base properties for auditable elements.",
6
+ "type": "object",
7
+ "properties": {
8
+ "id": {
9
+ "type": "string",
10
+ "description": "The id of the element."
11
+ },
12
+ "dateCreated": {
13
+ "type": "string",
14
+ "description": "The date/time of when the element was created."
15
+ },
16
+ "dateModified": {
17
+ "type": "string",
18
+ "description": "The date/time of when the element was modified."
19
+ },
20
+ "dateDeleted": {
21
+ "type": "string",
22
+ "description": "The date/time of when the element was deleted, as we never actually remove items."
23
+ }
24
+ }
25
+ }
@@ -1,29 +1,27 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/aig/AuditableItemGraphChangeset",
4
+ "title": "AuditableItemGraphChangeset",
4
5
  "description": "Interface describing a set of changes to the vertex.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
9
  "type": "array",
9
- "minItems": 2,
10
- "description": "JSON-LD Context.",
11
10
  "prefixItems": [
12
11
  {
13
- "type": "string",
14
12
  "const": "https://schema.twindev.org/aig/"
15
13
  },
16
14
  {
17
- "type": "string",
18
15
  "const": "https://schema.twindev.org/common/"
19
16
  }
20
17
  ],
21
18
  "items": {
22
19
  "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
23
- }
20
+ },
21
+ "minItems": 2,
22
+ "description": "JSON-LD Context."
24
23
  },
25
24
  "type": {
26
- "type": "string",
27
25
  "const": "AuditableItemGraphChangeset",
28
26
  "description": "JSON-LD Type."
29
27
  },
@@ -33,26 +31,26 @@
33
31
  },
34
32
  "dateCreated": {
35
33
  "type": "string",
36
- "description": "The date/time of when the changeset was created. json-ld namespace:sch"
34
+ "description": "The date/time of when the changeset was created."
37
35
  },
38
36
  "userIdentity": {
39
37
  "type": "string",
40
- "description": "The user identity that created the changes. json-ld namespace:twin-common"
38
+ "description": "The user identity that created the changes."
41
39
  },
42
40
  "patches": {
43
41
  "type": "array",
44
42
  "items": {
45
43
  "$ref": "https://schema.twindev.org/aig/AuditableItemGraphPatchOperation"
46
44
  },
47
- "description": "The patches in the changeset. json-ld container:set"
45
+ "description": "The patches in the changeset."
48
46
  },
49
47
  "proofId": {
50
48
  "type": "string",
51
- "description": "The immutable proof id which contains the signature for this changeset. json-ld type:sch:identifier"
49
+ "description": "The immutable proof id which contains the signature for this changeset."
52
50
  },
53
51
  "verification": {
54
52
  "$ref": "https://schema.twindev.org/immutable-proof/ImmutableProofVerification",
55
- "description": "The verification for the changeset. json-ld id"
53
+ "description": "The verification for the changeset."
56
54
  }
57
55
  },
58
56
  "required": [
@@ -1,72 +1,62 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/aig/AuditableItemGraphEdge",
4
+ "title": "AuditableItemGraphEdge",
4
5
  "description": "Interface describing an edge between two vertices in an auditable item graph.",
5
6
  "type": "object",
6
7
  "properties": {
7
- "id": {
8
- "type": "string",
9
- "description": "The id of the element."
10
- },
11
- "dateCreated": {
12
- "type": "string",
13
- "description": "The date/time of when the element was created. json-ld namespace:sch"
14
- },
15
- "dateModified": {
16
- "type": "string",
17
- "description": "The date/time of when the element was modified. json-ld namespace:sch"
18
- },
19
- "dateDeleted": {
20
- "type": "string",
21
- "description": "The date/time of when the element was deleted, as we never actually remove items. json-ld namespace:sch"
22
- },
23
8
  "@context": {
24
9
  "anyOf": [
25
10
  {
26
- "type": "string",
27
11
  "const": "https://schema.twindev.org/aig/"
28
12
  },
29
13
  {
30
14
  "type": "array",
31
- "minItems": 1,
32
15
  "prefixItems": [
33
16
  {
34
- "type": "string",
35
17
  "const": "https://schema.twindev.org/aig/"
36
18
  }
37
19
  ],
38
20
  "items": {
39
21
  "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
40
- }
22
+ },
23
+ "minItems": 1
41
24
  }
42
25
  ],
43
26
  "description": "JSON-LD Context."
44
27
  },
28
+ "id": {
29
+ "type": "string",
30
+ "description": "The id of the element."
31
+ },
45
32
  "targetId": {
46
33
  "type": "string",
47
- "description": "The target vertex id the edge connects to. json-ld type:@id"
34
+ "description": "The target vertex id the edge connects to."
48
35
  },
49
36
  "type": {
50
- "type": "string",
51
37
  "const": "AuditableItemGraphEdge",
52
38
  "description": "JSON-LD Type."
53
39
  },
54
40
  "annotationObject": {
55
41
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
56
- "description": "The JSON-LD annotation object for the edge. json-ld namespace:twin-common"
42
+ "description": "The JSON-LD annotation object for the edge."
57
43
  },
58
44
  "edgeRelationships": {
59
45
  "type": "array",
60
46
  "items": {
61
47
  "type": "string"
62
48
  },
63
- "description": "The relationships between the two vertices. json-ld container:set"
49
+ "description": "The relationships between the two vertices."
64
50
  }
65
51
  },
66
52
  "required": [
67
- "@context",
68
53
  "targetId",
69
54
  "type",
70
55
  "edgeRelationships"
56
+ ],
57
+ "allOf": [
58
+ {
59
+ "$ref": "https://schema.twindev.org/aig/AuditableItemGraphAuditedElement"
60
+ }
71
61
  ]
72
62
  }