@twin.org/identity-models 0.0.3-next.25 → 0.0.3-next.26

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
@@ -47,6 +47,8 @@ export * from "./models/IIdentityProfileComponent.js";
47
47
  export * from "./models/IIdentityProfileConnector.js";
48
48
  export * from "./models/IIdentityResolverComponent.js";
49
49
  export * from "./models/IIdentityResolverConnector.js";
50
+ export * from "./models/identityMetricIds.js";
51
+ export * from "./models/identityMetrics.js";
50
52
  export * from "./types/did.js";
51
53
  export * from "./utils/documentHelper.js";
52
54
  export * from "./utils/verificationHelper.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,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC;AAChE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,wDAAwD,CAAC;AACvE,cAAc,qEAAqE,CAAC;AACpF,cAAc,sEAAsE,CAAC;AACrF,cAAc,qEAAqE,CAAC;AACpF,cAAc,uEAAuE,CAAC;AACtF,cAAc,6EAA6E,CAAC;AAC5F,cAAc,qEAAqE,CAAC;AACpF,cAAc,sEAAsE,CAAC;AACrF,cAAc,uEAAuE,CAAC;AACtF,cAAc,wEAAwE,CAAC;AACvF,cAAc,+EAA+E,CAAC;AAC9F,cAAc,uEAAuE,CAAC;AACtF,cAAc,wEAAwE,CAAC;AACvF,cAAc,mEAAmE,CAAC;AAClF,cAAc,oEAAoE,CAAC;AACnF,cAAc,mEAAmE,CAAC;AAClF,cAAc,uDAAuD,CAAC;AACtE,cAAc,0DAA0D,CAAC;AACzE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,kDAAkD,CAAC;AACjE,cAAc,mDAAmD,CAAC;AAClE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./contextIdHandlers/didContextIdHandler.js\";\nexport * from \"./factories/identityConnectorFactory.js\";\nexport * from \"./factories/identityProfileConnectorFactory.js\";\nexport * from \"./factories/identityResolverConnectorFactory.js\";\nexport * from \"./models/api/identity/IIdentityAlsoKnownAsCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityAlsoKnownAsRemoveRequest.js\";\nexport * from \"./models/api/identity/IIdentityCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityProofCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityProofCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityProofVerifyRequest.js\";\nexport * from \"./models/api/identity/IIdentityProofVerifyResponse.js\";\nexport * from \"./models/api/identity/IIdentityRemoveRequest.js\";\nexport * from \"./models/api/identity/IIdentityServiceCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityServiceCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityServiceRemoveRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialRevokeRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialUnrevokeRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialVerifyDocumentRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialVerifyRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialVerifyResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationVerifyDocumentRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationVerifyRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationVerifyResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerificationMethodCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerificationMethodCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerificationMethodRemoveRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileCreateRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileGetPublicRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileGetPublicResponse.js\";\nexport * from \"./models/api/profile/IIdentityProfileGetRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileGetResponse.js\";\nexport * from \"./models/api/profile/IIdentityProfileListRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileListResponse.js\";\nexport * from \"./models/api/profile/IIdentityProfileUpdateRequest.js\";\nexport * from \"./models/api/resolver/IIdentityResolveRequest.js\";\nexport * from \"./models/api/resolver/IIdentityResolveResponse.js\";\nexport * from \"./models/IIdentityComponent.js\";\nexport * from \"./models/IIdentityConnector.js\";\nexport * from \"./models/IIdentityProfileComponent.js\";\nexport * from \"./models/IIdentityProfileConnector.js\";\nexport * from \"./models/IIdentityResolverComponent.js\";\nexport * from \"./models/IIdentityResolverConnector.js\";\nexport * from \"./types/did.js\";\nexport * from \"./utils/documentHelper.js\";\nexport * from \"./utils/verificationHelper.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,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC;AAChE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC;AAChE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,wDAAwD,CAAC;AACvE,cAAc,qEAAqE,CAAC;AACpF,cAAc,sEAAsE,CAAC;AACrF,cAAc,qEAAqE,CAAC;AACpF,cAAc,uEAAuE,CAAC;AACtF,cAAc,6EAA6E,CAAC;AAC5F,cAAc,qEAAqE,CAAC;AACpF,cAAc,sEAAsE,CAAC;AACrF,cAAc,uEAAuE,CAAC;AACtF,cAAc,wEAAwE,CAAC;AACvF,cAAc,+EAA+E,CAAC;AAC9F,cAAc,uEAAuE,CAAC;AACtF,cAAc,wEAAwE,CAAC;AACvF,cAAc,mEAAmE,CAAC;AAClF,cAAc,oEAAoE,CAAC;AACnF,cAAc,mEAAmE,CAAC;AAClF,cAAc,uDAAuD,CAAC;AACtE,cAAc,0DAA0D,CAAC;AACzE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,kDAAkD,CAAC;AACjE,cAAc,mDAAmD,CAAC;AAClE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./contextIdHandlers/didContextIdHandler.js\";\nexport * from \"./factories/identityConnectorFactory.js\";\nexport * from \"./factories/identityProfileConnectorFactory.js\";\nexport * from \"./factories/identityResolverConnectorFactory.js\";\nexport * from \"./models/api/identity/IIdentityAlsoKnownAsCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityAlsoKnownAsRemoveRequest.js\";\nexport * from \"./models/api/identity/IIdentityCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityProofCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityProofCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityProofVerifyRequest.js\";\nexport * from \"./models/api/identity/IIdentityProofVerifyResponse.js\";\nexport * from \"./models/api/identity/IIdentityRemoveRequest.js\";\nexport * from \"./models/api/identity/IIdentityServiceCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityServiceCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityServiceRemoveRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialRevokeRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialUnrevokeRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialVerifyDocumentRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialVerifyRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiableCredentialVerifyResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationVerifyDocumentRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationVerifyRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerifiablePresentationVerifyResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerificationMethodCreateRequest.js\";\nexport * from \"./models/api/identity/IIdentityVerificationMethodCreateResponse.js\";\nexport * from \"./models/api/identity/IIdentityVerificationMethodRemoveRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileCreateRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileGetPublicRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileGetPublicResponse.js\";\nexport * from \"./models/api/profile/IIdentityProfileGetRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileGetResponse.js\";\nexport * from \"./models/api/profile/IIdentityProfileListRequest.js\";\nexport * from \"./models/api/profile/IIdentityProfileListResponse.js\";\nexport * from \"./models/api/profile/IIdentityProfileUpdateRequest.js\";\nexport * from \"./models/api/resolver/IIdentityResolveRequest.js\";\nexport * from \"./models/api/resolver/IIdentityResolveResponse.js\";\nexport * from \"./models/IIdentityComponent.js\";\nexport * from \"./models/IIdentityConnector.js\";\nexport * from \"./models/IIdentityProfileComponent.js\";\nexport * from \"./models/IIdentityProfileConnector.js\";\nexport * from \"./models/IIdentityResolverComponent.js\";\nexport * from \"./models/IIdentityResolverConnector.js\";\nexport * from \"./models/identityMetricIds.js\";\nexport * from \"./models/identityMetrics.js\";\nexport * from \"./types/did.js\";\nexport * from \"./utils/documentHelper.js\";\nexport * from \"./utils/verificationHelper.js\";\n"]}
