@twin.org/identity-connector-entity-storage 0.9.2 → 0.9.3-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.
Files changed (32) hide show
  1. package/dist/es/entityStorageIdentityConnector.js +207 -139
  2. package/dist/es/entityStorageIdentityConnector.js.map +1 -1
  3. package/dist/es/entityStorageIdentityProfileConnector.js +1 -1
  4. package/dist/es/entityStorageIdentityProfileConnector.js.map +1 -1
  5. package/dist/es/entityStorageIdentityResolverConnector.js +59 -2
  6. package/dist/es/entityStorageIdentityResolverConnector.js.map +1 -1
  7. package/dist/es/index.js +2 -0
  8. package/dist/es/index.js.map +1 -1
  9. package/dist/es/models/IEntityStorageIdentityConnectorConfig.js +4 -0
  10. package/dist/es/models/IEntityStorageIdentityConnectorConfig.js.map +1 -0
  11. package/dist/es/models/IEntityStorageIdentityConnectorConstructorOptions.js.map +1 -1
  12. package/dist/es/models/IEntityStorageIdentityResolverConnectorConfig.js +4 -0
  13. package/dist/es/models/IEntityStorageIdentityResolverConnectorConfig.js.map +1 -0
  14. package/dist/es/models/IEntityStorageIdentityResolverConnectorConstructorOptions.js +0 -2
  15. package/dist/es/models/IEntityStorageIdentityResolverConnectorConstructorOptions.js.map +1 -1
  16. package/dist/types/entityStorageIdentityConnector.d.ts +11 -1
  17. package/dist/types/entityStorageIdentityResolverConnector.d.ts +9 -1
  18. package/dist/types/index.d.ts +2 -0
  19. package/dist/types/models/IEntityStorageIdentityConnectorConfig.d.ts +26 -0
  20. package/dist/types/models/IEntityStorageIdentityConnectorConstructorOptions.d.ts +5 -0
  21. package/dist/types/models/IEntityStorageIdentityResolverConnectorConfig.d.ts +23 -0
  22. package/dist/types/models/IEntityStorageIdentityResolverConnectorConstructorOptions.d.ts +5 -0
  23. package/docs/changelog.md +69 -0
  24. package/docs/reference/classes/EntityStorageIdentityConnector.md +36 -1
  25. package/docs/reference/classes/EntityStorageIdentityResolverConnector.md +29 -1
  26. package/docs/reference/index.md +2 -0
  27. package/docs/reference/interfaces/IEntityStorageIdentityConnectorConfig.md +46 -0
  28. package/docs/reference/interfaces/IEntityStorageIdentityConnectorConstructorOptions.md +12 -0
  29. package/docs/reference/interfaces/IEntityStorageIdentityResolverConnectorConfig.md +43 -0
  30. package/docs/reference/interfaces/IEntityStorageIdentityResolverConnectorConstructorOptions.md +8 -0
  31. package/locales/en.json +1 -0
  32. package/package.json +11 -11
@@ -0,0 +1,46 @@
1
+ # Interface: IEntityStorageIdentityConnectorConfig
2
+
3
+ Configuration for the Entity Storage Identity Connector.
4
+
5
+ ## Properties
6
+
7
+ ### didResolutionCacheTtlMs? {#didresolutioncachettlms}
8
+
9
+ > `optional` **didResolutionCacheTtlMs?**: `number`
10
+
11
+ TTL in ms for caching DID documents resolved for the connector's own sign/mutate
12
+ operations (create/update/revoke on an identity this connector controls). 0 disables
13
+ caching. Does not affect proof or credential verification of third-party claims, which
14
+ is never cached by this connector. Refreshed by every mutation made through this
15
+ connector instance; a mutation made through a different instance or out-of-band is not
16
+ observed until the entry's TTL expires.
17
+
18
+ #### Default
19
+
20
+ ```ts
21
+ 30000
22
+ ```
23
+
24
+ ***
25
+
26
+ ### didResolutionCacheCapacity? {#didresolutioncachecapacity}
27
+
28
+ > `optional` **didResolutionCacheCapacity?**: `number`
29
+
30
+ Maximum number of DID documents kept in the own-DID resolution cache.
31
+ Only used when didResolutionCacheTtlMs > 0.
32
+
33
+ #### Default
34
+
35
+ ```ts
36
+ 1000
37
+ ```
38
+
39
+ ***
40
+
41
+ ### didResolutionCacheMutexTimeoutMs? {#didresolutioncachemutextimeoutms}
42
+
43
+ > `optional` **didResolutionCacheMutexTimeoutMs?**: `number`
44
+
45
+ Maximum time in milliseconds to wait for own-DID cache getOrSet mutex acquisition.
46
+ Only used when didResolutionCacheTtlMs > 0.
@@ -8,6 +8,18 @@ Options for the entity storage identity connector constructor.
8
8
 
9
9
  ## Properties
10
10
 
