@twin.org/engine-types 0.0.2-next.3 → 0.0.2-next.5

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.
@@ -6,6 +6,7 @@ import type { IMongoDbEntityStorageConnectorConstructorOptions } from "@twin.org
6
6
  import type { IMySqlEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-mysql";
7
7
  import type { IPostgreSqlEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-postgresql";
8
8
  import type { IScyllaDBTableConnectorConstructorOptions } from "@twin.org/entity-storage-connector-scylladb";
9
+ import type { ISynchronisedEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-synchronised";
9
10
  import type { EntityStorageConnectorType } from "../types/entityStorageConnectorType";
10
11
  /**
11
12
  * Entity storage connector config types.
@@ -60,4 +61,7 @@ export type EntityStorageConnectorConfig = {
60
61
  config: Omit<IPostgreSqlEntityStorageConnectorConstructorOptions["config"], "tableName">;
61
62
  tablePrefix?: string;
62
63
  };
64
+ } | {
65
+ type: typeof EntityStorageConnectorType.Synchronised;
66
+ options: Omit<ISynchronisedEntityStorageConnectorConstructorOptions, "entitySchema">;
63
67
  };
@@ -0,0 +1,13 @@
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";
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
+ };
@@ -38,6 +38,10 @@ export declare const EntityStorageConnectorType: {
38
38
  * Postgre SQL.
39
39
  */
40
40
  readonly PostgreSql: "postgresql";
41
+ /**
42
+ * Synchronised.
43
+ */
44
+ readonly Synchronised: "synchronised";
41
45
  };
42
46
  /**
43
47
  * Entity storage connector types.
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Synchronised storage component types.
3
+ */
4
+ export declare const SynchronisedStorageComponentType: {
5
+ /**
6
+ * Service.
7
+ */
8
+ readonly Service: "service";
9
+ /**
10
+ * REST client.
11
+ */
12
+ readonly RestClient: "rest-client";
13
+ };
14
+ /**
15
+ * Synchronised storage component types.
16
+ */
17
+ export type SynchronisedStorageComponentType = (typeof SynchronisedStorageComponentType)[keyof typeof SynchronisedStorageComponentType];
package/docs/changelog.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @twin.org/engine-types - Changelog
2
2
 
3
+ ## [0.0.2-next.5](https://github.com/twinfoundation/engine/compare/engine-types-v0.0.2-next.4...engine-types-v0.0.2-next.5) (2025-08-14)
4
+
5
+
6
+ ### Features
7
+
8
+ * add synchronised storage support ([5142e34](https://github.com/twinfoundation/engine/commit/5142e3488f09195cf9f48a9c6c6d1014231a4c2c))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/engine-models bumped from 0.0.2-next.4 to 0.0.2-next.5
16
+
17
+ ## [0.0.2-next.4](https://github.com/twinfoundation/engine/compare/engine-types-v0.0.2-next.3...engine-types-v0.0.2-next.4) (2025-07-25)
18
+
19
+
20
+ ### Miscellaneous Chores
21
+
22
+ * **engine-types:** Synchronize repo versions
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/engine-models bumped from 0.0.2-next.3 to 0.0.2-next.4
30
+
3
31
  ## [0.0.2-next.3](https://github.com/twinfoundation/engine/compare/engine-types-v0.0.2-next.2...engine-types-v0.0.2-next.3) (2025-07-24)
4
32
 
5
33
 
@@ -1,6 +1,6 @@
1
1
  # Function: initialiseEntityStorageConnector()
2
2
 
3
- > **initialiseEntityStorageConnector**(`engineCore`, `context`, `typeCustom`, `schema`): `void`
3
+ > **initialiseEntityStorageConnector**(`engineCore`, `context`, `typeCustom`, `schema`): `string`
4
4
 
5
5
  Initialise the entity storage connector.
6
6
 
@@ -32,7 +32,9 @@ The schema for the entity storage.
32
32
 
33
33
  ## Returns
34
34
 
35
- `void`
35
+ `string`
36
+
37
+ The name of the instance type that was created.
36
38
 
37
39
  ## Throws
38
40
 
@@ -0,0 +1,41 @@
1
+ # Function: initialiseSynchronisedStorageComponent()
2
+
3
+ > **initialiseSynchronisedStorageComponent**(`engineCore`, `context`, `instanceConfig`, `overrideInstanceType?`): `undefined` \| `string`
4
+
5
+ Initialise the synchronised storage 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
+ [`SynchronisedStorageComponentConfig`](../type-aliases/SynchronisedStorageComponentConfig.md)
24
+
25
+ The instance config.
26
+
27
+ ### overrideInstanceType?
28
+
29
+ `string`
30
+
31
+ The instance type to override the default.
32
+
33
+ ## Returns
34
+
35
+ `undefined` \| `string`
36
+
37
+ The name of the instance created.
38
+
39
+ ## Throws
40
+
41
+ GeneralError if the component type is unknown.
@@ -41,6 +41,7 @@
41
41
  - [NftConnectorConfig](type-aliases/NftConnectorConfig.md)
42
42
  - [RightsManagementComponentConfig](type-aliases/RightsManagementComponentConfig.md)
43
43
  - [RightsManagementPapComponentConfig](type-aliases/RightsManagementPapComponentConfig.md)
44
+ - [SynchronisedStorageComponentConfig](type-aliases/SynchronisedStorageComponentConfig.md)
44
45
  - [TaskSchedulerComponentConfig](type-aliases/TaskSchedulerComponentConfig.md)
45
46
  - [TelemetryComponentConfig](type-aliases/TelemetryComponentConfig.md)
46
47
  - [TelemetryConnectorConfig](type-aliases/TelemetryConnectorConfig.md)
@@ -83,6 +84,7 @@
83
84
  - [NftConnectorType](type-aliases/NftConnectorType.md)
84
85
  - [RightsManagementComponentType](type-aliases/RightsManagementComponentType.md)
85
86
  - [RightsManagementPapComponentType](type-aliases/RightsManagementPapComponentType.md)
87
+ - [SynchronisedStorageComponentType](type-aliases/SynchronisedStorageComponentType.md)
86
88
  - [TaskSchedulerComponentType](type-aliases/TaskSchedulerComponentType.md)
87
89
  - [TelemetryComponentType](type-aliases/TelemetryComponentType.md)
88
90
  - [TelemetryConnectorType](type-aliases/TelemetryConnectorType.md)
@@ -128,6 +130,7 @@
128
130
  - [NftConnectorType](variables/NftConnectorType.md)
129
131
  - [RightsManagementComponentType](variables/RightsManagementComponentType.md)
130
132
  - [RightsManagementPapComponentType](variables/RightsManagementPapComponentType.md)
133
+ - [SynchronisedStorageComponentType](variables/SynchronisedStorageComponentType.md)
131
134
  - [TaskSchedulerComponentType](variables/TaskSchedulerComponentType.md)
132
135
  - [TelemetryComponentType](variables/TelemetryComponentType.md)
133
136
  - [TelemetryConnectorType](variables/TelemetryConnectorType.md)
@@ -172,6 +175,7 @@
172
175
  - [initialiseNftComponent](functions/initialiseNftComponent.md)
173
176
  - [initialiseRightsManagementComponent](functions/initialiseRightsManagementComponent.md)
174
177
  - [initialiseRightsManagementPapComponent](functions/initialiseRightsManagementPapComponent.md)
178
+ - [initialiseSynchronisedStorageComponent](functions/initialiseSynchronisedStorageComponent.md)
175
179
  - [initialiseTaskSchedulerComponent](functions/initialiseTaskSchedulerComponent.md)
176
180
  - [initialiseTelemetryConnector](functions/initialiseTelemetryConnector.md)
177
181
  - [initialiseTelemetryComponent](functions/initialiseTelemetryComponent.md)
@@ -252,12 +252,6 @@ Date processing options which can be overridden by individual components by spec
252
252
 
253
253
  Document management options which can be overridden by individual components by specifying types other than default.
254
254
 
255
- #### federatedCatalogueComponent?
256
-
257
- > `optional` **federatedCatalogueComponent**: `IEngineCoreTypeConfig`\<[`FederatedCatalogueComponentConfig`](../type-aliases/FederatedCatalogueComponentConfig.md)\>[]
258
-
259
- Federated catalogue options which can be overridden by individual components by specifying types other than default.
260
-
261
255
  #### rightsManagementComponent?
262
256
 
263
257
  > `optional` **rightsManagementComponent**: `IEngineCoreTypeConfig`\<[`RightsManagementComponentConfig`](../type-aliases/RightsManagementComponentConfig.md)\>[]
@@ -270,6 +264,18 @@ Rights management options which can be overridden by individual components by sp
270
264
 
271
265
  Rights management PAP options which can be overridden by individual components by specifying types other than default.
272
266
 
267
+ #### synchronisedStorageComponent?
268
+
269
+ > `optional` **synchronisedStorageComponent**: `IEngineCoreTypeConfig`\<[`SynchronisedStorageComponentConfig`](../type-aliases/SynchronisedStorageComponentConfig.md)\>[]
270
+
271
+ Synchronised storage options which can be overridden by individual components by specifying types other than default.
272
+
273
+ #### federatedCatalogueComponent?
274
+
275
+ > `optional` **federatedCatalogueComponent**: `IEngineCoreTypeConfig`\<[`FederatedCatalogueComponentConfig`](../type-aliases/FederatedCatalogueComponentConfig.md)\>[]
276
+
277
+ Federated catalogue options which can be overridden by individual components by specifying types other than default.
278
+
273
279
  #### Overrides
274
280
 
275
281
  `IEngineCoreConfig.types`
@@ -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`; \}
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"`\>; \}
4
4
 
5
5
  Entity storage connector config types.
@@ -0,0 +1,5 @@
1
+ # Type Alias: SynchronisedStorageComponentConfig
2
+
3
+ > **SynchronisedStorageComponentConfig** = \{ `type`: *typeof* [`Service`](../variables/SynchronisedStorageComponentType.md#service); `options`: `ISynchronisedStorageServiceConstructorOptions`; \} \| \{ `type`: *typeof* [`RestClient`](../variables/SynchronisedStorageComponentType.md#restclient); `options`: `IBaseRestClientConfig`; \}
4
+
5
+ Synchronised storage component config types.
@@ -0,0 +1,5 @@
1
+ # Type Alias: SynchronisedStorageComponentType
2
+
3
+ > **SynchronisedStorageComponentType** = *typeof* [`SynchronisedStorageComponentType`](../variables/SynchronisedStorageComponentType.md)\[keyof *typeof* [`SynchronisedStorageComponentType`](../variables/SynchronisedStorageComponentType.md)\]
4
+
5
+ Synchronised storage component types.
@@ -59,3 +59,9 @@ MongoDb.
59
59
  > `readonly` **PostgreSql**: `"postgresql"` = `"postgresql"`
60
60
 
61
61
  Postgre SQL.
62
+
63
+ ### Synchronised
64
+
65
+ > `readonly` **Synchronised**: `"synchronised"` = `"synchronised"`
66
+
67
+ Synchronised.
@@ -0,0 +1,19 @@
1
+ # Variable: SynchronisedStorageComponentType
2
+
3
+ > `const` **SynchronisedStorageComponentType**: `object`
4
+
5
+ Synchronised storage component types.
6
+
7
+ ## Type declaration
8
+
9
+ ### Service
10
+
11
+ > `readonly` **Service**: `"service"` = `"service"`
12
+
13
+ Service.
14
+
15
+ ### RestClient
16
+
17
+ > `readonly` **RestClient**: `"rest-client"` = `"rest-client"`
18
+
19
+ REST client.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-types",
3
- "version": "0.0.2-next.3",
3
+ "version": "0.0.2-next.5",
4
4
  "description": "Types to use in an engine.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -47,7 +47,7 @@
47
47
  "@twin.org/document-management-models": "next",
48
48
  "@twin.org/document-management-rest-client": "next",
49
49
  "@twin.org/document-management-service": "next",
50
- "@twin.org/engine-models": "0.0.2-next.3",
50
+ "@twin.org/engine-models": "0.0.2-next.5",
51
51
  "@twin.org/entity": "next",
52
52
  "@twin.org/entity-storage-connector-cosmosdb": "next",
53
53
  "@twin.org/entity-storage-connector-dynamodb": "next",
@@ -58,6 +58,7 @@
58
58
  "@twin.org/entity-storage-connector-mysql": "next",
59
59
  "@twin.org/entity-storage-connector-postgresql": "next",
60
60
  "@twin.org/entity-storage-connector-scylladb": "next",
61
+ "@twin.org/entity-storage-connector-synchronised": "next",
61
62
  "@twin.org/entity-storage-models": "next",
62
63
  "@twin.org/entity-storage-rest-client": "next",
63
64
  "@twin.org/entity-storage-service": "next",
@@ -97,6 +98,9 @@
97
98
  "@twin.org/rights-management-pap-service": "next",
98
99
  "@twin.org/rights-management-rest-client": "next",
99
100
  "@twin.org/rights-management-service": "next",
101
+ "@twin.org/synchronised-storage-models": "next",
102
+ "@twin.org/synchronised-storage-rest-client": "next",
103
+ "@twin.org/synchronised-storage-service": "next",
100
104
  "@twin.org/telemetry-connector-entity-storage": "next",
101
105
  "@twin.org/telemetry-models": "next",
102
106
  "@twin.org/telemetry-rest-client": "next",