@twin.org/auditable-item-graph-models 0.0.3-next.16 → 0.0.3-next.17
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 +10 -0
- package/dist/es/dataTypes/auditableItemGraphDataTypes.js.map +1 -1
- package/dist/es/index.js +3 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IAuditableItemGraphComponent.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/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/auditableItemGraphTypes.js +9 -1
- package/dist/es/models/auditableItemGraphTypes.js.map +1 -1
- package/dist/es/schemas/AuditableItemGraphListPatch.json +33 -0
- package/dist/es/schemas/AuditableItemGraphPartialVertex.json +110 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/models/IAuditableItemGraphComponent.d.ts +12 -1
- package/dist/types/models/IAuditableItemGraphListPatch.d.ts +18 -0
- package/dist/types/models/IAuditableItemGraphPartialVertex.d.ts +45 -0
- package/dist/types/models/api/IAuditableItemGraphUpdatePartialRequest.d.ts +20 -0
- package/dist/types/models/api/IAuditableItemGraphUpdateRequest.d.ts +2 -2
- package/dist/types/models/auditableItemGraphTypes.d.ts +8 -0
- package/docs/changelog.md +7 -0
- package/docs/reference/index.md +3 -0
- package/docs/reference/interfaces/IAuditableItemGraphComponent.md +27 -1
- package/docs/reference/interfaces/IAuditableItemGraphListPatch.md +25 -0
- package/docs/reference/interfaces/IAuditableItemGraphPartialVertex.md +149 -0
- package/docs/reference/interfaces/IAuditableItemGraphUpdatePartialRequest.md +26 -0
- package/docs/reference/interfaces/IAuditableItemGraphUpdateRequest.md +2 -2
- package/docs/reference/variables/AuditableItemGraphTypes.md +12 -0
- package/package.json +1 -1
|
@@ -7,6 +7,8 @@ import AuditableItemGraphAliasSchema from "../schemas/AuditableItemGraphAlias.js
|
|
|
7
7
|
import AuditableItemGraphAuditedElementSchema from "../schemas/AuditableItemGraphAuditedElement.json" with { type: "json" };
|
|
8
8
|
import AuditableItemGraphChangesetSchema from "../schemas/AuditableItemGraphChangeset.json" with { type: "json" };
|
|
9
9
|
import AuditableItemGraphEdgeSchema from "../schemas/AuditableItemGraphEdge.json" with { type: "json" };
|
|
10
|
+
import AuditableItemGraphListPatchSchema from "../schemas/AuditableItemGraphListPatch.json" with { type: "json" };
|
|
11
|
+
import AuditableItemGraphPartialVertexSchema from "../schemas/AuditableItemGraphPartialVertex.json" with { type: "json" };
|
|
10
12
|
import AuditableItemGraphPatchOperationSchema from "../schemas/AuditableItemGraphPatchOperation.json" with { type: "json" };
|
|
11
13
|
import AuditableItemGraphResourceSchema from "../schemas/AuditableItemGraphResource.json" with { type: "json" };
|
|
12
14
|
import AuditableItemGraphVertexSchema from "../schemas/AuditableItemGraphVertex.json" with { type: "json" };
|
|
@@ -51,6 +53,14 @@ export class AuditableItemGraphDataTypes {
|
|
|
51
53
|
{
|
|
52
54
|
type: "AuditableItemGraphAuditedElement",
|
|
53
55
|
schema: AuditableItemGraphAuditedElementSchema
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: AuditableItemGraphTypes.ListPatch,
|
|
59
|
+
schema: AuditableItemGraphListPatchSchema
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: AuditableItemGraphTypes.PartialVertex,
|
|
63
|
+
schema: AuditableItemGraphPartialVertexSchema
|
|
54
64
|
}
|
|
55
65
|
];
|
|
56
66
|
DataTypeHelper.registerTypes(AuditableItemGraphContexts.Namespace, AuditableItemGraphContexts.JsonLdContext, types.map(t => ({ type: t.type, schema: t.schema })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemGraphDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/auditableItemGraphDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,6BAA6B,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1G,OAAO,sCAAsC,MAAM,kDAAkD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5H,OAAO,iCAAiC,MAAM,6CAA6C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClH,OAAO,4BAA4B,MAAM,wCAAwC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxG,OAAO,sCAAsC,MAAM,kDAAkD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5H,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChH,OAAO,8BAA8B,MAAM,0CAA0C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5G,OAAO,kCAAkC,MAAM,8CAA8C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEpH;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACvC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,uBAAuB,CAAC,MAAM;gBACpC,MAAM,EAAE,8BAA8B;aACtC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,UAAU;gBACxC,MAAM,EAAE,kCAAkC;aAC1C;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,KAAK;gBACnC,MAAM,EAAE,6BAA6B;aACrC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,QAAQ;gBACtC,MAAM,EAAE,gCAAgC;aACxC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,IAAI;gBAClC,MAAM,EAAE,4BAA4B;aACpC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,SAAS;gBACvC,MAAM,EAAE,iCAAiC;aACzC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,cAAc;gBAC5C,MAAM,EAAE,sCAAsC;aAC9C;YACD;gBACC,IAAI,EAAE,kCAAkC;gBACxC,MAAM,EAAE,sCAAsC;aAC9C;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,0BAA0B,CAAC,SAAS,EACpC,0BAA0B,CAAC,aAAa,EACxC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CACpD,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { AuditableItemGraphContexts } from \"../models/auditableItemGraphContexts.js\";\nimport { AuditableItemGraphTypes } from \"../models/auditableItemGraphTypes.js\";\nimport AuditableItemGraphAliasSchema from \"../schemas/AuditableItemGraphAlias.json\" with { type: \"json\" };\nimport AuditableItemGraphAuditedElementSchema from \"../schemas/AuditableItemGraphAuditedElement.json\" with { type: \"json\" };\nimport AuditableItemGraphChangesetSchema from \"../schemas/AuditableItemGraphChangeset.json\" with { type: \"json\" };\nimport AuditableItemGraphEdgeSchema from \"../schemas/AuditableItemGraphEdge.json\" with { type: \"json\" };\nimport AuditableItemGraphPatchOperationSchema from \"../schemas/AuditableItemGraphPatchOperation.json\" with { type: \"json\" };\nimport AuditableItemGraphResourceSchema from \"../schemas/AuditableItemGraphResource.json\" with { type: \"json\" };\nimport AuditableItemGraphVertexSchema from \"../schemas/AuditableItemGraphVertex.json\" with { type: \"json\" };\nimport AuditableItemGraphVertexListSchema from \"../schemas/AuditableItemGraphVertexList.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for auditable item graph.\n */\nexport class AuditableItemGraphDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Vertex,\n\t\t\t\tschema: AuditableItemGraphVertexSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.VertexList,\n\t\t\t\tschema: AuditableItemGraphVertexListSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Alias,\n\t\t\t\tschema: AuditableItemGraphAliasSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Resource,\n\t\t\t\tschema: AuditableItemGraphResourceSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Edge,\n\t\t\t\tschema: AuditableItemGraphEdgeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Changeset,\n\t\t\t\tschema: AuditableItemGraphChangesetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.PatchOperation,\n\t\t\t\tschema: AuditableItemGraphPatchOperationSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"AuditableItemGraphAuditedElement\",\n\t\t\t\tschema: AuditableItemGraphAuditedElementSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tAuditableItemGraphContexts.Namespace,\n\t\t\tAuditableItemGraphContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: t.type, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"auditableItemGraphDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/auditableItemGraphDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,6BAA6B,MAAM,yCAAyC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1G,OAAO,sCAAsC,MAAM,kDAAkD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5H,OAAO,iCAAiC,MAAM,6CAA6C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClH,OAAO,4BAA4B,MAAM,wCAAwC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxG,OAAO,iCAAiC,MAAM,6CAA6C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClH,OAAO,qCAAqC,MAAM,iDAAiD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1H,OAAO,sCAAsC,MAAM,kDAAkD,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5H,OAAO,gCAAgC,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChH,OAAO,8BAA8B,MAAM,0CAA0C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5G,OAAO,kCAAkC,MAAM,8CAA8C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEpH;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACvC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,uBAAuB,CAAC,MAAM;gBACpC,MAAM,EAAE,8BAA8B;aACtC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,UAAU;gBACxC,MAAM,EAAE,kCAAkC;aAC1C;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,KAAK;gBACnC,MAAM,EAAE,6BAA6B;aACrC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,QAAQ;gBACtC,MAAM,EAAE,gCAAgC;aACxC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,IAAI;gBAClC,MAAM,EAAE,4BAA4B;aACpC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,SAAS;gBACvC,MAAM,EAAE,iCAAiC;aACzC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,cAAc;gBAC5C,MAAM,EAAE,sCAAsC;aAC9C;YACD;gBACC,IAAI,EAAE,kCAAkC;gBACxC,MAAM,EAAE,sCAAsC;aAC9C;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,SAAS;gBACvC,MAAM,EAAE,iCAAiC;aACzC;YACD;gBACC,IAAI,EAAE,uBAAuB,CAAC,aAAa;gBAC3C,MAAM,EAAE,qCAAqC;aAC7C;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,0BAA0B,CAAC,SAAS,EACpC,0BAA0B,CAAC,aAAa,EACxC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CACpD,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { AuditableItemGraphContexts } from \"../models/auditableItemGraphContexts.js\";\nimport { AuditableItemGraphTypes } from \"../models/auditableItemGraphTypes.js\";\nimport AuditableItemGraphAliasSchema from \"../schemas/AuditableItemGraphAlias.json\" with { type: \"json\" };\nimport AuditableItemGraphAuditedElementSchema from \"../schemas/AuditableItemGraphAuditedElement.json\" with { type: \"json\" };\nimport AuditableItemGraphChangesetSchema from \"../schemas/AuditableItemGraphChangeset.json\" with { type: \"json\" };\nimport AuditableItemGraphEdgeSchema from \"../schemas/AuditableItemGraphEdge.json\" with { type: \"json\" };\nimport AuditableItemGraphListPatchSchema from \"../schemas/AuditableItemGraphListPatch.json\" with { type: \"json\" };\nimport AuditableItemGraphPartialVertexSchema from \"../schemas/AuditableItemGraphPartialVertex.json\" with { type: \"json\" };\nimport AuditableItemGraphPatchOperationSchema from \"../schemas/AuditableItemGraphPatchOperation.json\" with { type: \"json\" };\nimport AuditableItemGraphResourceSchema from \"../schemas/AuditableItemGraphResource.json\" with { type: \"json\" };\nimport AuditableItemGraphVertexSchema from \"../schemas/AuditableItemGraphVertex.json\" with { type: \"json\" };\nimport AuditableItemGraphVertexListSchema from \"../schemas/AuditableItemGraphVertexList.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for auditable item graph.\n */\nexport class AuditableItemGraphDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Vertex,\n\t\t\t\tschema: AuditableItemGraphVertexSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.VertexList,\n\t\t\t\tschema: AuditableItemGraphVertexListSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Alias,\n\t\t\t\tschema: AuditableItemGraphAliasSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Resource,\n\t\t\t\tschema: AuditableItemGraphResourceSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Edge,\n\t\t\t\tschema: AuditableItemGraphEdgeSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.Changeset,\n\t\t\t\tschema: AuditableItemGraphChangesetSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.PatchOperation,\n\t\t\t\tschema: AuditableItemGraphPatchOperationSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"AuditableItemGraphAuditedElement\",\n\t\t\t\tschema: AuditableItemGraphAuditedElementSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.ListPatch,\n\t\t\t\tschema: AuditableItemGraphListPatchSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: AuditableItemGraphTypes.PartialVertex,\n\t\t\t\tschema: AuditableItemGraphPartialVertexSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tAuditableItemGraphContexts.Namespace,\n\t\t\tAuditableItemGraphContexts.JsonLdContext,\n\t\t\ttypes.map(t => ({ type: t.type, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
|
package/dist/es/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./models/api/IAuditableItemGraphGetResponse.js";
|
|
|
11
11
|
export * from "./models/api/IAuditableItemGraphListRequest.js";
|
|
12
12
|
export * from "./models/api/IAuditableItemGraphListResponse.js";
|
|
13
13
|
export * from "./models/api/IAuditableItemGraphUpdateRequest.js";
|
|
14
|
+
export * from "./models/api/IAuditableItemGraphUpdatePartialRequest.js";
|
|
14
15
|
export * from "./models/api/IAuditableItemGraphVersionGetRequest.js";
|
|
15
16
|
export * from "./models/api/IAuditableItemGraphVersionGetResponse.js";
|
|
16
17
|
export * from "./models/api/IAuditableItemGraphVersionListRequest.js";
|
|
@@ -29,6 +30,8 @@ export * from "./models/IAuditableItemGraphChangesetList.js";
|
|
|
29
30
|
export * from "./models/IAuditableItemGraphComponent.js";
|
|
30
31
|
export * from "./models/IAuditableItemGraphEdge.js";
|
|
31
32
|
export * from "./models/IAuditableItemGraphPatchOperation.js";
|
|
33
|
+
export * from "./models/IAuditableItemGraphListPatch.js";
|
|
34
|
+
export * from "./models/IAuditableItemGraphPartialVertex.js";
|
|
32
35
|
export * from "./models/IAuditableItemGraphResource.js";
|
|
33
36
|
export * from "./models/IAuditableItemGraphVertex.js";
|
|
34
37
|
export * from "./models/IAuditableItemGraphVertexList.js";
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC;AACzE,cAAc,kDAAkD,CAAC;AACjE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,+DAA+D,CAAC;AAC9E,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC;AACjE,cAAc,yBAAyB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/auditableItemGraphDataTypes.js\";\nexport * from \"./models/api/IAuditableItemGraphChangesetGetRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphChangesetGetResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphChangesetListRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphChangesetListResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphCreateRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphGetRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphGetResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphListRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphListResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphUpdateRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphVersionGetRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphVersionGetResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphVersionListRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphVersionListResponse.js\";\nexport * from \"./models/auditableItemGraphContexts.js\";\nexport * from \"./models/auditableItemGraphMetricIds.js\";\nexport * from \"./models/auditableItemGraphMetrics.js\";\nexport * from \"./models/auditableItemGraphTopics.js\";\nexport * from \"./models/auditableItemGraphTypes.js\";\nexport * from \"./models/eventBus/IAuditableItemGraphEventBusVertexCreated.js\";\nexport * from \"./models/eventBus/IAuditableItemGraphEventBusVertexUpdated.js\";\nexport * from \"./models/IAuditableItemGraphAlias.js\";\nexport * from \"./models/IAuditableItemGraphAuditedElement.js\";\nexport * from \"./models/IAuditableItemGraphChangeset.js\";\nexport * from \"./models/IAuditableItemGraphChangesetList.js\";\nexport * from \"./models/IAuditableItemGraphComponent.js\";\nexport * from \"./models/IAuditableItemGraphEdge.js\";\nexport * from \"./models/IAuditableItemGraphPatchOperation.js\";\nexport * from \"./models/IAuditableItemGraphResource.js\";\nexport * from \"./models/IAuditableItemGraphVertex.js\";\nexport * from \"./models/IAuditableItemGraphVertexList.js\";\nexport * from \"./models/IAuditableItemGraphVertexVersionList.js\";\nexport * from \"./models/verifyDepth.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC;AACzE,cAAc,kDAAkD,CAAC;AACjE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,yDAAyD,CAAC;AACxE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+DAA+D,CAAC;AAC9E,cAAc,+DAA+D,CAAC;AAC9E,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC;AACjE,cAAc,yBAAyB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/auditableItemGraphDataTypes.js\";\nexport * from \"./models/api/IAuditableItemGraphChangesetGetRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphChangesetGetResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphChangesetListRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphChangesetListResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphCreateRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphGetRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphGetResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphListRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphListResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphUpdateRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphUpdatePartialRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphVersionGetRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphVersionGetResponse.js\";\nexport * from \"./models/api/IAuditableItemGraphVersionListRequest.js\";\nexport * from \"./models/api/IAuditableItemGraphVersionListResponse.js\";\nexport * from \"./models/auditableItemGraphContexts.js\";\nexport * from \"./models/auditableItemGraphMetricIds.js\";\nexport * from \"./models/auditableItemGraphMetrics.js\";\nexport * from \"./models/auditableItemGraphTopics.js\";\nexport * from \"./models/auditableItemGraphTypes.js\";\nexport * from \"./models/eventBus/IAuditableItemGraphEventBusVertexCreated.js\";\nexport * from \"./models/eventBus/IAuditableItemGraphEventBusVertexUpdated.js\";\nexport * from \"./models/IAuditableItemGraphAlias.js\";\nexport * from \"./models/IAuditableItemGraphAuditedElement.js\";\nexport * from \"./models/IAuditableItemGraphChangeset.js\";\nexport * from \"./models/IAuditableItemGraphChangesetList.js\";\nexport * from \"./models/IAuditableItemGraphComponent.js\";\nexport * from \"./models/IAuditableItemGraphEdge.js\";\nexport * from \"./models/IAuditableItemGraphPatchOperation.js\";\nexport * from \"./models/IAuditableItemGraphListPatch.js\";\nexport * from \"./models/IAuditableItemGraphPartialVertex.js\";\nexport * from \"./models/IAuditableItemGraphResource.js\";\nexport * from \"./models/IAuditableItemGraphVertex.js\";\nexport * from \"./models/IAuditableItemGraphVertexList.js\";\nexport * from \"./models/IAuditableItemGraphVertexVersionList.js\";\nexport * from \"./models/verifyDepth.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditableItemGraphComponent.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IComparator, SortDirection } from \"@twin.org/entity\";\nimport type { IAuditableItemGraphChangeset } from \"./IAuditableItemGraphChangeset.js\";\nimport type { IAuditableItemGraphChangesetList } from \"./IAuditableItemGraphChangesetList.js\";\nimport type { IAuditableItemGraphVertex } from \"./IAuditableItemGraphVertex.js\";\nimport type { IAuditableItemGraphVertexList } from \"./IAuditableItemGraphVertexList.js\";\nimport type { IAuditableItemGraphVertexVersionList } from \"./IAuditableItemGraphVertexVersionList.js\";\nimport type { VerifyDepth } from \"./verifyDepth.js\";\n\n/**\n * Interface describing an auditable item graph contract.\n */\nexport interface IAuditableItemGraphComponent extends IComponent {\n\t/**\n\t * Create a new graph vertex.\n\t * @param vertex The vertex to create.\n\t * @param vertex.annotationObject The annotation object for the vertex as JSON-LD.\n\t * @param vertex.aliases Alternative aliases that can be used to identify the vertex.\n\t * @param vertex.resources The resources attached to the vertex.\n\t * @param vertex.edges The edges connected to the vertex.\n\t * @returns The id of the new graph item.\n\t */\n\tcreate(vertex: Omit<IAuditableItemGraphVertex, \"id\">): Promise<string>;\n\n\t/**\n\t * Update a graph vertex.\n\t * @param vertex The vertex to update.\n\t * @param vertex.id The id of the vertex to update.\n\t * @param vertex.annotationObject The annotation object for the vertex as JSON-LD.\n\t * @param vertex.aliases Alternative aliases that can be used to identify the vertex.\n\t * @param vertex.resources The resources attached to the vertex.\n\t * @param vertex.edges The edges connected to the vertex.\n\t * @returns Nothing.\n\t */\n\tupdate(vertex: IAuditableItemGraphVertex): Promise<void>;\n\n\t/**\n\t * Get a graph vertex.\n\t * @param id The id of the vertex to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeDeleted Whether to include deleted aliases, resource, edges, defaults to false.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The vertex if found.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tget(\n\t\tid: string,\n\t\toptions?: {\n\t\t\tincludeDeleted?: boolean;\n\t\t\tverifySignatureDepth?: VerifyDepth;\n\t\t}\n\t): Promise<IAuditableItemGraphVertex>;\n\n\t/**\n\t * Get a graph vertex changeset list.\n\t * @param id The id of the vertex to get.\n\t * @param cursor The optional cursor to get next chunk.\n\t * @param limit Limit the number of entities to return.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The changeset if found.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tgetChangesets(\n\t\tid: string,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\toptions?: {\n\t\t\tverifySignatureDepth?: VerifyDepth;\n\t\t}\n\t): Promise<{\n\t\tchangesets: IAuditableItemGraphChangesetList;\n\t\tcursor?: string;\n\t}>;\n\n\t/**\n\t * Get a graph vertex changeset.\n\t * @param id The id of the vertex to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The changeset if found.\n\t * @throws NotFoundError if the vertex or changeset is not found.\n\t */\n\tgetChangeset(\n\t\tid: string,\n\t\toptions?: { verifySignatureDepth?: VerifyDepth }\n\t): Promise<IAuditableItemGraphChangeset>;\n\n\t/**\n\t * Get a graph vertex at a specific version.\n\t * @param id The id of the vertex.\n\t * @param version The version number to retrieve.\n\t * @returns The vertex reconstructed at that version.\n\t * @throws NotFoundError if the vertex or version is not found.\n\t */\n\tgetVersion(id: string, version: number): Promise<IAuditableItemGraphVertex>;\n\n\t/**\n\t * Get all versions of a graph vertex.\n\t * @param id The id of the vertex.\n\t * @param options Additional options for the operation.\n\t * @param options.after Only return versions created after this ISO 8601 timestamp (exclusive).\n\t * @param options.before Only return versions created before this ISO 8601 timestamp (exclusive).\n\t * @returns The list of vertex versions.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tgetVersions(\n\t\tid: string,\n\t\toptions?: {\n\t\t\tafter?: string;\n\t\t\tbefore?: string;\n\t\t}\n\t): Promise<IAuditableItemGraphVertexVersionList>;\n\n\t/**\n\t * Remove the verifiable storage for an item.\n\t * @param id The id of the vertex to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tremoveVerifiable(id: string): Promise<void>;\n\n\t/**\n\t * Query the graph for vertices.\n\t * @param options The query options.\n\t * @param options.id The optional id to look for.\n\t * @param options.idMode Look in id, alias or both, defaults to both.\n\t * @param options.idExact Find only exact matches, default to false meaning partial matching.\n\t * @param options.resourceTypes Include vertices with specific resource types.\n\t * @param conditions Conditions to use in the query.\n\t * @param orderBy The order for the results, defaults to dateCreated.\n\t * @param orderByDirection The direction for the order, defaults to descending.\n\t * @param properties The properties to return, if not provided defaults to id, dateCreated, aliases and object.\n\t * @param cursor The cursor to request the next chunk of entities.\n\t * @param limit Limit the number of entities to return.\n\t * @returns The entities, which can be partial if a limited keys list was provided.\n\t */\n\tquery(\n\t\toptions?: {\n\t\t\tid?: string;\n\t\t\tidMode?: \"id\" | \"alias\" | \"both\";\n\t\t\tidExact?: boolean;\n\t\t\tresourceTypes?: string[];\n\t\t},\n\t\tconditions?: IComparator[],\n\t\torderBy?: keyof Pick<IAuditableItemGraphVertex, \"dateCreated\" | \"dateModified\">,\n\t\torderByDirection?: SortDirection,\n\t\tproperties?: (keyof IAuditableItemGraphVertex)[],\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAuditableItemGraphVertexList;\n\t\tcursor?: string;\n\t}>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IAuditableItemGraphComponent.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type { IComparator, SortDirection } from \"@twin.org/entity\";\nimport type { IAuditableItemGraphChangeset } from \"./IAuditableItemGraphChangeset.js\";\nimport type { IAuditableItemGraphChangesetList } from \"./IAuditableItemGraphChangesetList.js\";\nimport type { IAuditableItemGraphPartialVertex } from \"./IAuditableItemGraphPartialVertex.js\";\nimport type { IAuditableItemGraphVertex } from \"./IAuditableItemGraphVertex.js\";\nimport type { IAuditableItemGraphVertexList } from \"./IAuditableItemGraphVertexList.js\";\nimport type { IAuditableItemGraphVertexVersionList } from \"./IAuditableItemGraphVertexVersionList.js\";\nimport type { VerifyDepth } from \"./verifyDepth.js\";\n\n/**\n * Interface describing an auditable item graph contract.\n */\nexport interface IAuditableItemGraphComponent extends IComponent {\n\t/**\n\t * Create a new graph vertex.\n\t * @param vertex The vertex to create.\n\t * @param vertex.annotationObject The annotation object for the vertex as JSON-LD.\n\t * @param vertex.aliases Alternative aliases that can be used to identify the vertex.\n\t * @param vertex.resources The resources attached to the vertex.\n\t * @param vertex.edges The edges connected to the vertex.\n\t * @returns The id of the new graph item.\n\t */\n\tcreate(vertex: Omit<IAuditableItemGraphVertex, \"id\">): Promise<string>;\n\n\t/**\n\t * Update a graph vertex (PUT — full replacement of vertex state).\n\t * Concurrent updates for the same vertex are serialized via `Mutex` on the vertex id.\n\t * Multi-replica deployments are not coordinated.\n\t * @param vertex The vertex to update.\n\t * @param vertex.id The id of the vertex to update.\n\t * @param vertex.annotationObject The annotation object for the vertex as JSON-LD.\n\t * @param vertex.aliases Alternative aliases that can be used to identify the vertex.\n\t * @param vertex.resources The resources attached to the vertex.\n\t * @param vertex.edges The edges connected to the vertex.\n\t * @returns Nothing.\n\t */\n\tupdate(vertex: IAuditableItemGraphVertex): Promise<void>;\n\n\t/**\n\t * Partially update a graph vertex (PATCH); only properties that are not undefined are applied.\n\t * Sub-lists use explicit `{ add, remove }` patch objects. Serialized with `update()` via `Mutex`\n\t * on the same vertex id.\n\t * @param partial The partial vertex update (must include `id`).\n\t * @returns Nothing.\n\t */\n\tupdatePartial(partial: IAuditableItemGraphPartialVertex): Promise<void>;\n\n\t/**\n\t * Get a graph vertex.\n\t * @param id The id of the vertex to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.includeDeleted Whether to include deleted aliases, resource, edges, defaults to false.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The vertex if found.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tget(\n\t\tid: string,\n\t\toptions?: {\n\t\t\tincludeDeleted?: boolean;\n\t\t\tverifySignatureDepth?: VerifyDepth;\n\t\t}\n\t): Promise<IAuditableItemGraphVertex>;\n\n\t/**\n\t * Get a graph vertex changeset list.\n\t * @param id The id of the vertex to get.\n\t * @param cursor The optional cursor to get next chunk.\n\t * @param limit Limit the number of entities to return.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The changeset if found.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tgetChangesets(\n\t\tid: string,\n\t\tcursor?: string,\n\t\tlimit?: number,\n\t\toptions?: {\n\t\t\tverifySignatureDepth?: VerifyDepth;\n\t\t}\n\t): Promise<{\n\t\tchangesets: IAuditableItemGraphChangesetList;\n\t\tcursor?: string;\n\t}>;\n\n\t/**\n\t * Get a graph vertex changeset.\n\t * @param id The id of the vertex to get.\n\t * @param options Additional options for the get operation.\n\t * @param options.verifySignatureDepth How many signatures to verify, defaults to \"none\".\n\t * @returns The changeset if found.\n\t * @throws NotFoundError if the vertex or changeset is not found.\n\t */\n\tgetChangeset(\n\t\tid: string,\n\t\toptions?: { verifySignatureDepth?: VerifyDepth }\n\t): Promise<IAuditableItemGraphChangeset>;\n\n\t/**\n\t * Get a graph vertex at a specific version.\n\t * @param id The id of the vertex.\n\t * @param version The version number to retrieve.\n\t * @returns The vertex reconstructed at that version.\n\t * @throws NotFoundError if the vertex or version is not found.\n\t */\n\tgetVersion(id: string, version: number): Promise<IAuditableItemGraphVertex>;\n\n\t/**\n\t * Get all versions of a graph vertex.\n\t * @param id The id of the vertex.\n\t * @param options Additional options for the operation.\n\t * @param options.after Only return versions created after this ISO 8601 timestamp (exclusive).\n\t * @param options.before Only return versions created before this ISO 8601 timestamp (exclusive).\n\t * @returns The list of vertex versions.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tgetVersions(\n\t\tid: string,\n\t\toptions?: {\n\t\t\tafter?: string;\n\t\t\tbefore?: string;\n\t\t}\n\t): Promise<IAuditableItemGraphVertexVersionList>;\n\n\t/**\n\t * Remove the verifiable storage for an item.\n\t * @param id The id of the vertex to remove the storage from.\n\t * @returns Nothing.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tremoveVerifiable(id: string): Promise<void>;\n\n\t/**\n\t * Query the graph for vertices.\n\t * @param options The query options.\n\t * @param options.id The optional id to look for.\n\t * @param options.idMode Look in id, alias or both, defaults to both.\n\t * @param options.idExact Find only exact matches, default to false meaning partial matching.\n\t * @param options.resourceTypes Include vertices with specific resource types.\n\t * @param conditions Conditions to use in the query.\n\t * @param orderBy The order for the results, defaults to dateCreated.\n\t * @param orderByDirection The direction for the order, defaults to descending.\n\t * @param properties The properties to return, if not provided defaults to id, dateCreated, aliases and object.\n\t * @param cursor The cursor to request the next chunk of entities.\n\t * @param limit Limit the number of entities to return.\n\t * @returns The entities, which can be partial if a limited keys list was provided.\n\t */\n\tquery(\n\t\toptions?: {\n\t\t\tid?: string;\n\t\t\tidMode?: \"id\" | \"alias\" | \"both\";\n\t\t\tidExact?: boolean;\n\t\t\tresourceTypes?: string[];\n\t\t},\n\t\tconditions?: IComparator[],\n\t\torderBy?: keyof Pick<IAuditableItemGraphVertex, \"dateCreated\" | \"dateModified\">,\n\t\torderByDirection?: SortDirection,\n\t\tproperties?: (keyof IAuditableItemGraphVertex)[],\n\t\tcursor?: string,\n\t\tlimit?: number\n\t): Promise<{\n\t\tentries: IAuditableItemGraphVertexList;\n\t\tcursor?: string;\n\t}>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAuditableItemGraphListPatch.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphListPatch.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphAlias } from \"./IAuditableItemGraphAlias.js\";\nimport type { IAuditableItemGraphEdge } from \"./IAuditableItemGraphEdge.js\";\nimport type { IAuditableItemGraphResource } from \"./IAuditableItemGraphResource.js\";\n\n/**\n * PATCH operations for a sub-list on a vertex.\n */\nexport interface IAuditableItemGraphListPatch<\n\tTItem = IAuditableItemGraphEdge | IAuditableItemGraphAlias | IAuditableItemGraphResource\n> {\n\t/**\n\t * Items to add or update in the active set.\n\t * @json-ld container:set\n\t */\n\tadd?: TItem[];\n\n\t/**\n\t * Identifiers of items to remove from the active set (soft-delete).\n\t * @json-ld container:set\n\t */\n\tremove?: string[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAuditableItemGraphPartialVertex.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphPartialVertex.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\nimport type { IAuditableItemGraphAlias } from \"./IAuditableItemGraphAlias.js\";\nimport type { IAuditableItemGraphEdge } from \"./IAuditableItemGraphEdge.js\";\nimport type { IAuditableItemGraphListPatch } from \"./IAuditableItemGraphListPatch.js\";\nimport type { IAuditableItemGraphResource } from \"./IAuditableItemGraphResource.js\";\nimport type { IAuditableItemGraphVertex } from \"./IAuditableItemGraphVertex.js\";\n\n/**\n * Partial vertex payload for updatePartial (PATCH — requires id).\n * Sub-lists use explicit `{ add, remove }` patches; bare arrays are not supported.\n */\nexport interface IAuditableItemGraphPartialVertex extends Omit<\n\tIAuditableItemGraphVertex,\n\t\"type\" | \"aliases\" | \"edges\" | \"resources\"\n> {\n\t/**\n\t * The id of the vertex to update.\n\t */\n\tid: string;\n\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype?: typeof AuditableItemGraphTypes.Vertex;\n\n\t/**\n\t * Patch operations for aliases.\n\t * @json-ld id\n\t */\n\taliasPatches?: IAuditableItemGraphListPatch<IAuditableItemGraphAlias>;\n\n\t/**\n\t * Patch operations for resources.\n\t * @json-ld id\n\t */\n\tresourcePatches?: IAuditableItemGraphListPatch<IAuditableItemGraphResource>;\n\n\t/**\n\t * Patch operations for edges.\n\t * @json-ld id\n\t */\n\tedgePatches?: IAuditableItemGraphListPatch<IAuditableItemGraphEdge>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAuditableItemGraphUpdatePartialRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphUpdatePartialRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphPartialVertex } from \"../IAuditableItemGraphPartialVertex.js\";\n\n/**\n * Partially update an auditable item graph vertex (PATCH — explicit list patches).\n */\nexport interface IAuditableItemGraphUpdatePartialRequest {\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the vertex to update.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * Partial vertex data; only defined properties are applied.\n\t * Sub-lists use `{ add, remove }` patch objects.\n\t */\n\tbody: Omit<IAuditableItemGraphPartialVertex, \"id\">;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAuditableItemGraphUpdateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphUpdateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphVertex } from \"../IAuditableItemGraphVertex.js\";\n\n/**\n * Update an auditable item graph vertex.\n */\nexport interface IAuditableItemGraphUpdateRequest {\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the vertex to update.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The
|
|
1
|
+
{"version":3,"file":"IAuditableItemGraphUpdateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphUpdateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuditableItemGraphVertex } from \"../IAuditableItemGraphVertex.js\";\n\n/**\n * Update an auditable item graph vertex (PUT — full replacement of vertex state).\n */\nexport interface IAuditableItemGraphUpdateRequest {\n\t/**\n\t * The path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the vertex to update.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The full vertex payload. Replaces annotation and active sub-lists; omitted collections are cleared.\n\t */\n\tbody: Omit<IAuditableItemGraphVertex, \"id\">;\n}\n"]}
|
|
@@ -40,6 +40,14 @@ export const AuditableItemGraphTypes = {
|
|
|
40
40
|
/**
|
|
41
41
|
* Represents auditable item graph vertex version list.
|
|
42
42
|
*/
|
|
43
|
-
VertexVersionList: "AuditableItemGraphVertexVersionList"
|
|
43
|
+
VertexVersionList: "AuditableItemGraphVertexVersionList",
|
|
44
|
+
/**
|
|
45
|
+
* Represents auditable item graph partial vertex.
|
|
46
|
+
*/
|
|
47
|
+
PartialVertex: "AuditableItemGraphPartialVertex",
|
|
48
|
+
/**
|
|
49
|
+
* Represents auditable item graph list patch.
|
|
50
|
+
*/
|
|
51
|
+
ListPatch: "AuditableItemGraphListPatch"
|
|
44
52
|
};
|
|
45
53
|
//# sourceMappingURL=auditableItemGraphTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditableItemGraphTypes.js","sourceRoot":"","sources":["../../../src/models/auditableItemGraphTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC;;OAEG;IACH,MAAM,EAAE,0BAA0B;IAElC;;OAEG;IACH,UAAU,EAAE,8BAA8B;IAE1C;;OAEG;IACH,KAAK,EAAE,yBAAyB;IAEhC;;OAEG;IACH,QAAQ,EAAE,4BAA4B;IAEtC;;OAEG;IACH,IAAI,EAAE,wBAAwB;IAE9B;;OAEG;IACH,SAAS,EAAE,6BAA6B;IAExC;;OAEG;IACH,aAAa,EAAE,iCAAiC;IAEhD;;OAEG;IACH,cAAc,EAAE,kCAAkC;IAElD;;OAEG;IACH,iBAAiB,EAAE,qCAAqC;CAC/
|
|
1
|
+
{"version":3,"file":"auditableItemGraphTypes.js","sourceRoot":"","sources":["../../../src/models/auditableItemGraphTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC;;OAEG;IACH,MAAM,EAAE,0BAA0B;IAElC;;OAEG;IACH,UAAU,EAAE,8BAA8B;IAE1C;;OAEG;IACH,KAAK,EAAE,yBAAyB;IAEhC;;OAEG;IACH,QAAQ,EAAE,4BAA4B;IAEtC;;OAEG;IACH,IAAI,EAAE,wBAAwB;IAE9B;;OAEG;IACH,SAAS,EAAE,6BAA6B;IAExC;;OAEG;IACH,aAAa,EAAE,iCAAiC;IAEhD;;OAEG;IACH,cAAc,EAAE,kCAAkC;IAElD;;OAEG;IACH,iBAAiB,EAAE,qCAAqC;IAExD;;OAEG;IACH,aAAa,EAAE,iCAAiC;IAEhD;;OAEG;IACH,SAAS,EAAE,6BAA6B;CAC/B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The types of auditable item graph data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AuditableItemGraphTypes = {\n\t/**\n\t * Represents auditable item graph vertex.\n\t */\n\tVertex: \"AuditableItemGraphVertex\",\n\n\t/**\n\t * Represents auditable item graph vertex list.\n\t */\n\tVertexList: \"AuditableItemGraphVertexList\",\n\n\t/**\n\t * Represents auditable item graph alias.\n\t */\n\tAlias: \"AuditableItemGraphAlias\",\n\n\t/**\n\t * Represents auditable item graph resource.\n\t */\n\tResource: \"AuditableItemGraphResource\",\n\n\t/**\n\t * Represents auditable item graph edge.\n\t */\n\tEdge: \"AuditableItemGraphEdge\",\n\n\t/**\n\t * Represents auditable item graph changeset.\n\t */\n\tChangeset: \"AuditableItemGraphChangeset\",\n\n\t/**\n\t * Represents auditable item graph changeset list.\n\t */\n\tChangesetList: \"AuditableItemGraphChangesetList\",\n\n\t/**\n\t * Represents patch operation.\n\t */\n\tPatchOperation: \"AuditableItemGraphPatchOperation\",\n\n\t/**\n\t * Represents auditable item graph vertex version list.\n\t */\n\tVertexVersionList: \"AuditableItemGraphVertexVersionList\",\n\n\t/**\n\t * Represents auditable item graph partial vertex.\n\t */\n\tPartialVertex: \"AuditableItemGraphPartialVertex\",\n\n\t/**\n\t * Represents auditable item graph list patch.\n\t */\n\tListPatch: \"AuditableItemGraphListPatch\"\n} as const;\n\n/**\n * The types of auditable item graph data.\n */\nexport type AuditableItemGraphTypes =\n\t(typeof AuditableItemGraphTypes)[keyof typeof AuditableItemGraphTypes];\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/aig/AuditableItemGraphListPatch",
|
|
4
|
+
"title": "AuditableItemGraphListPatch",
|
|
5
|
+
"description": "PATCH operations for a sub-list on a vertex.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"add": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"oneOf": [
|
|
12
|
+
{
|
|
13
|
+
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphEdge"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphAlias"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphResource"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"description": "Items to add or update in the active set."
|
|
24
|
+
},
|
|
25
|
+
"remove": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"description": "Identifiers of items to remove from the active set (soft-delete)."
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/aig/AuditableItemGraphPartialVertex",
|
|
4
|
+
"title": "AuditableItemGraphPartialVertex",
|
|
5
|
+
"description": "Partial vertex payload for updatePartial (PATCH — requires id).\nSub-lists use explicit `{ add, remove }` patches; bare arrays are not supported.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The id of the vertex to update."
|
|
11
|
+
},
|
|
12
|
+
"@context": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"prefixItems": [
|
|
15
|
+
{
|
|
16
|
+
"const": "https://schema.twindev.org/aig/"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"const": "https://schema.twindev.org/common/"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"items": {
|
|
23
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
24
|
+
},
|
|
25
|
+
"minItems": 2,
|
|
26
|
+
"description": "JSON-LD Context."
|
|
27
|
+
},
|
|
28
|
+
"type": {
|
|
29
|
+
"const": "AuditableItemGraphVertex",
|
|
30
|
+
"description": "JSON-LD Type."
|
|
31
|
+
},
|
|
32
|
+
"aliasPatches": {
|
|
33
|
+
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphListPatch",
|
|
34
|
+
"description": "Patch operations for aliases."
|
|
35
|
+
},
|
|
36
|
+
"resourcePatches": {
|
|
37
|
+
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphListPatch",
|
|
38
|
+
"description": "Patch operations for resources."
|
|
39
|
+
},
|
|
40
|
+
"edgePatches": {
|
|
41
|
+
"$ref": "https://schema.twindev.org/aig/AuditableItemGraphListPatch",
|
|
42
|
+
"description": "Patch operations for edges."
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": [
|
|
46
|
+
"id",
|
|
47
|
+
"@context"
|
|
48
|
+
],
|
|
49
|
+
"allOf": [
|
|
50
|
+
{
|
|
51
|
+
"description": "Interface describing an auditable item graph vertex.",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"dateCreated": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The date/time of when the element was created."
|
|
57
|
+
},
|
|
58
|
+
"dateModified": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "The date/time of when the element was modified."
|
|
61
|
+
},
|
|
62
|
+
"dateDeleted": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "The date/time of when the element was deleted, as we never actually remove items."
|
|
65
|
+
},
|
|
66
|
+
"@context": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"prefixItems": [
|
|
69
|
+
{
|
|
70
|
+
"const": "https://schema.twindev.org/aig/"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"const": "https://schema.twindev.org/common/"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"items": {
|
|
77
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
78
|
+
},
|
|
79
|
+
"minItems": 2,
|
|
80
|
+
"description": "JSON-LD Context.",
|
|
81
|
+
"$comment": "Inherited from AuditableItemGraphVertex"
|
|
82
|
+
},
|
|
83
|
+
"organizationIdentity": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "The identity of the organization which controls the vertex.",
|
|
86
|
+
"$comment": "Inherited from AuditableItemGraphVertex"
|
|
87
|
+
},
|
|
88
|
+
"annotationObject": {
|
|
89
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
|
|
90
|
+
"description": "The JSON-LD annotation object for the vertex.",
|
|
91
|
+
"$comment": "Inherited from AuditableItemGraphVertex"
|
|
92
|
+
},
|
|
93
|
+
"verified": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"description": "Is the vertex verified, will only be populated when verification is requested.",
|
|
96
|
+
"$comment": "Inherited from AuditableItemGraphVertex"
|
|
97
|
+
},
|
|
98
|
+
"version": {
|
|
99
|
+
"type": "number",
|
|
100
|
+
"description": "The version of the vertex, populated only when getting a specific version.\nMaps to https://schema.org/version.",
|
|
101
|
+
"$comment": "Inherited from AuditableItemGraphVertex"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": [
|
|
105
|
+
"@context"
|
|
106
|
+
],
|
|
107
|
+
"$comment": "Inlined utility base type AuditableItemGraphVertex so utility transformations can operate on concrete properties instead of a $ref."
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./models/api/IAuditableItemGraphGetResponse.js";
|
|
|
9
9
|
export * from "./models/api/IAuditableItemGraphListRequest.js";
|
|
10
10
|
export * from "./models/api/IAuditableItemGraphListResponse.js";
|
|
11
11
|
export * from "./models/api/IAuditableItemGraphUpdateRequest.js";
|
|
12
|
+
export * from "./models/api/IAuditableItemGraphUpdatePartialRequest.js";
|
|
12
13
|
export * from "./models/api/IAuditableItemGraphVersionGetRequest.js";
|
|
13
14
|
export * from "./models/api/IAuditableItemGraphVersionGetResponse.js";
|
|
14
15
|
export * from "./models/api/IAuditableItemGraphVersionListRequest.js";
|
|
@@ -27,6 +28,8 @@ export * from "./models/IAuditableItemGraphChangesetList.js";
|
|
|
27
28
|
export * from "./models/IAuditableItemGraphComponent.js";
|
|
28
29
|
export * from "./models/IAuditableItemGraphEdge.js";
|
|
29
30
|
export * from "./models/IAuditableItemGraphPatchOperation.js";
|
|
31
|
+
export * from "./models/IAuditableItemGraphListPatch.js";
|
|
32
|
+
export * from "./models/IAuditableItemGraphPartialVertex.js";
|
|
30
33
|
export * from "./models/IAuditableItemGraphResource.js";
|
|
31
34
|
export * from "./models/IAuditableItemGraphVertex.js";
|
|
32
35
|
export * from "./models/IAuditableItemGraphVertexList.js";
|
|
@@ -2,6 +2,7 @@ import type { IComponent } from "@twin.org/core";
|
|
|
2
2
|
import type { IComparator, SortDirection } from "@twin.org/entity";
|
|
3
3
|
import type { IAuditableItemGraphChangeset } from "./IAuditableItemGraphChangeset.js";
|
|
4
4
|
import type { IAuditableItemGraphChangesetList } from "./IAuditableItemGraphChangesetList.js";
|
|
5
|
+
import type { IAuditableItemGraphPartialVertex } from "./IAuditableItemGraphPartialVertex.js";
|
|
5
6
|
import type { IAuditableItemGraphVertex } from "./IAuditableItemGraphVertex.js";
|
|
6
7
|
import type { IAuditableItemGraphVertexList } from "./IAuditableItemGraphVertexList.js";
|
|
7
8
|
import type { IAuditableItemGraphVertexVersionList } from "./IAuditableItemGraphVertexVersionList.js";
|
|
@@ -21,7 +22,9 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
21
22
|
*/
|
|
22
23
|
create(vertex: Omit<IAuditableItemGraphVertex, "id">): Promise<string>;
|
|
23
24
|
/**
|
|
24
|
-
* Update a graph vertex.
|
|
25
|
+
* Update a graph vertex (PUT — full replacement of vertex state).
|
|
26
|
+
* Concurrent updates for the same vertex are serialized via `Mutex` on the vertex id.
|
|
27
|
+
* Multi-replica deployments are not coordinated.
|
|
25
28
|
* @param vertex The vertex to update.
|
|
26
29
|
* @param vertex.id The id of the vertex to update.
|
|
27
30
|
* @param vertex.annotationObject The annotation object for the vertex as JSON-LD.
|
|
@@ -31,6 +34,14 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
31
34
|
* @returns Nothing.
|
|
32
35
|
*/
|
|
33
36
|
update(vertex: IAuditableItemGraphVertex): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Partially update a graph vertex (PATCH); only properties that are not undefined are applied.
|
|
39
|
+
* Sub-lists use explicit `{ add, remove }` patch objects. Serialized with `update()` via `Mutex`
|
|
40
|
+
* on the same vertex id.
|
|
41
|
+
* @param partial The partial vertex update (must include `id`).
|
|
42
|
+
* @returns Nothing.
|
|
43
|
+
*/
|
|
44
|
+
updatePartial(partial: IAuditableItemGraphPartialVertex): Promise<void>;
|
|
34
45
|
/**
|
|
35
46
|
* Get a graph vertex.
|
|
36
47
|
* @param id The id of the vertex to get.
|
|
@@ -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
|
+
}
|
|
@@ -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
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,7 +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
18
|
body: Omit<IAuditableItemGraphVertex, "id">;
|
|
19
19
|
}
|
|
@@ -38,6 +38,14 @@ export declare const AuditableItemGraphTypes: {
|
|
|
38
38
|
* Represents auditable item graph vertex version list.
|
|
39
39
|
*/
|
|
40
40
|
readonly VertexVersionList: "AuditableItemGraphVertexVersionList";
|
|
41
|
+
/**
|
|
42
|
+
* Represents auditable item graph partial vertex.
|
|
43
|
+
*/
|
|
44
|
+
readonly PartialVertex: "AuditableItemGraphPartialVertex";
|
|
45
|
+
/**
|
|
46
|
+
* Represents auditable item graph list patch.
|
|
47
|
+
*/
|
|
48
|
+
readonly ListPatch: "AuditableItemGraphListPatch";
|
|
41
49
|
};
|
|
42
50
|
/**
|
|
43
51
|
* The types of auditable item graph data.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.17](https://github.com/iotaledger/twin-auditable-item-graph/compare/auditable-item-graph-models-v0.0.3-next.16...auditable-item-graph-models-v0.0.3-next.17) (2026-05-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* incremental edge merge and per-vertex update queue ([#70](https://github.com/iotaledger/twin-auditable-item-graph/issues/70)) ([91eb51d](https://github.com/iotaledger/twin-auditable-item-graph/commit/91eb51d135d2e609eebce90de099670f08eb20ca))
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.16](https://github.com/iotaledger/twin-auditable-item-graph/compare/auditable-item-graph-models-v0.0.3-next.15...auditable-item-graph-models-v0.0.3-next.16) (2026-05-22)
|
|
4
11
|
|
|
5
12
|
|
package/docs/reference/index.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
- [IAuditableItemGraphChangesetList](interfaces/IAuditableItemGraphChangesetList.md)
|
|
13
13
|
- [IAuditableItemGraphComponent](interfaces/IAuditableItemGraphComponent.md)
|
|
14
14
|
- [IAuditableItemGraphEdge](interfaces/IAuditableItemGraphEdge.md)
|
|
15
|
+
- [IAuditableItemGraphListPatch](interfaces/IAuditableItemGraphListPatch.md)
|
|
16
|
+
- [IAuditableItemGraphPartialVertex](interfaces/IAuditableItemGraphPartialVertex.md)
|
|
15
17
|
- [IAuditableItemGraphPatchOperation](interfaces/IAuditableItemGraphPatchOperation.md)
|
|
16
18
|
- [IAuditableItemGraphResource](interfaces/IAuditableItemGraphResource.md)
|
|
17
19
|
- [IAuditableItemGraphVertex](interfaces/IAuditableItemGraphVertex.md)
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
- [IAuditableItemGraphGetResponse](interfaces/IAuditableItemGraphGetResponse.md)
|
|
27
29
|
- [IAuditableItemGraphListRequest](interfaces/IAuditableItemGraphListRequest.md)
|
|
28
30
|
- [IAuditableItemGraphListResponse](interfaces/IAuditableItemGraphListResponse.md)
|
|
31
|
+
- [IAuditableItemGraphUpdatePartialRequest](interfaces/IAuditableItemGraphUpdatePartialRequest.md)
|
|
29
32
|
- [IAuditableItemGraphUpdateRequest](interfaces/IAuditableItemGraphUpdateRequest.md)
|
|
30
33
|
- [IAuditableItemGraphVersionGetRequest](interfaces/IAuditableItemGraphVersionGetRequest.md)
|
|
31
34
|
- [IAuditableItemGraphVersionGetResponse](interfaces/IAuditableItemGraphVersionGetResponse.md)
|
|
@@ -34,7 +34,9 @@ The id of the new graph item.
|
|
|
34
34
|
|
|
35
35
|
> **update**(`vertex`): `Promise`\<`void`\>
|
|
36
36
|
|
|
37
|
-
Update a graph vertex.
|
|
37
|
+
Update a graph vertex (PUT — full replacement of vertex state).
|
|
38
|
+
Concurrent updates for the same vertex are serialized via `Mutex` on the vertex id.
|
|
39
|
+
Multi-replica deployments are not coordinated.
|
|
38
40
|
|
|
39
41
|
#### Parameters
|
|
40
42
|
|
|
@@ -52,6 +54,30 @@ Nothing.
|
|
|
52
54
|
|
|
53
55
|
***
|
|
54
56
|
|
|
57
|
+
### updatePartial() {#updatepartial}
|
|
58
|
+
|
|
59
|
+
> **updatePartial**(`partial`): `Promise`\<`void`\>
|
|
60
|
+
|
|
61
|
+
Partially update a graph vertex (PATCH); only properties that are not undefined are applied.
|
|
62
|
+
Sub-lists use explicit `{ add, remove }` patch objects. Serialized with `update()` via `Mutex`
|
|
63
|
+
on the same vertex id.
|
|
64
|
+
|
|
65
|
+
#### Parameters
|
|
66
|
+
|
|
67
|
+
##### partial
|
|
68
|
+
|
|
69
|
+
[`IAuditableItemGraphPartialVertex`](IAuditableItemGraphPartialVertex.md)
|
|
70
|
+
|
|
71
|
+
The partial vertex update (must include `id`).
|
|
72
|
+
|
|
73
|
+
#### Returns
|
|
74
|
+
|
|
75
|
+
`Promise`\<`void`\>
|
|
76
|
+
|
|
77
|
+
Nothing.
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
55
81
|
### get() {#get}
|
|
56
82
|
|
|
57
83
|
> **get**(`id`, `options?`): `Promise`\<[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md)\>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Interface: IAuditableItemGraphListPatch\<TItem\>
|
|
2
|
+
|
|
3
|
+
PATCH operations for a sub-list on a vertex.
|
|
4
|
+
|
|
5
|
+
## Type Parameters
|
|
6
|
+
|
|
7
|
+
### TItem
|
|
8
|
+
|
|
9
|
+
`TItem` = [`IAuditableItemGraphEdge`](IAuditableItemGraphEdge.md) \| [`IAuditableItemGraphAlias`](IAuditableItemGraphAlias.md) \| [`IAuditableItemGraphResource`](IAuditableItemGraphResource.md)
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### add? {#add}
|
|
14
|
+
|
|
15
|
+
> `optional` **add?**: `TItem`[]
|
|
16
|
+
|
|
17
|
+
Items to add or update in the active set.
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### remove? {#remove}
|
|
22
|
+
|
|
23
|
+
> `optional` **remove?**: `string`[]
|
|
24
|
+
|
|
25
|
+
Identifiers of items to remove from the active set (soft-delete).
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Interface: IAuditableItemGraphPartialVertex
|
|
2
|
+
|
|
3
|
+
Partial vertex payload for updatePartial (PATCH — requires id).
|
|
4
|
+
Sub-lists use explicit `{ add, remove }` patches; bare arrays are not supported.
|
|
5
|
+
|
|
6
|
+
## Extends
|
|
7
|
+
|
|
8
|
+
- `Omit`\<[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md), `"type"` \| `"aliases"` \| `"edges"` \| `"resources"`\>
|
|
9
|
+
|
|
10
|
+
## Properties
|
|
11
|
+
|
|
12
|
+
### dateCreated? {#datecreated}
|
|
13
|
+
|
|
14
|
+
> `optional` **dateCreated?**: `string`
|
|
15
|
+
|
|
16
|
+
The date/time of when the element was created.
|
|
17
|
+
|
|
18
|
+
#### Inherited from
|
|
19
|
+
|
|
20
|
+
[`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`dateCreated`](IAuditableItemGraphAuditedElement.md#datecreated)
|
|
21
|
+
|
|
22
|
+
***
|
|
23
|
+
|
|
24
|
+
### dateModified? {#datemodified}
|
|
25
|
+
|
|
26
|
+
> `optional` **dateModified?**: `string`
|
|
27
|
+
|
|
28
|
+
The date/time of when the element was modified.
|
|
29
|
+
|
|
30
|
+
#### Inherited from
|
|
31
|
+
|
|
32
|
+
[`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`dateModified`](IAuditableItemGraphAuditedElement.md#datemodified)
|
|
33
|
+
|
|
34
|
+
***
|
|
35
|
+
|
|
36
|
+
### dateDeleted? {#datedeleted}
|
|
37
|
+
|
|
38
|
+
> `optional` **dateDeleted?**: `string`
|
|
39
|
+
|
|
40
|
+
The date/time of when the element was deleted, as we never actually remove items.
|
|
41
|
+
|
|
42
|
+
#### Inherited from
|
|
43
|
+
|
|
44
|
+
[`IAuditableItemGraphAuditedElement`](IAuditableItemGraphAuditedElement.md).[`dateDeleted`](IAuditableItemGraphAuditedElement.md#datedeleted)
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
### id {#id}
|
|
49
|
+
|
|
50
|
+
> **id**: `string`
|
|
51
|
+
|
|
52
|
+
The id of the vertex to update.
|
|
53
|
+
|
|
54
|
+
#### Overrides
|
|
55
|
+
|
|
56
|
+
[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md).[`id`](IAuditableItemGraphVertex.md#id)
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### @context {#context}
|
|
61
|
+
|
|
62
|
+
> **@context**: \[`"https://schema.twindev.org/aig/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
63
|
+
|
|
64
|
+
JSON-LD Context.
|
|
65
|
+
|
|
66
|
+
#### Overrides
|
|
67
|
+
|
|
68
|
+
`Omit.@context`
|
|
69
|
+
|
|
70
|
+
***
|
|
71
|
+
|
|
72
|
+
### type? {#type}
|
|
73
|
+
|
|
74
|
+
> `optional` **type?**: `"AuditableItemGraphVertex"`
|
|
75
|
+
|
|
76
|
+
JSON-LD Type.
|
|
77
|
+
|
|
78
|
+
***
|
|
79
|
+
|
|
80
|
+
### aliasPatches? {#aliaspatches}
|
|
81
|
+
|
|
82
|
+
> `optional` **aliasPatches?**: [`IAuditableItemGraphListPatch`](IAuditableItemGraphListPatch.md)\<[`IAuditableItemGraphAlias`](IAuditableItemGraphAlias.md)\>
|
|
83
|
+
|
|
84
|
+
Patch operations for aliases.
|
|
85
|
+
|
|
86
|
+
***
|
|
87
|
+
|
|
88
|
+
### resourcePatches? {#resourcepatches}
|
|
89
|
+
|
|
90
|
+
> `optional` **resourcePatches?**: [`IAuditableItemGraphListPatch`](IAuditableItemGraphListPatch.md)\<[`IAuditableItemGraphResource`](IAuditableItemGraphResource.md)\>
|
|
91
|
+
|
|
92
|
+
Patch operations for resources.
|
|
93
|
+
|
|
94
|
+
***
|
|
95
|
+
|
|
96
|
+
### edgePatches? {#edgepatches}
|
|
97
|
+
|
|
98
|
+
> `optional` **edgePatches?**: [`IAuditableItemGraphListPatch`](IAuditableItemGraphListPatch.md)\<[`IAuditableItemGraphEdge`](IAuditableItemGraphEdge.md)\>
|
|
99
|
+
|
|
100
|
+
Patch operations for edges.
|
|
101
|
+
|
|
102
|
+
***
|
|
103
|
+
|
|
104
|
+
### organizationIdentity? {#organizationidentity}
|
|
105
|
+
|
|
106
|
+
> `optional` **organizationIdentity?**: `string`
|
|
107
|
+
|
|
108
|
+
The identity of the organization which controls the vertex.
|
|
109
|
+
|
|
110
|
+
#### Inherited from
|
|
111
|
+
|
|
112
|
+
[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md).[`organizationIdentity`](IAuditableItemGraphVertex.md#organizationidentity)
|
|
113
|
+
|
|
114
|
+
***
|
|
115
|
+
|
|
116
|
+
### annotationObject? {#annotationobject}
|
|
117
|
+
|
|
118
|
+
> `optional` **annotationObject?**: `IJsonLdNodeObject`
|
|
119
|
+
|
|
120
|
+
The JSON-LD annotation object for the vertex.
|
|
121
|
+
|
|
122
|
+
#### Inherited from
|
|
123
|
+
|
|
124
|
+
[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md).[`annotationObject`](IAuditableItemGraphVertex.md#annotationobject)
|
|
125
|
+
|
|
126
|
+
***
|
|
127
|
+
|
|
128
|
+
### verified? {#verified}
|
|
129
|
+
|
|
130
|
+
> `optional` **verified?**: `boolean`
|
|
131
|
+
|
|
132
|
+
Is the vertex verified, will only be populated when verification is requested.
|
|
133
|
+
|
|
134
|
+
#### Inherited from
|
|
135
|
+
|
|
136
|
+
[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md).[`verified`](IAuditableItemGraphVertex.md#verified)
|
|
137
|
+
|
|
138
|
+
***
|
|
139
|
+
|
|
140
|
+
### version? {#version}
|
|
141
|
+
|
|
142
|
+
> `optional` **version?**: `number`
|
|
143
|
+
|
|
144
|
+
The version of the vertex, populated only when getting a specific version.
|
|
145
|
+
Maps to https://schema.org/version.
|
|
146
|
+
|
|
147
|
+
#### Inherited from
|
|
148
|
+
|
|
149
|
+
[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md).[`version`](IAuditableItemGraphVertex.md#version)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Interface: IAuditableItemGraphUpdatePartialRequest
|
|
2
|
+
|
|
3
|
+
Partially update an auditable item graph vertex (PATCH — explicit list patches).
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The id of the vertex to update.
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### body {#body}
|
|
22
|
+
|
|
23
|
+
> **body**: `Omit`\<[`IAuditableItemGraphPartialVertex`](IAuditableItemGraphPartialVertex.md), `"id"`\>
|
|
24
|
+
|
|
25
|
+
Partial vertex data; only defined properties are applied.
|
|
26
|
+
Sub-lists use `{ add, remove }` patch objects.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Interface: IAuditableItemGraphUpdateRequest
|
|
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
|
## Properties
|
|
6
6
|
|
|
@@ -22,4 +22,4 @@ The id of the vertex to update.
|
|
|
22
22
|
|
|
23
23
|
> **body**: `Omit`\<[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md), `"id"`\>
|
|
24
24
|
|
|
25
|
-
The
|
|
25
|
+
The full vertex payload. Replaces annotation and active sub-lists; omitted collections are cleared.
|
|
@@ -59,3 +59,15 @@ Represents patch operation.
|
|
|
59
59
|
> `readonly` **VertexVersionList**: `"AuditableItemGraphVertexVersionList"` = `"AuditableItemGraphVertexVersionList"`
|
|
60
60
|
|
|
61
61
|
Represents auditable item graph vertex version list.
|
|
62
|
+
|
|
63
|
+
### PartialVertex {#partialvertex}
|
|
64
|
+
|
|
65
|
+
> `readonly` **PartialVertex**: `"AuditableItemGraphPartialVertex"` = `"AuditableItemGraphPartialVertex"`
|
|
66
|
+
|
|
67
|
+
Represents auditable item graph partial vertex.
|
|
68
|
+
|
|
69
|
+
### ListPatch {#listpatch}
|
|
70
|
+
|
|
71
|
+
> `readonly` **ListPatch**: `"AuditableItemGraphListPatch"` = `"AuditableItemGraphListPatch"`
|
|
72
|
+
|
|
73
|
+
Represents auditable item graph list patch.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/auditable-item-graph-models",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.17",
|
|
4
4
|
"description": "Defines shared graph data contracts, JSON schemas, and JSON-LD contexts for consistent interoperability.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|