@twin.org/attestation-models 0.9.1 → 0.9.2-next.2

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
@@ -8,6 +8,8 @@ export * from "./models/api/IAttestationGetRequest.js";
8
8
  export * from "./models/api/IAttestationGetResponse.js";
9
9
  export * from "./models/api/IAttestationTransferRequest.js";
10
10
  export * from "./models/attestationContexts.js";
11
+ export * from "./models/attestationMetricIds.js";
12
+ export * from "./models/attestationMetrics.js";
11
13
  export * from "./models/attestationTypes.js";
12
14
  export * from "./models/IAttestationComponent.js";
13
15
  export * from "./models/IAttestationConnector.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/attestationDataTypes.js\";\nexport * from \"./factories/attestationConnectorFactory.js\";\nexport * from \"./models/api/IAttestationCreateRequest.js\";\nexport * from \"./models/api/IAttestationDestroyRequest.js\";\nexport * from \"./models/api/IAttestationGetRequest.js\";\nexport * from \"./models/api/IAttestationGetResponse.js\";\nexport * from \"./models/api/IAttestationTransferRequest.js\";\nexport * from \"./models/attestationContexts.js\";\nexport * from \"./models/attestationTypes.js\";\nexport * from \"./models/IAttestationComponent.js\";\nexport * from \"./models/IAttestationConnector.js\";\nexport * from \"./models/IAttestationInformation.js\";\nexport * from \"./models/IAttestationJwtProof.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/attestationDataTypes.js\";\nexport * from \"./factories/attestationConnectorFactory.js\";\nexport * from \"./models/api/IAttestationCreateRequest.js\";\nexport * from \"./models/api/IAttestationDestroyRequest.js\";\nexport * from \"./models/api/IAttestationGetRequest.js\";\nexport * from \"./models/api/IAttestationGetResponse.js\";\nexport * from \"./models/api/IAttestationTransferRequest.js\";\nexport * from \"./models/attestationContexts.js\";\nexport * from \"./models/attestationMetricIds.js\";\nexport * from \"./models/attestationMetrics.js\";\nexport * from \"./models/attestationTypes.js\";\nexport * from \"./models/IAttestationComponent.js\";\nexport * from \"./models/IAttestationConnector.js\";\nexport * from \"./models/IAttestationInformation.js\";\nexport * from \"./models/IAttestationJwtProof.js\";\n"]}
