@twin.org/engine-server-types 0.9.1-next.2 → 0.9.1-next.4

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.
@@ -7,7 +7,7 @@ import { ComponentFactory } from "@twin.org/core";
7
7
  import { EngineTypeHelper, initialiseEntityStorageConnector } from "@twin.org/engine-types";
8
8
  import { AuthenticationComponentType } from "../models/types/authenticationComponentType.js";
9
9
  /**
10
- * Initialise the authentication.
10
+ * Initialise the authentication component.
11
11
  * @param engineCore The engine core.
12
12
  * @param context The context for the engine.
13
13
  * @param instanceConfig The instance config.
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../src/components/authentication.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,qCAAqC,EAAE,MAAM,+CAA+C,CAAC;AACtG,OAAO,EACN,kCAAkC,EAClC,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAMnE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,UAAU,iCAAiC,CAChD,UAA4C,EAC5C,OAAgD,EAChD,cAA6C;IAE7C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,aAAa,EAAE,CAAC;QACvE,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;YACF,OAAO,IAAI,kCAAkC,CAC5C,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,wBAAwB,EACvB,UAAU,CAAC,iCAAiC,CAAC,sBAAsB,CAAC;gBACrE,8BAA8B,EAAE,UAAU,CAAC,iCAAiC,CAC3E,8BAA8B,CAC9B;gBACD,6BAA6B,EAAE,UAAU,CAAC,yBAAyB,CAClE,6BAA6B,CAC7B;aACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,0CAAsD,CAAC;IACxE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,qCAAqC,CACxC,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,8CAAyD,CAAC;IAC3E,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 { EntityStorageAuthenticationRestClient } from \"@twin.org/api-auth-entity-storage-rest-client\";\nimport {\n\tEntityStorageAuthenticationService,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-service\";\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 { EngineTypeHelper, initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { AuthenticationComponentConfig } from \"../models/config/authenticationComponentConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { AuthenticationComponentType } from \"../models/types/authenticationComponentType.js\";\n\n/**\n * Initialise the authentication.\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 initialiseAuthenticationComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: AuthenticationComponentConfig\n): EngineTypeInitialiserReturn<AuthenticationComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === AuthenticationComponentType.EntityStorage) {\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\t\t\treturn new EntityStorageAuthenticationService(\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\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthenticationAuditServiceType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"authenticationAuditComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationRateServiceType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationRateComponent\"\n\t\t\t\t\t\t)\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(EntityStorageAuthenticationService);\n\t} else if (instanceConfig.type === AuthenticationComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew EntityStorageAuthenticationRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(EntityStorageAuthenticationRestClient);\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
+ {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../../../src/components/authentication.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,qCAAqC,EAAE,MAAM,+CAA+C,CAAC;AACtG,OAAO,EACN,kCAAkC,EAClC,UAAU,IAAI,2BAA2B,EAEzC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAMnE,OAAO,EAAE,gBAAgB,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI5F,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,UAAU,iCAAiC,CAChD,UAA4C,EAC5C,OAAgD,EAChD,cAA6C;IAE7C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,aAAa,EAAE,CAAC;QACvE,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;YACF,OAAO,IAAI,kCAAkC,CAC5C,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,wBAAwB,EACvB,UAAU,CAAC,iCAAiC,CAAC,sBAAsB,CAAC;gBACrE,8BAA8B,EAAE,UAAU,CAAC,iCAAiC,CAC3E,8BAA8B,CAC9B;gBACD,6BAA6B,EAAE,UAAU,CAAC,yBAAyB,CAClE,6BAA6B,CAC7B;aACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,0CAAsD,CAAC;IACxE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,qCAAqC,CACxC,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,8CAAyD,CAAC;IAC3E,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 { EntityStorageAuthenticationRestClient } from \"@twin.org/api-auth-entity-storage-rest-client\";\nimport {\n\tEntityStorageAuthenticationService,\n\tinitSchema as initSchemaAuthEntityStorage,\n\ttype AuthenticationUser\n} from \"@twin.org/api-auth-entity-storage-service\";\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 { EngineTypeHelper, initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { AuthenticationComponentConfig } from \"../models/config/authenticationComponentConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { AuthenticationComponentType } from \"../models/types/authenticationComponentType.js\";\n\n/**\n * Initialise the authentication 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 initialiseAuthenticationComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: AuthenticationComponentConfig\n): EngineTypeInitialiserReturn<AuthenticationComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === AuthenticationComponentType.EntityStorage) {\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\t\t\treturn new EntityStorageAuthenticationService(\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\ttenantAdminComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\"),\n\t\t\t\t\t\tauthenticationAuditServiceType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"authenticationAuditComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tauthenticationRateServiceType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"authenticationRateComponent\"\n\t\t\t\t\t\t)\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(EntityStorageAuthenticationService);\n\t} else if (instanceConfig.type === AuthenticationComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew EntityStorageAuthenticationRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(EntityStorageAuthenticationRestClient);\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"]}
@@ -3,7 +3,7 @@ import type { EngineTypeInitialiserReturn, IEngineCore, IEngineCoreContext } fro
3
3
  import type { AuthenticationComponentConfig } from "../models/config/authenticationComponentConfig.js";
4
4
  import type { IEngineServerConfig } from "../models/IEngineServerConfig.js";
5
5
  /**
6
- * Initialise the authentication.
6
+ * Initialise the authentication component.
7
7
  * @param engineCore The engine core.
8
8
  * @param context The context for the engine.
9
9
  * @param instanceConfig The instance config.
package/docs/changelog.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.1-next.4](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.9.1-next.3...engine-server-types-v0.9.1-next.4) (2026-06-30)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **engine-server-types:** Synchronize repo versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/engine-models bumped from 0.9.1-next.3 to 0.9.1-next.4
16
+ * @twin.org/engine-types bumped from 0.9.1-next.3 to 0.9.1-next.4
17
+
18
+ ## [0.9.1-next.3](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.9.1-next.2...engine-server-types-v0.9.1-next.3) (2026-06-29)
19
+
20
+
21
+ ### Features
22
+
23
+ * update components ([83675cc](https://github.com/iotaledger/twin-engine/commit/83675cca92b949c69fd1db423c1e86896691581d))
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * The following workspace dependencies were updated
29
+ * dependencies
30
+ * @twin.org/engine-models bumped from 0.9.1-next.2 to 0.9.1-next.3
31
+ * @twin.org/engine-types bumped from 0.9.1-next.2 to 0.9.1-next.3
32
+
3
33
  ## [0.9.1-next.2](https://github.com/iotaledger/twin-engine/compare/engine-server-types-v0.9.1-next.1...engine-server-types-v0.9.1-next.2) (2026-06-26)
4
34
 
5
35
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **initialiseAuthenticationComponent**(`engineCore`, `context`, `instanceConfig`): `EngineTypeInitialiserReturn`\<[`AuthenticationComponentConfig`](../type-aliases/AuthenticationComponentConfig.md), `Factory`\<`IComponent`\>\>
4
4
 
5
- Initialise the authentication.
5
+ Initialise the authentication component.
6
6
 
7
7
  ## Parameters
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-server-types",
3
- "version": "0.9.1-next.2",
3
+ "version": "0.9.1-next.4",
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.9.1-next.2",
29
- "@twin.org/engine-types": "0.9.1-next.2",
28
+ "@twin.org/engine-models": "0.9.1-next.4",
29
+ "@twin.org/engine-types": "0.9.1-next.4",
30
30
  "@twin.org/entity": "next",
31
31
  "@twin.org/nameof": "next"
32
32
  },