@twin.org/engine-types 0.0.3-next.45 → 0.0.3-next.47

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 (88) hide show
  1. package/dist/es/components/dataspaceDataPlane.js +1 -1
  2. package/dist/es/components/dataspaceDataPlane.js.map +1 -1
  3. package/dist/es/components/entityStorage.js +0 -18
  4. package/dist/es/components/entityStorage.js.map +1 -1
  5. package/dist/es/components/federatedCatalogue.js +2 -1
  6. package/dist/es/components/federatedCatalogue.js.map +1 -1
  7. package/dist/es/components/logging.js +6 -2
  8. package/dist/es/components/logging.js.map +1 -1
  9. package/dist/es/components/metricsCollector.js +3 -1
  10. package/dist/es/components/metricsCollector.js.map +1 -1
  11. package/dist/es/components/rightsManagementPnap.js +1 -1
  12. package/dist/es/components/rightsManagementPnap.js.map +1 -1
  13. package/dist/es/components/telemetry.js +4 -1
  14. package/dist/es/components/telemetry.js.map +1 -1
  15. package/dist/es/components/tenant.js +26 -1
  16. package/dist/es/components/tenant.js.map +1 -1
  17. package/dist/es/components/trustVerifier.js +6 -3
  18. package/dist/es/components/trustVerifier.js.map +1 -1
  19. package/dist/es/index.js +2 -8
  20. package/dist/es/index.js.map +1 -1
  21. package/dist/es/models/IEngineConfig.js.map +1 -1
  22. package/dist/es/models/config/entityStorageConnectorConfig.js.map +1 -1
  23. package/dist/es/models/config/tenantComponentConfig.js +2 -0
  24. package/dist/es/models/config/tenantComponentConfig.js.map +1 -0
  25. package/dist/es/models/config/trustVerifierComponentConfig.js.map +1 -1
  26. package/dist/es/models/types/entityStorageConnectorType.js +1 -5
  27. package/dist/es/models/types/entityStorageConnectorType.js.map +1 -1
  28. package/dist/es/models/types/tenantComponentType.js +13 -0
  29. package/dist/es/models/types/tenantComponentType.js.map +1 -0
  30. package/dist/es/models/types/trustVerifierComponentType.js +5 -1
  31. package/dist/es/models/types/trustVerifierComponentType.js.map +1 -1
  32. package/dist/types/components/tenant.d.ts +9 -0
  33. package/dist/types/index.d.ts +2 -8
  34. package/dist/types/models/IEngineConfig.d.ts +5 -15
  35. package/dist/types/models/config/entityStorageConnectorConfig.d.ts +0 -4
  36. package/dist/types/models/config/tenantComponentConfig.d.ts +9 -0
  37. package/dist/types/models/config/trustVerifierComponentConfig.d.ts +4 -1
  38. package/dist/types/models/types/entityStorageConnectorType.d.ts +0 -4
  39. package/dist/types/models/types/tenantComponentType.d.ts +13 -0
  40. package/dist/types/models/types/trustVerifierComponentType.d.ts +4 -0
  41. package/docs/changelog.md +30 -0
  42. package/docs/reference/functions/initialiseTenantComponent.md +31 -0
  43. package/docs/reference/index.md +4 -12
  44. package/docs/reference/interfaces/IEngineConfig.md +6 -18
  45. package/docs/reference/type-aliases/EntityStorageConnectorConfig.md +1 -1
  46. package/docs/reference/type-aliases/TenantComponentConfig.md +17 -0
  47. package/docs/reference/type-aliases/TenantComponentType.md +5 -0
  48. package/docs/reference/type-aliases/TrustVerifierComponentConfig.md +1 -13
  49. package/docs/reference/variables/EntityStorageConnectorType.md +0 -6
  50. package/docs/reference/variables/TenantComponentType.md +13 -0
  51. package/docs/reference/variables/TrustVerifierComponentType.md +6 -0
  52. package/package.json +3 -12
  53. package/dist/es/components/synchronisedStorage.js +0 -49
  54. package/dist/es/components/synchronisedStorage.js.map +0 -1
  55. package/dist/es/components/verifiableStorage.js +0 -77
  56. package/dist/es/components/verifiableStorage.js.map +0 -1
  57. package/dist/es/models/config/synchronisedStorageComponentConfig.js +0 -2
  58. package/dist/es/models/config/synchronisedStorageComponentConfig.js.map +0 -1
  59. package/dist/es/models/config/verifiableStorageComponentConfig.js +0 -2
  60. package/dist/es/models/config/verifiableStorageComponentConfig.js.map +0 -1
  61. package/dist/es/models/config/verifiableStorageConnectorConfig.js +0 -2
  62. package/dist/es/models/config/verifiableStorageConnectorConfig.js.map +0 -1
  63. package/dist/es/models/types/synchronisedStorageComponentType.js +0 -17
  64. package/dist/es/models/types/synchronisedStorageComponentType.js.map +0 -1
  65. package/dist/es/models/types/verifiableStorageComponentType.js +0 -17
  66. package/dist/es/models/types/verifiableStorageComponentType.js.map +0 -1
  67. package/dist/es/models/types/verifiableStorageConnectorType.js +0 -17
  68. package/dist/es/models/types/verifiableStorageConnectorType.js.map +0 -1
  69. package/dist/types/components/synchronisedStorage.d.ts +0 -12
  70. package/dist/types/components/verifiableStorage.d.ts +0 -22
  71. package/dist/types/models/config/synchronisedStorageComponentConfig.d.ts +0 -13
  72. package/dist/types/models/config/verifiableStorageComponentConfig.d.ts +0 -13
  73. package/dist/types/models/config/verifiableStorageConnectorConfig.d.ts +0 -13
  74. package/dist/types/models/types/synchronisedStorageComponentType.d.ts +0 -17
  75. package/dist/types/models/types/verifiableStorageComponentType.d.ts +0 -17
  76. package/dist/types/models/types/verifiableStorageConnectorType.d.ts +0 -17
  77. package/docs/reference/functions/initialiseSynchronisedStorageComponent.md +0 -31
  78. package/docs/reference/functions/initialiseVerifiableStorageComponent.md +0 -31
  79. package/docs/reference/functions/initialiseVerifiableStorageConnector.md +0 -31
  80. package/docs/reference/type-aliases/IVerifiableStorageComponentType.md +0 -5
  81. package/docs/reference/type-aliases/SynchronisedStorageComponentConfig.md +0 -5
  82. package/docs/reference/type-aliases/SynchronisedStorageComponentType.md +0 -5
  83. package/docs/reference/type-aliases/VerifiableStorageComponentConfig.md +0 -5
  84. package/docs/reference/type-aliases/VerifiableStorageConnectorConfig.md +0 -5
  85. package/docs/reference/type-aliases/VerifiableStorageConnectorType.md +0 -5
  86. package/docs/reference/variables/SynchronisedStorageComponentType.md +0 -19
  87. package/docs/reference/variables/VerifiableStorageComponentType.md +0 -19
  88. package/docs/reference/variables/VerifiableStorageConnectorType.md +0 -19
