@twin.org/auditable-item-graph-models 0.0.3-next.14 → 0.0.3-next.16

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/index.js CHANGED
@@ -16,6 +16,8 @@ export * from "./models/api/IAuditableItemGraphVersionGetResponse.js";
16
16
  export * from "./models/api/IAuditableItemGraphVersionListRequest.js";
17
17
  export * from "./models/api/IAuditableItemGraphVersionListResponse.js";
18
18
  export * from "./models/auditableItemGraphContexts.js";
19
+ export * from "./models/auditableItemGraphMetricIds.js";
20
+ export * from "./models/auditableItemGraphMetrics.js";
19
21
  export * from "./models/auditableItemGraphTopics.js";
20
22
  export * from "./models/auditableItemGraphTypes.js";
21
23
  export * from "./models/eventBus/IAuditableItemGraphEventBusVertexCreated.js";
@@ -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,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/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,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 +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 versionId The id of the version (changeset id) 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, versionId: string): 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 { 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 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphVertexVersionList.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphVertexVersionList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\n\n/**\n * Interface describing a list of auditable item graph vertex version numbers.\n */\nexport interface IAuditableItemGraphVertexVersionList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexVersionList];\n\n\t/**\n\t * The list of version numbers.\n\t * @json-ld namespace:sch\n\t */\n\t[SchemaOrgTypes.ItemListElement]: number[];\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphVertexVersionList.js","sourceRoot":"","sources":["../../../src/models/IAuditableItemGraphVertexVersionList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { AuditableItemGraphContexts } from \"./auditableItemGraphContexts.js\";\nimport type { AuditableItemGraphTypes } from \"./auditableItemGraphTypes.js\";\n\n/**\n * Interface describing a list of auditable item graph vertex version numbers.\n */\nexport interface IAuditableItemGraphVertexVersionList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof AuditableItemGraphContexts.Context,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexVersionList];\n\n\t/**\n\t * The list of versions.\n\t * @json-ld namespace:sch\n\t */\n\t[SchemaOrgTypes.ItemListElement]: { version: number; dateCreated: string }[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IAuditableItemGraphVersionGetRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphVersionGetRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Get an auditable item graph vertex at a specific version.\n */\nexport interface IAuditableItemGraphVersionGetRequest {\n\t/**\n\t * The headers which can be used to determine the response data type.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;\n\t};\n\n\t/**\n\t * The parameters from the path.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the vertex.\n\t\t */\n\t\tid: string;\n\n\t\t/**\n\t\t * The id of the version (changeset id) to get.\n\t\t */\n\t\tversionId: string;\n\t};\n}\n"]}
1
+ {"version":3,"file":"IAuditableItemGraphVersionGetRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IAuditableItemGraphVersionGetRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { HeaderTypes, MimeTypes } from \"@twin.org/web\";\n\n/**\n * Get an auditable item graph vertex at a specific version.\n */\nexport interface IAuditableItemGraphVersionGetRequest {\n\t/**\n\t * The headers which can be used to determine the response data type.\n\t */\n\theaders?: {\n\t\t[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;\n\t};\n\n\t/**\n\t * The parameters from the path.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the vertex.\n\t\t */\n\t\tid: string;\n\n\t\t/**\n\t\t * The version number to get.\n\t\t */\n\t\tversion: string;\n\t};\n}\n"]}
@@ -0,0 +1,69 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ /**
4
+ * Metric IDs for the auditable item graph service.
5
+ */
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention
7
+ export const AuditableItemGraphMetricIds = {
8
+ /**
9
+ * Number of vertices created.
10
+ */
11
+ VerticesCreated: "aig_vertices_created",
12
+ /**
13
+ * Number of vertices updated.
14
+ */
15
+ VerticesUpdated: "aig_vertices_updated",
16
+ /**
17
+ * Number of changesets created.
18
+ */
19
+ ChangesetsCreated: "aig_changesets_created",
20
+ /**
21
+ * Number of aliases added.
22
+ */
23
+ AliasesAdded: "aig_aliases_added",
24
+ /**
25
+ * Number of aliases modified.
26
+ */
27
+ AliasesModified: "aig_aliases_modified",
28
+ /**
29
+ * Number of aliases deleted.
30
+ */
31
+ AliasesDeleted: "aig_aliases_deleted",
32
+ /**
33
+ * Number of resources added.
34
+ */
35
+ ResourcesAdded: "aig_resources_added",
36
+ /**
37
+ * Number of resources modified.
38
+ */
39
+ ResourcesModified: "aig_resources_modified",
40
+ /**
41
+ * Number of resources deleted.
42
+ */
43
+ ResourcesDeleted: "aig_resources_deleted",
44
+ /**
45
+ * Number of edges added.
46
+ */
47
+ EdgesAdded: "aig_edges_added",
48
+ /**
49
+ * Number of edges modified.
50
+ */
51
+ EdgesModified: "aig_edges_modified",
52
+ /**
53
+ * Number of edges deleted.
54
+ */
55
+ EdgesDeleted: "aig_edges_deleted",
56
+ /**
57
+ * Number of queries executed.
58
+ */
59
+ QueriesExecuted: "aig_queries_executed",
60
+ /**
61
+ * Number of verifications succeeded.
62
+ */
63
+ VerificationsSucceeded: "aig_verifications_succeeded",
64
+ /**
65
+ * Number of verifications failed.
66
+ */
67
+ VerificationsFailed: "aig_verifications_failed"
68
+ };
69
+ //# sourceMappingURL=auditableItemGraphMetricIds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auditableItemGraphMetricIds.js","sourceRoot":"","sources":["../../../src/models/auditableItemGraphMetricIds.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IAC1C;;OAEG;IACH,eAAe,EAAE,sBAAsB;IAEvC;;OAEG;IACH,eAAe,EAAE,sBAAsB;IAEvC;;OAEG;IACH,iBAAiB,EAAE,wBAAwB;IAE3C;;OAEG;IACH,YAAY,EAAE,mBAAmB;IAEjC;;OAEG;IACH,eAAe,EAAE,sBAAsB;IAEvC;;OAEG;IACH,cAAc,EAAE,qBAAqB;IAErC;;OAEG;IACH,cAAc,EAAE,qBAAqB;IAErC;;OAEG;IACH,iBAAiB,EAAE,wBAAwB;IAE3C;;OAEG;IACH,gBAAgB,EAAE,uBAAuB;IAEzC;;OAEG;IACH,UAAU,EAAE,iBAAiB;IAE7B;;OAEG;IACH,aAAa,EAAE,oBAAoB;IAEnC;;OAEG;IACH,YAAY,EAAE,mBAAmB;IAEjC;;OAEG;IACH,eAAe,EAAE,sBAAsB;IAEvC;;OAEG;IACH,sBAAsB,EAAE,6BAA6B;IAErD;;OAEG;IACH,mBAAmB,EAAE,0BAA0B;CACtC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Metric IDs for the auditable item graph service.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AuditableItemGraphMetricIds = {\n\t/**\n\t * Number of vertices created.\n\t */\n\tVerticesCreated: \"aig_vertices_created\",\n\n\t/**\n\t * Number of vertices updated.\n\t */\n\tVerticesUpdated: \"aig_vertices_updated\",\n\n\t/**\n\t * Number of changesets created.\n\t */\n\tChangesetsCreated: \"aig_changesets_created\",\n\n\t/**\n\t * Number of aliases added.\n\t */\n\tAliasesAdded: \"aig_aliases_added\",\n\n\t/**\n\t * Number of aliases modified.\n\t */\n\tAliasesModified: \"aig_aliases_modified\",\n\n\t/**\n\t * Number of aliases deleted.\n\t */\n\tAliasesDeleted: \"aig_aliases_deleted\",\n\n\t/**\n\t * Number of resources added.\n\t */\n\tResourcesAdded: \"aig_resources_added\",\n\n\t/**\n\t * Number of resources modified.\n\t */\n\tResourcesModified: \"aig_resources_modified\",\n\n\t/**\n\t * Number of resources deleted.\n\t */\n\tResourcesDeleted: \"aig_resources_deleted\",\n\n\t/**\n\t * Number of edges added.\n\t */\n\tEdgesAdded: \"aig_edges_added\",\n\n\t/**\n\t * Number of edges modified.\n\t */\n\tEdgesModified: \"aig_edges_modified\",\n\n\t/**\n\t * Number of edges deleted.\n\t */\n\tEdgesDeleted: \"aig_edges_deleted\",\n\n\t/**\n\t * Number of queries executed.\n\t */\n\tQueriesExecuted: \"aig_queries_executed\",\n\n\t/**\n\t * Number of verifications succeeded.\n\t */\n\tVerificationsSucceeded: \"aig_verifications_succeeded\",\n\n\t/**\n\t * Number of verifications failed.\n\t */\n\tVerificationsFailed: \"aig_verifications_failed\"\n} as const;\n\n/**\n * Metric IDs for the auditable item graph service.\n */\nexport type AuditableItemGraphMetricIds =\n\t(typeof AuditableItemGraphMetricIds)[keyof typeof AuditableItemGraphMetricIds];\n"]}
@@ -0,0 +1,82 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { MetricType } from "@twin.org/telemetry-models";
4
+ import { AuditableItemGraphMetricIds } from "./auditableItemGraphMetricIds.js";
5
+ /**
6
+ * Metrics registered by the auditable item graph service.
7
+ */
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ export const AuditableItemGraphMetrics = [
10
+ {
11
+ id: AuditableItemGraphMetricIds.VerticesCreated,
12
+ label: "Vertices created",
13
+ type: MetricType.Counter
14
+ },
15
+ {
16
+ id: AuditableItemGraphMetricIds.VerticesUpdated,
17
+ label: "Vertices updated",
18
+ type: MetricType.Counter
19
+ },
20
+ {
21
+ id: AuditableItemGraphMetricIds.ChangesetsCreated,
22
+ label: "Changesets created",
23
+ type: MetricType.Counter
24
+ },
25
+ {
26
+ id: AuditableItemGraphMetricIds.AliasesAdded,
27
+ label: "Aliases added",
28
+ type: MetricType.Counter
29
+ },
30
+ {
31
+ id: AuditableItemGraphMetricIds.AliasesModified,
32
+ label: "Aliases modified",
33
+ type: MetricType.Counter
34
+ },
35
+ {
36
+ id: AuditableItemGraphMetricIds.AliasesDeleted,
37
+ label: "Aliases deleted",
38
+ type: MetricType.Counter
39
+ },
40
+ {
41
+ id: AuditableItemGraphMetricIds.ResourcesAdded,
42
+ label: "Resources added",
43
+ type: MetricType.Counter
44
+ },
45
+ {
46
+ id: AuditableItemGraphMetricIds.ResourcesModified,
47
+ label: "Resources modified",
48
+ type: MetricType.Counter
49
+ },
50
+ {
51
+ id: AuditableItemGraphMetricIds.ResourcesDeleted,
52
+ label: "Resources deleted",
53
+ type: MetricType.Counter
54
+ },
55
+ { id: AuditableItemGraphMetricIds.EdgesAdded, label: "Edges added", type: MetricType.Counter },
56
+ {
57
+ id: AuditableItemGraphMetricIds.EdgesModified,
58
+ label: "Edges modified",
59
+ type: MetricType.Counter
60
+ },
61
+ {
62
+ id: AuditableItemGraphMetricIds.EdgesDeleted,
63
+ label: "Edges deleted",
64
+ type: MetricType.Counter
65
+ },
66
+ {
67
+ id: AuditableItemGraphMetricIds.QueriesExecuted,
68
+ label: "Queries executed",
69
+ type: MetricType.Counter
70
+ },
71
+ {
72
+ id: AuditableItemGraphMetricIds.VerificationsSucceeded,
73
+ label: "Verifications succeeded",
74
+ type: MetricType.Counter
75
+ },
76
+ {
77
+ id: AuditableItemGraphMetricIds.VerificationsFailed,
78
+ label: "Verifications failed",
79
+ type: MetricType.Counter
80
+ }
81
+ ];
82
+ //# sourceMappingURL=auditableItemGraphMetrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auditableItemGraphMetrics.js","sourceRoot":"","sources":["../../../src/models/auditableItemGraphMetrics.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAyB,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAAuB;IAC5D;QACC,EAAE,EAAE,2BAA2B,CAAC,eAAe;QAC/C,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,eAAe;QAC/C,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,iBAAiB;QACjD,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,YAAY;QAC5C,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,eAAe;QAC/C,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,cAAc;QAC9C,KAAK,EAAE,iBAAiB;QACxB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,cAAc;QAC9C,KAAK,EAAE,iBAAiB;QACxB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,iBAAiB;QACjD,KAAK,EAAE,oBAAoB;QAC3B,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,gBAAgB;QAChD,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD,EAAE,EAAE,EAAE,2BAA2B,CAAC,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE;IAC9F;QACC,EAAE,EAAE,2BAA2B,CAAC,aAAa;QAC7C,KAAK,EAAE,gBAAgB;QACvB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,YAAY;QAC5C,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,eAAe;QAC/C,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,sBAAsB;QACtD,KAAK,EAAE,yBAAyB;QAChC,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,2BAA2B,CAAC,mBAAmB;QACnD,KAAK,EAAE,sBAAsB;QAC7B,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;CACD,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { type ITelemetryMetric, MetricType } from \"@twin.org/telemetry-models\";\nimport { AuditableItemGraphMetricIds } from \"./auditableItemGraphMetricIds.js\";\n\n/**\n * Metrics registered by the auditable item graph service.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AuditableItemGraphMetrics: ITelemetryMetric[] = [\n\t{\n\t\tid: AuditableItemGraphMetricIds.VerticesCreated,\n\t\tlabel: \"Vertices created\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.VerticesUpdated,\n\t\tlabel: \"Vertices updated\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.ChangesetsCreated,\n\t\tlabel: \"Changesets created\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.AliasesAdded,\n\t\tlabel: \"Aliases added\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.AliasesModified,\n\t\tlabel: \"Aliases modified\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.AliasesDeleted,\n\t\tlabel: \"Aliases deleted\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.ResourcesAdded,\n\t\tlabel: \"Resources added\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.ResourcesModified,\n\t\tlabel: \"Resources modified\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.ResourcesDeleted,\n\t\tlabel: \"Resources deleted\",\n\t\ttype: MetricType.Counter\n\t},\n\t{ id: AuditableItemGraphMetricIds.EdgesAdded, label: \"Edges added\", type: MetricType.Counter },\n\t{\n\t\tid: AuditableItemGraphMetricIds.EdgesModified,\n\t\tlabel: \"Edges modified\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.EdgesDeleted,\n\t\tlabel: \"Edges deleted\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.QueriesExecuted,\n\t\tlabel: \"Queries executed\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.VerificationsSucceeded,\n\t\tlabel: \"Verifications succeeded\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AuditableItemGraphMetricIds.VerificationsFailed,\n\t\tlabel: \"Verifications failed\",\n\t\ttype: MetricType.Counter\n\t}\n];\n"]}
@@ -14,6 +14,8 @@ export * from "./models/api/IAuditableItemGraphVersionGetResponse.js";
14
14
  export * from "./models/api/IAuditableItemGraphVersionListRequest.js";
