@twin.org/engine-server-types 0.0.3-next.44 → 0.0.3-next.46

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.
@@ -53,7 +53,10 @@ export function initialiseSocketRouteProcessorComponent(engineCore, context, ins
53
53
  else if (instanceConfig.type === SocketRouteProcessorType.Tenant) {
54
54
  createComponent = (createConfig) => {
55
55
  initSchemaTenantProcessor();
56
- initialiseEntityStorageConnector(engineCore, context, createConfig.options?.tenantEntityStorageType, "Tenant", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node]));
56
+ initialiseEntityStorageConnector(engineCore, context, createConfig.options?.tenantEntityStorageType, "Tenant", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [
57
+ ContextIdKeys.Node,
58
+ ContextIdKeys.Tenant
59
+ ]));
57
60
  return new TenantProcessor(EngineTypeHelper.mergeConfig({
58
61
  urlTransformerComponentType: engineCore.getRegisteredInstanceType("urlTransformerComponent")
59
62
  }, createConfig.options));
@@ -1 +1 @@
1
- {"version":3,"file":"socketRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/socketRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,mBAAmB,EACnB,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,UAAU,IAAI,yBAAyB,EAEvC,eAAe,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOnE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI5F,OAAO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,CAAC;IACrD,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,2BAA2B;KACpC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tAuthHeaderProcessor,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-service\";\nimport { SocketRouteProcessorFactory } from \"@twin.org/api-models\";\nimport {\n\tLoggingProcessor,\n\tContextIdProcessor,\n\tSocketRouteProcessor,\n\tStaticContextIdProcessor\n} from \"@twin.org/api-processors\";\nimport {\n\tinitSchema as initSchemaTenantProcessor,\n\ttype Tenant,\n\tTenantProcessor\n} from \"@twin.org/api-tenant-processor\";\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { SocketRouteProcessorConfig } from \"../models/config/socketRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { SocketRouteProcessorType } from \"../models/types/socketRouteProcessorType.js\";\n\n/**\n * Initialise the socket route processor.\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 initialiseSocketRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: SocketRouteProcessorConfig\n): EngineTypeInitialiserReturn<SocketRouteProcessorConfig, typeof SocketRouteProcessorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === SocketRouteProcessorType.AuthHeader) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaAuthEntityStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType,\n\t\t\t\tnameof<AuthenticationUser>(),\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\n\t\t\treturn new AuthHeaderProcessor(\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\turlTransformerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"urlTransformerComponent\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\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(AuthHeaderProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingProcessor(\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},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(LoggingProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.ContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew ContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(ContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.StaticContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(StaticContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SocketRoute) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SocketRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(SocketRouteProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Tenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaTenantProcessor();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.tenantEntityStorageType,\n\t\t\t\tnameof<Tenant>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\t\t\treturn new TenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\turlTransformerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"urlTransformerComponent\")\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(TenantProcessor);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: SocketRouteProcessorFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"socketRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/socketRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,mBAAmB,EACnB,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,UAAU,IAAI,yBAAyB,EAEvC,eAAe,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOnE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,UAAU,uCAAuC,CACtD,UAA4C,EAC5C,OAAgD,EAChD,cAA0C;IAE1C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,UAAU,EAAE,CAAC;QACjE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,2BAA2B,EAAE,CAAC;YAC9B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,qBAAqB,wBAE3C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;gBACpE,aAAa,CAAC,IAAI;gBAClB,aAAa,CAAC,MAAM;aACpB,CAAC,CACF,CAAC;YAEF,OAAO,IAAI,mBAAmB,CAC7B,gBAAgB,CAAC,WAAW,CAC3B;g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AgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,2BAAwC,CAAC;IAC1D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,MAAM,EAAE,CAAC;QACpE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,yBAAyB,EAAE,CAAC;YAC5B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,uBAAuB,YAE7C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;gBACpE,aAAa,CAAC,IAAI;gBAClB,aAAa,CAAC,MAAM;aACpB,CAAC,CACF,CAAC;YACF,OAAO,IAAI,eAAe,CACzB,gBAAgB,CAAC,WAAW,CAC3B;gBACC,2BAA2B,EAC1B,UAAU,CAAC,yBAAyB,CAAC,yBAAyB,CAAC;aAChE,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,qBAAmC,CAAC;IACrD,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,2BAA2B;KACpC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tAuthHeaderProcessor,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-service\";\nimport { SocketRouteProcessorFactory } from \"@twin.org/api-models\";\nimport {\n\tLoggingProcessor,\n\tContextIdProcessor,\n\tSocketRouteProcessor,\n\tStaticContextIdProcessor\n} from \"@twin.org/api-processors\";\nimport {\n\tinitSchema as initSchemaTenantProcessor,\n\ttype Tenant,\n\tTenantProcessor\n} from \"@twin.org/api-tenant-processor\";\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { EngineTypeHelper, initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { SocketRouteProcessorConfig } from \"../models/config/socketRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { SocketRouteProcessorType } from \"../models/types/socketRouteProcessorType.js\";\n\n/**\n * Initialise the socket route processor.\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 initialiseSocketRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: SocketRouteProcessorConfig\n): EngineTypeInitialiserReturn<SocketRouteProcessorConfig, typeof SocketRouteProcessorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === SocketRouteProcessorType.AuthHeader) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaAuthEntityStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.userEntityStorageType,\n\t\t\t\tnameof<AuthenticationUser>(),\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\n\t\t\treturn new AuthHeaderProcessor(\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\turlTransformerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"urlTransformerComponent\"),\n\t\t\t\t\t\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\")\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(AuthHeaderProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingProcessor(\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},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(LoggingProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.ContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew ContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(ContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.StaticContextId) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticContextIdProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(StaticContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SocketRoute) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SocketRouteProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(SocketRouteProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Tenant) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaTenantProcessor();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.tenantEntityStorageType,\n\t\t\t\tnameof<Tenant>(),\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 TenantProcessor(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\turlTransformerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"urlTransformerComponent\")\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(TenantProcessor);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: SocketRouteProcessorFactory\n\t};\n}\n"]}
package/docs/changelog.md CHANGED
@@ -1,5 +1,75 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.46](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.0.3-next.45...engine-server-types-v0.0.3-next.46) (2026-06-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * add tenant component ([#138](https://github.com/iotaledger/twin-engine/issues/138)) ([ebbcb8f](https://github.com/iotaledger/twin-engine/commit/ebbcb8fa3fee05048ddad2891c6ada66bd29e7bd))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/engine-models bumped from 0.0.3-next.45 to 0.0.3-next.46
16
+ * @twin.org/engine-types bumped from 0.0.3-next.45 to 0.0.3-next.46
17
+
18
+ ## [0.0.3-next.45](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.0.3-next.44...engine-server-types-v0.0.3-next.45) (2026-06-02)
19
+
20
+
21
+ ### Features
22
+
23
+ * add auth admin component ([201cd06](https://github.com/iotaledger/twin-engine/commit/201cd061be83afccb5a6b06856ffe7cf8db7d6b3))
24
+ * add authentication rate and audit services ([#95](https://github.com/iotaledger/twin-engine/issues/95)) ([55e2b08](https://github.com/iotaledger/twin-engine/commit/55e2b089661529e0556115817cc435cc6e4292cc))
25
+ * add context id features ([#51](https://github.com/iotaledger/twin-engine/issues/51)) ([eaef180](https://github.com/iotaledger/twin-engine/commit/eaef1807397a907bc7655ef1545a151a710ca2f1))
26
+ * add data space connector ([a824d99](https://github.com/iotaledger/twin-engine/commit/a824d9931faeaa8115e01f8e7545b802d0e7ac70))
27
+ * add default logging component for web server ([8ad94f0](https://github.com/iotaledger/twin-engine/commit/8ad94f0d2d9a5241a8854b1e59fb9a55ce310142))
28
+ * add fed cat filters ([a52cbf1](https://github.com/iotaledger/twin-engine/commit/a52cbf1eaf85e6cad61de9ea9448932fb5ae0f43))
29
+ * add federated catalogue ([1b15dd0](https://github.com/iotaledger/twin-engine/commit/1b15dd059a11446457651c411a73145fab37f025))
30
+ * add hosting component ([#70](https://github.com/iotaledger/twin-engine/issues/70)) ([2ab0dec](https://github.com/iotaledger/twin-engine/commit/2ab0dec8fdb979395c639b73f394a40a0dd7e55a))
31
+ * add latest rights management components ([2d305c8](https://github.com/iotaledger/twin-engine/commit/2d305c8c85c77bb4f5694c76422db4a11efc1a40))
32
+ * add mimeTypeProcessors and disableNodeIdentity ([bb7e81e](https://github.com/iotaledger/twin-engine/commit/bb7e81e2036fe042068a5645ec59b22e20d33aad))
33
+ * add rest clients as components ([c6f956a](https://github.com/iotaledger/twin-engine/commit/c6f956afe4fc22cd552174539c92a109448dc242))
34
+ * add rights management modules ([e02cadc](https://github.com/iotaledger/twin-engine/commit/e02cadc840d242fe16a73ab41ba61376c7467e50))
35
+ * add rights management negotiation ([84ef46b](https://github.com/iotaledger/twin-engine/commit/84ef46bff110611a19512793425c8c873ee2a590))
36
+ * add synchronised storage support ([5142e34](https://github.com/iotaledger/twin-engine/commit/5142e3488f09195cf9f48a9c6c6d1014231a4c2c))
37
+ * add task scheduler ([0951107](https://github.com/iotaledger/twin-engine/commit/09511073ad042194a45206303f0ef31d8d6af5db))
38
+ * add trust and rights management plugins ([eea0807](https://github.com/iotaledger/twin-engine/commit/eea0807601833220bd9fd8605b5e4383fbc0ebae))
39
+ * add validate-locales ([b92ea09](https://github.com/iotaledger/twin-engine/commit/b92ea09dbcfe35225271a51f24d231f59e2d363e))
40
+ * additional component wiring ([#133](https://github.com/iotaledger/twin-engine/issues/133)) ([a32bce1](https://github.com/iotaledger/twin-engine/commit/a32bce169ab3a47fd566eb089c6b01ba147ea1da))
41
+ * context id handlers repopulated after engine clone ([9712e32](https://github.com/iotaledger/twin-engine/commit/9712e328f4607f5b2c82355c394c61bde0ee39bf))
42
+ * eslint migration to flat config ([6b978da](https://github.com/iotaledger/twin-engine/commit/6b978daf777a615d7758b63c3df57d5a376f6dfb))
43
+ * modifying the engine to run the new services ([#10](https://github.com/iotaledger/twin-engine/issues/10)) ([6f7141f](https://github.com/iotaledger/twin-engine/commit/6f7141fe0a6d05c725066b274bcc18b5490e580b))
44
+ * multi instance component support ([#83](https://github.com/iotaledger/twin-engine/issues/83)) ([6012b50](https://github.com/iotaledger/twin-engine/commit/6012b50959df5af893f05516d42eea2e0800b31a))
45
+ * remove additional identity auth components ([409b2e6](https://github.com/iotaledger/twin-engine/commit/409b2e6a5a543d0795b01916349b39922afb6d88))
46
+ * remove authentication generator components ([#67](https://github.com/iotaledger/twin-engine/issues/67)) ([62f7984](https://github.com/iotaledger/twin-engine/commit/62f798468f567fdbf648401aa0dc51cda871c913))
47
+ * remove dap and darp ([d568c4f](https://github.com/iotaledger/twin-engine/commit/d568c4fc58a3159378e1d65f93228ae84f34a31d))
48
+ * replace unified data space connector with control plane and data plane components ([#78](https://github.com/iotaledger/twin-engine/issues/78)) ([a6ebace](https://github.com/iotaledger/twin-engine/commit/a6ebace389dafe754a3ca0827999966b5a101a59))
49
+ * simplify config building ([732c871](https://github.com/iotaledger/twin-engine/commit/732c871c5aca236759168f4bc15aeffd98a330a8))
50
+ * standardised engine logging naming ([0dbf857](https://github.com/iotaledger/twin-engine/commit/0dbf857587641f86ddf010143519d0e8333489ff))
51
+ * switch to devDeps ([32832ac](https://github.com/iotaledger/twin-engine/commit/32832acd934e1e5569474281a527c9b118d30732))
52
+ * typescript 6 update ([b227f52](https://github.com/iotaledger/twin-engine/commit/b227f5271b18ac627b932ea8e59d2879ff01ebd7))
53
+ * update dependencies ([e6ebe42](https://github.com/iotaledger/twin-engine/commit/e6ebe42b9d61066227ad8b45dae14c8f8615b760))
54
+ * update dependencies ([97c9f64](https://github.com/iotaledger/twin-engine/commit/97c9f64b6ef096963bcc5de338a2a9e99bdc1a11))
55
+ * update framework core ([acc0f8d](https://github.com/iotaledger/twin-engine/commit/acc0f8d455a4b8ec47f1da643139fa0f07775fa6))
56
+ * update rights management and add authentication generators ([f728a1e](https://github.com/iotaledger/twin-engine/commit/f728a1efea15ada8d10cfbe17cafe7e2b252f527))
57
+ * upgrade framework components ([efd52e8](https://github.com/iotaledger/twin-engine/commit/efd52e80564fff29c3897bfa09b6305b3a322812))
58
+ * use shared store mechanism ([#2](https://github.com/iotaledger/twin-engine/issues/2)) ([9eed8d7](https://github.com/iotaledger/twin-engine/commit/9eed8d7766388479b42f03e2542fe761f2156408))
59
+
60
+
61
+ ### Bug Fixes
62
+
63
+ * constructing TenantProcessor ([4dad604](https://github.com/iotaledger/twin-engine/commit/4dad604c0e424a3ffa65f3d6cef173058b21ec76))
64
+
65
+
66
+ ### Dependencies
67
+
68
+ * The following workspace dependencies were updated
69
+ * dependencies
70
+ * @twin.org/engine-models bumped from 0.0.3-next.44 to 0.0.3-next.45
71
+ * @twin.org/engine-types bumped from 0.0.3-next.44 to 0.0.3-next.45
72
+
3
73
  ## [0.0.3-next.44](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.0.3-next.43...engine-server-types-v0.0.3-next.44) (2026-06-02)
4
74
 
5
75
 
@@ -486,6 +486,12 @@ Dataspace control plane component options which can be overridden by individual
486
486
 
487
487
  Dataspace data plane component options which can be overridden by individual components by specifying types other than default.
488
488
 
489
+ ##### tenantComponent?
490
+
491
+ > `optional` **tenantComponent?**: `IEngineCoreTypeConfig`\<`TenantComponentConfig`\>[]
492
+
493
+ Tenant component options which can be overridden by individual components by specifying types other than default.
494
+
489
495
  ##### tenantAdminComponent?
490
496
 
491
497
  > `optional` **tenantAdminComponent?**: `IEngineCoreTypeConfig`\<`TenantAdminComponentConfig`\>[]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-server-types",
3
- "version": "0.0.3-next.44",
3
+ "version": "0.0.3-next.46",
4
4
  "description": "Server-focused component types and configuration models for API routing and hosting.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,8 +25,8 @@
25
25
  "@twin.org/api-tenant-processor": "next",
26
26
  "@twin.org/context": "next",
27
27
  "@twin.org/core": "next",
28
- "@twin.org/engine-models": "0.0.3-next.44",
29
- "@twin.org/engine-types": "0.0.3-next.44",
28
+ "@twin.org/engine-models": "0.0.3-next.46",
29
+ "@twin.org/engine-types": "0.0.3-next.46",
30
30
  "@twin.org/entity": "next",
31
31
  "@twin.org/nameof": "next"
32
32
  },