@@ -0,0 +1,31 @@
1
+ # Function: initialiseTenantComponent()
2
+
3
+ > **initialiseTenantComponent**(`engineCore`, `context`, `instanceConfig`): `EngineTypeInitialiserReturn`\<[`TenantComponentConfig`](../type-aliases/TenantComponentConfig.md), `Factory`\<`IComponent`\>\>
4
+
5
+ Initialise the tenant component.
6
+
7
+ ## Parameters
8
+
9
+ ### engineCore
10
+
11
+ `IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
12
+
13
+ The engine core.
14
+
15
+ ### context
16
+
17
+ `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
18
+
19
+ The context for the engine.
20
+
21
+ ### instanceConfig
22
+
23
+ [`TenantComponentConfig`](../type-aliases/TenantComponentConfig.md)
24
+
25
+ The instance config.
26
+
27
+ ## Returns
28
+
29
+ `EngineTypeInitialiserReturn`\<[`TenantComponentConfig`](../type-aliases/TenantComponentConfig.md), `Factory`\<`IComponent`\>\>
30
+
31
+ The instance created and the factory for it.
@@ -70,18 +70,16 @@
70
70
  - [RightsManagementPolicyObligationEnforcerComponentConfig](type-aliases/RightsManagementPolicyObligationEnforcerComponentConfig.md)
71
71
  - [RightsManagementPolicyRequesterComponentConfig](type-aliases/RightsManagementPolicyRequesterComponentConfig.md)
72
72
  - [RightsManagementPxpComponentConfig](type-aliases/RightsManagementPxpComponentConfig.md)
73
- - [SynchronisedStorageComponentConfig](type-aliases/SynchronisedStorageComponentConfig.md)
74
73
  - [TaskSchedulerComponentConfig](type-aliases/TaskSchedulerComponentConfig.md)
75
74
  - [TelemetryComponentConfig](type-aliases/TelemetryComponentConfig.md)
76
75
  - [TelemetryConnectorConfig](type-aliases/TelemetryConnectorConfig.md)
77
76
  - [TenantAdminComponentConfig](type-aliases/TenantAdminComponentConfig.md)
77
+ - [TenantComponentConfig](type-aliases/TenantComponentConfig.md)
78
78
  - [TrustComponentConfig](type-aliases/TrustComponentConfig.md)
79
79
  - [TrustGeneratorComponentConfig](type-aliases/TrustGeneratorComponentConfig.md)
80
80
  - [TrustVerifierComponentConfig](type-aliases/TrustVerifierComponentConfig.md)
81
81
  - [UrlTransformerComponentConfig](type-aliases/UrlTransformerComponentConfig.md)
82
82
  - [VaultConnectorConfig](type-aliases/VaultConnectorConfig.md)
83
- - [VerifiableStorageComponentConfig](type-aliases/VerifiableStorageComponentConfig.md)
84
- - [VerifiableStorageConnectorConfig](type-aliases/VerifiableStorageConnectorConfig.md)
85
83
  - [WalletConnectorConfig](type-aliases/WalletConnectorConfig.md)
86
84
  - [AttestationComponentType](type-aliases/AttestationComponentType.md)
87
85
  - [AttestationConnectorType](type-aliases/AttestationConnectorType.md)
@@ -143,18 +141,16 @@
143
141
  - [RightsManagementPolicyObligationEnforcerComponentType](type-aliases/RightsManagementPolicyObligationEnforcerComponentType.md)
144
142
  - [RightsManagementPolicyRequesterComponentType](type-aliases/RightsManagementPolicyRequesterComponentType.md)
145
143
  - [RightsManagementPxpComponentType](type-aliases/RightsManagementPxpComponentType.md)
146
- - [SynchronisedStorageComponentType](type-aliases/SynchronisedStorageComponentType.md)
147
144
  - [TaskSchedulerComponentType](type-aliases/TaskSchedulerComponentType.md)
148
145
  - [TelemetryComponentType](type-aliases/TelemetryComponentType.md)
149
146
  - [TelemetryConnectorType](type-aliases/TelemetryConnectorType.md)
150
147
  - [TenantAdminComponentType](type-aliases/TenantAdminComponentType.md)
148
+ - [TenantComponentType](type-aliases/TenantComponentType.md)
151
149
  - [TrustComponentType](type-aliases/TrustComponentType.md)
152
150
  - [TrustGeneratorComponentType](type-aliases/TrustGeneratorComponentType.md)
153
151
  - [TrustVerifierComponentType](type-aliases/TrustVerifierComponentType.md)
154
152
  - [UrlTransformerComponentType](type-aliases/UrlTransformerComponentType.md)
155
153
  - [VaultConnectorType](type-aliases/VaultConnectorType.md)
156
- - [IVerifiableStorageComponentType](type-aliases/IVerifiableStorageComponentType.md)
157
- - [VerifiableStorageConnectorType](type-aliases/VerifiableStorageConnectorType.md)
158
154
  - [WalletConnectorType](type-aliases/WalletConnectorType.md)
159
155
 
160
156
  ## Variables
@@ -219,18 +215,16 @@
219
215
  - [RightsManagementPolicyObligationEnforcerComponentType](variables/RightsManagementPolicyObligationEnforcerComponentType.md)
220
216
  - [RightsManagementPolicyRequesterComponentType](variables/RightsManagementPolicyRequesterComponentType.md)
221
217
  - [RightsManagementPxpComponentType](variables/RightsManagementPxpComponentType.md)
