@twin.org/auditable-item-graph-models 0.0.3-next.23 → 0.0.3-next.24
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.
|
@@ -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 { 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
|
|
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 A promise that resolves when the vertex has been updated.\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 A promise that resolves when the partial update has been applied.\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 proof for an item.\n\t * @param id The id of the vertex to remove the proof from.\n\t * @returns A promise that resolves when the proof has been removed from all changesets.\n\t * @throws NotFoundError if the vertex is not found.\n\t */\n\tremoveProof(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"]}
|
|
@@ -31,7 +31,7 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
31
31
|
* @param vertex.aliases Alternative aliases that can be used to identify the vertex.
|
|
32
32
|
* @param vertex.resources The resources attached to the vertex.
|
|
33
33
|
* @param vertex.edges The edges connected to the vertex.
|
|
34
|
-
* @returns
|
|
34
|
+
* @returns A promise that resolves when the vertex has been updated.
|
|
35
35
|
*/
|
|
36
36
|
update(vertex: IAuditableItemGraphVertex): Promise<void>;
|
|
37
37
|
/**
|
|
@@ -39,7 +39,7 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
39
39
|
* Sub-lists use explicit `{ add, remove }` patch objects. Serialized with `update()` via `Mutex`
|
|
40
40
|
* on the same vertex id.
|
|
41
41
|
* @param partial The partial vertex update (must include `id`).
|
|
42
|
-
* @returns
|
|
42
|
+
* @returns A promise that resolves when the partial update has been applied.
|
|
43
43
|
*/
|
|
44
44
|
updatePartial(partial: IAuditableItemGraphPartialVertex): Promise<void>;
|
|
45
45
|
/**
|
|
@@ -106,7 +106,7 @@ export interface IAuditableItemGraphComponent extends IComponent {
|
|
|
106
106
|
/**
|
|
107
107
|
* Remove the proof for an item.
|
|
108
108
|
* @param id The id of the vertex to remove the proof from.
|
|
109
|
-
* @returns
|
|
109
|
+
* @returns A promise that resolves when the proof has been removed from all changesets.
|
|
110
110
|
* @throws NotFoundError if the vertex is not found.
|
|
111
111
|
*/
|
|
112
112
|
removeProof(id: string): Promise<void>;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.24](https://github.com/iotaledger/twin-auditable-item-graph/compare/auditable-item-graph-models-v0.0.3-next.23...auditable-item-graph-models-v0.0.3-next.24) (2026-06-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **auditable-item-graph-models:** Synchronize repo versions
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.23](https://github.com/iotaledger/twin-auditable-item-graph/compare/auditable-item-graph-models-v0.0.3-next.22...auditable-item-graph-models-v0.0.3-next.23) (2026-06-11)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -50,7 +50,7 @@ The vertex to update.
|
|
|
50
50
|
|
|
51
51
|
`Promise`\<`void`\>
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
A promise that resolves when the vertex has been updated.
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
@@ -74,7 +74,7 @@ The partial vertex update (must include `id`).
|
|
|
74
74
|
|
|
75
75
|
`Promise`\<`void`\>
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
A promise that resolves when the partial update has been applied.
|
|
78
78
|
|
|
79
79
|
***
|
|
80
80
|
|
|
@@ -296,7 +296,7 @@ The id of the vertex to remove the proof from.
|
|
|
296
296
|
|
|
297
297
|
`Promise`\<`void`\>
|
|
298
298
|
|
|
299
|
-
|
|
299
|
+
A promise that resolves when the proof has been removed from all changesets.
|
|
300
300
|
|
|
301
301
|
#### Throws
|
|
302
302
|
|
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.24",
|
|
4
4
|
"description": "Defines shared graph data contracts, JSON schemas, and JSON-LD contexts for consistent interoperability.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|