@twin.org/auditable-item-graph-models 0.0.3-next.10 → 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 -25
  17. package/dist/es/schemas/AuditableItemGraphAuditedElement.json +25 -0
  18. package/dist/es/schemas/AuditableItemGraphChangeset.json +10 -13
  19. package/dist/es/schemas/AuditableItemGraphEdge.json +15 -26
  20. package/dist/es/schemas/AuditableItemGraphPatchOperation.json +27 -19
  21. package/dist/es/schemas/AuditableItemGraphResource.json +9 -24
  22. package/dist/es/schemas/AuditableItemGraphVertex.json +35 -29
  23. package/dist/es/schemas/AuditableItemGraphVertexList.json +17 -20
  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 +15 -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
@@ -1,64 +1,72 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/aig/AuditableItemGraphPatchOperation",
4
+ "title": "AuditableItemGraphPatchOperation",
4
5
  "description": "The patch operation for JSON diffs.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
9
  "anyOf": [
9
10
  {
10
- "type": "string",
11
11
  "const": "https://schema.twindev.org/aig/"
12
12
  },
13
13
  {
14
14
  "type": "array",
15
- "minItems": 1,
16
15
  "prefixItems": [
17
16
  {
18
- "type": "string",
19
17
  "const": "https://schema.twindev.org/aig/"
20
18
  }
21
19
  ],
22
20
  "items": {
23
21
  "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
24
- }
22
+ },
23
+ "minItems": 1
25
24
  }
26
25
  ],
27
26
  "description": "JSON-LD Context."
28
27
  },
29
28
  "type": {
30
- "type": "string",
31
29
  "const": "AuditableItemGraphPatchOperation",
32
30
  "description": "JSON-LD Type."
33
31
  },
34
32
  "patchOperation": {
35
- "type": "string",
36
- "enum": [
37
- "add",
38
- "remove",
39
- "replace",
40
- "move",
41
- "copy",
42
- "test"
33
+ "anyOf": [
34
+ {
35
+ "const": "add"
36
+ },
37
+ {
38
+ "const": "remove"
39
+ },
40
+ {
41
+ "const": "replace"
42
+ },
43
+ {
44
+ "const": "move"
45
+ },
46
+ {
47
+ "const": "copy"
48
+ },
49
+ {
50
+ "const": "test"
51
+ }
43
52
  ],
44
- "description": "The operation that was performed on the item. json-ld type:sch:Text"
53
+ "description": "The operation that was performed on the item."
45
54
  },
46
55
  "patchPath": {
47
56
  "type": "string",
48
- "description": "The path to the object that was changed. json-ld type:sch:Text"
57
+ "description": "The path to the object that was changed."
49
58
  },
50
59
  "patchFrom": {
51
60
  "type": "string",
52
- "description": "The path the value was copied or moved from. json-ld type:sch:Text"
61
+ "description": "The path the value was copied or moved from."
53
62
  },
54
63
  "patchValue": {
55
- "description": "The value to add. json-ld type:json"
64
+ "description": "The value to add."
56
65
  }
57
66
  },
58
67
  "required": [
59
68
  "type",
60
69
  "patchOperation",
61
70
  "patchPath"
62
- ],
63
- "additionalProperties": false
71
+ ]
64
72
  }
@@ -1,60 +1,45 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/aig/AuditableItemGraphResource",
4
+ "title": "AuditableItemGraphResource",
4
5
  "description": "Interface describing an auditable item graph vertex resource.",
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
28
  "type": {
46
- "type": "string",
47
29
  "const": "AuditableItemGraphResource",
48
30
  "description": "JSON-LD Type."
49
31
  },
50
32
  "resourceObject": {
51
33
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
52
- "description": "The JSON-LD object for the resource. json-ld type:json"
34
+ "description": "The JSON-LD object for the resource."
53
35
  }
54
36
  },
55
37
  "required": [
56
- "@context",
57
38
  "type"
58
39
  ],
59
- "additionalProperties": false
40
+ "allOf": [
41
+ {
42
+ "$ref": "https://schema.twindev.org/aig/AuditableItemGraphAuditedElement"
43
+ }
44
+ ]
60
45
  }