@@ -0,0 +1,29 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ /**
4
+ * Metric IDs for the attestation service.
5
+ */
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention
7
+ export const AttestationMetricIds = {
8
+ /**
9
+ * Number of attestations created.
10
+ */
11
+ AttestationCreated: "att_attestations_created",
12
+ /**
13
+ * Number of attestation verifications succeeded.
14
+ */
15
+ AttestationVerified: "att_attestations_verified",
16
+ /**
17
+ * Number of attestation verifications failed.
18
+ */
19
+ AttestationVerificationFailed: "att_attestations_verification_failed",
20
+ /**
21
+ * Number of attestations transferred.
22
+ */
23
+ AttestationTransferred: "att_attestations_transferred",
24
+ /**
25
+ * Number of attestations destroyed.
26
+ */
27
+ AttestationDestroyed: "att_attestations_destroyed"
28
+ };
29
+ //# sourceMappingURL=attestationMetricIds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attestationMetricIds.js","sourceRoot":"","sources":["../../../src/models/attestationMetricIds.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,kBAAkB,EAAE,0BAA0B;IAE9C;;OAEG;IACH,mBAAmB,EAAE,2BAA2B;IAEhD;;OAEG;IACH,6BAA6B,EAAE,sCAAsC;IAErE;;OAEG;IACH,sBAAsB,EAAE,8BAA8B;IAEtD;;OAEG;IACH,oBAAoB,EAAE,4BAA4B;CACzC,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Metric IDs for the attestation service.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AttestationMetricIds = {\n\t/**\n\t * Number of attestations created.\n\t */\n\tAttestationCreated: \"att_attestations_created\",\n\n\t/**\n\t * Number of attestation verifications succeeded.\n\t */\n\tAttestationVerified: \"att_attestations_verified\",\n\n\t/**\n\t * Number of attestation verifications failed.\n\t */\n\tAttestationVerificationFailed: \"att_attestations_verification_failed\",\n\n\t/**\n\t * Number of attestations transferred.\n\t */\n\tAttestationTransferred: \"att_attestations_transferred\",\n\n\t/**\n\t * Number of attestations destroyed.\n\t */\n\tAttestationDestroyed: \"att_attestations_destroyed\"\n} as const;\n\n/**\n * Union type of all attestation service metric ID string values.\n */\nexport type AttestationMetricIds = (typeof AttestationMetricIds)[keyof typeof AttestationMetricIds];\n"]}
@@ -0,0 +1,36 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { MetricType } from "@twin.org/telemetry-models";
4
+ import { AttestationMetricIds } from "./attestationMetricIds.js";
5
+ /**
6
+ * Metrics registered by the attestation service.
7
+ */
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ export const AttestationMetrics = [
10
+ {
11
+ id: AttestationMetricIds.AttestationCreated,
12
+ label: "Attestations created",
13
+ type: MetricType.Counter
14
+ },
15
+ {
16
+ id: AttestationMetricIds.AttestationVerified,
17
+ label: "Attestation verifications succeeded",
18
+ type: MetricType.Counter
19
+ },
20
+ {
21
+ id: AttestationMetricIds.AttestationVerificationFailed,
22
+ label: "Attestation verifications failed",
23
+ type: MetricType.Counter
24
+ },
25
+ {
26
+ id: AttestationMetricIds.AttestationTransferred,
27
+ label: "Attestations transferred",
28
+ type: MetricType.Counter
29
+ },
30
+ {
31
+ id: AttestationMetricIds.AttestationDestroyed,
32
+ label: "Attestations destroyed",
33
+ type: MetricType.Counter
34
+ }
35
+ ];
36
+ //# sourceMappingURL=attestationMetrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attestationMetrics.js","sourceRoot":"","sources":["../../../src/models/attestationMetrics.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAyB,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAuB;IACrD;QACC,EAAE,EAAE,oBAAoB,CAAC,kBAAkB;QAC3C,KAAK,EAAE,sBAAsB;QAC7B,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,oBAAoB,CAAC,mBAAmB;QAC5C,KAAK,EAAE,qCAAqC;QAC5C,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,oBAAoB,CAAC,6BAA6B;QACtD,KAAK,EAAE,kCAAkC;QACzC,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,oBAAoB,CAAC,sBAAsB;QAC/C,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,oBAAoB,CAAC,oBAAoB;QAC7C,KAAK,EAAE,wBAAwB;QAC/B,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;CACD,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { type ITelemetryMetric, MetricType } from \"@twin.org/telemetry-models\";\nimport { AttestationMetricIds } from \"./attestationMetricIds.js\";\n\n/**\n * Metrics registered by the attestation service.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const AttestationMetrics: ITelemetryMetric[] = [\n\t{\n\t\tid: AttestationMetricIds.AttestationCreated,\n\t\tlabel: \"Attestations created\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AttestationMetricIds.AttestationVerified,\n\t\tlabel: \"Attestation verifications succeeded\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AttestationMetricIds.AttestationVerificationFailed,\n\t\tlabel: \"Attestation verifications failed\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AttestationMetricIds.AttestationTransferred,\n\t\tlabel: \"Attestations transferred\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: AttestationMetricIds.AttestationDestroyed,\n\t\tlabel: \"Attestations destroyed\",\n\t\ttype: MetricType.Counter\n\t}\n];\n"]}
@@ -6,6 +6,8 @@ export * from "./models/api/IAttestationGetRequest.js";
6
6
  export * from "./models/api/IAttestationGetResponse.js";
7
7
  export * from "./models/api/IAttestationTransferRequest.js";
8
8
  export * from "./models/attestationContexts.js";
9
+ export * from "./models/attestationMetricIds.js";
10
+ export * from "./models/attestationMetrics.js";
9
11
  export * from "./models/attestationTypes.js";
10
12
  export * from "./models/IAttestationComponent.js";