11
+ ### config? {#config}
12
+
13
+ > `optional` **config?**: [`IEntityStorageIdentityConnectorConfig`](IEntityStorageIdentityConnectorConfig.md)
14
+
15
+ Configuration for the connector.
16
+
17
+ #### Overrides
18
+
19
+ [`IEntityStorageIdentityResolverConnectorConstructorOptions`](IEntityStorageIdentityResolverConnectorConstructorOptions.md).[`config`](IEntityStorageIdentityResolverConnectorConstructorOptions.md#config)
20
+
21
+ ***
22
+
11
23
  ### didDocumentEntityStorageType? {#diddocumententitystoragetype}
12
24
 
13
25
  > `optional` **didDocumentEntityStorageType?**: `string`
@@ -0,0 +1,43 @@
1
+ # Interface: IEntityStorageIdentityResolverConnectorConfig
2
+
3
+ Configuration for the Entity Storage Identity Resolver Connector.
4
+
5
+ ## Properties
6
+
7
+ ### didResolutionCacheTtlMs? {#didresolutioncachettlms}
8
+
9
+ > `optional` **didResolutionCacheTtlMs?**: `number`
10
+
11
+ TTL in ms for caching resolved DID documents. 0 disables caching. As the documents
12
+ resolved here can belong to third parties, a non-zero TTL means changes made to a
13
+ document in storage, including revocation, are only observed once the entry expires.
14
+
15
+ #### Default
16
+
17
+ ```ts
18
+ 30000
19
+ ```
20
+
21
+ ***
22
+
23
+ ### didResolutionCacheCapacity? {#didresolutioncachecapacity}
24
+
25
+ > `optional` **didResolutionCacheCapacity?**: `number`
26
+
27
+ Maximum number of DID documents kept in the resolution cache.
28
+ Only used when didResolutionCacheTtlMs > 0.
29
+
30
+ #### Default
31
+
32
+ ```ts
33
+ 1000
34
+ ```
35
+
36
+ ***
37
+
38
+ ### didResolutionCacheMutexTimeoutMs? {#didresolutioncachemutextimeoutms}
39
+
40
+ > `optional` **didResolutionCacheMutexTimeoutMs?**: `number`
41
+
42
+ Maximum time in milliseconds to wait for resolution cache getOrSet mutex acquisition.
43
+ Only used when didResolutionCacheTtlMs > 0.
@@ -8,6 +8,14 @@ Options for the entity storage identity connector constructor.
8
8
 
9
9
  ## Properties
10
10
 
11
+ ### config? {#config}
12
+
13
+ > `optional` **config?**: [`IEntityStorageIdentityResolverConnectorConfig`](IEntityStorageIdentityResolverConnectorConfig.md)
14
+
15
+ Configuration for the connector.
16
+
17
+ ***
18
+
11
19
  ### didDocumentEntityStorageType? {#diddocumententitystoragetype}
12
20
 
13
21
  > `optional` **didDocumentEntityStorageType?**: `string`
package/locales/en.json CHANGED
@@ -17,6 +17,7 @@
17
17
  "createVerifiablePresentationFailed": "Creating the verifiable presentation failed",
18
18
  "documentNotFound": "The document could not be found \"{notFoundId}\"",
19
19
  "invalidAlias": "The alias is invalid it must be a Url or Urn, it is \"{alias}\"",
20
+ "issuerMismatch": "The credential issuer \"{issuer}\" does not match the DID of the proof verification method \"{method}\"",
20
21
  "jwkSignatureFailed": "The signature on the JWK failed verification",
21
22
  "methodMissing": "The verification method specified does not exist \"{method}\"",
22
23
  "missingDid": "The full id including DID is required",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/identity-connector-entity-storage",
3
- "version": "0.9.2",
3
+ "version": "0.9.3-next.2",
4
4
  "description": "Entity storage connector for persisting and retrieving identity records through a consistent data layer.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,16 +14,16 @@
14
14
  "node": ">=24.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "^0.9.2",
18
- "@twin.org/data-core": "^0.9.2",
19
- "@twin.org/data-json-ld": "^0.9.2",
20
- "@twin.org/entity": "^0.9.2",
21
- "@twin.org/entity-storage-models": "^0.9.2",
22
- "@twin.org/identity-models": "^0.9.2",
23
- "@twin.org/nameof": "^0.9.2",
24
- "@twin.org/standards-w3c-did": "^0.9.2",
25
- "@twin.org/vault-models": "^0.9.2",
26
- "@twin.org/web": "^0.9.2"
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/entity-storage-models": "next",
22
+ "@twin.org/identity-models": "0.9.3-next.2",
23
+ "@twin.org/nameof": "next",
24
+ "@twin.org/standards-w3c-did": "next",
25
+ "@twin.org/vault-models": "next",
26
+ "@twin.org/web": "next"
27
27
  },
28
28
  "main": "./dist/es/index.js",
29
29
  "types": "./dist/types/index.d.ts",