@@ -1,80 +1,66 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/aig/AuditableItemGraphVertex",
4
+ "title": "AuditableItemGraphVertex",
4
5
  "description": "Interface describing an auditable item graph 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
  "type": "array",
25
- "minItems": 2,
26
- "description": "JSON-LD Context.",
27
10
  "prefixItems": [
28
11
  {
29
- "type": "string",
30
12
  "const": "https://schema.twindev.org/aig/"
31
13
  },
32
14
  {
33
- "type": "string",
34
15
  "const": "https://schema.twindev.org/common/"
35
16
  }
36
17
  ],
37
18
  "items": {
38
19
  "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
39
- }
20
+ },
21
+ "minItems": 2,
22
+ "description": "JSON-LD Context."
40
23
  },
41
- "type": {
24
+ "id": {
42
25
  "type": "string",
26
+ "description": "The id of the element."
27
+ },
28
+ "type": {
43
29
  "const": "AuditableItemGraphVertex",
44
30
  "description": "JSON-LD Type."
45
31
  },
46
32
  "organizationIdentity": {
47
33
  "type": "string",
48
- "description": "The identity of the organization which controls the vertex. json-ld namespace:twin-common"
34
+ "description": "The identity of the organization which controls the vertex."
49
35
  },
50
36
  "annotationObject": {
51
37
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
52
- "description": "The JSON-LD annotation object for the vertex. json-ld namespace:twin-common"
38
+ "description": "The JSON-LD annotation object for the vertex."
53
39
  },
54
40
  "aliases": {
55
41
  "type": "array",
56
42
  "items": {
57
43
  "$ref": "https://schema.twindev.org/aig/AuditableItemGraphAlias"
58
44
  },
59
- "description": "Alternative aliases that can be used to identify the vertex. json-ld container:set"
45
+ "description": "Alternative aliases that can be used to identify the vertex."
60
46
  },
61
47
  "resources": {
62
48
  "type": "array",
63
49
  "items": {
64
50
  "$ref": "https://schema.twindev.org/aig/AuditableItemGraphResource"
65
51
  },
66
- "description": "The resources attached to the vertex. json-ld container:set"
52
+ "description": "The resources attached to the vertex."
67
53
  },
68
54
  "edges": {
69
55
  "type": "array",
70
56
  "items": {
71
57
  "$ref": "https://schema.twindev.org/aig/AuditableItemGraphEdge"
72
58
  },
73
- "description": "Edges connected to the vertex. json-ld container:set"
59
+ "description": "Edges connected to the vertex."
74
60
  },
75
61
  "verified": {
76
62
  "type": "boolean",
77
- "description": "Is the vertex verified, will only be populated when verification is requested. json-ld namespace:twin-common"
63
+ "description": "Is the vertex verified, will only be populated when verification is requested."
78
64
  }
79
65
  },
80
66
  "required": [
@@ -82,5 +68,25 @@
82
68
  "id",
83
69
  "type"
84
70
  ],
85
- "additionalProperties": false
71
+ "allOf": [
72
+ {
73
+ "description": "Interface describing the base properties for auditable elements.",
74
+ "type": "object",
75
+ "properties": {
76
+ "dateCreated": {
77
+ "type": "string",
78
+ "description": "The date/time of when the element was created."
79
+ },
80
+ "dateModified": {
81
+ "type": "string",
82
+ "description": "The date/time of when the element was modified."
83
+ },
84
+ "dateDeleted": {
85
+ "type": "string",
86
+ "description": "The date/time of when the element was deleted, as we never actually remove items."
87
+ }
88
+ },
89
+ "$comment": "Inlined utility base type AuditableItemGraphAuditedElement so utility transformations can operate on concrete properties instead of a $ref."
90
+ }
91
+ ]
86
92
  }
@@ -1,41 +1,39 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/aig/AuditableItemGraphVertexList",
4
+ "title": "AuditableItemGraphVertexList",
4
5
  "description": "Interface describing an auditable item graph vertex list.",
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.org"
15
13
  },