@@ -0,0 +1,49 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ /**
4
+ * Metric IDs for the identity service.
5
+ */
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention
7
+ export const IdentityMetricIds = {
8
+ /**
9
+ * Number of DIDs created.
10
+ */
11
+ DidsCreated: "identity_dids_created",
12
+ /**
13
+ * Number of DIDs removed.
14
+ */
15
+ DidsRemoved: "identity_dids_removed",
16
+ /**
17
+ * Number of verifiable credentials created.
18
+ */
19
+ VcsCreated: "identity_vcs_created",
20
+ /**
21
+ * Number of VC verifications succeeded.
22
+ */
23
+ VcsVerified: "identity_vcs_verified",
24
+ /**
25
+ * Number of VC verifications failed.
26
+ */
27
+ VcsVerificationFailed: "identity_vcs_verification_failed",
28
+ /**
29
+ * Number of VCs revoked.
30
+ */
31
+ VcsRevoked: "identity_vcs_revoked",
32
+ /**
33
+ * Number of VCs unrevoked.
34
+ */
35
+ VcsUnrevoked: "identity_vcs_unrevoked",
36
+ /**
37
+ * Number of verifiable presentations created.
38
+ */
39
+ VpsCreated: "identity_vps_created",
40
+ /**
41
+ * Number of VP verifications succeeded.
42
+ */
43
+ VpsVerified: "identity_vps_verified",
44
+ /**
45
+ * Number of VP verifications failed.
46
+ */
47
+ VpsVerificationFailed: "identity_vps_verification_failed"
48
+ };
49
+ //# sourceMappingURL=identityMetricIds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identityMetricIds.js","sourceRoot":"","sources":["../../../src/models/identityMetricIds.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC;;OAEG;IACH,WAAW,EAAE,uBAAuB;IAEpC;;OAEG;IACH,WAAW,EAAE,uBAAuB;IAEpC;;OAEG;IACH,UAAU,EAAE,sBAAsB;IAElC;;OAEG;IACH,WAAW,EAAE,uBAAuB;IAEpC;;OAEG;IACH,qBAAqB,EAAE,kCAAkC;IAEzD;;OAEG;IACH,UAAU,EAAE,sBAAsB;IAElC;;OAEG;IACH,YAAY,EAAE,wBAAwB;IAEtC;;OAEG;IACH,UAAU,EAAE,sBAAsB;IAElC;;OAEG;IACH,WAAW,EAAE,uBAAuB;IAEpC;;OAEG;IACH,qBAAqB,EAAE,kCAAkC;CAChD,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Metric IDs for the identity service.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const IdentityMetricIds = {\n\t/**\n\t * Number of DIDs created.\n\t */\n\tDidsCreated: \"identity_dids_created\",\n\n\t/**\n\t * Number of DIDs removed.\n\t */\n\tDidsRemoved: \"identity_dids_removed\",\n\n\t/**\n\t * Number of verifiable credentials created.\n\t */\n\tVcsCreated: \"identity_vcs_created\",\n\n\t/**\n\t * Number of VC verifications succeeded.\n\t */\n\tVcsVerified: \"identity_vcs_verified\",\n\n\t/**\n\t * Number of VC verifications failed.\n\t */\n\tVcsVerificationFailed: \"identity_vcs_verification_failed\",\n\n\t/**\n\t * Number of VCs revoked.\n\t */\n\tVcsRevoked: \"identity_vcs_revoked\",\n\n\t/**\n\t * Number of VCs unrevoked.\n\t */\n\tVcsUnrevoked: \"identity_vcs_unrevoked\",\n\n\t/**\n\t * Number of verifiable presentations created.\n\t */\n\tVpsCreated: \"identity_vps_created\",\n\n\t/**\n\t * Number of VP verifications succeeded.\n\t */\n\tVpsVerified: \"identity_vps_verified\",\n\n\t/**\n\t * Number of VP verifications failed.\n\t */\n\tVpsVerificationFailed: \"identity_vps_verification_failed\"\n} as const;\n\n/**\n * Metric IDs for the identity service.\n */\nexport type IdentityMetricIds = (typeof IdentityMetricIds)[keyof typeof IdentityMetricIds];\n"]}
@@ -0,0 +1,61 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { MetricType } from "@twin.org/telemetry-models";
4
+ import { IdentityMetricIds } from "./identityMetricIds.js";
5
+ /**
6
+ * Metrics registered by the identity service.
7
+ */
8
+ // eslint-disable-next-line @typescript-eslint/naming-convention
9
+ export const IdentityMetrics = [
10
+ {
11
+ id: IdentityMetricIds.DidsCreated,
12
+ label: "DIDs created",
13
+ type: MetricType.Counter
14
+ },
15
+ {
16
+ id: IdentityMetricIds.DidsRemoved,
17
+ label: "DIDs removed",
18
+ type: MetricType.Counter
19
+ },
20
+ {
21
+ id: IdentityMetricIds.VcsCreated,
22
+ label: "VCs created",
23
+ type: MetricType.Counter
24
+ },
25
+ {
26
+ id: IdentityMetricIds.VcsVerified,
27
+ label: "VC verifications succeeded",
28
+ type: MetricType.Counter
29
+ },
30
+ {
31
+ id: IdentityMetricIds.VcsVerificationFailed,
32
+ label: "VC verifications failed",
33
+ type: MetricType.Counter
34
+ },
35
+ {
36
+ id: IdentityMetricIds.VcsRevoked,
37
+ label: "VCs revoked",
38
+ type: MetricType.Counter
39
+ },
40
+ {
41
+ id: IdentityMetricIds.VcsUnrevoked,
42
+ label: "VCs unrevoked",
43
+ type: MetricType.Counter
44
+ },
45
+ {
46
+ id: IdentityMetricIds.VpsCreated,
47
+ label: "VPs created",
48
+ type: MetricType.Counter
49
+ },
50
+ {
51
+ id: IdentityMetricIds.VpsVerified,
52
+ label: "VP verifications succeeded",
53
+ type: MetricType.Counter
54
+ },
55
+ {
56
+ id: IdentityMetricIds.VpsVerificationFailed,
57
+ label: "VP verifications failed",
58
+ type: MetricType.Counter
59
+ }
60
+ ];
61
+ //# sourceMappingURL=identityMetrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identityMetrics.js","sourceRoot":"","sources":["../../../src/models/identityMetrics.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAyB,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,eAAe,GAAuB;IAClD;QACC,EAAE,EAAE,iBAAiB,CAAC,WAAW;QACjC,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,WAAW;QACjC,KAAK,EAAE,cAAc;QACrB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,UAAU;QAChC,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,WAAW;QACjC,KAAK,EAAE,4BAA4B;QACnC,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,qBAAqB;QAC3C,KAAK,EAAE,yBAAyB;QAChC,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,UAAU;QAChC,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,YAAY;QAClC,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,UAAU;QAChC,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,WAAW;QACjC,KAAK,EAAE,4BAA4B;QACnC,IAAI,EAAE,UAAU,CAAC,OAAO;KACxB;IACD;QACC,EAAE,EAAE,iBAAiB,CAAC,qBAAqB;QAC3C,KAAK,EAAE,yBAAyB;QAChC,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 { IdentityMetricIds } from \"./identityMetricIds.js\";\n\n/**\n * Metrics registered by the identity service.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const IdentityMetrics: ITelemetryMetric[] = [\n\t{\n\t\tid: IdentityMetricIds.DidsCreated,\n\t\tlabel: \"DIDs created\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.DidsRemoved,\n\t\tlabel: \"DIDs removed\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.VcsCreated,\n\t\tlabel: \"VCs created\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.VcsVerified,\n\t\tlabel: \"VC verifications succeeded\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.VcsVerificationFailed,\n\t\tlabel: \"VC verifications failed\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.VcsRevoked,\n\t\tlabel: \"VCs revoked\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.VcsUnrevoked,\n\t\tlabel: \"VCs unrevoked\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.VpsCreated,\n\t\tlabel: \"VPs created\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.VpsVerified,\n\t\tlabel: \"VP verifications succeeded\",\n\t\ttype: MetricType.Counter\n\t},\n\t{\n\t\tid: IdentityMetricIds.VpsVerificationFailed,\n\t\tlabel: \"VP verifications failed\",\n\t\ttype: MetricType.Counter\n\t}\n];\n"]}
@@ -45,6 +45,8 @@ export * from "./models/IIdentityProfileComponent.js";
45
45
  export * from "./models/IIdentityProfileConnector.js";