222
- - [SynchronisedStorageComponentType](variables/SynchronisedStorageComponentType.md)
223
218
  - [TaskSchedulerComponentType](variables/TaskSchedulerComponentType.md)
224
219
  - [TelemetryComponentType](variables/TelemetryComponentType.md)
225
220
  - [TelemetryConnectorType](variables/TelemetryConnectorType.md)
226
221
  - [TenantAdminComponentType](variables/TenantAdminComponentType.md)
222
+ - [TenantComponentType](variables/TenantComponentType.md)
227
223
  - [TrustComponentType](variables/TrustComponentType.md)
228
224
  - [TrustGeneratorComponentType](variables/TrustGeneratorComponentType.md)
229
225
  - [TrustVerifierComponentType](variables/TrustVerifierComponentType.md)
230
226
  - [UrlTransformerComponentType](variables/UrlTransformerComponentType.md)
231
227
  - [VaultConnectorType](variables/VaultConnectorType.md)
232
- - [VerifiableStorageComponentType](variables/VerifiableStorageComponentType.md)
233
- - [VerifiableStorageConnectorType](variables/VerifiableStorageConnectorType.md)
234
228
  - [WalletConnectorType](variables/WalletConnectorType.md)
235
229
 
236
230
  ## Functions
@@ -294,16 +288,14 @@
294
288
  - [initialiseRightsManagementPolicyObligationEnforcerComponent](functions/initialiseRightsManagementPolicyObligationEnforcerComponent.md)
295
289
  - [initialiseRightsManagementPolicyRequesterComponent](functions/initialiseRightsManagementPolicyRequesterComponent.md)
296
290
  - [initialiseRightsManagementPxpComponent](functions/initialiseRightsManagementPxpComponent.md)
297
- - [initialiseSynchronisedStorageComponent](functions/initialiseSynchronisedStorageComponent.md)
298
291
  - [initialiseTaskSchedulerComponent](functions/initialiseTaskSchedulerComponent.md)
299
292
  - [initialiseTelemetryConnector](functions/initialiseTelemetryConnector.md)
300
293
  - [initialiseTelemetryComponent](functions/initialiseTelemetryComponent.md)
294
+ - [initialiseTenantComponent](functions/initialiseTenantComponent.md)
301
295
  - [initialiseTenantAdminComponent](functions/initialiseTenantAdminComponent.md)
302
296
  - [initialiseTrustComponent](functions/initialiseTrustComponent.md)
303
297
  - [initialiseTrustGeneratorComponent](functions/initialiseTrustGeneratorComponent.md)
304
298
  - [initialiseTrustVerifierComponent](functions/initialiseTrustVerifierComponent.md)
305
299
  - [initialiseUrlTransformerComponent](functions/initialiseUrlTransformerComponent.md)
306
300
  - [initialiseVaultConnector](functions/initialiseVaultConnector.md)
307
- - [initialiseVerifiableStorageConnector](functions/initialiseVerifiableStorageConnector.md)
308
- - [initialiseVerifiableStorageComponent](functions/initialiseVerifiableStorageComponent.md)
309
301
  - [initialiseWalletConnector](functions/initialiseWalletConnector.md)
@@ -210,18 +210,6 @@ DLT options which can be overridden by individual components by specifying types
210
210
 
211
211
  Wallet connector options which can be overridden by individual components by specifying types other than default.
212
212
 
213
- #### verifiableStorageConnector?
214
-
215
- > `optional` **verifiableStorageConnector?**: `IEngineCoreTypeConfig`\<[`VerifiableStorageConnectorConfig`](../type-aliases/VerifiableStorageConnectorConfig.md)\>[]
216
-
217
- Verifiable storage connector options which can be overridden by individual components by specifying types other than default.
218
-
219
- #### verifiableStorageComponent?
220
-
221
- > `optional` **verifiableStorageComponent?**: `IEngineCoreTypeConfig`\<[`VerifiableStorageComponentConfig`](../type-aliases/VerifiableStorageComponentConfig.md)\>[]
222
-
223
- Verifiable storage component options which can be overridden by individual components by specifying types other than default.
224
-
225
213
  #### immutableProofComponent?
226
214
 
227
215
  > `optional` **immutableProofComponent?**: `IEngineCoreTypeConfig`\<[`ImmutableProofComponentConfig`](../type-aliases/ImmutableProofComponentConfig.md)\>[]
@@ -450,12 +438,6 @@ Rights management policy negotiator options which can be overridden by individua
450
438
 
451
439
  Rights management policy requester options which can be overridden by individual components by specifying types other than default.
452
440
 
453
- #### synchronisedStorageComponent?
454
-
455
- > `optional` **synchronisedStorageComponent?**: `IEngineCoreTypeConfig`\<[`SynchronisedStorageComponentConfig`](../type-aliases/SynchronisedStorageComponentConfig.md)\>[]
456
-
457
- Synchronised storage options which can be overridden by individual components by specifying types other than default.
458
-
459
441
  #### federatedCatalogueComponent?
460
442
 
461
443
  > `optional` **federatedCatalogueComponent?**: `IEngineCoreTypeConfig`\<[`FederatedCatalogueComponentConfig`](../type-aliases/FederatedCatalogueComponentConfig.md)\>[]
@@ -480,6 +462,12 @@ Dataspace control plane component options which can be overridden by individual
480
462
 
481
463
  Dataspace data plane component options which can be overridden by individual components by specifying types other than default.
482
464
 
465
+ #### tenantComponent?
466
+
467
+ > `optional` **tenantComponent?**: `IEngineCoreTypeConfig`\<[`TenantComponentConfig`](../type-aliases/TenantComponentConfig.md)\>[]
468
+
469
+ Tenant component options which can be overridden by individual components by specifying types other than default.
470
+
483
471
  #### tenantAdminComponent?
484
472
 
485
473
  > `optional` **tenantAdminComponent?**: `IEngineCoreTypeConfig`\<[`TenantAdminComponentConfig`](../type-aliases/TenantAdminComponentConfig.md)\>[]
@@ -1,5 +1,5 @@
1
1
  # Type Alias: EntityStorageConnectorConfig
2
2
 
