@twin.org/engine 0.0.1-next.76 → 0.0.1-next.77

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.
@@ -87,7 +87,7 @@ class EngineConfigHelper {
87
87
  * @param engineConfig The engine configuration.
88
88
  * @param entityTypeName The entity type name.
89
89
  * @param entitySchema The entity schema.
90
- * @param restPath The rest path to serve the entity storage from.
90
+ * @param restPath The rest path to serve the entity storage from, leave undefined for no endpoints.
91
91
  * @param options Additional options.
92
92
  * @param options.includeNodeIdentity Whether to include the node identity in the entity, defaults to true.
93
93
  * @param options.includeUserIdentity Whether to include the user identity in the entity, defaults to true.
@@ -96,7 +96,6 @@ class EngineConfigHelper {
96
96
  core.Guards.object(EngineConfigHelper.CLASS_NAME, "engineConfig", engineConfig);
97
97
  core.Guards.stringValue(EngineConfigHelper.CLASS_NAME, "entityTypeName", entityTypeName);
98
98
  core.Guards.object(EngineConfigHelper.CLASS_NAME, "entitySchema", entitySchema);
99
- core.Guards.stringValue(EngineConfigHelper.CLASS_NAME, "restPath", restPath);
100
99
  engineConfig.types.entityStorageComponent ??= [];
101
100
  entity.EntitySchemaFactory.register(entityTypeName, () => entitySchema);
102
101
  engineConfig.types.entityStorageComponent.push({
@@ -85,7 +85,7 @@ class EngineConfigHelper {
85
85
  * @param engineConfig The engine configuration.
86
86
  * @param entityTypeName The entity type name.
87
87
  * @param entitySchema The entity schema.
88
- * @param restPath The rest path to serve the entity storage from.
88
+ * @param restPath The rest path to serve the entity storage from, leave undefined for no endpoints.
89
89
  * @param options Additional options.
90
90
  * @param options.includeNodeIdentity Whether to include the node identity in the entity, defaults to true.
91
91
  * @param options.includeUserIdentity Whether to include the user identity in the entity, defaults to true.
@@ -94,7 +94,6 @@ class EngineConfigHelper {
94
94
  Guards.object(EngineConfigHelper.CLASS_NAME, "engineConfig", engineConfig);
95
95
  Guards.stringValue(EngineConfigHelper.CLASS_NAME, "entityTypeName", entityTypeName);
96
96
  Guards.object(EngineConfigHelper.CLASS_NAME, "entitySchema", entitySchema);
97
- Guards.stringValue(EngineConfigHelper.CLASS_NAME, "restPath", restPath);
98
97
  engineConfig.types.entityStorageComponent ??= [];
99
98
  EntitySchemaFactory.register(entityTypeName, () => entitySchema);
100
99
  engineConfig.types.entityStorageComponent.push({
@@ -13,12 +13,12 @@ export declare class EngineConfigHelper {
13
13
  * @param engineConfig The engine configuration.
14
14
  * @param entityTypeName The entity type name.
15
15
  * @param entitySchema The entity schema.
16
- * @param restPath The rest path to serve the entity storage from.
16
+ * @param restPath The rest path to serve the entity storage from, leave undefined for no endpoints.
17
17
  * @param options Additional options.
18
18
  * @param options.includeNodeIdentity Whether to include the node identity in the entity, defaults to true.
19
19
  * @param options.includeUserIdentity Whether to include the user identity in the entity, defaults to true.
20
20
  */
21
- static addCustomEntityStorage<T>(engineConfig: IEngineConfig, entityTypeName: string, entitySchema: IEntitySchema<T>, restPath: string, options?: {
21
+ static addCustomEntityStorage<T>(engineConfig: IEngineConfig, entityTypeName: string, entitySchema: IEntitySchema<T>, restPath?: string, options?: {
22
22
  includeNodeIdentity?: boolean;
23
23
  includeUserIdentity?: true;
24
24
  }): void;
package/docs/changelog.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @twin.org/engine - Changelog
2
2
 
3
+ ## [0.0.1-next.77](https://github.com/twinfoundation/engine/compare/engine-v0.0.1-next.76...engine-v0.0.1-next.77) (2025-06-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * addCustomEntityStorage optional rest path ([55f42c5](https://github.com/twinfoundation/engine/commit/55f42c568945f010eb8883e27fb385d2c30eebff))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/engine-core bumped from 0.0.1-next.76 to 0.0.1-next.77
16
+ * @twin.org/engine-types bumped from 0.0.1-next.76 to 0.0.1-next.77
17
+
3
18
  ## [0.0.1-next.76](https://github.com/twinfoundation/engine/compare/engine-v0.0.1-next.75...engine-v0.0.1-next.76) (2025-06-12)
4
19
 
5
20
 
@@ -24,7 +24,7 @@ Runtime name for the class.
24
24
 
25
25
  ### addCustomEntityStorage()
26
26
 
27
- > `static` **addCustomEntityStorage**\<`T`\>(`engineConfig`, `entityTypeName`, `entitySchema`, `restPath`, `options?`): `void`
27
+ > `static` **addCustomEntityStorage**\<`T`\>(`engineConfig`, `entityTypeName`, `entitySchema`, `restPath?`, `options?`): `void`
28
28
 
29
29
  Add a custom entity storage to the engine configuration.
30
30
 
@@ -54,11 +54,11 @@ The entity type name.
54
54
 
55
55
  The entity schema.
56
56
 
57
- ##### restPath
57
+ ##### restPath?
58
58
 
59
59
  `string`
60
60
 
61
- The rest path to serve the entity storage from.
61
+ The rest path to serve the entity storage from, leave undefined for no endpoints.
62
62
 
63
63
  ##### options?
64
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine",
3
- "version": "0.0.1-next.76",
3
+ "version": "0.0.1-next.77",
4
4
  "description": "Engine implementation.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/core": "next",
18
- "@twin.org/engine-core": "0.0.1-next.76",
19
- "@twin.org/engine-types": "0.0.1-next.76",
18
+ "@twin.org/engine-core": "0.0.1-next.77",
19
+ "@twin.org/engine-types": "0.0.1-next.77",
20
20
  "@twin.org/entity": "next"
21
21
  },
22
22
  "main": "./dist/cjs/index.cjs",