@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.
- package/README.md +3 -1
- package/dist/es/dataTypes/auditableItemGraphDataTypes.js +37 -43
- package/dist/es/dataTypes/auditableItemGraphDataTypes.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphAlias.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphAuditedElement.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphChangeset.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphChangesetList.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphComponent.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphEdge.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphPatchOperation.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphResource.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphVertex.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphVertexList.js.map +1 -1
- package/dist/es/models/api/IAuditableItemGraphCreateRequest.js.map +1 -1
- package/dist/es/models/api/IAuditableItemGraphUpdateRequest.js.map +1 -1
- package/dist/es/schemas/AuditableItemGraphAlias.json +18 -24
- package/dist/es/schemas/AuditableItemGraphAuditedElement.json +25 -0
- package/dist/es/schemas/AuditableItemGraphChangeset.json +9 -11
- package/dist/es/schemas/AuditableItemGraphEdge.json +15 -25
- package/dist/es/schemas/AuditableItemGraphPatchOperation.json +26 -17
- package/dist/es/schemas/AuditableItemGraphResource.json +9 -23
- package/dist/es/schemas/AuditableItemGraphVertex.json +35 -28
- package/dist/es/schemas/AuditableItemGraphVertexList.json +16 -18
- package/dist/types/models/IAuditableItemGraphAlias.d.ts +8 -3
- package/dist/types/models/IAuditableItemGraphAuditedElement.d.ts +3 -3
- package/dist/types/models/IAuditableItemGraphChangeset.d.ts +5 -5
- package/dist/types/models/IAuditableItemGraphChangesetList.d.ts +1 -1
- package/dist/types/models/IAuditableItemGraphComponent.d.ts +2 -39
- package/dist/types/models/IAuditableItemGraphEdge.d.ts +4 -4
- package/dist/types/models/IAuditableItemGraphPatchOperation.d.ts +4 -4
- package/dist/types/models/IAuditableItemGraphResource.d.ts +2 -2
- package/dist/types/models/IAuditableItemGraphVertex.d.ts +6 -6
- package/dist/types/models/IAuditableItemGraphVertexList.d.ts +1 -1
- package/dist/types/models/api/IAuditableItemGraphCreateRequest.d.ts +2 -31
- package/dist/types/models/api/IAuditableItemGraphUpdateRequest.d.ts +2 -32
- package/docs/changelog.md +8 -1
- package/docs/examples.md +22 -1
- package/docs/reference/classes/AuditableItemGraphDataTypes.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphAlias.md +22 -19
- package/docs/reference/interfaces/IAuditableItemGraphAuditedElement.md +8 -11
- package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +12 -17
- package/docs/reference/interfaces/IAuditableItemGraphChangesetGetRequest.md +6 -6
- package/docs/reference/interfaces/IAuditableItemGraphChangesetGetResponse.md +3 -3
- package/docs/reference/interfaces/IAuditableItemGraphChangesetList.md +3 -4
- package/docs/reference/interfaces/IAuditableItemGraphChangesetListRequest.md +8 -8
- package/docs/reference/interfaces/IAuditableItemGraphChangesetListResponse.md +4 -4
- package/docs/reference/interfaces/IAuditableItemGraphComponent.md +13 -63
- package/docs/reference/interfaces/IAuditableItemGraphCreateRequest.md +2 -26
- package/docs/reference/interfaces/IAuditableItemGraphEdge.md +15 -21
- package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexCreated.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexUpdated.md +2 -2
- package/docs/reference/interfaces/IAuditableItemGraphGetRequest.md +7 -7
- package/docs/reference/interfaces/IAuditableItemGraphGetResponse.md +3 -3
- package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +14 -14
- package/docs/reference/interfaces/IAuditableItemGraphListResponse.md +4 -4
- package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +9 -13
- package/docs/reference/interfaces/IAuditableItemGraphResource.md +13 -17
- package/docs/reference/interfaces/IAuditableItemGraphUpdateRequest.md +3 -27
- package/docs/reference/interfaces/IAuditableItemGraphVertex.md +21 -30
- package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +3 -4
- package/docs/reference/variables/AuditableItemGraphContexts.md +6 -6
- package/docs/reference/variables/AuditableItemGraphTopics.md +2 -2
- package/docs/reference/variables/AuditableItemGraphTypes.md +8 -8
- package/docs/reference/variables/VerifyDepth.md +3 -3
- package/package.json +2 -2
|
@@ -1,58 +1,67 @@
|
|
|
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
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
61
|
+
"description": "The path the value was copied or moved from."
|
|
53
62
|
},
|
|
54
63
|
"patchValue": {
|
|
55
|
-
"description": "The value to add.
|
|
64
|
+
"description": "The value to add."
|
|
56
65
|
}
|
|
57
66
|
},
|
|
58
67
|
"required": [
|
|
@@ -1,59 +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.
|
|
34
|
+
"description": "The JSON-LD object for the resource."
|
|
53
35
|
}
|
|
54
36
|
},
|
|
55
37
|
"required": [
|
|
56
|
-
"@context",
|
|
57
38
|
"type"
|
|
39
|
+
],
|
|
40
|
+
"allOf": [
|
|
41
|
+
{
|
|
42
|
+
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphAuditedElement"
|
|
43
|
+
}
|
|
58
44
|
]
|
|
59
45
|
}
|
|
@@ -1,85 +1,92 @@
|
|
|
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
|
-
"
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
63
|
+
"description": "Is the vertex verified, will only be populated when verification is requested."
|
|
78
64
|
}
|
|
79
65
|
},
|
|
80
66
|
"required": [
|
|
81
67
|
"@context",
|
|
82
68
|
"id",
|
|
83
69
|
"type"
|
|
70
|
+
],
|
|
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
|
+
}
|
|
84
91
|
]
|
|
85
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
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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,7 +41,7 @@
|
|
|
43
41
|
"items": {
|
|
44
42
|
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphVertex"
|
|
45
43
|
},
|
|
46
|
-
"description": "The list of vertices.
|
|
44
|
+
"description": "The list of vertices."
|
|
47
45
|
}
|
|
48
46
|
},
|
|
49
47
|
"required": [
|
|
@@ -9,7 +9,7 @@ export interface IAuditableItemGraphAlias extends IAuditableItemGraphAuditedElem
|
|
|
9
9
|
/**
|
|
10
10
|
* JSON-LD Context.
|
|
11
11
|
*/
|
|
12
|
-
"@context"
|
|
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"
|
|
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"
|
|
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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAuditableItemGraphVertex } from "../IAuditableItemGraphVertex.js";
|
|
2
2
|
/**
|
|
3
3
|
* Create an auditable item graph vertex.
|
|
4
4
|
*/
|
|
@@ -6,34 +6,5 @@ export interface IAuditableItemGraphCreateRequest {
|
|
|
6
6
|
/**
|
|
7
7
|
* The data to be used in the vertex.
|
|
8
8
|
*/
|
|
9
|
-
body:
|
|
10
|
-
/**
|
|
11
|
-
* The object to be used in the vertex as JSON-LD.
|
|
12
|
-
*/
|
|
13
|
-
annotationObject?: IJsonLdNodeObject;
|
|
14
|
-
/**
|
|
15
|
-
* Alternative aliases that can be used to identify the vertex.
|
|
16
|
-
*/
|
|
17
|
-
aliases?: {
|
|
18
|
-
id: string;
|
|
19
|
-
aliasFormat?: string;
|
|
20
|
-
unique?: boolean;
|
|
21
|
-
annotationObject?: IJsonLdNodeObject;
|
|
22
|
-
}[];
|
|
23
|
-
/**
|
|
24
|
-
* The resources attached to the vertex.
|
|
25
|
-
*/
|
|
26
|
-
resources?: {
|
|
27
|
-
id?: string;
|
|
28
|
-
resourceObject?: IJsonLdNodeObject;
|
|
29
|
-
}[];
|
|
30
|
-
/**
|
|
31
|
-
* The edges connected to the vertex.
|
|
32
|
-
*/
|
|
33
|
-
edges?: {
|
|
34
|
-
targetId: string;
|
|
35
|
-
edgeRelationships: string[];
|
|
36
|
-
annotationObject?: IJsonLdNodeObject;
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
9
|
+
body: Omit<IAuditableItemGraphVertex, "id">;
|
|
39
10
|
}
|