3
- > **EntityStorageConnectorConfig** = \{ `type`: *typeof* [`File`](../variables/EntityStorageConnectorType.md#file); `options`: `Omit`\<`IFileEntityStorageConnectorConstructorOptions`, `"entitySchema"`\> & `object`; \} \| \{ `type`: *typeof* [`Memory`](../variables/EntityStorageConnectorType.md#memory); `options?`: `never`; \} \| \{ `type`: *typeof* [`AwsDynamoDb`](../variables/EntityStorageConnectorType.md#awsdynamodb); `options`: `Omit`\<`IDynamoDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`AzureCosmosDb`](../variables/EntityStorageConnectorType.md#azurecosmosdb); `options`: `Omit`\<`ICosmosDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`GcpFirestoreDb`](../variables/EntityStorageConnectorType.md#gcpfirestoredb); `options`: `Omit`\<`IFirestoreEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`ScyllaDb`](../variables/EntityStorageConnectorType.md#scylladb); `options`: `Omit`\<`IScyllaDBTableConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`MySqlDb`](../variables/EntityStorageConnectorType.md#mysqldb); `options`: `Omit`\<`IMySqlEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`MongoDb`](../variables/EntityStorageConnectorType.md#mongodb); `options`: `Omit`\<`IMongoDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`PostgreSql`](../variables/EntityStorageConnectorType.md#postgresql); `options`: `Omit`\<`IPostgreSqlEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`Synchronised`](../variables/EntityStorageConnectorType.md#synchronised); `options`: `Omit`\<`ISynchronisedEntityStorageConnectorConstructorOptions`, `"entitySchema"`\>; \}
3
+ > **EntityStorageConnectorConfig** = \{ `type`: *typeof* [`File`](../variables/EntityStorageConnectorType.md#file); `options`: `Omit`\<`IFileEntityStorageConnectorConstructorOptions`, `"entitySchema"`\> & `object`; \} \| \{ `type`: *typeof* [`Memory`](../variables/EntityStorageConnectorType.md#memory); `options?`: `never`; \} \| \{ `type`: *typeof* [`AwsDynamoDb`](../variables/EntityStorageConnectorType.md#awsdynamodb); `options`: `Omit`\<`IDynamoDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`AzureCosmosDb`](../variables/EntityStorageConnectorType.md#azurecosmosdb); `options`: `Omit`\<`ICosmosDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`GcpFirestoreDb`](../variables/EntityStorageConnectorType.md#gcpfirestoredb); `options`: `Omit`\<`IFirestoreEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`ScyllaDb`](../variables/EntityStorageConnectorType.md#scylladb); `options`: `Omit`\<`IScyllaDBTableConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`MySqlDb`](../variables/EntityStorageConnectorType.md#mysqldb); `options`: `Omit`\<`IMySqlEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`MongoDb`](../variables/EntityStorageConnectorType.md#mongodb); `options`: `Omit`\<`IMongoDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`PostgreSql`](../variables/EntityStorageConnectorType.md#postgresql); `options`: `Omit`\<`IPostgreSqlEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \}
4
4
 
5
5
  Entity storage connector config types.
@@ -0,0 +1,17 @@
1
+ # Type Alias: TenantComponentConfig
2
+
3
+ > **TenantComponentConfig** = `object`
4
+
5
+ Tenant component config types.
6
+
7
+ ## Properties
8
+
9
+ ### type {#type}
10
+
11
+ > **type**: *typeof* [`Service`](../variables/TenantComponentType.md#service)
12
+
13
+ ***
14
+
15
+ ### options? {#options}
16
+
17
+ > `optional` **options?**: `ITenantServiceConstructorOptions`
@@ -0,0 +1,5 @@
1
+ # Type Alias: TenantComponentType
2
+
3
+ > **TenantComponentType** = *typeof* [`TenantComponentType`](../variables/TenantComponentType.md)\[keyof *typeof* [`TenantComponentType`](../variables/TenantComponentType.md)\]
4
+
5
+ Tenant component types.
@@ -1,17 +1,5 @@
1
1
  # Type Alias: TrustVerifierComponentConfig
2
2
 
3
- > **TrustVerifierComponentConfig** = `object`
3
+ > **TrustVerifierComponentConfig** = \{ `type`: *typeof* [`JwtVerifiableCredential`](../variables/TrustVerifierComponentType.md#jwtverifiablecredential); `options?`: `IJwtVerifiableCredentialVerifierConstructorOptions`; \} \| \{ `type`: *typeof* [`IdentityAllowDeny`](../variables/TrustVerifierComponentType.md#identityallowdeny); `options?`: `IIdentityAllowDenyVerifierConstructorOptions`; \}
4
4
 
5
5
  Trust verifier component config types.
6
-
7
- ## Properties
8
-
9
- ### type {#type}
10
-
11
- > **type**: *typeof* [`JwtVerifiableCredential`](../variables/TrustVerifierComponentType.md#jwtverifiablecredential)
12
-
13
- ***
14
-
15
- ### options? {#options}
16
-
17
- > `optional` **options?**: `IJwtVerifiableCredentialVerifierConstructorOptions`
@@ -59,9 +59,3 @@ MongoDb.
59
59
  > `readonly` **PostgreSql**: `"postgresql"` = `"postgresql"`
60
60
 
61
61
  Postgre SQL.
62
-
63
- ### Synchronised {#synchronised}
64
-
65
- > `readonly` **Synchronised**: `"synchronised"` = `"synchronised"`
66
-
67
- Synchronised.
@@ -0,0 +1,13 @@
1
+ # Variable: TenantComponentType
2
+
3
+ > `const` **TenantComponentType**: `object`
4
+
5
+ Tenant component types.
6
+
7
+ ## Type Declaration
8
+
9
+ ### Service {#service}
10
+
11
+ > `readonly` **Service**: `"service"` = `"service"`
12
+
13
+ Service.
@@ -11,3 +11,9 @@ Trust verifier component types.
11
11
  > `readonly` **JwtVerifiableCredential**: `"jwt-verifiable-credential"` = `"jwt-verifiable-credential"`
12
12
 
13
13
  JWT Verifiable Credential.
14
+
15
+ ### IdentityAllowDeny {#identityallowdeny}
16
+
17
+ > `readonly` **IdentityAllowDeny**: `"identity-allow-deny"` = `"identity-allow-deny"`
18
+
19
+ Identity Allow/Deny Verifier.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-types",
3
- "version": "0.0.3-next.45",
3
+ "version": "0.0.3-next.47",
4
4
  "description": "Component and connector type definitions with configuration helpers for engine composition.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,8 +62,8 @@
62
62
  "@twin.org/document-management-models": "next",
63
63
  "@twin.org/document-management-rest-client": "next",
64
64
  "@twin.org/document-management-service": "next",
65
- "@twin.org/engine-core": "0.0.3-next.45",
66
- "@twin.org/engine-models": "0.0.3-next.45",
65
+ "@twin.org/engine-core": "0.0.3-next.47",
66
+ "@twin.org/engine-models": "0.0.3-next.47",
67
67
  "@twin.org/entity": "next",
68
68
  "@twin.org/entity-storage-connector-cosmosdb": "next",
69
69
  "@twin.org/entity-storage-connector-dynamodb": "next",
@@ -74,7 +74,6 @@
74
74
  "@twin.org/entity-storage-connector-mysql": "next",
75
75
  "@twin.org/entity-storage-connector-postgresql": "next",
76
76
  "@twin.org/entity-storage-connector-scylladb": "next",
77
- "@twin.org/entity-storage-connector-synchronised": "next",
78
77
  "@twin.org/entity-storage-models": "next",
79
78
  "@twin.org/entity-storage-rest-client": "next",
80
79
  "@twin.org/entity-storage-service": "next",
@@ -128,9 +127,6 @@
128
127
  "@twin.org/rights-management-pxp-service": "next",
129
128
  "@twin.org/rights-management-rest-client": "next",
130
129
  "@twin.org/rights-management-service": "next",
131
- "@twin.org/synchronised-storage-models": "next",
132
- "@twin.org/synchronised-storage-rest-client": "next",
133
- "@twin.org/synchronised-storage-service": "next",
134
130
  "@twin.org/telemetry-connector-entity-storage": "next",
135
131
  "@twin.org/telemetry-connector-opentelemetry": "next",
136
132
  "@twin.org/telemetry-models": "next",
@@ -144,11 +140,6 @@
144
140
  "@twin.org/vault-connector-entity-storage": "next",
145
141
  "@twin.org/vault-connector-hashicorp": "next",
146
142
  "@twin.org/vault-models": "next",
147
- "@twin.org/verifiable-storage-connector-entity-storage": "next",
148
- "@twin.org/verifiable-storage-connector-iota": "next",
149
- "@twin.org/verifiable-storage-models": "next",
150
- "@twin.org/verifiable-storage-rest-client": "next",
151
- "@twin.org/verifiable-storage-service": "next",
152
143
  "@twin.org/wallet-connector-entity-storage": "next",
153
144
  "@twin.org/wallet-connector-iota": "next",
154
145
  "@twin.org/wallet-models": "next"
@@ -1,49 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
4
- import { ComponentFactory } from "@twin.org/core";
5
- import { SynchronisedStorageRestClient } from "@twin.org/synchronised-storage-rest-client";
6
- import { SynchronisedStorageService, initSchema as initSchemaSynchronisedStorage } from "@twin.org/synchronised-storage-service";
7
- import { initialiseEntityStorageConnector } from "./entityStorage.js";
8
- import { SynchronisedStorageComponentType } from "../models/types/synchronisedStorageComponentType.js";
9
- import { EngineTypeHelper } from "../utils/engineTypeHelper.js";
10
- /**
11
- * Initialise the synchronised storage component.
12
- * @param engineCore The engine core.
13
- * @param context The context for the engine.
14
- * @param instanceConfig The instance config.
15
- * @returns The instance created and the factory for it.
16
- */
17
- export function initialiseSynchronisedStorageComponent(engineCore, context, instanceConfig) {
18
- let createComponent;
19
- let instanceTypeName;
20
- if (instanceConfig.type === SynchronisedStorageComponentType.Service) {
21
- createComponent = (createConfig) => {
22
- initSchemaSynchronisedStorage();
23
- initialiseEntityStorageConnector(engineCore, context, createConfig.options?.syncSnapshotStorageConnectorType, "SyncSnapshotEntry", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node]));
24
- return new SynchronisedStorageService(EngineTypeHelper.mergeConfig({
25
- loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
26
- eventBusComponentType: engineCore.getRegisteredInstanceType("eventBusComponent"),
27
- vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
28
- verifiableStorageConnectorType: engineCore.getRegisteredInstanceType("verifiableStorageConnector"),
29
- taskSchedulerComponentType: engineCore.getRegisteredInstanceType("taskSchedulerComponent"),
30
- trustedSynchronisedStorageComponentType: engineCore.getRegisteredInstanceTypeOptional("synchronisedStorageComponent", ["trusted"]),
31
- blobStorageConnectorType: engineCore.getRegisteredInstanceType("blobStorageConnector", [
32
- "public"
33
- ]),
34
- trustComponentType: engineCore.getRegisteredInstanceType("trustComponent")
35
- }, createConfig.options));
36
- };
37
- instanceTypeName = "synchronised-storage-service";
38
- }
39
- else if (instanceConfig.type === SynchronisedStorageComponentType.RestClient) {
40
- createComponent = (createConfig) => new SynchronisedStorageRestClient(EngineTypeHelper.mergeConfig(createConfig.options));
41
- instanceTypeName = "synchronised-storage-rest-client";
42
- }
43
- return {
44
- createComponent: createComponent,
45
- instanceTypeName,
46
- factory: ComponentFactory
47
- };
48
- }
49
- //# sourceMappingURL=synchronisedStorage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synchronisedStorage.js","sourceRoot":"","sources":["../../../src/components/synchronisedStorage.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAOnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAEN,0BAA0B,EAC1B,UAAU,IAAI,6BAA6B,EAC3C,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AACvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACrD,UAAsC,EACtC,OAA0C,EAC1C,cAAkD;IAElD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,gCAAgC,CAAC,OAAO,EAAE,CAAC;QACtE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,6BAA6B,EAAE,CAAC;YAEhC,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,gCAAgC,uBAEtD,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;YACF,OAAO,IAAI,0BAA0B,CACpC,gBAAgB,CAAC,WAAW,CAC3B;gBACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;gBAC9E,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;gBAChF,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,8BAA8B,EAAE,UAAU,CAAC,yBAAyB,CACnE,4BAA4B,CAC5B;gBACD,0BAA0B,EACzB,UAAU,CAAC,yBAAyB,CAAC,wBAAwB,CAAC;gBAC/D,uCAAuC,EAAE,UAAU,CAAC,iCAAiC,CACpF,8BAA8B,EAC9B,CAAC,SAAS,CAAC,CACX;gBACD,wBAAwB,EAAE,UAAU,CAAC,yBAAyB,CAAC,sBAAsB,EAAE;oBACtF,QAAQ;iBACR,CAAC;gBACF,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;aAC1E,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,iCAA8C,CAAC;IAChE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,gCAAgC,CAAC,UAAU,EAAE,CAAC;QAChF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,6BAA6B,CAChC,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,qCAAiD,CAAC;IACnE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { SynchronisedStorageRestClient } from \"@twin.org/synchronised-storage-rest-client\";\nimport {\n\ttype SyncSnapshotEntry,\n\tSynchronisedStorageService,\n\tinitSchema as initSchemaSynchronisedStorage\n} from \"@twin.org/synchronised-storage-service\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { SynchronisedStorageComponentConfig } from \"../models/config/synchronisedStorageComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { SynchronisedStorageComponentType } from \"../models/types/synchronisedStorageComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the synchronised storage component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseSynchronisedStorageComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: SynchronisedStorageComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === SynchronisedStorageComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaSynchronisedStorage();\n\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.syncSnapshotStorageConnectorType,\n\t\t\t\tnameof<SyncSnapshotEntry>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\t\t\treturn new SynchronisedStorageService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\t\t\t\teventBusComponentType: engineCore.getRegisteredInstanceType(\"eventBusComponent\"),\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\tverifiableStorageConnectorType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"verifiableStorageConnector\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttaskSchedulerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"taskSchedulerComponent\"),\n\t\t\t\t\t\ttrustedSynchronisedStorageComponentType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"synchronisedStorageComponent\",\n\t\t\t\t\t\t\t[\"trusted\"]\n\t\t\t\t\t\t),\n\t\t\t\t\t\tblobStorageConnectorType: engineCore.getRegisteredInstanceType(\"blobStorageConnector\", [\n\t\t\t\t\t\t\t\"public\"\n\t\t\t\t\t\t]),\n\t\t\t\t\t\ttrustComponentType: engineCore.getRegisteredInstanceType(\"trustComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(SynchronisedStorageService);\n\t} else if (instanceConfig.type === SynchronisedStorageComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SynchronisedStorageRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(SynchronisedStorageRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
@@ -1,77 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
4
- import { ComponentFactory } from "@twin.org/core";
5
- import { EntityStorageVerifiableStorageConnector, initSchema as initSchemaVerifiableStorageStorage } from "@twin.org/verifiable-storage-connector-entity-storage";
6
- import { IotaVerifiableStorageConnector } from "@twin.org/verifiable-storage-connector-iota";
7
- import { VerifiableStorageConnectorFactory } from "@twin.org/verifiable-storage-models";
8
- import { VerifiableStorageRestClient } from "@twin.org/verifiable-storage-rest-client";
9
- import { VerifiableStorageService } from "@twin.org/verifiable-storage-service";
10
- import { initialiseEntityStorageConnector } from "./entityStorage.js";
11
- import { DltConfigType } from "../models/types/dltConfigType.js";
12
- import { VerifiableStorageComponentType } from "../models/types/verifiableStorageComponentType.js";
13
- import { VerifiableStorageConnectorType } from "../models/types/verifiableStorageConnectorType.js";
14
- import { EngineTypeHelper } from "../utils/engineTypeHelper.js";
15
- /**
16
- * Initialise the verifiable storage connector.
17
- * @param engineCore The engine core.
18
- * @param context The context for the engine.
19
- * @param instanceConfig The instance config.
20
- * @returns The instance created and the factory for it.
21
- */
22
- export function initialiseVerifiableStorageConnector(engineCore, context, instanceConfig) {
23
- let createComponent;
24
- let instanceTypeName;
25
- if (instanceConfig.type === VerifiableStorageConnectorType.Iota) {
26
- createComponent = (createConfig) => {
27
- const dltConfig = EngineTypeHelper.getConfigOfType(engineCore.getConfig(), "dltConfig", DltConfigType.Iota);
28
- return new IotaVerifiableStorageConnector(EngineTypeHelper.mergeConfig({
29
- vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
30
- loggingComponentType: engineCore.getRegisteredInstanceTypeOptional("loggingComponent"),
31
- config: dltConfig?.options?.config
32
- }, createConfig.options));
33
- };
34
- instanceTypeName = IotaVerifiableStorageConnector.NAMESPACE;
35
- }
36
- else if (instanceConfig.type === VerifiableStorageConnectorType.EntityStorage) {
37
- createComponent = (createConfig) => {
38
- initSchemaVerifiableStorageStorage();
39
- initialiseEntityStorageConnector(engineCore, context, createConfig.options?.verifiableStorageEntityStorageType, "VerifiableItem", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [
40
- ContextIdKeys.Node,
41
- ContextIdKeys.Tenant
42
- ]));
43
- return new EntityStorageVerifiableStorageConnector(EngineTypeHelper.mergeConfig(createConfig.options));
44
- };
45
- instanceTypeName = EntityStorageVerifiableStorageConnector.NAMESPACE;
46
- }
47
- return {
48
- createComponent: createComponent,
49
- instanceTypeName,
50
- factory: VerifiableStorageConnectorFactory
51
- };
52
- }
53
- /**
54
- * Initialise the verifiable storage component.
55
- * @param engineCore The engine core.
56
- * @param context The context for the engine.
57
- * @param instanceConfig The instance config.
58
- * @returns The instance created and the factory for it.
59
- */
60
- export function initialiseVerifiableStorageComponent(engineCore, context, instanceConfig) {
61
- let createComponent;
62
- let instanceTypeName;
63
- if (instanceConfig.type === VerifiableStorageComponentType.Service) {
64
- createComponent = (createConfig) => new VerifiableStorageService(EngineTypeHelper.mergeConfig(createConfig.options));
65
- instanceTypeName = "verifiable-storage-service";
66
- }
67
- else if (instanceConfig.type === VerifiableStorageComponentType.RestClient) {
68
- createComponent = (createConfig) => new VerifiableStorageRestClient(EngineTypeHelper.mergeConfig(createConfig.options));
69
- instanceTypeName = "verifiable-storage-rest-client";
70
- }
71
- return {
72
- createComponent: createComponent,
73
- instanceTypeName,
74
- factory: ComponentFactory
75
- };
76
- }
77
- //# sourceMappingURL=verifiableStorage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorage.js","sourceRoot":"","sources":["../../../src/components/verifiableStorage.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,EACN,uCAAuC,EACvC,UAAU,IAAI,kCAAkC,EAEhD,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAKtE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AACnG,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,oCAAoC,CACnD,UAAsC,EACtC,OAA0C,EAC1C,cAAgD;IAEhD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,8BAA8B,CAAC,IAAI,EAAE,CAAC;QACjE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,MAAM,SAAS,GAAG,gBAAgB,CAAC,eAAe,CACjD,UAAU,CAAC,SAAS,EAAE,EACtB,WAAW,EACX,aAAa,CAAC,IAAI,CAClB,CAAC;YACF,OAAO,IAAI,8BAA8B,CACxC,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,oBAAoB,EAAE,UAAU,CAAC,iCAAiC,CAAC,kBAAkB,CAAC;gBACtF,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM;aAClC,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,GAAG,8BAA8B,CAAC,SAAS,CAAC;IAC7D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,8BAA8B,CAAC,aAAa,EAAE,CAAC;QACjF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,kCAAkC,EAAE,CAAC;YACrC,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,kCAAkC,oBAExD,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;gBACpE,aAAa,CAAC,IAAI;gBAClB,aAAa,CAAC,MAAM;aACpB,CAAC,CACF,CAAC;YACF,OAAO,IAAI,uCAAuC,CACjD,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,GAAG,uCAAuC,CAAC,SAAS,CAAC;IACtE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,iCAAiC;KAC1C,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oCAAoC,CACnD,UAAsC,EACtC,OAA0C,EAC1C,cAAgD;IAEhD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,8BAA8B,CAAC,OAAO,EAAE,CAAC;QACpE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,wBAAwB,CAC3B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,+BAA4C,CAAC;IAC9D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,8BAA8B,CAAC,UAAU,EAAE,CAAC;QAC9E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,2BAA2B,CAC9B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,mCAA+C,CAAC;IACjE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport type { IComponent } from \"@twin.org/core\";\nimport { ComponentFactory } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport {\n\tEntityStorageVerifiableStorageConnector,\n\tinitSchema as initSchemaVerifiableStorageStorage,\n\ttype VerifiableItem\n} from \"@twin.org/verifiable-storage-connector-entity-storage\";\nimport { IotaVerifiableStorageConnector } from \"@twin.org/verifiable-storage-connector-iota\";\nimport { VerifiableStorageConnectorFactory } from \"@twin.org/verifiable-storage-models\";\nimport { VerifiableStorageRestClient } from \"@twin.org/verifiable-storage-rest-client\";\nimport { VerifiableStorageService } from \"@twin.org/verifiable-storage-service\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DltConfig } from \"../models/config/dltConfig.js\";\nimport type { VerifiableStorageComponentConfig } from \"../models/config/verifiableStorageComponentConfig.js\";\nimport type { VerifiableStorageConnectorConfig } from \"../models/config/verifiableStorageConnectorConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DltConfigType } from \"../models/types/dltConfigType.js\";\nimport { VerifiableStorageComponentType } from \"../models/types/verifiableStorageComponentType.js\";\nimport { VerifiableStorageConnectorType } from \"../models/types/verifiableStorageConnectorType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the verifiable storage connector.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseVerifiableStorageConnector(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: VerifiableStorageConnectorConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof VerifiableStorageConnectorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === VerifiableStorageConnectorType.Iota) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tconst dltConfig = EngineTypeHelper.getConfigOfType<DltConfig>(\n\t\t\t\tengineCore.getConfig(),\n\t\t\t\t\"dltConfig\",\n\t\t\t\tDltConfigType.Iota\n\t\t\t);\n\t\t\treturn new IotaVerifiableStorageConnector(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceTypeOptional(\"loggingComponent\"),\n\t\t\t\t\t\tconfig: dltConfig?.options?.config\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = IotaVerifiableStorageConnector.NAMESPACE;\n\t} else if (instanceConfig.type === VerifiableStorageConnectorType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaVerifiableStorageStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.verifiableStorageEntityStorageType,\n\t\t\t\tnameof<VerifiableItem>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\treturn new EntityStorageVerifiableStorageConnector(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = EntityStorageVerifiableStorageConnector.NAMESPACE;\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: VerifiableStorageConnectorFactory\n\t};\n}\n\n/**\n * Initialise the verifiable storage component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseVerifiableStorageComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: VerifiableStorageComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === VerifiableStorageComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew VerifiableStorageService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(VerifiableStorageService);\n\t} else if (instanceConfig.type === VerifiableStorageComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew VerifiableStorageRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(VerifiableStorageRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=synchronisedStorageComponentConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synchronisedStorageComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/synchronisedStorageComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBaseRestClientConfig } from \"@twin.org/api-models\";\nimport type { ISynchronisedStorageServiceConstructorOptions } from \"@twin.org/synchronised-storage-service\";\nimport type { SynchronisedStorageComponentType } from \"../types/synchronisedStorageComponentType.js\";\n\n/**\n * Synchronised storage component config types.\n */\nexport type SynchronisedStorageComponentConfig =\n\t| {\n\t\t\ttype: typeof SynchronisedStorageComponentType.Service;\n\t\t\toptions: ISynchronisedStorageServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SynchronisedStorageComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=verifiableStorageComponentConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorageComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/verifiableStorageComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBaseRestClientConfig } from \"@twin.org/api-models\";\nimport type { IVerifiableStorageServiceConstructorOptions } from \"@twin.org/verifiable-storage-service\";\nimport type { VerifiableStorageComponentType } from \"../types/verifiableStorageComponentType.js\";\n\n/**\n * Verifiable storage component config types.\n */\nexport type VerifiableStorageComponentConfig =\n\t| {\n\t\t\ttype: typeof VerifiableStorageComponentType.Service;\n\t\t\toptions?: IVerifiableStorageServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof VerifiableStorageComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=verifiableStorageConnectorConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorageConnectorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/verifiableStorageConnectorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageVerifiableStorageConnectorConstructorOptions } from \"@twin.org/verifiable-storage-connector-entity-storage\";\nimport type { IIotaVerifiableStorageConnectorConstructorOptions } from \"@twin.org/verifiable-storage-connector-iota\";\nimport type { VerifiableStorageConnectorType } from \"../types/verifiableStorageConnectorType.js\";\n\n/**\n * Verifiable storage connector config types.\n */\nexport type VerifiableStorageConnectorConfig =\n\t| {\n\t\t\ttype: typeof VerifiableStorageConnectorType.EntityStorage;\n\t\t\toptions?: IEntityStorageVerifiableStorageConnectorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof VerifiableStorageConnectorType.Iota;\n\t\t\toptions: IIotaVerifiableStorageConnectorConstructorOptions;\n\t };\n"]}
@@ -1,17 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- /**
4
- * Synchronised storage component types.
5
- */
6
- // eslint-disable-next-line @typescript-eslint/naming-convention
7
- export const SynchronisedStorageComponentType = {
8
- /**
9
- * Service.
10
- */
11
- Service: "service",
12
- /**
13
- * REST client.
14
- */
15
- RestClient: "rest-client"
16
- };
17
- //# sourceMappingURL=synchronisedStorageComponentType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synchronisedStorageComponentType.js","sourceRoot":"","sources":["../../../../src/models/types/synchronisedStorageComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC/C;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Synchronised storage component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const SynchronisedStorageComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Synchronised storage component types.\n */\nexport type SynchronisedStorageComponentType =\n\t(typeof SynchronisedStorageComponentType)[keyof typeof SynchronisedStorageComponentType];\n"]}
@@ -1,17 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- /**
4
- * Verifiable storage component types.
5
- */
6
- // eslint-disable-next-line @typescript-eslint/naming-convention
7
- export const VerifiableStorageComponentType = {
8
- /**
9
- * Service.
10
- */
11
- Service: "service",
12
- /**
13
- * REST client.
14
- */
15
- RestClient: "rest-client"
16
- };
17
- //# sourceMappingURL=verifiableStorageComponentType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorageComponentType.js","sourceRoot":"","sources":["../../../../src/models/types/verifiableStorageComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC7C;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Verifiable storage component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const VerifiableStorageComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Verifiable storage component types.\n */\nexport type IVerifiableStorageComponentType =\n\t(typeof VerifiableStorageComponentType)[keyof typeof VerifiableStorageComponentType];\n"]}
@@ -1,17 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- /**
4
- * Verifiable storage connector types.
5
- */
6
- // eslint-disable-next-line @typescript-eslint/naming-convention
7
- export const VerifiableStorageConnectorType = {
8
- /**
9
- * Entity storage.
10
- */
11
- EntityStorage: "entity-storage",
12
- /**
13
- * IOTA.
14
- */
15
- Iota: "iota"
16
- };
17
- //# sourceMappingURL=verifiableStorageConnectorType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorageConnectorType.js","sourceRoot":"","sources":["../../../../src/models/types/verifiableStorageConnectorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC7C;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,IAAI,EAAE,MAAM;CACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Verifiable storage connector types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const VerifiableStorageConnectorType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * IOTA.\n\t */\n\tIota: \"iota\"\n} as const;\n\n/**\n * Verifiable storage connector types.\n */\nexport type VerifiableStorageConnectorType =\n\t(typeof VerifiableStorageConnectorType)[keyof typeof VerifiableStorageConnectorType];\n"]}
@@ -1,12 +0,0 @@
1
- import { ComponentFactory } from "@twin.org/core";
2
- import type { EngineTypeInitialiserReturn, IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
3
- import type { SynchronisedStorageComponentConfig } from "../models/config/synchronisedStorageComponentConfig.js";
4
- import type { IEngineConfig } from "../models/IEngineConfig.js";
5
- /**
6
- * Initialise the synchronised storage component.
7
- * @param engineCore The engine core.
8
- * @param context The context for the engine.
9
- * @param instanceConfig The instance config.
10
- * @returns The instance created and the factory for it.
11
- */
12
- export declare function initialiseSynchronisedStorageComponent(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: SynchronisedStorageComponentConfig): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory>;
@@ -1,22 +0,0 @@
1
- import { ComponentFactory } from "@twin.org/core";
2
- import type { EngineTypeInitialiserReturn, IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
3
- import { VerifiableStorageConnectorFactory } from "@twin.org/verifiable-storage-models";
4
- import type { VerifiableStorageComponentConfig } from "../models/config/verifiableStorageComponentConfig.js";
5
- import type { VerifiableStorageConnectorConfig } from "../models/config/verifiableStorageConnectorConfig.js";
6
- import type { IEngineConfig } from "../models/IEngineConfig.js";
7
- /**
8
- * Initialise the verifiable storage connector.
9
- * @param engineCore The engine core.
10
- * @param context The context for the engine.
11
- * @param instanceConfig The instance config.
12
- * @returns The instance created and the factory for it.
13
- */
14
- export declare function initialiseVerifiableStorageConnector(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: VerifiableStorageConnectorConfig): EngineTypeInitialiserReturn<typeof instanceConfig, typeof VerifiableStorageConnectorFactory>;
15
- /**
16
- * Initialise the verifiable storage component.
17
- * @param engineCore The engine core.
18
- * @param context The context for the engine.
19
- * @param instanceConfig The instance config.
20
- * @returns The instance created and the factory for it.
21
- */
22
- export declare function initialiseVerifiableStorageComponent(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: VerifiableStorageComponentConfig): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory>;
@@ -1,13 +0,0 @@
1
- import type { IBaseRestClientConfig } from "@twin.org/api-models";
2
- import type { ISynchronisedStorageServiceConstructorOptions } from "@twin.org/synchronised-storage-service";
3
- import type { SynchronisedStorageComponentType } from "../types/synchronisedStorageComponentType.js";
4
- /**
5
- * Synchronised storage component config types.
6
- */
7
- export type SynchronisedStorageComponentConfig = {
8
- type: typeof SynchronisedStorageComponentType.Service;
9
- options: ISynchronisedStorageServiceConstructorOptions;
10
- } | {
11
- type: typeof SynchronisedStorageComponentType.RestClient;
12
- options: IBaseRestClientConfig;
13
- };