46
46
  export * from "./models/IIdentityResolverComponent.js";
47
47
  export * from "./models/IIdentityResolverConnector.js";
48
+ export * from "./models/identityMetricIds.js";
49
+ export * from "./models/identityMetrics.js";
48
50
  export * from "./types/did.js";
49
51
  export * from "./utils/documentHelper.js";
50
52
  export * from "./utils/verificationHelper.js";
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Metric IDs for the identity service.
3
+ */
4
+ export declare const IdentityMetricIds: {
5
+ /**
6
+ * Number of DIDs created.
7
+ */
8
+ readonly DidsCreated: "identity_dids_created";
9
+ /**
10
+ * Number of DIDs removed.
11
+ */
12
+ readonly DidsRemoved: "identity_dids_removed";
13
+ /**
14
+ * Number of verifiable credentials created.
15
+ */
16
+ readonly VcsCreated: "identity_vcs_created";
17
+ /**
18
+ * Number of VC verifications succeeded.
19
+ */
20
+ readonly VcsVerified: "identity_vcs_verified";
21
+ /**
22
+ * Number of VC verifications failed.
23
+ */
24
+ readonly VcsVerificationFailed: "identity_vcs_verification_failed";
25
+ /**
26
+ * Number of VCs revoked.
27
+ */
28
+ readonly VcsRevoked: "identity_vcs_revoked";
29
+ /**
30
+ * Number of VCs unrevoked.
31
+ */
32
+ readonly VcsUnrevoked: "identity_vcs_unrevoked";
33
+ /**
34
+ * Number of verifiable presentations created.
35
+ */
36
+ readonly VpsCreated: "identity_vps_created";
37
+ /**
38
+ * Number of VP verifications succeeded.
39
+ */
40
+ readonly VpsVerified: "identity_vps_verified";
41
+ /**
42
+ * Number of VP verifications failed.
43
+ */
44
+ readonly VpsVerificationFailed: "identity_vps_verification_failed";
45
+ };
46
+ /**
47
+ * Metric IDs for the identity service.
48
+ */
49
+ export type IdentityMetricIds = (typeof IdentityMetricIds)[keyof typeof IdentityMetricIds];
@@ -0,0 +1,5 @@
1
+ import { type ITelemetryMetric } from "@twin.org/telemetry-models";
2
+ /**
3
+ * Metrics registered by the identity service.
4
+ */
5
+ export declare const IdentityMetrics: ITelemetryMetric[];
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.26](https://github.com/iotaledger/twin-identity/compare/identity-models-v0.0.3-next.25...identity-models-v0.0.3-next.26) (2026-05-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * add telemetry metrics ([#132](https://github.com/iotaledger/twin-identity/issues/132)) ([b51cd78](https://github.com/iotaledger/twin-identity/commit/b51cd7816905fd55e250035daf1b8f2047cba83d))
9
+
3
10
  ## [0.0.3-next.25](https://github.com/iotaledger/twin-identity/compare/identity-models-v0.0.3-next.24...identity-models-v0.0.3-next.25) (2026-05-20)
4
11
 
5
12
 
@@ -53,8 +53,14 @@
53
53
  - [IIdentityResolveRequest](interfaces/IIdentityResolveRequest.md)
54
54
  - [IIdentityResolveResponse](interfaces/IIdentityResolveResponse.md)
55
55
 
56
+ ## Type Aliases
57
+
58
+ - [IdentityMetricIds](type-aliases/IdentityMetricIds.md)
59
+
56
60
  ## Variables
57
61
 
58
62
  - [IdentityConnectorFactory](variables/IdentityConnectorFactory.md)
59
63
  - [IdentityProfileConnectorFactory](variables/IdentityProfileConnectorFactory.md)
60
64
  - [IdentityResolverConnectorFactory](variables/IdentityResolverConnectorFactory.md)
65
+ - [IdentityMetricIds](variables/IdentityMetricIds.md)
66
+ - [IdentityMetrics](variables/IdentityMetrics.md)
@@ -0,0 +1,5 @@
1
+ # Type Alias: IdentityMetricIds
2
+
3
+ > **IdentityMetricIds** = *typeof* [`IdentityMetricIds`](../variables/IdentityMetricIds.md)\[keyof *typeof* [`IdentityMetricIds`](../variables/IdentityMetricIds.md)\]
4
+
5
+ Metric IDs for the identity service.
@@ -0,0 +1,67 @@
1
+ # Variable: IdentityMetricIds
2
+
3
+ > `const` **IdentityMetricIds**: `object`
4
+
5
+ Metric IDs for the identity service.
6
+
7
+ ## Type Declaration
8
+
9
+ ### DidsCreated {#didscreated}
10
+
11
+ > `readonly` **DidsCreated**: `"identity_dids_created"` = `"identity_dids_created"`
12
+
13
+ Number of DIDs created.
14
+
15
+ ### DidsRemoved {#didsremoved}
16
+
17
+ > `readonly` **DidsRemoved**: `"identity_dids_removed"` = `"identity_dids_removed"`
18
+
19
+ Number of DIDs removed.
20
+
21
+ ### VcsCreated {#vcscreated}
22
+
23
+ > `readonly` **VcsCreated**: `"identity_vcs_created"` = `"identity_vcs_created"`
24
+
25
+ Number of verifiable credentials created.
26
+
27
+ ### VcsVerified {#vcsverified}
28
+
29
+ > `readonly` **VcsVerified**: `"identity_vcs_verified"` = `"identity_vcs_verified"`
30
+
31
+ Number of VC verifications succeeded.
32
+
33
+ ### VcsVerificationFailed {#vcsverificationfailed}
34
+
35
+ > `readonly` **VcsVerificationFailed**: `"identity_vcs_verification_failed"` = `"identity_vcs_verification_failed"`
36
+
37
+ Number of VC verifications failed.
38
+
39
+ ### VcsRevoked {#vcsrevoked}
40
+
41
+ > `readonly` **VcsRevoked**: `"identity_vcs_revoked"` = `"identity_vcs_revoked"`
42
+
43
+ Number of VCs revoked.
44
+
45
+ ### VcsUnrevoked {#vcsunrevoked}
46
+
47
+ > `readonly` **VcsUnrevoked**: `"identity_vcs_unrevoked"` = `"identity_vcs_unrevoked"`
48
+
49
+ Number of VCs unrevoked.
50
+
51
+ ### VpsCreated {#vpscreated}
52
+
53
+ > `readonly` **VpsCreated**: `"identity_vps_created"` = `"identity_vps_created"`
54
+
55
+ Number of verifiable presentations created.
56
+
57
+ ### VpsVerified {#vpsverified}
58
+
59
+ > `readonly` **VpsVerified**: `"identity_vps_verified"` = `"identity_vps_verified"`
60
+
61
+ Number of VP verifications succeeded.
62
+
63
+ ### VpsVerificationFailed {#vpsverificationfailed}
64
+
65
+ > `readonly` **VpsVerificationFailed**: `"identity_vps_verification_failed"` = `"identity_vps_verification_failed"`
66
+
67
+ Number of VP verifications failed.
@@ -0,0 +1,5 @@
1
+ # Variable: IdentityMetrics
2
+
3
+ > `const` **IdentityMetrics**: `ITelemetryMetric`[]
4
+
5
+ Metrics registered by the identity service.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/identity-models",
3
- "version": "0.0.3-next.25",
3
+ "version": "0.0.3-next.26",
4
4
  "description": "Shared identity models and contracts for consistent data structures across services, connectors, and clients.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,6 +20,7 @@
20
20
  "@twin.org/data-json-ld": "next",
21
21
  "@twin.org/entity": "next",
22
22
  "@twin.org/standards-w3c-did": "next",
23
+ "@twin.org/telemetry-models": "next",
23
24
  "@twin.org/web": "next"
24
25
  },
25
26
  "main": "./dist/es/index.js",