15
15
  export * from "./models/api/IAuditableItemGraphVersionListResponse.js";
16
16
  export * from "./models/auditableItemGraphContexts.js";
17
+ export * from "./models/auditableItemGraphMetricIds.js";
18
+ export * from "./models/auditableItemGraphMetrics.js";
17
19
  export * from "./models/auditableItemGraphTopics.js";
18
20
  export * from "./models/auditableItemGraphTypes.js";
19
21
  export * from "./models/eventBus/IAuditableItemGraphEventBusVertexCreated.js";
@@ -74,11 +74,11 @@ export interface IAuditableItemGraphComponent extends IComponent {
74
74
  /**
75
75
  * Get a graph vertex at a specific version.
76
76
  * @param id The id of the vertex.
77
- * @param versionId The id of the version (changeset id) to retrieve.
77
+ * @param version The version number to retrieve.
78
78
  * @returns The vertex reconstructed at that version.
79
79
  * @throws NotFoundError if the vertex or version is not found.
80
80
  */
81
- getVersion(id: string, versionId: string): Promise<IAuditableItemGraphVertex>;
81
+ getVersion(id: string, version: number): Promise<IAuditableItemGraphVertex>;
82
82
  /**
83
83
  * Get all versions of a graph vertex.
84
84
  * @param id The id of the vertex.
@@ -19,8 +19,11 @@ export interface IAuditableItemGraphVertexVersionList {
19
19
  */
20
20
  type: [typeof SchemaOrgTypes.ItemList, typeof AuditableItemGraphTypes.VertexVersionList];
21
21
  /**
22
- * The list of version numbers.
22
+ * The list of versions.
23
23
  * @json-ld namespace:sch
24
24
  */
25
- [SchemaOrgTypes.ItemListElement]: number[];
25
+ [SchemaOrgTypes.ItemListElement]: {
26
+ version: number;
27
+ dateCreated: string;
28
+ }[];
26
29
  }