16
14
  {
17
- "type": "string",
18
15
  "const": "https://schema.twindev.org/aig/"
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
25
  "type": "array",
27
- "items": {
28
- "allOf": [
29
- {
30
- "type": "string",
31
- "const": "ItemList"
32
- },
33
- {
34
- "type": "string",
35
- "const": "AuditableItemGraphVertexList"
36
- }
37
- ]
38
- },
26
+ "prefixItems": [
27
+ {
28
+ "const": "ItemList"
29
+ },
30
+ {
31
+ "const": "AuditableItemGraphVertexList"
32
+ }
33
+ ],
34
+ "items": false,
35
+ "minItems": 2,
36
+ "maxItems": 2,
39
37
  "description": "JSON-LD Type."
40
38
  },
41
39
  "itemListElement": {
@@ -43,13 +41,12 @@
43
41
  "items": {
44
42
  "$ref": "https://schema.twindev.org/aig/AuditableItemGraphVertex"
45
43
  },
46
- "description": "The list of vertices. json-ld namespace:sch"
44
+ "description": "The list of vertices."
47
45
  }
48
46
  },
49
47
  "required": [
50
48
  "@context",
51
49
  "type",
52
50
  "itemListElement"
53
- ],
54
- "additionalProperties": false
51
+ ]
55
52
  }
@@ -9,7 +9,7 @@ export interface IAuditableItemGraphAlias extends IAuditableItemGraphAuditedElem
9
9
  /**
10
10
  * JSON-LD Context.
11
11
  */
12
- "@context": typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
12
+ "@context"?: typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
13
13
  /**
14
14
  * The id of the element.
15
15
  */
@@ -20,12 +20,17 @@ export interface IAuditableItemGraphAlias extends IAuditableItemGraphAuditedElem
20
20
  type: typeof AuditableItemGraphTypes.Alias;
21
21
  /**
22
22
  * The JSON-LD annotation object for the alias.
23
- * json-ld namespace:twin-common
23
+ * @json-ld namespace:twin-common
24
24
  */
25
25
  annotationObject?: IJsonLdNodeObject;
26
26
  /**
27
27
  * The format of the id in the alias.
28
- * json-ld type:sch:Text
28
+ * @json-ld type:sch:Text
29
29
  */
30
30
  aliasFormat?: string;
31
+ /**
32
+ * Whether the alias should be unique across the graph, meaning that no other vertex can have the same alias. Defaults to false.
33
+ * @json-ld type:sch:Boolean
34
+ */
35
+ unique?: boolean;
31
36
  }
@@ -8,17 +8,17 @@ export interface IAuditableItemGraphAuditedElement {
8
8
  id?: string;
9
9
  /**
10
10
  * The date/time of when the element was created.
11
- * json-ld namespace:sch
11
+ * @json-ld namespace:sch
12
12
  */
13
13
  dateCreated?: string;
14
14
  /**
15
15
  * The date/time of when the element was modified.
16
- * json-ld namespace:sch
16
+ * @json-ld namespace:sch
17
17
  */
18
18
  dateModified?: string;
19
19
  /**
20
20
  * The date/time of when the element was deleted, as we never actually remove items.
21
- * json-ld namespace:sch
21
+ * @json-ld namespace:sch
22
22
  */
23
23
  dateDeleted?: string;
24
24
  }
@@ -25,27 +25,27 @@ export interface IAuditableItemGraphChangeset {
25
25
  id: string;
26
26
  /**
27
27
  * The date/time of when the changeset was created.
28
- * json-ld namespace:sch
28
+ * @json-ld namespace:sch
29
29
  */
30
30
  dateCreated: string;
31
31
  /**
32
32
  * The user identity that created the changes.
33
- * json-ld namespace:twin-common
33
+ * @json-ld namespace:twin-common
34
34
  */
35
35
  userIdentity?: string;
36
36
  /**
37
37
  * The patches in the changeset.
38
- * json-ld container:set
38
+ * @json-ld container:set
39
39
  */
40
40
  patches: IAuditableItemGraphPatchOperation[];
41
41
  /**
42
42
  * The immutable proof id which contains the signature for this changeset.
43
- * json-ld type:sch:identifier
43
+ * @json-ld type:sch:identifier
44
44
  */
45
45
  proofId?: string;
46
46
  /**
47
47
  * The verification for the changeset.
48
- * json-ld id
48
+ * @json-ld id
49
49
  */
50
50
  verification?: IImmutableProofVerification;
51
51
  }