11
13
  export * from "./models/IAttestationConnector.js";
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Metric IDs for the attestation service.
3
+ */
4
+ export declare const AttestationMetricIds: {
5
+ /**
6
+ * Number of attestations created.
7
+ */
8
+ readonly AttestationCreated: "att_attestations_created";
9
+ /**
10
+ * Number of attestation verifications succeeded.
11
+ */
12
+ readonly AttestationVerified: "att_attestations_verified";
13
+ /**
14
+ * Number of attestation verifications failed.
15
+ */
16
+ readonly AttestationVerificationFailed: "att_attestations_verification_failed";
17
+ /**
18
+ * Number of attestations transferred.
19
+ */
20
+ readonly AttestationTransferred: "att_attestations_transferred";
21
+ /**
22
+ * Number of attestations destroyed.
23
+ */
24
+ readonly AttestationDestroyed: "att_attestations_destroyed";
25
+ };
26
+ /**
27
+ * Union type of all attestation service metric ID string values.
28
+ */
29
+ export type AttestationMetricIds = (typeof AttestationMetricIds)[keyof typeof AttestationMetricIds];
@@ -0,0 +1,5 @@
1
+ import { type ITelemetryMetric } from "@twin.org/telemetry-models";
2
+ /**
3
+ * Metrics registered by the attestation service.
4
+ */
5
+ export declare const AttestationMetrics: ITelemetryMetric[];
package/docs/changelog.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.2-next.2](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.9.2-next.1...attestation-models-v0.9.2-next.2) (2026-08-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * add event-driven telemetry metrics ([#66](https://github.com/iotaledger/twin-attestation/issues/66)) ([1b0c778](https://github.com/iotaledger/twin-attestation/commit/1b0c778eaa8bd6dca1fdc24ed5d3b4e6ade4ea33))
9
+
10
+ ## [0.9.2-next.1](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.9.2-next.0...attestation-models-v0.9.2-next.1) (2026-07-30)
11
+
12
+
13
+ ### Features
14
+
15
+ * add context id features ([#21](https://github.com/iotaledger/twin-attestation/issues/21)) ([640deab](https://github.com/iotaledger/twin-attestation/commit/640deabfc00340e619283f94570c5e1ec45e83af))
16
+ * add ts-to-jsonld-context tool ([df7edd0](https://github.com/iotaledger/twin-attestation/commit/df7edd0d32cabc2b0f9f6dc7b216f569f739324d))
17
+ * add validate-locales ([a1f9e13](https://github.com/iotaledger/twin-attestation/commit/a1f9e13875a661f612ce16dd9896e7df20c6a7ff))
18
+ * context updates ([#25](https://github.com/iotaledger/twin-attestation/issues/25)) ([1ea71b2](https://github.com/iotaledger/twin-attestation/commit/1ea71b28d874daef4d0bca594fb5dbf5f2a47571))
19
+ * eslint migration to flat config ([7c768ff](https://github.com/iotaledger/twin-attestation/commit/7c768ffae02456d60fd62ba8b4b488c307ceff32))
20
+ * release to production ([aa69a08](https://github.com/iotaledger/twin-attestation/commit/aa69a08fbd3897c8d72b0d32ec730f104ad31b33))
21
+ * release to production ([89ca987](https://github.com/iotaledger/twin-attestation/commit/89ca987963d9090abcfc1b62bc997e2c521944ec))
22
+ * remove holder identity ([#38](https://github.com/iotaledger/twin-attestation/issues/38)) ([4862d7f](https://github.com/iotaledger/twin-attestation/commit/4862d7f22345b82bcb90f27adc0d64ed75484813))
23
+ * remove unused schemas causing conflict ([#27](https://github.com/iotaledger/twin-attestation/issues/27)) ([9723bc3](https://github.com/iotaledger/twin-attestation/commit/9723bc3757f87ce8a943f5f091a92d258f867892))
24
+ * typescript 6 update ([9484667](https://github.com/iotaledger/twin-attestation/commit/948466713dc980e4b2d89e72ebb927b3fe530280))
25
+ * update contexts and namespaces ([#23](https://github.com/iotaledger/twin-attestation/issues/23)) ([7e7ffb4](https://github.com/iotaledger/twin-attestation/commit/7e7ffb4056bfe296dd3cedcaa7a9bfb91fd830d7))
26
+ * update data type registration with fully qualified names ([5982245](https://github.com/iotaledger/twin-attestation/commit/59822454a027a9c6dfa72ffa9aabb9622b925929))
27
+ * update dependencies ([1d96d2e](https://github.com/iotaledger/twin-attestation/commit/1d96d2ee6e81a30396980f6f5e16e9658710d32d))
28
+ * update framework core ([02326d4](https://github.com/iotaledger/twin-attestation/commit/02326d41238862c13587c19bb3d04c1cb3b606d8))
29
+ * update schemas ([c163f36](https://github.com/iotaledger/twin-attestation/commit/c163f3623d54a0e87a97cf5eab25327b9aeac0fe))
30
+ * update ts-to-schema generation ([0f23298](https://github.com/iotaledger/twin-attestation/commit/0f23298f6e8accb19c0faaf74220cce02155b48a))
31
+ * use shared store mechanism ([#5](https://github.com/iotaledger/twin-attestation/issues/5)) ([3768cf7](https://github.com/iotaledger/twin-attestation/commit/3768cf7214d30a5429b7b08190539b517d7fafa0))
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * correct context ordering ([c7cded2](https://github.com/iotaledger/twin-attestation/commit/c7cded248662b8b78ff41b19749bc182ff5105c0))
37
+ * remove unused schema ([1529b0a](https://github.com/iotaledger/twin-attestation/commit/1529b0a4dfcb1d70b59e8976a1ebcf05a1a90dc9))
38
+
3
39
  ## [0.9.1](https://github.com/iotaledger/twin-attestation/compare/attestation-models-v0.9.1...attestation-models-v0.9.1) (2026-07-27)
4
40
 
5
41
 
@@ -19,10 +19,13 @@
19
19
  ## Type Aliases
20
20
 
21
21
  - [AttestationContexts](type-aliases/AttestationContexts.md)
22
+ - [AttestationMetricIds](type-aliases/AttestationMetricIds.md)
22
23
  - [AttestationTypes](type-aliases/AttestationTypes.md)
23
24
 
24
25
  ## Variables
25
26
 
26
27
  - [AttestationConnectorFactory](variables/AttestationConnectorFactory.md)
27
28
  - [AttestationContexts](variables/AttestationContexts.md)
29
+ - [AttestationMetricIds](variables/AttestationMetricIds.md)
30
+ - [AttestationMetrics](variables/AttestationMetrics.md)
28
31
  - [AttestationTypes](variables/AttestationTypes.md)
@@ -0,0 +1,5 @@
1
+ # Type Alias: AttestationMetricIds
2
+
3
+ > **AttestationMetricIds** = *typeof* [`AttestationMetricIds`](../variables/AttestationMetricIds.md)\[keyof *typeof* [`AttestationMetricIds`](../variables/AttestationMetricIds.md)\]
4
+
5
+ Union type of all attestation service metric ID string values.
@@ -0,0 +1,37 @@
1
+ # Variable: AttestationMetricIds
2
+
3
+ > `const` **AttestationMetricIds**: `object`
4
+
5
+ Metric IDs for the attestation service.
6
+
7
+ ## Type Declaration
8
+
9
+ ### AttestationCreated {#attestationcreated}
10
+
11
+ > `readonly` **AttestationCreated**: `"att_attestations_created"` = `"att_attestations_created"`
12
+
13
+ Number of attestations created.
14
+
15
+ ### AttestationVerified {#attestationverified}
16
+
17
+ > `readonly` **AttestationVerified**: `"att_attestations_verified"` = `"att_attestations_verified"`
18
+
19
+ Number of attestation verifications succeeded.
20
+
21
+ ### AttestationVerificationFailed {#attestationverificationfailed}
22
+
23
+ > `readonly` **AttestationVerificationFailed**: `"att_attestations_verification_failed"` = `"att_attestations_verification_failed"`
24
+
25
+ Number of attestation verifications failed.
26
+
27
+ ### AttestationTransferred {#attestationtransferred}
28
+
29
+ > `readonly` **AttestationTransferred**: `"att_attestations_transferred"` = `"att_attestations_transferred"`
30
+
31
+ Number of attestations transferred.
32
+
33
+ ### AttestationDestroyed {#attestationdestroyed}
34
+
35
+ > `readonly` **AttestationDestroyed**: `"att_attestations_destroyed"` = `"att_attestations_destroyed"`
36
+
37
+ Number of attestations destroyed.
@@ -0,0 +1,5 @@
1
+ # Variable: AttestationMetrics
2
+
3
+ > `const` **AttestationMetrics**: `ITelemetryMetric`[]
4
+
5
+ Metrics registered by the attestation service.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/attestation-models",
3
- "version": "0.9.1",
3
+ "version": "0.9.2-next.2",
4
4
  "description": "Shared models and data types for attestation connectors and services.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,14 +14,15 @@
14
14
  "node": ">=24.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "^0.9.1",
18
- "@twin.org/data-core": "^0.9.1",
19
- "@twin.org/data-json-ld": "^0.9.1",
20
- "@twin.org/entity": "^0.9.1",
21
- "@twin.org/nameof": "^0.9.1",
22
- "@twin.org/standards-schema-org": "^0.9.1",
23
- "@twin.org/standards-w3c-did": "^0.9.1",
24
- "@twin.org/web": "^0.9.1"
17
+ "@twin.org/core": "next",
18
+ "@twin.org/data-core": "next",
19
+ "@twin.org/data-json-ld": "next",
20
+ "@twin.org/entity": "next",
21
+ "@twin.org/nameof": "next",
22
+ "@twin.org/standards-schema-org": "next",
23
+ "@twin.org/standards-w3c-did": "next",
24
+ "@twin.org/telemetry-models": "next",
25
+ "@twin.org/web": "next"
25
26
  },
26
27
  "main": "./dist/es/index.js",
27
28
  "types": "./dist/types/index.d.ts",