@@ -18,8 +18,8 @@ export interface IAuditableItemGraphVersionGetRequest {
18
18
  */
19
19
  id: string;
20
20
  /**
21
- * The id of the version (changeset id) to get.
21
+ * The version number to get.
22
22
  */
23
- versionId: string;
23
+ version: string;
24
24
  };
25
25
  }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Metric IDs for the auditable item graph service.
3
+ */
4
+ export declare const AuditableItemGraphMetricIds: {
5
+ /**
6
+ * Number of vertices created.
7
+ */
8
+ readonly VerticesCreated: "aig_vertices_created";
9
+ /**
10
+ * Number of vertices updated.
11
+ */
12
+ readonly VerticesUpdated: "aig_vertices_updated";
13
+ /**
14
+ * Number of changesets created.
15
+ */
16
+ readonly ChangesetsCreated: "aig_changesets_created";
17
+ /**
18
+ * Number of aliases added.
19
+ */
20
+ readonly AliasesAdded: "aig_aliases_added";
21
+ /**
22
+ * Number of aliases modified.
23
+ */
24
+ readonly AliasesModified: "aig_aliases_modified";
25
+ /**
26
+ * Number of aliases deleted.
27
+ */
28
+ readonly AliasesDeleted: "aig_aliases_deleted";
29
+ /**
30
+ * Number of resources added.
31
+ */
32
+ readonly ResourcesAdded: "aig_resources_added";
33
+ /**
34
+ * Number of resources modified.
35
+ */
36
+ readonly ResourcesModified: "aig_resources_modified";
37
+ /**
38
+ * Number of resources deleted.
39
+ */
40
+ readonly ResourcesDeleted: "aig_resources_deleted";
41
+ /**
42
+ * Number of edges added.
43
+ */
44
+ readonly EdgesAdded: "aig_edges_added";
45
+ /**
46
+ * Number of edges modified.
47
+ */
48
+ readonly EdgesModified: "aig_edges_modified";
49
+ /**
50
+ * Number of edges deleted.
51
+ */
52
+ readonly EdgesDeleted: "aig_edges_deleted";
53
+ /**
54
+ * Number of queries executed.
55
+ */
56
+ readonly QueriesExecuted: "aig_queries_executed";
57
+ /**
58
+ * Number of verifications succeeded.
59
+ */
60
+ readonly VerificationsSucceeded: "aig_verifications_succeeded";
61
+ /**
62
+ * Number of verifications failed.
63
+ */
64
+ readonly VerificationsFailed: "aig_verifications_failed";
65
+ };
66
+ /**
67
+ * Metric IDs for the auditable item graph service.
68
+ */
69
+ export type AuditableItemGraphMetricIds = (typeof AuditableItemGraphMetricIds)[keyof typeof AuditableItemGraphMetricIds];
@@ -0,0 +1,5 @@
1
+ import { type ITelemetryMetric } from "@twin.org/telemetry-models";
2
+ /**
3
+ * Metrics registered by the auditable item graph service.
4
+ */
5
+ export declare const AuditableItemGraphMetrics: ITelemetryMetric[];
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [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
+
5
+
6
+ ### Features
7
+
8
+ * improved versioning ([#66](https://github.com/iotaledger/twin-auditable-item-graph/issues/66)) ([1b497cd](https://github.com/iotaledger/twin-auditable-item-graph/commit/1b497cdc88eec9b6707b097283773e109baae3aa))
9
+
10
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-auditable-item-graph/compare/auditable-item-graph-models-v0.0.3-next.14...auditable-item-graph-models-v0.0.3-next.15) (2026-05-20)
11
+
12
+
13
+ ### Features
14
+
15
+ * add event-driven telemetry metrics ([#63](https://github.com/iotaledger/twin-auditable-item-graph/issues/63)) ([8fe6cdd](https://github.com/iotaledger/twin-auditable-item-graph/commit/8fe6cdd0d56496402b766c151f002f475ddb8c0e))
16
+
3
17
  ## [0.0.3-next.14](https://github.com/iotaledger/twin-auditable-item-graph/compare/auditable-item-graph-models-v0.0.3-next.13...auditable-item-graph-models-v0.0.3-next.14) (2026-05-18)
4
18
 
5
19
 
@@ -37,6 +37,7 @@
37
37
  ## Type Aliases
38
38
 
39
39
  - [AuditableItemGraphContexts](type-aliases/AuditableItemGraphContexts.md)
40
+ - [AuditableItemGraphMetricIds](type-aliases/AuditableItemGraphMetricIds.md)
40
41
  - [AuditableItemGraphTopics](type-aliases/AuditableItemGraphTopics.md)
41
42
  - [AuditableItemGraphTypes](type-aliases/AuditableItemGraphTypes.md)
42
43
  - [VerifyDepth](type-aliases/VerifyDepth.md)
@@ -44,6 +45,8 @@
44
45
  ## Variables
45
46
 
46
47
  - [AuditableItemGraphContexts](variables/AuditableItemGraphContexts.md)
48
+ - [AuditableItemGraphMetricIds](variables/AuditableItemGraphMetricIds.md)
49
+ - [AuditableItemGraphMetrics](variables/AuditableItemGraphMetrics.md)
47
50
  - [AuditableItemGraphTopics](variables/AuditableItemGraphTopics.md)
48
51
  - [AuditableItemGraphTypes](variables/AuditableItemGraphTypes.md)
49
52
  - [VerifyDepth](variables/VerifyDepth.md)
@@ -180,7 +180,7 @@ NotFoundError if the vertex or changeset is not found.
180
180
 
181
181
  ### getVersion() {#getversion}
182
182
 
183
- > **getVersion**(`id`, `versionId`): `Promise`\<[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md)\>
183
+ > **getVersion**(`id`, `version`): `Promise`\<[`IAuditableItemGraphVertex`](IAuditableItemGraphVertex.md)\>
184
184
 
185
185
  Get a graph vertex at a specific version.
186
186
 
@@ -192,11 +192,11 @@ Get a graph vertex at a specific version.
192
192
 
193
193
  The id of the vertex.
194
194
 
195
- ##### versionId
195
+ ##### version
196
196
 
197
- `string`
197
+ `number`
198
198
 
199
- The id of the version (changeset id) to retrieve.
199
+ The version number to retrieve.
200
200
 
201
201
  #### Returns
202
202
 
@@ -28,8 +28,8 @@ The parameters from the path.
28
28
 
29
29
  The id of the vertex.
30
30
 
31
- #### versionId
31
+ #### version
32
32
 
33
- > **versionId**: `string`
33
+ > **version**: `string`
34
34
 
35
- The id of the version (changeset id) to get.
35
+ The version number to get.
@@ -22,6 +22,14 @@ JSON-LD Type.
22
22
 
23
23
  ### itemListElement {#itemlistelement}
24
24
 
25
- > **itemListElement**: `number`[]
25
+ > **itemListElement**: `object`[]
26
26
 
27
- The list of version numbers.
27
+ The list of versions.
28
+
29
+ #### version
30
+
31
+ > **version**: `number`
32
+
33
+ #### dateCreated
34
+
35
+ > **dateCreated**: `string`
@@ -0,0 +1,5 @@
1
+ # Type Alias: AuditableItemGraphMetricIds
2
+
3
+ > **AuditableItemGraphMetricIds** = *typeof* [`AuditableItemGraphMetricIds`](../variables/AuditableItemGraphMetricIds.md)\[keyof *typeof* [`AuditableItemGraphMetricIds`](../variables/AuditableItemGraphMetricIds.md)\]
4
+
5
+ Metric IDs for the auditable item graph service.
@@ -0,0 +1,97 @@
1
+ # Variable: AuditableItemGraphMetricIds
2
+
3
+ > `const` **AuditableItemGraphMetricIds**: `object`
4
+
5
+ Metric IDs for the auditable item graph service.
6
+
7
+ ## Type Declaration
8
+
9
+ ### VerticesCreated {#verticescreated}
10
+
11
+ > `readonly` **VerticesCreated**: `"aig_vertices_created"` = `"aig_vertices_created"`
12
+
13
+ Number of vertices created.
14
+
15
+ ### VerticesUpdated {#verticesupdated}
16
+
17
+ > `readonly` **VerticesUpdated**: `"aig_vertices_updated"` = `"aig_vertices_updated"`
18
+
19
+ Number of vertices updated.
20
+
21
+ ### ChangesetsCreated {#changesetscreated}
22
+
23
+ > `readonly` **ChangesetsCreated**: `"aig_changesets_created"` = `"aig_changesets_created"`
24
+
25
+ Number of changesets created.
26
+
27
+ ### AliasesAdded {#aliasesadded}
28
+
29
+ > `readonly` **AliasesAdded**: `"aig_aliases_added"` = `"aig_aliases_added"`
30
+
31
+ Number of aliases added.
32
+
33
+ ### AliasesModified {#aliasesmodified}
34
+
35
+ > `readonly` **AliasesModified**: `"aig_aliases_modified"` = `"aig_aliases_modified"`
36
+
37
+ Number of aliases modified.
38
+
39
+ ### AliasesDeleted {#aliasesdeleted}
40
+
41
+ > `readonly` **AliasesDeleted**: `"aig_aliases_deleted"` = `"aig_aliases_deleted"`
42
+
43
+ Number of aliases deleted.
44
+
45
+ ### ResourcesAdded {#resourcesadded}
46
+
47
+ > `readonly` **ResourcesAdded**: `"aig_resources_added"` = `"aig_resources_added"`
48
+
49
+ Number of resources added.
50
+
51
+ ### ResourcesModified {#resourcesmodified}
52
+
53
+ > `readonly` **ResourcesModified**: `"aig_resources_modified"` = `"aig_resources_modified"`
54
+
55
+ Number of resources modified.
56
+
57
+ ### ResourcesDeleted {#resourcesdeleted}
58
+
59
+ > `readonly` **ResourcesDeleted**: `"aig_resources_deleted"` = `"aig_resources_deleted"`
60
+
61
+ Number of resources deleted.
62
+
63
+ ### EdgesAdded {#edgesadded}
64
+
65
+ > `readonly` **EdgesAdded**: `"aig_edges_added"` = `"aig_edges_added"`
66
+
67
+ Number of edges added.
68
+
69
+ ### EdgesModified {#edgesmodified}
70
+
71
+ > `readonly` **EdgesModified**: `"aig_edges_modified"` = `"aig_edges_modified"`
72
+
73
+ Number of edges modified.
74
+
75
+ ### EdgesDeleted {#edgesdeleted}
76
+
77
+ > `readonly` **EdgesDeleted**: `"aig_edges_deleted"` = `"aig_edges_deleted"`
78
+
79
+ Number of edges deleted.
80
+
81
+ ### QueriesExecuted {#queriesexecuted}
82
+
83
+ > `readonly` **QueriesExecuted**: `"aig_queries_executed"` = `"aig_queries_executed"`
84
+
85
+ Number of queries executed.
86
+
87
+ ### VerificationsSucceeded {#verificationssucceeded}
88
+
89
+ > `readonly` **VerificationsSucceeded**: `"aig_verifications_succeeded"` = `"aig_verifications_succeeded"`
90
+
91
+ Number of verifications succeeded.
92
+
93
+ ### VerificationsFailed {#verificationsfailed}
94
+
95
+ > `readonly` **VerificationsFailed**: `"aig_verifications_failed"` = `"aig_verifications_failed"`
96
+
97
+ Number of verifications failed.
@@ -0,0 +1,5 @@
1
+ # Variable: AuditableItemGraphMetrics
2
+
3
+ > `const` **AuditableItemGraphMetrics**: `ITelemetryMetric`[]
4
+
5
+ Metrics registered by the auditable item graph service.
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.14",
3
+ "version": "0.0.3-next.16",
4
4
  "description": "Defines shared graph data contracts, JSON schemas, and JSON-LD contexts for consistent interoperability.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,6 +21,7 @@
21
21
  "@twin.org/immutable-proof-models": "next",
22
22
  "@twin.org/nameof": "next",
23
23
  "@twin.org/standards-schema-org": "next",
24
+ "@twin.org/telemetry-models": "next",
24
25
  "@twin.org/web": "next"
25
26
  },
26
27
  "main": "./dist/es/index.js",