@@ -21,7 +21,7 @@ export interface IAuditableItemGraphChangesetList {
21
21
  type: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.ChangesetList];
22
22
  /**
23
23
  * The list of changesets.
24
- * json-ld namespace:sch
24
+ * @json-ld namespace:sch
25
25
  */
26
26
  [SchemaOrgTypes.ItemListElement]: IAuditableItemGraphChangeset[];
27
27
  }
@@ -1,5 +1,4 @@
1
1
  import type { IComponent } from "@twin.org/core";
2
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
3
2
  import type { IComparator, SortDirection } from "@twin.org/entity";
4
3
  import type { IAuditableItemGraphChangeset } from "./IAuditableItemGraphChangeset.js";
5
4
  import type { IAuditableItemGraphChangesetList } from "./IAuditableItemGraphChangesetList.js";
@@ -19,24 +18,7 @@ export interface IAuditableItemGraphComponent extends IComponent {
19
18
  * @param vertex.edges The edges connected to the vertex.
20
19
  * @returns The id of the new graph item.
21
20
  */
22
- create(vertex: {
23
- annotationObject?: IJsonLdNodeObject;
24
- aliases?: {
25
- id: string;
26
- aliasFormat?: string;
27
- unique?: boolean;
28
- annotationObject?: IJsonLdNodeObject;
29
- }[];
30
- resources?: {
31
- id?: string;
32
- resourceObject?: IJsonLdNodeObject;
33
- }[];
34
- edges?: {
35
- targetId: string;
36
- edgeRelationships: string[];
37
- annotationObject?: IJsonLdNodeObject;
38
- }[];
39
- }): Promise<string>;
21
+ create(vertex: Omit<IAuditableItemGraphVertex, "id">): Promise<string>;
40
22
  /**
41
23
  * Update a graph vertex.
42
24
  * @param vertex The vertex to update.
@@ -47,26 +29,7 @@ export interface IAuditableItemGraphComponent extends IComponent {
47
29
  * @param vertex.edges The edges connected to the vertex.
48
30
  * @returns Nothing.
49
31
  */
50
- update(vertex: {
51
- id: string;
52
- annotationObject?: IJsonLdNodeObject;
53
- aliases?: {
54
- id: string;
55
- aliasFormat?: string;
56
- unique?: boolean;
57
- annotationObject?: IJsonLdNodeObject;
58
- }[];
59
- resources?: {
60
- id?: string;
61
- resourceObject?: IJsonLdNodeObject;
62
- }[];
63
- edges?: {
64
- id?: string;
65
- targetId: string;
66
- edgeRelationships: string[];
67
- annotationObject?: IJsonLdNodeObject;
68
- }[];
69
- }): Promise<void>;
32
+ update(vertex: IAuditableItemGraphVertex): Promise<void>;
70
33
  /**
71
34
  * Get a graph vertex.
72
35
  * @param id The id of the vertex to get.
@@ -9,14 +9,14 @@ export interface IAuditableItemGraphEdge extends IAuditableItemGraphAuditedEleme
9
9
  /**
10
10
  * JSON-LD Context.
11
11
  */
12
- "@context": typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
12
+ "@context"?: typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
13
13
  /**
14
14
  * The id of the element.
15
15
  */
16
16
  id?: string;
17
17
  /**
18
18
  * The target vertex id the edge connects to.
19
- * json-ld type:@id
19
+ * @json-ld type:@id
20
20
  */
21
21
  targetId: string;
22
22
  /**
@@ -25,12 +25,12 @@ export interface IAuditableItemGraphEdge extends IAuditableItemGraphAuditedEleme
25
25
  type: typeof AuditableItemGraphTypes.Edge;
26
26
  /**
27
27
  * The JSON-LD annotation object for the edge.
28
- * json-ld namespace:twin-common
28
+ * @json-ld namespace:twin-common
29
29
  */
30
30
  annotationObject?: IJsonLdNodeObject;
31
31
  /**
32
32
  * The relationships between the two vertices.
33
- * json-ld container:set
33
+ * @json-ld container:set
34
34
  */
35
35
  edgeRelationships: string[];
36
36
  }
