@twin.org/auditable-item-graph-models 0.0.3-next.0 → 0.0.3-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/dataTypes/auditableItemGraphDataTypes.js +14 -14
- package/dist/es/dataTypes/auditableItemGraphDataTypes.js.map +1 -1
- package/dist/es/index.js +5 -0
- package/dist/es/index.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 +2 -0
- package/dist/es/models/IAuditableItemGraphChangesetList.js.map +1 -0
- 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/IAuditableItemGraphChangesetGetRequest.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphChangesetGetRequest.js.map +1 -0
- package/dist/es/models/api/IAuditableItemGraphChangesetGetResponse.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphChangesetGetResponse.js.map +1 -0
- package/dist/es/models/api/IAuditableItemGraphChangesetListRequest.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphChangesetListRequest.js.map +1 -0
- package/dist/es/models/api/IAuditableItemGraphChangesetListResponse.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphChangesetListResponse.js.map +1 -0
- package/dist/es/models/api/IAuditableItemGraphGetRequest.js.map +1 -1
- package/dist/es/models/api/IAuditableItemGraphListRequest.js.map +1 -1
- package/dist/es/models/api/IAuditableItemGraphListResponse.js.map +1 -1
- package/dist/es/models/auditableItemGraphContexts.js +20 -4
- package/dist/es/models/auditableItemGraphContexts.js.map +1 -1
- package/dist/es/models/auditableItemGraphTypes.js +5 -1
- package/dist/es/models/auditableItemGraphTypes.js.map +1 -1
- package/dist/es/schemas/AuditableItemGraphAlias.json +5 -5
- package/dist/es/schemas/AuditableItemGraphChangeset.json +5 -6
- package/dist/es/schemas/AuditableItemGraphEdge.json +6 -6
- package/dist/es/schemas/AuditableItemGraphPatchOperation.json +4 -5
- package/dist/es/schemas/AuditableItemGraphResource.json +4 -4
- package/dist/es/schemas/AuditableItemGraphVertex.json +9 -16
- package/dist/es/schemas/AuditableItemGraphVertexList.json +1 -5
- package/dist/types/index.d.ts +5 -0
- package/dist/types/models/IAuditableItemGraphAlias.d.ts +3 -1
- package/dist/types/models/IAuditableItemGraphAuditedElement.d.ts +3 -0
- package/dist/types/models/IAuditableItemGraphChangeset.d.ts +8 -3
- package/dist/types/models/IAuditableItemGraphChangesetList.d.ts +27 -0
- package/dist/types/models/IAuditableItemGraphComponent.d.ts +33 -3
- package/dist/types/models/IAuditableItemGraphEdge.d.ts +4 -1
- package/dist/types/models/IAuditableItemGraphPatchOperation.d.ts +5 -1
- package/dist/types/models/IAuditableItemGraphResource.d.ts +2 -1
- package/dist/types/models/IAuditableItemGraphVertex.d.ts +8 -7
- package/dist/types/models/IAuditableItemGraphVertexList.d.ts +3 -6
- package/dist/types/models/api/IAuditableItemGraphChangesetGetRequest.d.ts +35 -0
- package/dist/types/models/api/IAuditableItemGraphChangesetGetResponse.d.ts +17 -0
- package/dist/types/models/api/IAuditableItemGraphChangesetListRequest.d.ts +39 -0
- package/dist/types/models/api/IAuditableItemGraphChangesetListResponse.d.ts +18 -0
- package/dist/types/models/api/IAuditableItemGraphGetRequest.d.ts +1 -5
- package/dist/types/models/api/IAuditableItemGraphListRequest.d.ts +1 -1
- package/dist/types/models/api/IAuditableItemGraphListResponse.d.ts +1 -0
- package/dist/types/models/auditableItemGraphContexts.d.ts +20 -4
- package/dist/types/models/auditableItemGraphTypes.d.ts +5 -1
- package/docs/changelog.md +120 -0
- package/docs/reference/index.md +5 -0
- package/docs/reference/interfaces/IAuditableItemGraphAlias.md +5 -0
- package/docs/reference/interfaces/IAuditableItemGraphAuditedElement.md +3 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +7 -2
- package/docs/reference/interfaces/IAuditableItemGraphChangesetGetRequest.md +49 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangesetGetResponse.md +23 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangesetList.md +28 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangesetListRequest.md +55 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangesetListResponse.md +27 -0
- package/docs/reference/interfaces/IAuditableItemGraphComponent.md +85 -7
- package/docs/reference/interfaces/IAuditableItemGraphEdge.md +6 -0
- package/docs/reference/interfaces/IAuditableItemGraphGetRequest.md +1 -7
- package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphListResponse.md +4 -0
- package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +6 -2
- package/docs/reference/interfaces/IAuditableItemGraphResource.md +4 -0
- package/docs/reference/interfaces/IAuditableItemGraphVertex.md +9 -8
- package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +1 -8
- package/docs/reference/variables/AuditableItemGraphContexts.md +30 -6
- package/docs/reference/variables/AuditableItemGraphTypes.md +7 -1
- package/package.json +1 -1
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dateCreated": {
|
|
12
12
|
"type": "string",
|
|
13
|
-
"description": "The date/time of when the element was created."
|
|
13
|
+
"description": "The date/time of when the element was created. json-ld namespace:sch"
|
|
14
14
|
},
|
|
15
15
|
"dateModified": {
|
|
16
16
|
"type": "string",
|
|
17
|
-
"description": "The date/time of when the element was modified."
|
|
17
|
+
"description": "The date/time of when the element was modified. json-ld namespace:sch"
|
|
18
18
|
},
|
|
19
19
|
"dateDeleted": {
|
|
20
20
|
"type": "string",
|
|
21
|
-
"description": "The date/time of when the element was deleted, as we never actually remove items."
|
|
21
|
+
"description": "The date/time of when the element was deleted, as we never actually remove items. json-ld namespace:sch"
|
|
22
22
|
},
|
|
23
23
|
"@context": {
|
|
24
24
|
"type": "array",
|
|
@@ -45,43 +45,36 @@
|
|
|
45
45
|
},
|
|
46
46
|
"organizationIdentity": {
|
|
47
47
|
"type": "string",
|
|
48
|
-
"description": "The identity of the organization which controls the vertex."
|
|
48
|
+
"description": "The identity of the organization which controls the vertex. json-ld namespace:twin-common"
|
|
49
49
|
},
|
|
50
50
|
"annotationObject": {
|
|
51
51
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
|
|
52
|
-
"description": "The JSON-LD annotation object for the vertex."
|
|
52
|
+
"description": "The JSON-LD annotation object for the vertex. json-ld namespace:twin-common"
|
|
53
53
|
},
|
|
54
54
|
"aliases": {
|
|
55
55
|
"type": "array",
|
|
56
56
|
"items": {
|
|
57
57
|
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphAlias"
|
|
58
58
|
},
|
|
59
|
-
"description": "Alternative aliases that can be used to identify the vertex."
|
|
59
|
+
"description": "Alternative aliases that can be used to identify the vertex. json-ld container:set"
|
|
60
60
|
},
|
|
61
61
|
"resources": {
|
|
62
62
|
"type": "array",
|
|
63
63
|
"items": {
|
|
64
64
|
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphResource"
|
|
65
65
|
},
|
|
66
|
-
"description": "The resources attached to the vertex."
|
|
66
|
+
"description": "The resources attached to the vertex. json-ld container:set"
|
|
67
67
|
},
|
|
68
68
|
"edges": {
|
|
69
69
|
"type": "array",
|
|
70
70
|
"items": {
|
|
71
71
|
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphEdge"
|
|
72
72
|
},
|
|
73
|
-
"description": "Edges connected to the vertex."
|
|
74
|
-
},
|
|
75
|
-
"changesets": {
|
|
76
|
-
"type": "array",
|
|
77
|
-
"items": {
|
|
78
|
-
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphChangeset"
|
|
79
|
-
},
|
|
80
|
-
"description": "Changesets for the vertex."
|
|
73
|
+
"description": "Edges connected to the vertex. json-ld container:set"
|
|
81
74
|
},
|
|
82
75
|
"verified": {
|
|
83
76
|
"type": "boolean",
|
|
84
|
-
"description": "Is the vertex verified, will only be populated when verification is requested."
|
|
77
|
+
"description": "Is the vertex verified, will only be populated when verification is requested. json-ld namespace:twin-common"
|
|
85
78
|
}
|
|
86
79
|
},
|
|
87
80
|
"required": [
|
|
@@ -43,11 +43,7 @@
|
|
|
43
43
|
"items": {
|
|
44
44
|
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphVertex"
|
|
45
45
|
},
|
|
46
|
-
"description": "The list of vertices."
|
|
47
|
-
},
|
|
48
|
-
"nextItem": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"description": "The cursor to get the next chunk of vertices."
|
|
46
|
+
"description": "The list of vertices. json-ld namespace:sch"
|
|
51
47
|
}
|
|
52
48
|
},
|
|
53
49
|
"required": [
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export * from "./dataTypes/auditableItemGraphDataTypes.js";
|
|
2
|
+
export * from "./models/api/IAuditableItemGraphChangesetGetRequest.js";
|
|
3
|
+
export * from "./models/api/IAuditableItemGraphChangesetGetResponse.js";
|
|
4
|
+
export * from "./models/api/IAuditableItemGraphChangesetListRequest.js";
|
|
5
|
+
export * from "./models/api/IAuditableItemGraphChangesetListResponse.js";
|
|
2
6
|
export * from "./models/api/IAuditableItemGraphCreateRequest.js";
|
|
3
7
|
export * from "./models/api/IAuditableItemGraphGetRequest.js";
|
|
4
8
|
export * from "./models/api/IAuditableItemGraphGetResponse.js";
|
|
@@ -13,6 +17,7 @@ export * from "./models/eventBus/IAuditableItemGraphEventBusVertexUpdated.js";
|
|
|
13
17
|
export * from "./models/IAuditableItemGraphAlias.js";
|
|
14
18
|
export * from "./models/IAuditableItemGraphAuditedElement.js";
|
|
15
19
|
export * from "./models/IAuditableItemGraphChangeset.js";
|
|
20
|
+
export * from "./models/IAuditableItemGraphChangesetList.js";
|
|
16
21
|
export * from "./models/IAuditableItemGraphComponent.js";
|
|
17
22
|
export * from "./models/IAuditableItemGraphEdge.js";
|
|
18
23
|
export * from "./models/IAuditableItemGraphPatchOperation.js";
|
|
@@ -9,7 +9,7 @@ export interface IAuditableItemGraphAlias extends IAuditableItemGraphAuditedElem
|
|
|
9
9
|
/**
|
|
10
10
|
* JSON-LD Context.
|
|
11
11
|
*/
|
|
12
|
-
"@context": typeof AuditableItemGraphContexts.
|
|
12
|
+
"@context": typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
|
|
13
13
|
/**
|
|
14
14
|
* The id of the element.
|
|
15
15
|
*/
|
|
@@ -20,10 +20,12 @@ 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
24
|
*/
|
|
24
25
|
annotationObject?: IJsonLdNodeObject;
|
|
25
26
|
/**
|
|
26
27
|
* The format of the id in the alias.
|
|
28
|
+
* json-ld type:sch:Text
|
|
27
29
|
*/
|
|
28
30
|
aliasFormat?: string;
|
|
29
31
|
}
|
|
@@ -8,14 +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
12
|
*/
|
|
12
13
|
dateCreated?: string;
|
|
13
14
|
/**
|
|
14
15
|
* The date/time of when the element was modified.
|
|
16
|
+
* json-ld namespace:sch
|
|
15
17
|
*/
|
|
16
18
|
dateModified?: string;
|
|
17
19
|
/**
|
|
18
20
|
* The date/time of when the element was deleted, as we never actually remove items.
|
|
21
|
+
* json-ld namespace:sch
|
|
19
22
|
*/
|
|
20
23
|
dateDeleted?: string;
|
|
21
24
|
}
|
|
@@ -10,9 +10,9 @@ export interface IAuditableItemGraphChangeset {
|
|
|
10
10
|
/**
|
|
11
11
|
* JSON-LD Context.
|
|
12
12
|
*/
|
|
13
|
-
"@context"
|
|
14
|
-
typeof AuditableItemGraphContexts.
|
|
15
|
-
typeof AuditableItemGraphContexts.
|
|
13
|
+
"@context"?: [
|
|
14
|
+
typeof AuditableItemGraphContexts.Context,
|
|
15
|
+
typeof AuditableItemGraphContexts.ContextCommon,
|
|
16
16
|
...IJsonLdContextDefinitionElement[]
|
|
17
17
|
];
|
|
18
18
|
/**
|
|
@@ -25,22 +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
29
|
*/
|
|
29
30
|
dateCreated: string;
|
|
30
31
|
/**
|
|
31
32
|
* The user identity that created the changes.
|
|
33
|
+
* json-ld namespace:twin-common
|
|
32
34
|
*/
|
|
33
35
|
userIdentity?: string;
|
|
34
36
|
/**
|
|
35
37
|
* The patches in the changeset.
|
|
38
|
+
* json-ld container:set
|
|
36
39
|
*/
|
|
37
40
|
patches: IAuditableItemGraphPatchOperation[];
|
|
38
41
|
/**
|
|
39
42
|
* The immutable proof id which contains the signature for this changeset.
|
|
43
|
+
* json-ld type:sch:identifier
|
|
40
44
|
*/
|
|
41
45
|
proofId?: string;
|
|
42
46
|
/**
|
|
43
47
|
* The verification for the changeset.
|
|
48
|
+
* json-ld id
|
|
44
49
|
*/
|
|
45
50
|
verification?: IImmutableProofVerification;
|
|
46
51
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { SchemaOrgContexts, SchemaOrgTypes } from "@twin.org/standards-schema-org";
|
|
3
|
+
import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js";
|
|
4
|
+
import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
|
|
5
|
+
import type { IAuditableItemGraphChangeset } from "./IAuditableItemGraphChangeset.js";
|
|
6
|
+
/**
|
|
7
|
+
* Interface describing an auditable item graph changeset list.
|
|
8
|
+
*/
|
|
9
|
+
export interface IAuditableItemGraphChangesetList {
|
|
10
|
+
/**
|
|
11
|
+
* JSON-LD Context.
|
|
12
|
+
*/
|
|
13
|
+
"@context": [
|
|
14
|
+
typeof SchemaOrgContexts.Context,
|
|
15
|
+
typeof AuditableItemGraphContexts.Context,
|
|
16
|
+
...IJsonLdContextDefinitionElement[]
|
|
17
|
+
];
|
|
18
|
+
/**
|
|
19
|
+
* JSON-LD Type.
|
|
20
|
+
*/
|
|
21
|
+
type: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.ChangesetList];
|
|
22
|
+
/**
|
|
23
|
+
* The list of changesets.
|
|
24
|
+
* json-ld namespace:sch
|
|
25
|
+
*/
|
|
26
|
+
[SchemaOrgTypes.ItemListElement]: IAuditableItemGraphChangeset[];
|
|
27
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
2
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
3
|
import type { IComparator, SortDirection } from "@twin.org/entity";
|
|
4
|
+
import type { IAuditableItemGraphChangeset } from "./IAuditableItemGraphChangeset.js";
|
|
5
|
+
import type { IAuditableItemGraphChangesetList } from "./IAuditableItemGraphChangesetList.js";
|
|
4
6
|
import type { IAuditableItemGraphVertex } from "./IAuditableItemGraphVertex.js";
|
|
5
7
|
import type { IAuditableItemGraphVertexList } from "./IAuditableItemGraphVertexList.js";
|
|
6
8
|
import type { VerifyDepth } from "./verifyDepth.js";
|
|
@@ -70,16 +72,41 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
70
72
|
* @param id The id of the vertex to get.
|
|
71
73
|
* @param options Additional options for the get operation.
|
|
72
74
|
* @param options.includeDeleted Whether to include deleted aliases, resource, edges, defaults to false.
|
|
73
|
-
* @param options.includeChangesets Whether to include the changesets of the vertex, defaults to false.
|
|
74
75
|
* @param options.verifySignatureDepth How many signatures to verify, defaults to "none".
|
|
75
76
|
* @returns The vertex if found.
|
|
76
77
|
* @throws NotFoundError if the vertex is not found.
|
|
77
78
|
*/
|
|
78
79
|
get(id: string, options?: {
|
|
79
80
|
includeDeleted?: boolean;
|
|
80
|
-
includeChangesets?: boolean;
|
|
81
81
|
verifySignatureDepth?: VerifyDepth;
|
|
82
82
|
}): Promise<IAuditableItemGraphVertex>;
|
|
83
|
+
/**
|
|
84
|
+
* Get a graph vertex changeset list.
|
|
85
|
+
* @param id The id of the vertex to get.
|
|
86
|
+
* @param cursor The optional cursor to get next chunk.
|
|
87
|
+
* @param limit Limit the number of entities to return.
|
|
88
|
+
* @param options Additional options for the get operation.
|
|
89
|
+
* @param options.verifySignatureDepth How many signatures to verify, defaults to "none".
|
|
90
|
+
* @returns The changeset if found.
|
|
91
|
+
* @throws NotFoundError if the vertex is not found.
|
|
92
|
+
*/
|
|
93
|
+
getChangesets(id: string, cursor?: string, limit?: number, options?: {
|
|
94
|
+
verifySignatureDepth?: VerifyDepth;
|
|
95
|
+
}): Promise<{
|
|
96
|
+
changesets: IAuditableItemGraphChangesetList;
|
|
97
|
+
cursor?: string;
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Get a graph vertex changeset.
|
|
101
|
+
* @param id The id of the vertex to get.
|
|
102
|
+
* @param options Additional options for the get operation.
|
|
103
|
+
* @param options.verifySignatureDepth How many signatures to verify, defaults to "none".
|
|
104
|
+
* @returns The changeset if found.
|
|
105
|
+
* @throws NotFoundError if the vertex or changeset is not found.
|
|
106
|
+
*/
|
|
107
|
+
getChangeset(id: string, options?: {
|
|
108
|
+
verifySignatureDepth?: VerifyDepth;
|
|
109
|
+
}): Promise<IAuditableItemGraphChangeset>;
|
|
83
110
|
/**
|
|
84
111
|
* Remove the verifiable storage for an item.
|
|
85
112
|
* @param id The id of the vertex to remove the storage from.
|
|
@@ -107,5 +134,8 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
107
134
|
idMode?: "id" | "alias" | "both";
|
|
108
135
|
idExact?: boolean;
|
|
109
136
|
resourceTypes?: string[];
|
|
110
|
-
}, conditions?: IComparator[], orderBy?: keyof Pick<IAuditableItemGraphVertex, "dateCreated" | "dateModified">, orderByDirection?: SortDirection, properties?: (keyof IAuditableItemGraphVertex)[], cursor?: string, limit?: number): Promise<
|
|
137
|
+
}, conditions?: IComparator[], orderBy?: keyof Pick<IAuditableItemGraphVertex, "dateCreated" | "dateModified">, orderByDirection?: SortDirection, properties?: (keyof IAuditableItemGraphVertex)[], cursor?: string, limit?: number): Promise<{
|
|
138
|
+
entries: IAuditableItemGraphVertexList;
|
|
139
|
+
cursor?: string;
|
|
140
|
+
}>;
|
|
111
141
|
}
|
|
@@ -9,13 +9,14 @@ export interface IAuditableItemGraphEdge extends IAuditableItemGraphAuditedEleme
|
|
|
9
9
|
/**
|
|
10
10
|
* JSON-LD Context.
|
|
11
11
|
*/
|
|
12
|
-
"@context": typeof AuditableItemGraphContexts.
|
|
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
20
|
*/
|
|
20
21
|
targetId: string;
|
|
21
22
|
/**
|
|
@@ -24,10 +25,12 @@ export interface IAuditableItemGraphEdge extends IAuditableItemGraphAuditedEleme
|
|
|
24
25
|
type: typeof AuditableItemGraphTypes.Edge;
|
|
25
26
|
/**
|
|
26
27
|
* The JSON-LD annotation object for the edge.
|
|
28
|
+
* json-ld namespace:twin-common
|
|
27
29
|
*/
|
|
28
30
|
annotationObject?: IJsonLdNodeObject;
|
|
29
31
|
/**
|
|
30
32
|
* The relationships between the two vertices.
|
|
33
|
+
* json-ld container:set
|
|
31
34
|
*/
|
|
32
35
|
edgeRelationships: string[];
|
|
33
36
|
}
|
|
@@ -8,25 +8,29 @@ export interface IAuditableItemGraphPatchOperation {
|
|
|
8
8
|
/**
|
|
9
9
|
* JSON-LD Context.
|
|
10
10
|
*/
|
|
11
|
-
"@context"
|
|
11
|
+
"@context"?: typeof AuditableItemGraphContexts.Context | [typeof AuditableItemGraphContexts.Context, ...IJsonLdContextDefinitionElement[]];
|
|
12
12
|
/**
|
|
13
13
|
* JSON-LD Type.
|
|
14
14
|
*/
|
|
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
19
|
*/
|
|
19
20
|
patchOperation: "add" | "remove" | "replace" | "move" | "copy" | "test";
|
|
20
21
|
/**
|
|
21
22
|
* The path to the object that was changed.
|
|
23
|
+
* json-ld type:sch:Text
|
|
22
24
|
*/
|
|
23
25
|
patchPath: string;
|
|
24
26
|
/**
|
|
25
27
|
* The path the value was copied or moved from.
|
|
28
|
+
* json-ld type:sch:Text
|
|
26
29
|
*/
|
|
27
30
|
patchFrom?: string;
|
|
28
31
|
/**
|
|
29
32
|
* The value to add.
|
|
33
|
+
* json-ld type:json
|
|
30
34
|
*/
|
|
31
35
|
patchValue?: unknown;
|
|
32
36
|
}
|
|
@@ -9,13 +9,14 @@ export interface IAuditableItemGraphResource extends IAuditableItemGraphAuditedE
|
|
|
9
9
|
/**
|
|
10
10
|
* JSON-LD Context.
|
|
11
11
|
*/
|
|
12
|
-
"@context": typeof AuditableItemGraphContexts.
|
|
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
20
|
*/
|
|
20
21
|
resourceObject?: IJsonLdNodeObject;
|
|
21
22
|
}
|
|
@@ -3,7 +3,6 @@ import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js
|
|
|
3
3
|
import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
|
|
4
4
|
import type { IAuditableItemGraphAlias } from "./IAuditableItemGraphAlias.js";
|
|
5
5
|
import type { IAuditableItemGraphAuditedElement } from "./IAuditableItemGraphAuditedElement.js";
|
|
6
|
-
import type { IAuditableItemGraphChangeset } from "./IAuditableItemGraphChangeset.js";
|
|
7
6
|
import type { IAuditableItemGraphEdge } from "./IAuditableItemGraphEdge.js";
|
|
8
7
|
import type { IAuditableItemGraphResource } from "./IAuditableItemGraphResource.js";
|
|
9
8
|
/**
|
|
@@ -14,8 +13,8 @@ export interface IAuditableItemGraphVertex extends Omit<IAuditableItemGraphAudit
|
|
|
14
13
|
* JSON-LD Context.
|
|
15
14
|
*/
|
|
16
15
|
"@context": [
|
|
17
|
-
typeof AuditableItemGraphContexts.
|
|
18
|
-
typeof AuditableItemGraphContexts.
|
|
16
|
+
typeof AuditableItemGraphContexts.Context,
|
|
17
|
+
typeof AuditableItemGraphContexts.ContextCommon,
|
|
19
18
|
...IJsonLdContextDefinitionElement[]
|
|
20
19
|
];
|
|
21
20
|
/**
|
|
@@ -28,30 +27,32 @@ export interface IAuditableItemGraphVertex extends Omit<IAuditableItemGraphAudit
|
|
|
28
27
|
type: typeof AuditableItemGraphTypes.Vertex;
|
|
29
28
|
/**
|
|
30
29
|
* The identity of the organization which controls the vertex.
|
|
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
36
|
*/
|
|
36
37
|
annotationObject?: IJsonLdNodeObject;
|
|
37
38
|
/**
|
|
38
39
|
* Alternative aliases that can be used to identify the vertex.
|
|
40
|
+
* json-ld container:set
|
|
39
41
|
*/
|
|
40
42
|
aliases?: IAuditableItemGraphAlias[];
|
|
41
43
|
/**
|
|
42
44
|
* The resources attached to the vertex.
|
|
45
|
+
* json-ld container:set
|
|
43
46
|
*/
|
|
44
47
|
resources?: IAuditableItemGraphResource[];
|
|
45
48
|
/**
|
|
46
49
|
* Edges connected to the vertex.
|
|
50
|
+
* json-ld container:set
|
|
47
51
|
*/
|
|
48
52
|
edges?: IAuditableItemGraphEdge[];
|
|
49
|
-
/**
|
|
50
|
-
* Changesets for the vertex.
|
|
51
|
-
*/
|
|
52
|
-
changesets?: IAuditableItemGraphChangeset[];
|
|
53
53
|
/**
|
|
54
54
|
* Is the vertex verified, will only be populated when verification is requested.
|
|
55
|
+
* json-ld namespace:twin-common
|
|
55
56
|
*/
|
|
56
57
|
verified?: boolean;
|
|
57
58
|
}
|
|
@@ -11,8 +11,8 @@ export interface IAuditableItemGraphVertexList {
|
|
|
11
11
|
* JSON-LD Context.
|
|
12
12
|
*/
|
|
13
13
|
"@context": [
|
|
14
|
-
typeof SchemaOrgContexts.
|
|
15
|
-
typeof AuditableItemGraphContexts.
|
|
14
|
+
typeof SchemaOrgContexts.Context,
|
|
15
|
+
typeof AuditableItemGraphContexts.Context,
|
|
16
16
|
...IJsonLdContextDefinitionElement[]
|
|
17
17
|
];
|
|
18
18
|
/**
|
|
@@ -21,10 +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
25
|
*/
|
|
25
26
|
[SchemaOrgTypes.ItemListElement]: IAuditableItemGraphVertex[];
|
|
26
|
-
/**
|
|
27
|
-
* The cursor to get the next chunk of vertices.
|
|
28
|
-
*/
|
|
29
|
-
[SchemaOrgTypes.NextItem]?: string;
|
|
30
27
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
import type { VerifyDepth } from "../verifyDepth.js";
|
|
3
|
+
/**
|
|
4
|
+
* Get an auditable item graph vertex changeset.
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuditableItemGraphChangesetGetRequest {
|
|
7
|
+
/**
|
|
8
|
+
* The headers which can be used to determine the response data type.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The parameters from the path.
|
|
15
|
+
*/
|
|
16
|
+
pathParams: {
|
|
17
|
+
/**
|
|
18
|
+
* The id of the vertex to get the changeset from.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* The id of the changeset to get.
|
|
23
|
+
*/
|
|
24
|
+
changesetId: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The query parameters.
|
|
28
|
+
*/
|
|
29
|
+
query?: {
|
|
30
|
+
/**
|
|
31
|
+
* How many signatures to verify, none, current or all, defaults to "none".
|
|
32
|
+
*/
|
|
33
|
+
verifySignatureDepth?: VerifyDepth;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
import type { IAuditableItemGraphChangeset } from "../IAuditableItemGraphChangeset.js";
|
|
3
|
+
/**
|
|
4
|
+
* Response to getting an auditable item graph vertex changeset.
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuditableItemGraphChangesetGetResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The headers which can be used to determine the response data type.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The response body.
|
|
15
|
+
*/
|
|
16
|
+
body: IAuditableItemGraphChangeset;
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
import type { VerifyDepth } from "../verifyDepth.js";
|
|
3
|
+
/**
|
|
4
|
+
* Get an auditable item graph changeset.
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuditableItemGraphChangesetListRequest {
|
|
7
|
+
/**
|
|
8
|
+
* The headers which can be used to determine the response data type.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The parameters from the path.
|
|
15
|
+
*/
|
|
16
|
+
pathParams: {
|
|
17
|
+
/**
|
|
18
|
+
* The id of the changeset to get.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The query parameters.
|
|
24
|
+
*/
|
|
25
|
+
query?: {
|
|
26
|
+
/**
|
|
27
|
+
* The optional cursor to get next chunk.
|
|
28
|
+
*/
|
|
29
|
+
cursor?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Limit the number of entities to return.
|
|
32
|
+
*/
|
|
33
|
+
limit?: string;
|
|
34
|
+
/**
|
|
35
|
+
* How many signatures to verify, none, current or all, defaults to "none".
|
|
36
|
+
*/
|
|
37
|
+
verifySignatureDepth?: VerifyDepth;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
import type { IAuditableItemGraphChangesetList } from "../IAuditableItemGraphChangesetList.js";
|
|
3
|
+
/**
|
|
4
|
+
* Response to getting an auditable item graph changeset list.
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuditableItemGraphChangesetListResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The headers which can be used to determine the response data type.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
[HeaderTypes.Link]?: string | string[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The response body.
|
|
16
|
+
*/
|
|
17
|
+
body: IAuditableItemGraphChangesetList;
|
|
18
|
+
}
|
|
@@ -26,11 +26,7 @@ export interface IAuditableItemGraphGetRequest {
|
|
|
26
26
|
/**
|
|
27
27
|
* Whether to include deleted aliases, resource, edges, defaults to false.
|
|
28
28
|
*/
|
|
29
|
-
includeDeleted?:
|
|
30
|
-
/**
|
|
31
|
-
* Whether to include the changesets of the vertex, defaults to false.
|
|
32
|
-
*/
|
|
33
|
-
includeChangesets?: boolean | string;
|
|
29
|
+
includeDeleted?: string;
|
|
34
30
|
/**
|
|
35
31
|
* How many signatures to verify, none, current or all, defaults to "none".
|
|
36
32
|
*/
|
|
@@ -26,7 +26,7 @@ export interface IAuditableItemGraphListRequest {
|
|
|
26
26
|
/**
|
|
27
27
|
* Find only exact matches, default to false meaning partial matching.
|
|
28
28
|
*/
|
|
29
|
-
idExact?:
|
|
29
|
+
idExact?: string;
|
|
30
30
|
/**
|
|
31
31
|
* Include vertices with specific resource types, comma separated.
|
|
32
32
|
*/
|
|
@@ -3,13 +3,29 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const AuditableItemGraphContexts: {
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The canonical RDF namespace URI for Auditable Item Graph.
|
|
7
7
|
*/
|
|
8
|
-
readonly
|
|
8
|
+
readonly Namespace: "https://schema.twindev.org/aig/";
|
|
9
9
|
/**
|
|
10
|
-
* The context
|
|
10
|
+
* The value to use in context for Auditable Item Graph.
|
|
11
11
|
*/
|
|
12
|
-
readonly
|
|
12
|
+
readonly Context: "https://schema.twindev.org/aig/";
|
|
13
|
+
/**
|
|
14
|
+
* The JSON-LD Context URL for Auditable Item Graph.
|
|
15
|
+
*/
|
|
16
|
+
readonly JsonLdContext: "https://schema.twindev.org/aig/types.jsonld";
|
|
17
|
+
/**
|
|
18
|
+
* The canonical RDF namespace URI for TWIN Common.
|
|
19
|
+
*/
|
|
20
|
+
readonly NamespaceCommon: "https://schema.twindev.org/common/";
|
|
21
|
+
/**
|
|
22
|
+
* The value to use in JSON-LD context for TWIN Common.
|
|
23
|
+
*/
|
|
24
|
+
readonly ContextCommon: "https://schema.twindev.org/common/";
|
|
25
|
+
/**
|
|
26
|
+
* The JSON-LD Context URL for TWIN Common.
|
|
27
|
+
*/
|
|
28
|
+
readonly JsonLdContextCommon: "https://schema.twindev.org/common/types.jsonld";
|
|
13
29
|
};
|
|
14
30
|
/**
|
|
15
31
|
* The contexts of auditable item graph data.
|
|
@@ -23,9 +23,13 @@ export declare const AuditableItemGraphTypes: {
|
|
|
23
23
|
*/
|
|
24
24
|
readonly Edge: "AuditableItemGraphEdge";
|
|
25
25
|
/**
|
|
26
|
-
* Represents auditable item graph
|
|
26
|
+
* Represents auditable item graph changeset.
|
|
27
27
|
*/
|
|
28
28
|
readonly Changeset: "AuditableItemGraphChangeset";
|
|
29
|
+
/**
|
|
30
|
+
* Represents auditable item graph changeset list.
|
|
31
|
+
*/
|
|
32
|
+
readonly ChangesetList: "AuditableItemGraphChangesetList";
|
|
29
33
|
/**
|
|
30
34
|
* Represents patch operation.
|
|
31
35
|
*/
|