@twin.org/auditable-item-graph-models 0.0.3-next.2 → 0.0.3-next.20
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 +47 -43
- package/dist/es/dataTypes/auditableItemGraphDataTypes.js.map +1 -1
- package/dist/es/index.js +15 -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/IAuditableItemGraphListPatch.js +2 -0
- package/dist/es/models/IAuditableItemGraphListPatch.js.map +1 -0
- package/dist/es/models/IAuditableItemGraphPartialVertex.js +2 -0
- package/dist/es/models/IAuditableItemGraphPartialVertex.js.map +1 -0
- 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/IAuditableItemGraphVertexVersionList.js +2 -0
- package/dist/es/models/IAuditableItemGraphVertexVersionList.js.map +1 -0
- 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/IAuditableItemGraphCreateRequest.js.map +1 -1
- package/dist/es/models/api/IAuditableItemGraphGetRequest.js.map +1 -1
- package/dist/es/models/api/IAuditableItemGraphListResponse.js.map +1 -1
- package/dist/es/models/api/IAuditableItemGraphUpdatePartialRequest.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphUpdatePartialRequest.js.map +1 -0
- package/dist/es/models/api/IAuditableItemGraphUpdateRequest.js.map +1 -1
- package/dist/es/models/api/IAuditableItemGraphVersionGetRequest.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphVersionGetRequest.js.map +1 -0
- package/dist/es/models/api/IAuditableItemGraphVersionGetResponse.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphVersionGetResponse.js.map +1 -0
- package/dist/es/models/api/IAuditableItemGraphVersionListRequest.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphVersionListRequest.js.map +1 -0
- package/dist/es/models/api/IAuditableItemGraphVersionListResponse.js +2 -0
- package/dist/es/models/api/IAuditableItemGraphVersionListResponse.js.map +1 -0
- package/dist/es/models/auditableItemGraphContexts.js +19 -3
- package/dist/es/models/auditableItemGraphContexts.js.map +1 -1
- package/dist/es/models/auditableItemGraphMetricIds.js +69 -0
- package/dist/es/models/auditableItemGraphMetricIds.js.map +1 -0
- package/dist/es/models/auditableItemGraphMetrics.js +82 -0
- package/dist/es/models/auditableItemGraphMetrics.js.map +1 -0
- package/dist/es/models/auditableItemGraphTypes.js +18 -2
- package/dist/es/models/auditableItemGraphTypes.js.map +1 -1
- package/dist/es/schemas/AuditableItemGraphAlias.json +16 -23
- package/dist/es/schemas/AuditableItemGraphAuditedElement.json +25 -0
- package/dist/es/schemas/AuditableItemGraphChangeset.json +9 -9
- package/dist/es/schemas/AuditableItemGraphEdge.json +12 -23
- package/dist/es/schemas/AuditableItemGraphListPatch.json +33 -0
- package/dist/es/schemas/AuditableItemGraphPartialVertex.json +110 -0
- package/dist/es/schemas/AuditableItemGraphPatchOperation.json +23 -16
- package/dist/es/schemas/AuditableItemGraphResource.json +8 -23
- package/dist/es/schemas/AuditableItemGraphVertex.json +33 -30
- package/dist/es/schemas/AuditableItemGraphVertexList.json +16 -23
- package/dist/types/index.d.ts +15 -0
- package/dist/types/models/IAuditableItemGraphAlias.d.ts +8 -1
- package/dist/types/models/IAuditableItemGraphAuditedElement.d.ts +3 -0
- package/dist/types/models/IAuditableItemGraphChangeset.d.ts +14 -3
- package/dist/types/models/IAuditableItemGraphChangesetList.d.ts +27 -0
- package/dist/types/models/IAuditableItemGraphComponent.d.ts +72 -46
- package/dist/types/models/IAuditableItemGraphEdge.d.ts +4 -1
- package/dist/types/models/IAuditableItemGraphListPatch.d.ts +18 -0
- package/dist/types/models/IAuditableItemGraphPartialVertex.d.ts +45 -0
- 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 +14 -7
- package/dist/types/models/IAuditableItemGraphVertexList.d.ts +3 -6
- package/dist/types/models/IAuditableItemGraphVertexVersionList.d.ts +29 -0
- 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/IAuditableItemGraphCreateRequest.d.ts +2 -31
- package/dist/types/models/api/IAuditableItemGraphGetRequest.d.ts +0 -4
- package/dist/types/models/api/IAuditableItemGraphListResponse.d.ts +1 -0
- package/dist/types/models/api/IAuditableItemGraphUpdatePartialRequest.d.ts +20 -0
- package/dist/types/models/api/IAuditableItemGraphUpdateRequest.d.ts +4 -34
- package/dist/types/models/api/IAuditableItemGraphVersionGetRequest.d.ts +25 -0
- package/dist/types/models/api/IAuditableItemGraphVersionGetResponse.d.ts +17 -0
- package/dist/types/models/api/IAuditableItemGraphVersionListRequest.d.ts +34 -0
- package/dist/types/models/api/IAuditableItemGraphVersionListResponse.d.ts +17 -0
- package/dist/types/models/auditableItemGraphContexts.d.ts +18 -2
- package/dist/types/models/auditableItemGraphMetricIds.d.ts +69 -0
- package/dist/types/models/auditableItemGraphMetrics.d.ts +5 -0
- package/dist/types/models/auditableItemGraphTypes.d.ts +17 -1
- package/docs/changelog.md +224 -69
- package/docs/examples.md +22 -1
- package/docs/reference/classes/AuditableItemGraphDataTypes.md +1 -1
- package/docs/reference/index.md +16 -0
- package/docs/reference/interfaces/IAuditableItemGraphAlias.md +22 -14
- package/docs/reference/interfaces/IAuditableItemGraphAuditedElement.md +8 -8
- package/docs/reference/interfaces/IAuditableItemGraphChangeset.md +21 -12
- package/docs/reference/interfaces/IAuditableItemGraphChangesetGetRequest.md +49 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangesetGetResponse.md +23 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangesetList.md +27 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangesetListRequest.md +55 -0
- package/docs/reference/interfaces/IAuditableItemGraphChangesetListResponse.md +27 -0
- package/docs/reference/interfaces/IAuditableItemGraphComponent.md +185 -57
- package/docs/reference/interfaces/IAuditableItemGraphCreateRequest.md +2 -26
- package/docs/reference/interfaces/IAuditableItemGraphEdge.md +15 -15
- package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexCreated.md +1 -1
- package/docs/reference/interfaces/IAuditableItemGraphEventBusVertexUpdated.md +2 -2
- package/docs/reference/interfaces/IAuditableItemGraphGetRequest.md +7 -13
- package/docs/reference/interfaces/IAuditableItemGraphGetResponse.md +3 -3
- package/docs/reference/interfaces/IAuditableItemGraphListPatch.md +25 -0
- package/docs/reference/interfaces/IAuditableItemGraphListRequest.md +14 -14
- package/docs/reference/interfaces/IAuditableItemGraphListResponse.md +7 -3
- package/docs/reference/interfaces/IAuditableItemGraphPartialVertex.md +149 -0
- package/docs/reference/interfaces/IAuditableItemGraphPatchOperation.md +9 -9
- package/docs/reference/interfaces/IAuditableItemGraphResource.md +13 -13
- package/docs/reference/interfaces/IAuditableItemGraphUpdatePartialRequest.md +26 -0
- package/docs/reference/interfaces/IAuditableItemGraphUpdateRequest.md +5 -29
- package/docs/reference/interfaces/IAuditableItemGraphVersionGetRequest.md +35 -0
- package/docs/reference/interfaces/IAuditableItemGraphVersionGetResponse.md +23 -0
- package/docs/reference/interfaces/IAuditableItemGraphVersionListRequest.md +49 -0
- package/docs/reference/interfaces/IAuditableItemGraphVersionListResponse.md +23 -0
- package/docs/reference/interfaces/IAuditableItemGraphVertex.md +26 -25
- package/docs/reference/interfaces/IAuditableItemGraphVertexList.md +3 -11
- package/docs/reference/interfaces/IAuditableItemGraphVertexVersionList.md +35 -0
- package/docs/reference/type-aliases/AuditableItemGraphMetricIds.md +5 -0
- package/docs/reference/variables/AuditableItemGraphContexts.md +28 -4
- package/docs/reference/variables/AuditableItemGraphMetricIds.md +97 -0
- package/docs/reference/variables/AuditableItemGraphMetrics.md +5 -0
- package/docs/reference/variables/AuditableItemGraphTopics.md +2 -2
- package/docs/reference/variables/AuditableItemGraphTypes.md +32 -8
- package/docs/reference/variables/VerifyDepth.md +3 -3
- package/package.json +5 -4
|
@@ -9,13 +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
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
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IAuditableItemGraphAlias } from "./IAuditableItemGraphAlias.js";
|
|
2
|
+
import type { IAuditableItemGraphEdge } from "./IAuditableItemGraphEdge.js";
|
|
3
|
+
import type { IAuditableItemGraphResource } from "./IAuditableItemGraphResource.js";
|
|
4
|
+
/**
|
|
5
|
+
* PATCH operations for a sub-list on a vertex.
|
|
6
|
+
*/
|
|
7
|
+
export interface IAuditableItemGraphListPatch<TItem = IAuditableItemGraphEdge | IAuditableItemGraphAlias | IAuditableItemGraphResource> {
|
|
8
|
+
/**
|
|
9
|
+
* Items to add or update in the active set.
|
|
10
|
+
* @json-ld container:set
|
|
11
|
+
*/
|
|
12
|
+
add?: TItem[];
|
|
13
|
+
/**
|
|
14
|
+
* Identifiers of items to remove from the active set (soft-delete).
|
|
15
|
+
* @json-ld container:set
|
|
16
|
+
*/
|
|
17
|
+
remove?: string[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { AuditableItemGraphContexts } from "./auditableItemGraphContexts.js";
|
|
3
|
+
import type { AuditableItemGraphTypes } from "./auditableItemGraphTypes.js";
|
|
4
|
+
import type { IAuditableItemGraphAlias } from "./IAuditableItemGraphAlias.js";
|
|
5
|
+
import type { IAuditableItemGraphEdge } from "./IAuditableItemGraphEdge.js";
|
|
6
|
+
import type { IAuditableItemGraphListPatch } from "./IAuditableItemGraphListPatch.js";
|
|
7
|
+
import type { IAuditableItemGraphResource } from "./IAuditableItemGraphResource.js";
|
|
8
|
+
import type { IAuditableItemGraphVertex } from "./IAuditableItemGraphVertex.js";
|
|
9
|
+
/**
|
|
10
|
+
* Partial vertex payload for updatePartial (PATCH — requires id).
|
|
11
|
+
* Sub-lists use explicit `{ add, remove }` patches; bare arrays are not supported.
|
|
12
|
+
*/
|
|
13
|
+
export interface IAuditableItemGraphPartialVertex extends Omit<IAuditableItemGraphVertex, "type" | "aliases" | "edges" | "resources"> {
|
|
14
|
+
/**
|
|
15
|
+
* The id of the vertex to update.
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* JSON-LD Context.
|
|
20
|
+
*/
|
|
21
|
+
"@context": [
|
|
22
|
+
typeof AuditableItemGraphContexts.Context,
|
|
23
|
+
typeof AuditableItemGraphContexts.ContextCommon,
|
|
24
|
+
...IJsonLdContextDefinitionElement[]
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* JSON-LD Type.
|
|
28
|
+
*/
|
|
29
|
+
type?: typeof AuditableItemGraphTypes.Vertex;
|
|
30
|
+
/**
|
|
31
|
+
* Patch operations for aliases.
|
|
32
|
+
* @json-ld id
|
|
33
|
+
*/
|
|
34
|
+
aliasPatches?: IAuditableItemGraphListPatch<IAuditableItemGraphAlias>;
|
|
35
|
+
/**
|
|
36
|
+
* Patch operations for resources.
|
|
37
|
+
* @json-ld id
|
|
38
|
+
*/
|
|
39
|
+
resourcePatches?: IAuditableItemGraphListPatch<IAuditableItemGraphResource>;
|
|
40
|
+
/**
|
|
41
|
+
* Patch operations for edges.
|
|
42
|
+
* @json-ld id
|
|
43
|
+
*/
|
|
44
|
+
edgePatches?: IAuditableItemGraphListPatch<IAuditableItemGraphEdge>;
|
|
45
|
+
}
|
|
@@ -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"
|
|
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,38 @@ 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;
|
|
58
|
+
/**
|
|
59
|
+
* The version of the vertex, populated only when getting a specific version.
|
|
60
|
+
* Maps to https://schema.org/version.
|
|
61
|
+
* @json-ld namespace:sch
|
|
62
|
+
*/
|
|
63
|
+
version?: number;
|
|
57
64
|
}
|
|
@@ -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,29 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Interface describing a list of auditable item graph vertex version numbers.
|
|
7
|
+
*/
|
|
8
|
+
export interface IAuditableItemGraphVertexVersionList {
|
|
9
|
+
/**
|
|
10
|
+
* JSON-LD Context.
|
|
11
|
+
*/
|
|
12
|
+
"@context": [
|
|
13
|
+
typeof SchemaOrgContexts.Context,
|
|
14
|
+
typeof AuditableItemGraphContexts.Context,
|
|
15
|
+
...IJsonLdContextDefinitionElement[]
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* JSON-LD Type.
|
|
19
|
+
*/
|
|
20
|
+
type: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexVersionList];
|
|
21
|
+
/**
|
|
22
|
+
* The list of versions.
|
|
23
|
+
* @json-ld namespace:sch
|
|
24
|
+
*/
|
|
25
|
+
[SchemaOrgTypes.ItemListElement]: {
|
|
26
|
+
version: number;
|
|
27
|
+
dateCreated: string;
|
|
28
|
+
}[];
|
|
29
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -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
|
}
|
|
@@ -27,10 +27,6 @@ export interface IAuditableItemGraphGetRequest {
|
|
|
27
27
|
* Whether to include deleted aliases, resource, edges, defaults to false.
|
|
28
28
|
*/
|
|
29
29
|
includeDeleted?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Whether to include the changesets of the vertex, defaults to false.
|
|
32
|
-
*/
|
|
33
|
-
includeChangesets?: string;
|
|
34
30
|
/**
|
|
35
31
|
* How many signatures to verify, none, current or all, defaults to "none".
|
|
36
32
|
*/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IAuditableItemGraphPartialVertex } from "../IAuditableItemGraphPartialVertex.js";
|
|
2
|
+
/**
|
|
3
|
+
* Partially update an auditable item graph vertex (PATCH — explicit list patches).
|
|
4
|
+
*/
|
|
5
|
+
export interface IAuditableItemGraphUpdatePartialRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The path parameters.
|
|
8
|
+
*/
|
|
9
|
+
pathParams: {
|
|
10
|
+
/**
|
|
11
|
+
* The id of the vertex to update.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Partial vertex data; only defined properties are applied.
|
|
17
|
+
* Sub-lists use `{ add, remove }` patch objects.
|
|
18
|
+
*/
|
|
19
|
+
body: Omit<IAuditableItemGraphPartialVertex, "id">;
|
|
20
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAuditableItemGraphVertex } from "../IAuditableItemGraphVertex.js";
|
|
2
2
|
/**
|
|
3
|
-
* Update an auditable item graph vertex.
|
|
3
|
+
* Update an auditable item graph vertex (PUT — full replacement of vertex state).
|
|
4
4
|
*/
|
|
5
5
|
export interface IAuditableItemGraphUpdateRequest {
|
|
6
6
|
/**
|
|
@@ -13,37 +13,7 @@ export interface IAuditableItemGraphUpdateRequest {
|
|
|
13
13
|
id: string;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* The
|
|
16
|
+
* The full vertex payload. Replaces annotation and active sub-lists; omitted collections are cleared.
|
|
17
17
|
*/
|
|
18
|
-
body:
|
|
19
|
-
/**
|
|
20
|
-
* The object to be used in the vertex as JSON-LD.
|
|
21
|
-
*/
|
|
22
|
-
annotationObject?: IJsonLdNodeObject;
|
|
23
|
-
/**
|
|
24
|
-
* Alternative aliases that can be used to identify the vertex.
|
|
25
|
-
*/
|
|
26
|
-
aliases?: {
|
|
27
|
-
id: string;
|
|
28
|
-
aliasFormat?: string;
|
|
29
|
-
unique?: boolean;
|
|
30
|
-
annotationObject?: IJsonLdNodeObject;
|
|
31
|
-
}[];
|
|
32
|
-
/**
|
|
33
|
-
* The resources attached to the vertex.
|
|
34
|
-
*/
|
|
35
|
-
resources?: {
|
|
36
|
-
id?: string;
|
|
37
|
-
resourceObject?: IJsonLdNodeObject;
|
|
38
|
-
}[];
|
|
39
|
-
/**
|
|
40
|
-
* The edges connected to the vertex.
|
|
41
|
-
*/
|
|
42
|
-
edges?: {
|
|
43
|
-
id?: string;
|
|
44
|
-
targetId: string;
|
|
45
|
-
edgeRelationships: string[];
|
|
46
|
-
annotationObject?: IJsonLdNodeObject;
|
|
47
|
-
}[];
|
|
48
|
-
};
|
|
18
|
+
body: Omit<IAuditableItemGraphVertex, "id">;
|
|
49
19
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
/**
|
|
3
|
+
* Get an auditable item graph vertex at a specific version.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAuditableItemGraphVersionGetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The headers which can be used to determine the response data type.
|
|
8
|
+
*/
|
|
9
|
+
headers?: {
|
|
10
|
+
[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The parameters from the path.
|
|
14
|
+
*/
|
|
15
|
+
pathParams: {
|
|
16
|
+
/**
|
|
17
|
+
* The id of the vertex.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* The version number to get.
|
|
22
|
+
*/
|
|
23
|
+
version: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
import type { IAuditableItemGraphVertex } from "../IAuditableItemGraphVertex.js";
|
|
3
|
+
/**
|
|
4
|
+
* Response to getting an auditable item graph vertex at a specific version.
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuditableItemGraphVersionGetResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The headers.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The response body.
|
|
15
|
+
*/
|
|
16
|
+
body: IAuditableItemGraphVertex;
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
/**
|
|
3
|
+
* Get all versions of an auditable item graph vertex.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAuditableItemGraphVersionListRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The headers which can be used to determine the response data type.
|
|
8
|
+
*/
|
|
9
|
+
headers?: {
|
|
10
|
+
[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The parameters from the path.
|
|
14
|
+
*/
|
|
15
|
+
pathParams: {
|
|
16
|
+
/**
|
|
17
|
+
* The id of the vertex.
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The query parameters.
|
|
23
|
+
*/
|
|
24
|
+
query?: {
|
|
25
|
+
/**
|
|
26
|
+
* Only return versions created after this ISO 8601 timestamp (exclusive).
|
|
27
|
+
*/
|
|
28
|
+
after?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Only return versions created before this ISO 8601 timestamp (exclusive).
|
|
31
|
+
*/
|
|
32
|
+
before?: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
import type { IAuditableItemGraphVertexVersionList } from "../IAuditableItemGraphVertexVersionList.js";
|
|
3
|
+
/**
|
|
4
|
+
* Response to getting all versions of an auditable item graph vertex.
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuditableItemGraphVersionListResponse {
|
|
7
|
+
/**
|
|
8
|
+
* The headers.
|
|
9
|
+
*/
|
|
10
|
+
headers?: {
|
|
11
|
+
[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The response body.
|
|
15
|
+
*/
|
|
16
|
+
body: IAuditableItemGraphVertexVersionList;
|
|
17
|
+
}
|
|
@@ -3,13 +3,29 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const AuditableItemGraphContexts: {
|
|
5
5
|
/**
|
|
6
|
-
* The namespace for
|
|
6
|
+
* The canonical RDF namespace URI for Auditable Item Graph.
|
|
7
7
|
*/
|
|
8
8
|
readonly Namespace: "https://schema.twindev.org/aig/";
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
10
|
+
* The value to use in context for Auditable Item Graph.
|
|
11
|
+
*/
|
|
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.
|
|
11
19
|
*/
|
|
12
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.
|