@twin.org/engine-server-types 0.0.3-next.12 → 0.0.3-next.14

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,7 +6,6 @@ import { LoggingProcessor, ContextIdProcessor, RestRouteProcessor, StaticContext
6
6
  import { initSchema as initSchemaTenantProcessor, TenantProcessor } from "@twin.org/api-tenant-processor";
7
7
  import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
8
8
  import { initialiseEntityStorageConnector } from "@twin.org/engine-types";
9
- import { VerifiableCredentialAuthenticationProcessor } from "@twin.org/identity-authentication";
10
9
  import { RestRouteProcessorType } from "../models/types/restRouteProcessorType.js";
11
10
  /**
12
11
  * Initialise the rest route processor.
@@ -27,16 +26,6 @@ export async function initialiseRestRouteProcessorComponent(engineCore, context,
27
26
  });
28
27
  instanceType = "auth-header-processor";
29
28
  }
30
- else if (instanceConfig.type === RestRouteProcessorType.AuthVerifiableCredential) {
31
- component = new VerifiableCredentialAuthenticationProcessor({
32
- identityConnectorType: engineCore.getRegisteredInstanceType("identityConnector"),
33
- loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
34
- config: {
35
- ...instanceConfig.options?.config
36
- }
37
- });
38
- instanceType = "verifiable-credential-authentication-processor";
39
- }
40
29
  else if (instanceConfig.type === RestRouteProcessorType.Logging) {
41
30
  component = new LoggingProcessor({
42
31
  loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
@@ -1 +1 @@
1
- {"version":3,"file":"restRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/restRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAA4B,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,MAAM,0BAA0B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X-License-Identifier: Apache-2.0.\nimport { AuthHeaderProcessor } from \"@twin.org/api-auth-entity-storage-service\";\nimport { RestRouteProcessorFactory, type IBaseRouteProcessor } from \"@twin.org/api-models\";\nimport {\n\tLoggingProcessor,\n\tContextIdProcessor,\n\tRestRouteProcessor,\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 { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport { initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { VerifiableCredentialAuthenticationProcessor } from \"@twin.org/identity-authentication\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { RestRouteProcessorConfig } from \"../models/config/restRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { RestRouteProcessorType } from \"../models/types/restRouteProcessorType.js\";\n\n/**\n * Initialise the rest 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 async function initialiseRestRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: RestRouteProcessorConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof RestRouteProcessorFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IBaseRouteProcessor | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === RestRouteProcessorType.AuthHeader) {\n\t\tcomponent = new AuthHeaderProcessor({\n\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(AuthHeaderProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.AuthVerifiableCredential) {\n\t\tcomponent = new VerifiableCredentialAuthenticationProcessor({\n\t\t\tidentityConnectorType: engineCore.getRegisteredInstanceType(\"identityConnector\"),\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(VerifiableCredentialAuthenticationProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.Logging) {\n\t\tcomponent = new LoggingProcessor({\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(LoggingProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.ContextId) {\n\t\tcomponent = new ContextIdProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(ContextIdProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.StaticContextId) {\n\t\tcomponent = new StaticContextIdProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(StaticContextIdProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.RestRoute) {\n\t\tcomponent = new RestRouteProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(RestRouteProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.Tenant) {\n\t\tinitSchemaTenantProcessor();\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.tenantEntityStorageType,\n\t\t\tnameof<Tenant>(),\n\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\tContextIdKeys.Node,\n\t\t\t\tContextIdKeys.Tenant\n\t\t\t])\n\t\t);\n\n\t\tcomponent = new TenantProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(TenantProcessor);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: RestRouteProcessorFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"restRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/restRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAA4B,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,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;AAGnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAI1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAEnF;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,qCAAqC,CAC1D,UAA4C,EAC5C,OAAgD,EAChD,cAAwC;IAMxC,IAAI,SAA0C,CAAC;IAC/C,IAAI,YAAgC,CAAC;IAErC,IAAI,cAAc,CAAC,IAAI,KAAK,sBAAsB,CAAC,UAAU,EAAE,CAAC;QAC/D,SAAS,GAAG,IAAI,mBAAmB,CAAC;YACnC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;YAC1E,MAAM,EAAE;gBACP,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM;aACjC;SACD,CAAC,CAAC;QACH,YAAY,0BAAuC,CAAC;IACrD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,sBAAsB,CAAC,OAAO,EAAE,CAAC;QACnE,SAAS,GAAG,I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cesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { AuthHeaderProcessor } from \"@twin.org/api-auth-entity-storage-service\";\nimport { RestRouteProcessorFactory, type IBaseRouteProcessor } from \"@twin.org/api-models\";\nimport {\n\tLoggingProcessor,\n\tContextIdProcessor,\n\tRestRouteProcessor,\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 { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport { initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport type { RestRouteProcessorConfig } from \"../models/config/restRouteProcessorConfig.js\";\nimport type { IEngineServerConfig } from \"../models/IEngineServerConfig.js\";\nimport { RestRouteProcessorType } from \"../models/types/restRouteProcessorType.js\";\n\n/**\n * Initialise the rest 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 async function initialiseRestRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: RestRouteProcessorConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof RestRouteProcessorFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IBaseRouteProcessor | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === RestRouteProcessorType.AuthHeader) {\n\t\tcomponent = new AuthHeaderProcessor({\n\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(AuthHeaderProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.Logging) {\n\t\tcomponent = new LoggingProcessor({\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(LoggingProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.ContextId) {\n\t\tcomponent = new ContextIdProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(ContextIdProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.StaticContextId) {\n\t\tcomponent = new StaticContextIdProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(StaticContextIdProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.RestRoute) {\n\t\tcomponent = new RestRouteProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(RestRouteProcessor);\n\t} else if (instanceConfig.type === RestRouteProcessorType.Tenant) {\n\t\tinitSchemaTenantProcessor();\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.tenantEntityStorageType,\n\t\t\tnameof<Tenant>(),\n\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\tContextIdKeys.Node,\n\t\t\t\tContextIdKeys.Tenant\n\t\t\t])\n\t\t);\n\n\t\tcomponent = new TenantProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(TenantProcessor);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: RestRouteProcessorFactory\n\t};\n}\n"]}
@@ -6,7 +6,6 @@ import { LoggingProcessor, ContextIdProcessor, SocketRouteProcessor, StaticConte
6
6
  import { initSchema as initSchemaTenantProcessor, TenantProcessor } from "@twin.org/api-tenant-processor";
7
7
  import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
8
8
  import { initialiseEntityStorageConnector } from "@twin.org/engine-types";
9
- import { VerifiableCredentialAuthenticationProcessor } from "@twin.org/identity-authentication";
10
9
  import { SocketRouteProcessorType } from "../models/types/socketRouteProcessorType.js";
11
10
  /**
12
11
  * Initialise the socket route processor.
@@ -27,16 +26,6 @@ export async function initialiseSocketRouteProcessorComponent(engineCore, contex
27
26
  });
28
27
  instanceType = "auth-header-processor";
29
28
  }
30
- else if (instanceConfig.type === SocketRouteProcessorType.AuthVerifiableCredential) {
31
- component = new VerifiableCredentialAuthenticationProcessor({
32
- identityConnectorType: engineCore.getRegisteredInstanceType("identityConnector"),
33
- loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
34
- config: {
35
- ...instanceConfig.options?.config
36
- }
37
- });
38
- instanceType = "verifiable-credential-authentication-processor";
39
- }
40
29
  else if (instanceConfig.type === SocketRouteProcessorType.Logging) {
41
30
  component = new LoggingProcessor({
42
31
  loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
@@ -1 +1 @@
1
- {"version":3,"file":"socketRouteProcessor.js","sourceRoot":"","sources":["../../../src/components/socketRouteProcessor.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAA4B,MAAM,sBAAsB,CAAC;AAC7F,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;AAGnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,2CAA2C,EAAE,MAAM,mCAAmC,CAAC;AAIhG,OAAO,EAAE,wBAAwB,EAAE,MAAM,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,CAAC;QAC3D,YAAY,yBAAsC,CAAC;IACpD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,eAAe,EAAE,CAAC;QAC7E,SAAS,GAAG,IAAI,wBAAwB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACjE,YAAY,gCAA4C,CAAC;IAC1D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,WAAW,EAAE,CAAC;QACzE,SAAS,GAAG,IAAI,oBAAoB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC7D,YAAY,2BAAwC,CAAC;IACtD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,MAAM,EAAE,CAAC;QACpE,yBAAyB,EAAE,CAAC;QAC5B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,cAAc,CAAC,OAAO,EAAE,uBAAuB,YAE/C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;QAEF,SAAS,GAAG,IAAI,eAAe,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACxD,YAAY,qBAAmC,CAAC;IACjD,CAAC;IAED,OAAO;QACN,SAAS;QACT,YAAY;QACZ,OAAO,EAAE,2BAA2B;KACpC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { AuthHeaderProcessor } from \"@twin.org/api-auth-entity-storage-service\";\nimport { SocketRouteProcessorFactory, type IBaseRouteProcessor } 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 { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport { initialiseEntityStorageConnector } from \"@twin.org/engine-types\";\nimport { VerifiableCredentialAuthenticationProcessor } from \"@twin.org/identity-authentication\";\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 async function initialiseSocketRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: SocketRouteProcessorConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof SocketRouteProcessorFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IBaseRouteProcessor | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === SocketRouteProcessorType.AuthHeader) {\n\t\tcomponent = new AuthHeaderProcessor({\n\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(AuthHeaderProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.AuthVerifiableCredential) {\n\t\tcomponent = new VerifiableCredentialAuthenticationProcessor({\n\t\t\tidentityConnectorType: engineCore.getRegisteredInstanceType(\"identityConnector\"),\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(VerifiableCredentialAuthenticationProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Logging) {\n\t\tcomponent = new LoggingProcessor({\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(LoggingProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.ContextId) {\n\t\tcomponent = new ContextIdProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(ContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.StaticContextId) {\n\t\tcomponent = new StaticContextIdProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(StaticContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SocketRoute) {\n\t\tcomponent = new SocketRouteProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(SocketRouteProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Tenant) {\n\t\tinitSchemaTenantProcessor();\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.tenantEntityStorageType,\n\t\t\tnameof<Tenant>(),\n\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t);\n\n\t\tcomponent = new TenantProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(TenantProcessor);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\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,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAA4B,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QAC3D,YAAY,yBAAsC,CAAC;IACpD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,eAAe,EAAE,CAAC;QAC7E,SAAS,GAAG,IAAI,wBAAwB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACjE,YAAY,gCAA4C,CAAC;IAC1D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,WAAW,EAAE,CAAC;QACzE,SAAS,GAAG,IAAI,oBAAoB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC7D,YAAY,2BAAwC,CAAC;IACtD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,MAAM,EAAE,CAAC;QACpE,yBAAyB,EAAE,CAAC;QAC5B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,cAAc,CAAC,OAAO,EAAE,uBAAuB,YAE/C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;QAEF,SAAS,GAAG,IAAI,eAAe,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACxD,YAAY,qBAAmC,CAAC;IACjD,CAAC;IAED,OAAO;QACN,SAAS;QACT,YAAY;QACZ,OAAO,EAAE,2BAA2B;KACpC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { AuthHeaderProcessor } from \"@twin.org/api-auth-entity-storage-service\";\nimport { SocketRouteProcessorFactory, type IBaseRouteProcessor } 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 { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport { 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 async function initialiseSocketRouteProcessorComponent(\n\tengineCore: IEngineCore<IEngineServerConfig>,\n\tcontext: IEngineCoreContext<IEngineServerConfig>,\n\tinstanceConfig: SocketRouteProcessorConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof SocketRouteProcessorFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IBaseRouteProcessor | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === SocketRouteProcessorType.AuthHeader) {\n\t\tcomponent = new AuthHeaderProcessor({\n\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(AuthHeaderProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Logging) {\n\t\tcomponent = new LoggingProcessor({\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tconfig: {\n\t\t\t\t...instanceConfig.options?.config\n\t\t\t}\n\t\t});\n\t\tinstanceType = nameofKebabCase(LoggingProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.ContextId) {\n\t\tcomponent = new ContextIdProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(ContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.StaticContextId) {\n\t\tcomponent = new StaticContextIdProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(StaticContextIdProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.SocketRoute) {\n\t\tcomponent = new SocketRouteProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(SocketRouteProcessor);\n\t} else if (instanceConfig.type === SocketRouteProcessorType.Tenant) {\n\t\tinitSchemaTenantProcessor();\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.tenantEntityStorageType,\n\t\t\tnameof<Tenant>(),\n\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t);\n\n\t\tcomponent = new TenantProcessor(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(TenantProcessor);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: SocketRouteProcessorFactory\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"restRouteProcessorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/restRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@twin.org/api-auth-entity-storage-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tIRestRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@twin.org/api-processors\";\nimport type { ITenantProcessorConstructorOptions } from \"@twin.org/api-tenant-processor\";\nimport type { IVerifiableCredentialAuthenticationProcessorConstructorOptions } from \"@twin.org/identity-authentication\";\nimport type { RestRouteProcessorType } from \"../types/restRouteProcessorType.js\";\n\n/**\n * REST route processor config types.\n */\nexport type RestRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.AuthVerifiableCredential;\n\t\t\toptions?: IVerifiableCredentialAuthenticationProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.RestRoute;\n\t\t\toptions?: IRestRouteProcessorConstructorOptions;\n\t };\n"]}
1
+ {"version":3,"file":"restRouteProcessorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/restRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@twin.org/api-auth-entity-storage-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tIRestRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@twin.org/api-processors\";\nimport type { ITenantProcessorConstructorOptions } from \"@twin.org/api-tenant-processor\";\nimport type { RestRouteProcessorType } from \"../types/restRouteProcessorType.js\";\n\n/**\n * REST route processor config types.\n */\nexport type RestRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RestRouteProcessorType.RestRoute;\n\t\t\toptions?: IRestRouteProcessorConstructorOptions;\n\t };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"socketRouteProcessorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/socketRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@twin.org/api-auth-entity-storage-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tISocketRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@twin.org/api-processors\";\nimport type { ITenantProcessorConstructorOptions } from \"@twin.org/api-tenant-processor\";\nimport type { IVerifiableCredentialAuthenticationProcessorConstructorOptions } from \"@twin.org/identity-authentication\";\nimport type { SocketRouteProcessorType } from \"../types/socketRouteProcessorType.js\";\n\n/**\n * Socket route processor config types.\n */\nexport type SocketRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.AuthVerifiableCredential;\n\t\t\toptions?: IVerifiableCredentialAuthenticationProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.SocketRoute;\n\t\t\toptions?: ISocketRouteProcessorConstructorOptions;\n\t };\n"]}
1
+ {"version":3,"file":"socketRouteProcessorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/socketRouteProcessorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAuthHeaderProcessorConstructorOptions } from \"@twin.org/api-auth-entity-storage-service\";\nimport type {\n\tIContextIdProcessorConstructorOptions,\n\tILoggingProcessorConstructorOptions,\n\tISocketRouteProcessorConstructorOptions,\n\tIStaticContextIdProcessorConstructorOptions\n} from \"@twin.org/api-processors\";\nimport type { ITenantProcessorConstructorOptions } from \"@twin.org/api-tenant-processor\";\nimport type { SocketRouteProcessorType } from \"../types/socketRouteProcessorType.js\";\n\n/**\n * Socket route processor config types.\n */\nexport type SocketRouteProcessorConfig =\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.AuthHeader;\n\t\t\toptions?: IAuthHeaderProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Logging;\n\t\t\toptions?: ILoggingProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.ContextId;\n\t\t\toptions: IContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.StaticContextId;\n\t\t\toptions: IStaticContextIdProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.Tenant;\n\t\t\toptions?: ITenantProcessorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SocketRouteProcessorType.SocketRoute;\n\t\t\toptions?: ISocketRouteProcessorConstructorOptions;\n\t };\n"]}
@@ -1,7 +1,6 @@
1
1
  import type { IAuthHeaderProcessorConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
2
2
  import type { IContextIdProcessorConstructorOptions, ILoggingProcessorConstructorOptions, IRestRouteProcessorConstructorOptions, IStaticContextIdProcessorConstructorOptions } from "@twin.org/api-processors";
3
3
  import type { ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
4
- import type { IVerifiableCredentialAuthenticationProcessorConstructorOptions } from "@twin.org/identity-authentication";
5
4
  import type { RestRouteProcessorType } from "../types/restRouteProcessorType.js";
6
5
  /**
7
6
  * REST route processor config types.
@@ -9,9 +8,6 @@ import type { RestRouteProcessorType } from "../types/restRouteProcessorType.js"
9
8
  export type RestRouteProcessorConfig = {
10
9
  type: typeof RestRouteProcessorType.AuthHeader;
11
10
  options?: IAuthHeaderProcessorConstructorOptions;
12
- } | {
13
- type: typeof RestRouteProcessorType.AuthVerifiableCredential;
14
- options?: IVerifiableCredentialAuthenticationProcessorConstructorOptions;
15
11
  } | {
16
12
  type: typeof RestRouteProcessorType.Logging;
17
13
  options?: ILoggingProcessorConstructorOptions;
@@ -1,7 +1,6 @@
1
1
  import type { IAuthHeaderProcessorConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
2
2
  import type { IContextIdProcessorConstructorOptions, ILoggingProcessorConstructorOptions, ISocketRouteProcessorConstructorOptions, IStaticContextIdProcessorConstructorOptions } from "@twin.org/api-processors";
3
3
  import type { ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
4
- import type { IVerifiableCredentialAuthenticationProcessorConstructorOptions } from "@twin.org/identity-authentication";
5
4
  import type { SocketRouteProcessorType } from "../types/socketRouteProcessorType.js";
6
5
  /**
7
6
  * Socket route processor config types.
@@ -9,9 +8,6 @@ import type { SocketRouteProcessorType } from "../types/socketRouteProcessorType
9
8
  export type SocketRouteProcessorConfig = {
10
9
  type: typeof SocketRouteProcessorType.AuthHeader;
11
10
  options?: IAuthHeaderProcessorConstructorOptions;
12
- } | {
13
- type: typeof SocketRouteProcessorType.AuthVerifiableCredential;
14
- options?: IVerifiableCredentialAuthenticationProcessorConstructorOptions;
15
11
  } | {
16
12
  type: typeof SocketRouteProcessorType.Logging;
17
13
  options?: ILoggingProcessorConstructorOptions;
package/docs/changelog.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # @twin.org/engine-server-types - Changelog
2
2
 
3
+ ## [0.0.3-next.14](https://github.com/twinfoundation/engine/compare/engine-server-types-v0.0.3-next.13...engine-server-types-v0.0.3-next.14) (2026-01-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * add auth admin component ([201cd06](https://github.com/twinfoundation/engine/commit/201cd061be83afccb5a6b06856ffe7cf8db7d6b3))
9
+ * add context id features ([#51](https://github.com/twinfoundation/engine/issues/51)) ([eaef180](https://github.com/twinfoundation/engine/commit/eaef1807397a907bc7655ef1545a151a710ca2f1))
10
+ * add data space connector ([a824d99](https://github.com/twinfoundation/engine/commit/a824d9931faeaa8115e01f8e7545b802d0e7ac70))
11
+ * add default logging component for web server ([8ad94f0](https://github.com/twinfoundation/engine/commit/8ad94f0d2d9a5241a8854b1e59fb9a55ce310142))
12
+ * add fed cat filters ([a52cbf1](https://github.com/twinfoundation/engine/commit/a52cbf1eaf85e6cad61de9ea9448932fb5ae0f43))
13
+ * add federated catalogue ([1b15dd0](https://github.com/twinfoundation/engine/commit/1b15dd059a11446457651c411a73145fab37f025))
14
+ * add latest rights management components ([2d305c8](https://github.com/twinfoundation/engine/commit/2d305c8c85c77bb4f5694c76422db4a11efc1a40))
15
+ * add mimeTypeProcessors and disableNodeIdentity ([bb7e81e](https://github.com/twinfoundation/engine/commit/bb7e81e2036fe042068a5645ec59b22e20d33aad))
16
+ * add rest clients as components ([c6f956a](https://github.com/twinfoundation/engine/commit/c6f956afe4fc22cd552174539c92a109448dc242))
17
+ * add rights management modules ([e02cadc](https://github.com/twinfoundation/engine/commit/e02cadc840d242fe16a73ab41ba61376c7467e50))
18
+ * add rights management negotiation ([84ef46b](https://github.com/twinfoundation/engine/commit/84ef46bff110611a19512793425c8c873ee2a590))
19
+ * add synchronised storage support ([5142e34](https://github.com/twinfoundation/engine/commit/5142e3488f09195cf9f48a9c6c6d1014231a4c2c))
20
+ * add task scheduler ([0951107](https://github.com/twinfoundation/engine/commit/09511073ad042194a45206303f0ef31d8d6af5db))
21
+ * add trust and rights management plugins ([eea0807](https://github.com/twinfoundation/engine/commit/eea0807601833220bd9fd8605b5e4383fbc0ebae))
22
+ * add validate-locales ([b92ea09](https://github.com/twinfoundation/engine/commit/b92ea09dbcfe35225271a51f24d231f59e2d363e))
23
+ * context id handlers repopulated after engine clone ([9712e32](https://github.com/twinfoundation/engine/commit/9712e328f4607f5b2c82355c394c61bde0ee39bf))
24
+ * eslint migration to flat config ([6b978da](https://github.com/twinfoundation/engine/commit/6b978daf777a615d7758b63c3df57d5a376f6dfb))
25
+ * modifying the engine to run the new services ([#10](https://github.com/twinfoundation/engine/issues/10)) ([6f7141f](https://github.com/twinfoundation/engine/commit/6f7141fe0a6d05c725066b274bcc18b5490e580b))
26
+ * remove additional identity auth components ([409b2e6](https://github.com/twinfoundation/engine/commit/409b2e6a5a543d0795b01916349b39922afb6d88))
27
+ * remove authentication generator components ([#67](https://github.com/twinfoundation/engine/issues/67)) ([62f7984](https://github.com/twinfoundation/engine/commit/62f798468f567fdbf648401aa0dc51cda871c913))
28
+ * simplify config building ([732c871](https://github.com/twinfoundation/engine/commit/732c871c5aca236759168f4bc15aeffd98a330a8))
29
+ * standardised engine logging naming ([0dbf857](https://github.com/twinfoundation/engine/commit/0dbf857587641f86ddf010143519d0e8333489ff))
30
+ * switch to devDeps ([32832ac](https://github.com/twinfoundation/engine/commit/32832acd934e1e5569474281a527c9b118d30732))
31
+ * update dependencies ([97c9f64](https://github.com/twinfoundation/engine/commit/97c9f64b6ef096963bcc5de338a2a9e99bdc1a11))
32
+ * update framework core ([acc0f8d](https://github.com/twinfoundation/engine/commit/acc0f8d455a4b8ec47f1da643139fa0f07775fa6))
33
+ * update rights management and add authentication generators ([f728a1e](https://github.com/twinfoundation/engine/commit/f728a1efea15ada8d10cfbe17cafe7e2b252f527))
34
+ * upgrade framework components ([efd52e8](https://github.com/twinfoundation/engine/commit/efd52e80564fff29c3897bfa09b6305b3a322812))
35
+ * use shared store mechanism ([#2](https://github.com/twinfoundation/engine/issues/2)) ([9eed8d7](https://github.com/twinfoundation/engine/commit/9eed8d7766388479b42f03e2542fe761f2156408))
36
+
37
+
38
+ ### Dependencies
39
+
40
+ * The following workspace dependencies were updated
41
+ * dependencies
42
+ * @twin.org/engine-models bumped from 0.0.3-next.13 to 0.0.3-next.14
43
+ * @twin.org/engine-types bumped from 0.0.3-next.13 to 0.0.3-next.14
44
+
45
+ ## [0.0.3-next.13](https://github.com/twinfoundation/engine/compare/engine-server-types-v0.0.3-next.12...engine-server-types-v0.0.3-next.13) (2026-01-19)
46
+
47
+
48
+ ### Features
49
+
50
+ * remove authentication generator components ([#67](https://github.com/twinfoundation/engine/issues/67)) ([62f7984](https://github.com/twinfoundation/engine/commit/62f798468f567fdbf648401aa0dc51cda871c913))
51
+
52
+
53
+ ### Dependencies
54
+
55
+ * The following workspace dependencies were updated
56
+ * dependencies
57
+ * @twin.org/engine-models bumped from 0.0.3-next.12 to 0.0.3-next.13
58
+ * @twin.org/engine-types bumped from 0.0.3-next.12 to 0.0.3-next.13
59
+
3
60
  ## [0.0.3-next.12](https://github.com/twinfoundation/engine/compare/engine-server-types-v0.0.3-next.11...engine-server-types-v0.0.3-next.12) (2026-01-19)
4
61
 
5
62
 
@@ -1,5 +1,5 @@
1
1
  # Type Alias: RestRouteProcessorConfig
2
2
 
3
- > **RestRouteProcessorConfig** = \{ `type`: *typeof* [`AuthHeader`](../variables/RestRouteProcessorType.md#authheader); `options?`: `IAuthHeaderProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`AuthVerifiableCredential`](../variables/RestRouteProcessorType.md#authverifiablecredential); `options?`: `IVerifiableCredentialAuthenticationProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Logging`](../variables/RestRouteProcessorType.md#logging); `options?`: `ILoggingProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`ContextId`](../variables/RestRouteProcessorType.md#contextid); `options`: `IContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`StaticContextId`](../variables/RestRouteProcessorType.md#staticcontextid); `options`: `IStaticContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Tenant`](../variables/RestRouteProcessorType.md#tenant); `options?`: `ITenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`RestRoute`](../variables/RestRouteProcessorType.md#restroute); `options?`: `IRestRouteProcessorConstructorOptions`; \}
3
+ > **RestRouteProcessorConfig** = \{ `type`: *typeof* [`AuthHeader`](../variables/RestRouteProcessorType.md#authheader); `options?`: `IAuthHeaderProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Logging`](../variables/RestRouteProcessorType.md#logging); `options?`: `ILoggingProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`ContextId`](../variables/RestRouteProcessorType.md#contextid); `options`: `IContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`StaticContextId`](../variables/RestRouteProcessorType.md#staticcontextid); `options`: `IStaticContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Tenant`](../variables/RestRouteProcessorType.md#tenant); `options?`: `ITenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`RestRoute`](../variables/RestRouteProcessorType.md#restroute); `options?`: `IRestRouteProcessorConstructorOptions`; \}
4
4
 
5
5
  REST route processor config types.
@@ -1,5 +1,5 @@
1
1
  # Type Alias: SocketRouteProcessorConfig
2
2
 
3
- > **SocketRouteProcessorConfig** = \{ `type`: *typeof* [`AuthHeader`](../variables/SocketRouteProcessorType.md#authheader); `options?`: `IAuthHeaderProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`AuthVerifiableCredential`](../variables/SocketRouteProcessorType.md#authverifiablecredential); `options?`: `IVerifiableCredentialAuthenticationProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Logging`](../variables/SocketRouteProcessorType.md#logging); `options?`: `ILoggingProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`ContextId`](../variables/SocketRouteProcessorType.md#contextid); `options`: `IContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`StaticContextId`](../variables/SocketRouteProcessorType.md#staticcontextid); `options`: `IStaticContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Tenant`](../variables/SocketRouteProcessorType.md#tenant); `options?`: `ITenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`SocketRoute`](../variables/SocketRouteProcessorType.md#socketroute); `options?`: `ISocketRouteProcessorConstructorOptions`; \}
3
+ > **SocketRouteProcessorConfig** = \{ `type`: *typeof* [`AuthHeader`](../variables/SocketRouteProcessorType.md#authheader); `options?`: `IAuthHeaderProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Logging`](../variables/SocketRouteProcessorType.md#logging); `options?`: `ILoggingProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`ContextId`](../variables/SocketRouteProcessorType.md#contextid); `options`: `IContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`StaticContextId`](../variables/SocketRouteProcessorType.md#staticcontextid); `options`: `IStaticContextIdProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`Tenant`](../variables/SocketRouteProcessorType.md#tenant); `options?`: `ITenantProcessorConstructorOptions`; \} \| \{ `type`: *typeof* [`SocketRoute`](../variables/SocketRouteProcessorType.md#socketroute); `options?`: `ISocketRouteProcessorConstructorOptions`; \}
4
4
 
5
5
  Socket route processor config types.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-server-types",
3
- "version": "0.0.3-next.12",
3
+ "version": "0.0.3-next.14",
4
4
  "description": "Server types to use in an engine server.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,10 +25,9 @@
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.12",
29
- "@twin.org/engine-types": "0.0.3-next.12",
28
+ "@twin.org/engine-models": "0.0.3-next.14",
29
+ "@twin.org/engine-types": "0.0.3-next.14",
30
30
  "@twin.org/entity": "next",
31
- "@twin.org/identity-authentication": "next",
32
31
  "@twin.org/nameof": "next"
33
32
  },
34
33
  "main": "./dist/es/index.js",