@@ -15,22 +15,22 @@ export interface IAuditableItemGraphPatchOperation {
15
15
  type: typeof AuditableItemGraphTypes.PatchOperation;
16
16
  /**
17
17
  * The operation that was performed on the item.
18
- * json-ld type:sch:Text
18
+ * @json-ld type:sch:Text
19
19
  */
20
20
  patchOperation: "add" | "remove" | "replace" | "move" | "copy" | "test";
21
21
  /**
22
22
  * The path to the object that was changed.
23
- * json-ld type:sch:Text
23
+ * @json-ld type:sch:Text
24
24
  */
25
25
  patchPath: string;
26
26
  /**
27
27
  * The path the value was copied or moved from.
28
- * json-ld type:sch:Text
28
+ * @json-ld type:sch:Text
29
29
  */
30
30
  patchFrom?: string;
31
31
  /**
32
32
  * The value to add.
33
- * json-ld type:json
33
+ * @json-ld type:json
34
34
  */
35
35
  patchValue?: unknown;
36
36
  }
@@ -9,14 +9,14 @@ export interface IAuditableItemGraphResource extends IAuditableItemGraphAuditedE
9
9
  /**
10
10
  * JSON-LD Context.
11
11
  */
12
- "@context": typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
12
+ "@context"?: typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
13
13
  /**
14
14
  * JSON-LD Type.
15
15
  */
16
16
  type: typeof AuditableItemGraphTypes.Resource;
17
17
  /**
18
18
  * The JSON-LD object for the resource.
19
- * json-ld type:json
19
+ * @json-ld type:json
20
20
  */
21
21
  resourceObject?: IJsonLdNodeObject;
22
22
  }
@@ -27,32 +27,32 @@ export interface IAuditableItemGraphVertex extends Omit<IAuditableItemGraphAudit
27
27
  type: typeof AuditableItemGraphTypes.Vertex;
28
28
  /**
29
29
  * The identity of the organization which controls the vertex.
30
- * json-ld namespace:twin-common
30
+ * @json-ld namespace:twin-common
31
31
  */
32
32
  organizationIdentity?: string;
33
33
  /**
34
34
  * The JSON-LD annotation object for the vertex.
35
- * json-ld namespace:twin-common
35
+ * @json-ld namespace:twin-common
36
36
  */
37
37
  annotationObject?: IJsonLdNodeObject;
38
38
  /**
39
39
  * Alternative aliases that can be used to identify the vertex.
40
- * json-ld container:set
40
+ * @json-ld container:set
41
41
  */
42
42
  aliases?: IAuditableItemGraphAlias[];
43
43
  /**
44
44
  * The resources attached to the vertex.
45
- * json-ld container:set
45
+ * @json-ld container:set
46
46
  */
47
47
  resources?: IAuditableItemGraphResource[];
48
48
  /**
49
49
  * Edges connected to the vertex.
50
- * json-ld container:set
50
+ * @json-ld container:set
51
51
  */
52
52
  edges?: IAuditableItemGraphEdge[];
53
53
  /**
54
54
  * Is the vertex verified, will only be populated when verification is requested.
55
- * json-ld namespace:twin-common
55
+ * @json-ld namespace:twin-common
56
56
  */
57
57
  verified?: boolean;
58
58
  }
@@ -21,7 +21,7 @@ export interface IAuditableItemGraphVertexList {
21
21
  type: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexList];
22
22
  /**
23
23
  * The list of vertices.
24
- * json-ld namespace:sch
24
+ * @json-ld namespace:sch
25
25
  */
26
26
  [SchemaOrgTypes.ItemListElement]: IAuditableItemGraphVertex[];
27
27
  }