@twin.org/engine-server-types 0.0.2-next.9 → 0.0.3-next.2
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.
- package/dist/es/components/authentication.js +40 -0
- package/dist/es/components/authentication.js.map +1 -0
- package/dist/es/components/authenticationAdmin.js +33 -0
- package/dist/es/components/authenticationAdmin.js.map +1 -0
- package/dist/es/components/information.js +29 -0
- package/dist/es/components/information.js.map +1 -0
- package/dist/es/components/mimeTypeProcessor.js +26 -0
- package/dist/es/components/mimeTypeProcessor.js.map +1 -0
- package/dist/es/components/restRouteProcessor.js +76 -0
- package/dist/es/components/restRouteProcessor.js.map +1 -0
- package/dist/es/components/socketRouteProcessor.js +73 -0
- package/dist/es/components/socketRouteProcessor.js.map +1 -0
- package/dist/es/index.js +22 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IEngineServerConfig.js +2 -0
- package/dist/es/models/IEngineServerConfig.js.map +1 -0
- package/dist/es/models/config/authenticationAdminComponentConfig.js +2 -0
- package/dist/es/models/config/authenticationAdminComponentConfig.js.map +1 -0
- package/dist/es/models/config/authenticationComponentConfig.js +2 -0
- package/dist/es/models/config/authenticationComponentConfig.js.map +1 -0
- package/dist/es/models/config/informationComponentConfig.js +2 -0
- package/dist/es/models/config/informationComponentConfig.js.map +1 -0
- package/dist/es/models/config/mimeTypeProcessorConfig.js +2 -0
- package/dist/es/models/config/mimeTypeProcessorConfig.js.map +1 -0
- package/dist/es/models/config/restRouteProcessorConfig.js +2 -0
- package/dist/es/models/config/restRouteProcessorConfig.js.map +1 -0
- package/dist/es/models/config/socketRouteProcessorConfig.js +2 -0
- package/dist/es/models/config/socketRouteProcessorConfig.js.map +1 -0
- package/dist/es/models/types/authenticationAdminComponentType.js +13 -0
- package/dist/es/models/types/authenticationAdminComponentType.js.map +1 -0
- package/dist/es/models/types/authenticationComponentType.js +17 -0
- package/dist/es/models/types/authenticationComponentType.js.map +1 -0
- package/dist/es/models/types/informationComponentType.js +17 -0
- package/dist/es/models/types/informationComponentType.js.map +1 -0
- package/dist/es/models/types/mimeTypeProcessorType.js +13 -0
- package/dist/es/models/types/mimeTypeProcessorType.js.map +1 -0
- package/dist/es/models/types/restRouteProcessorType.js +37 -0
- package/dist/es/models/types/restRouteProcessorType.js.map +1 -0
- package/dist/es/models/types/socketRouteProcessorType.js +37 -0
- package/dist/es/models/types/socketRouteProcessorType.js.map +1 -0
- package/dist/types/components/authentication.d.ts +9 -6
- package/dist/types/components/authenticationAdmin.d.ts +9 -6
- package/dist/types/components/information.d.ts +9 -6
- package/dist/types/components/mimeTypeProcessor.d.ts +10 -6
- package/dist/types/components/restRouteProcessor.d.ts +11 -7
- package/dist/types/components/socketRouteProcessor.d.ts +10 -6
- package/dist/types/index.d.ts +19 -19
- package/dist/types/models/IEngineServerConfig.d.ts +6 -6
- package/dist/types/models/config/authenticationAdminComponentConfig.d.ts +1 -1
- package/dist/types/models/config/authenticationComponentConfig.d.ts +1 -1
- package/dist/types/models/config/informationComponentConfig.d.ts +1 -1
- package/dist/types/models/config/mimeTypeProcessorConfig.d.ts +1 -1
- package/dist/types/models/config/restRouteProcessorConfig.d.ts +14 -6
- package/dist/types/models/config/socketRouteProcessorConfig.d.ts +14 -6
- package/dist/types/models/types/restRouteProcessorType.d.ts +12 -4
- package/dist/types/models/types/socketRouteProcessorType.d.ts +12 -4
- package/docs/changelog.md +307 -0
- package/docs/reference/functions/initialiseAuthenticationAdminComponent.md +3 -13
- package/docs/reference/functions/initialiseAuthenticationComponent.md +3 -13
- package/docs/reference/functions/initialiseInformationComponent.md +3 -13
- package/docs/reference/functions/initialiseMimeTypeProcessorComponent.md +3 -13
- package/docs/reference/functions/initialiseRestRouteProcessorComponent.md +3 -13
- package/docs/reference/functions/initialiseSocketRouteProcessorComponent.md +3 -13
- package/docs/reference/interfaces/IEngineServerConfig.md +1 -1
- package/docs/reference/type-aliases/RestRouteProcessorConfig.md +1 -1
- package/docs/reference/type-aliases/SocketRouteProcessorConfig.md +1 -1
- package/docs/reference/variables/AuthenticationAdminComponentType.md +1 -1
- package/docs/reference/variables/AuthenticationComponentType.md +1 -1
- package/docs/reference/variables/InformationComponentType.md +1 -1
- package/docs/reference/variables/MimeTypeProcessorType.md +1 -1
- package/docs/reference/variables/RestRouteProcessorType.md +19 -7
- package/docs/reference/variables/SocketRouteProcessorType.md +19 -7
- package/package.json +23 -10
- package/dist/cjs/index.cjs +0 -427
- package/dist/esm/index.mjs +0 -414
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Socket route processor types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const SocketRouteProcessorType = {
|
|
8
|
+
/**
|
|
9
|
+
* Auth header.
|
|
10
|
+
*/
|
|
11
|
+
AuthHeader: "auth-header",
|
|
12
|
+
/**
|
|
13
|
+
* Auth verifiable credential.
|
|
14
|
+
*/
|
|
15
|
+
AuthVerifiableCredential: "auth-verifiable-credential",
|
|
16
|
+
/**
|
|
17
|
+
* Logging.
|
|
18
|
+
*/
|
|
19
|
+
Logging: "logging",
|
|
20
|
+
/**
|
|
21
|
+
* Context ID.
|
|
22
|
+
*/
|
|
23
|
+
ContextId: "context-id",
|
|
24
|
+
/**
|
|
25
|
+
* Static Context ID.
|
|
26
|
+
*/
|
|
27
|
+
StaticContextId: "static-context-id",
|
|
28
|
+
/**
|
|
29
|
+
* Tenant.
|
|
30
|
+
*/
|
|
31
|
+
Tenant: "tenant",
|
|
32
|
+
/**
|
|
33
|
+
* Socket Route.
|
|
34
|
+
*/
|
|
35
|
+
SocketRoute: "socket-route"
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=socketRouteProcessorType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"socketRouteProcessorType.js","sourceRoot":"","sources":["../../../../src/models/types/socketRouteProcessorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACvC;;OAEG;IACH,UAAU,EAAE,aAAa;IAEzB;;OAEG;IACH,wBAAwB,EAAE,4BAA4B;IAEtD;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,eAAe,EAAE,mBAAmB;IAEpC;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,WAAW,EAAE,cAAc;CAClB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Socket route processor types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const SocketRouteProcessorType = {\n\t/**\n\t * Auth header.\n\t */\n\tAuthHeader: \"auth-header\",\n\n\t/**\n\t * Auth verifiable credential.\n\t */\n\tAuthVerifiableCredential: \"auth-verifiable-credential\",\n\n\t/**\n\t * Logging.\n\t */\n\tLogging: \"logging\",\n\n\t/**\n\t * Context ID.\n\t */\n\tContextId: \"context-id\",\n\n\t/**\n\t * Static Context ID.\n\t */\n\tStaticContextId: \"static-context-id\",\n\n\t/**\n\t * Tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Socket Route.\n\t */\n\tSocketRoute: \"socket-route\"\n} as const;\n\n/**\n * Socket route processor types.\n */\nexport type SocketRouteProcessorType =\n\t(typeof SocketRouteProcessorType)[keyof typeof SocketRouteProcessorType];\n"]}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { ComponentFactory, type IComponent } from "@twin.org/core";
|
|
1
2
|
import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
2
|
-
import type { AuthenticationComponentConfig } from "../models/config/authenticationComponentConfig";
|
|
3
|
-
import type { IEngineServerConfig } from "../models/IEngineServerConfig";
|
|
3
|
+
import type { AuthenticationComponentConfig } from "../models/config/authenticationComponentConfig.js";
|
|
4
|
+
import type { IEngineServerConfig } from "../models/IEngineServerConfig.js";
|
|
4
5
|
/**
|
|
5
6
|
* Initialise the authentication.
|
|
6
7
|
* @param engineCore The engine core.
|
|
7
8
|
* @param context The context for the engine.
|
|
8
9
|
* @param instanceConfig The instance config.
|
|
9
|
-
* @
|
|
10
|
-
* @returns The name of the instance created.
|
|
11
|
-
* @throws GeneralError if the component type is unknown.
|
|
10
|
+
* @returns The instance created and the factory for it.
|
|
12
11
|
*/
|
|
13
|
-
export declare function initialiseAuthenticationComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: AuthenticationComponentConfig
|
|
12
|
+
export declare function initialiseAuthenticationComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: AuthenticationComponentConfig): Promise<{
|
|
13
|
+
instanceType?: string;
|
|
14
|
+
factory?: typeof ComponentFactory;
|
|
15
|
+
component?: IComponent;
|
|
16
|
+
}>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { ComponentFactory, type IComponent } from "@twin.org/core";
|
|
1
2
|
import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
2
|
-
import type { AuthenticationAdminComponentConfig } from "../models/config/authenticationAdminComponentConfig";
|
|
3
|
-
import type { IEngineServerConfig } from "../models/IEngineServerConfig";
|
|
3
|
+
import type { AuthenticationAdminComponentConfig } from "../models/config/authenticationAdminComponentConfig.js";
|
|
4
|
+
import type { IEngineServerConfig } from "../models/IEngineServerConfig.js";
|
|
4
5
|
/**
|
|
5
6
|
* Initialise the authentication admin.
|
|
6
7
|
* @param engineCore The engine core.
|
|
7
8
|
* @param context The context for the engine.
|
|
8
9
|
* @param instanceConfig The instance config.
|
|
9
|
-
* @
|
|
10
|
-
* @returns The name of the instance created.
|
|
11
|
-
* @throws GeneralError if the component type is unknown.
|
|
10
|
+
* @returns The instance created and the factory for it.
|
|
12
11
|
*/
|
|
13
|
-
export declare function initialiseAuthenticationAdminComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: AuthenticationAdminComponentConfig
|
|
12
|
+
export declare function initialiseAuthenticationAdminComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: AuthenticationAdminComponentConfig): Promise<{
|
|
13
|
+
instanceType?: string;
|
|
14
|
+
factory?: typeof ComponentFactory;
|
|
15
|
+
component?: IComponent;
|
|
16
|
+
}>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { ComponentFactory, type IComponent } from "@twin.org/core";
|
|
1
2
|
import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
2
|
-
import type { InformationComponentConfig } from "../models/config/informationComponentConfig";
|
|
3
|
-
import type { IEngineServerConfig } from "../models/IEngineServerConfig";
|
|
3
|
+
import type { InformationComponentConfig } from "../models/config/informationComponentConfig.js";
|
|
4
|
+
import type { IEngineServerConfig } from "../models/IEngineServerConfig.js";
|
|
4
5
|
/**
|
|
5
6
|
* Initialise the information component.
|
|
6
7
|
* @param engineCore The engine core.
|
|
7
8
|
* @param context The context for the engine.
|
|
8
9
|
* @param instanceConfig The instance config.
|
|
9
|
-
* @
|
|
10
|
-
* @returns The name of the instance created.
|
|
11
|
-
* @throws GeneralError if the component type is unknown.
|
|
10
|
+
* @returns The instance created and the factory for it.
|
|
12
11
|
*/
|
|
13
|
-
export declare function initialiseInformationComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: InformationComponentConfig
|
|
12
|
+
export declare function initialiseInformationComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: InformationComponentConfig): Promise<{
|
|
13
|
+
instanceType?: string;
|
|
14
|
+
factory?: typeof ComponentFactory;
|
|
15
|
+
component?: IComponent;
|
|
16
|
+
}>;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { MimeTypeProcessorFactory } from "@twin.org/api-models";
|
|
2
|
+
import type { IComponent } from "@twin.org/core";
|
|
1
3
|
import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
2
|
-
import type { MimeTypeProcessorConfig } from "../models/config/mimeTypeProcessorConfig";
|
|
3
|
-
import type { IEngineServerConfig } from "../models/IEngineServerConfig";
|
|
4
|
+
import type { MimeTypeProcessorConfig } from "../models/config/mimeTypeProcessorConfig.js";
|
|
5
|
+
import type { IEngineServerConfig } from "../models/IEngineServerConfig.js";
|
|
4
6
|
/**
|
|
5
7
|
* Initialise the mime type processor.
|
|
6
8
|
* @param engineCore The engine core.
|
|
7
9
|
* @param context The context for the engine.
|
|
8
10
|
* @param instanceConfig The instance config.
|
|
9
|
-
* @
|
|
10
|
-
* @returns The name of the instance created.
|
|
11
|
-
* @throws GeneralError if the component type is unknown.
|
|
11
|
+
* @returns The instance created and the factory for it.
|
|
12
12
|
*/
|
|
13
|
-
export declare function initialiseMimeTypeProcessorComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: MimeTypeProcessorConfig
|
|
13
|
+
export declare function initialiseMimeTypeProcessorComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: MimeTypeProcessorConfig): Promise<{
|
|
14
|
+
instanceType?: string;
|
|
15
|
+
factory?: typeof MimeTypeProcessorFactory;
|
|
16
|
+
component?: IComponent;
|
|
17
|
+
}>;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import { RestRouteProcessorFactory } from "@twin.org/api-models";
|
|
2
|
+
import type { IComponent } from "@twin.org/core";
|
|
3
|
+
import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
4
|
+
import type { RestRouteProcessorConfig } from "../models/config/restRouteProcessorConfig.js";
|
|
5
|
+
import type { IEngineServerConfig } from "../models/IEngineServerConfig.js";
|
|
4
6
|
/**
|
|
5
7
|
* Initialise the rest route processor.
|
|
6
8
|
* @param engineCore The engine core.
|
|
7
9
|
* @param context The context for the engine.
|
|
8
10
|
* @param instanceConfig The instance config.
|
|
9
|
-
* @
|
|
10
|
-
* @returns The name of the instance created.
|
|
11
|
-
* @throws GeneralError if the component type is unknown.
|
|
11
|
+
* @returns The instance created and the factory for it.
|
|
12
12
|
*/
|
|
13
|
-
export declare function initialiseRestRouteProcessorComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: RestRouteProcessorConfig
|
|
13
|
+
export declare function initialiseRestRouteProcessorComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: RestRouteProcessorConfig): Promise<{
|
|
14
|
+
instanceType?: string;
|
|
15
|
+
factory?: typeof RestRouteProcessorFactory;
|
|
16
|
+
component?: IComponent;
|
|
17
|
+
}>;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { SocketRouteProcessorFactory } from "@twin.org/api-models";
|
|
2
|
+
import type { IComponent } from "@twin.org/core";
|
|
1
3
|
import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
2
|
-
import type { SocketRouteProcessorConfig } from "../models/config/socketRouteProcessorConfig";
|
|
3
|
-
import type { IEngineServerConfig } from "../models/IEngineServerConfig";
|
|
4
|
+
import type { SocketRouteProcessorConfig } from "../models/config/socketRouteProcessorConfig.js";
|
|
5
|
+
import type { IEngineServerConfig } from "../models/IEngineServerConfig.js";
|
|
4
6
|
/**
|
|
5
7
|
* Initialise the socket route processor.
|
|
6
8
|
* @param engineCore The engine core.
|
|
7
9
|
* @param context The context for the engine.
|
|
8
10
|
* @param instanceConfig The instance config.
|
|
9
|
-
* @
|
|
10
|
-
* @returns The name of the instance created.
|
|
11
|
-
* @throws GeneralError if the component type is unknown.
|
|
11
|
+
* @returns The instance created and the factory for it.
|
|
12
12
|
*/
|
|
13
|
-
export declare function initialiseSocketRouteProcessorComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: SocketRouteProcessorConfig
|
|
13
|
+
export declare function initialiseSocketRouteProcessorComponent(engineCore: IEngineCore<IEngineServerConfig>, context: IEngineCoreContext<IEngineServerConfig>, instanceConfig: SocketRouteProcessorConfig): Promise<{
|
|
14
|
+
instanceType?: string;
|
|
15
|
+
factory?: typeof SocketRouteProcessorFactory;
|
|
16
|
+
component?: IComponent;
|
|
17
|
+
}>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from "./components/authentication";
|
|
2
|
-
export * from "./components/authenticationAdmin";
|
|
3
|
-
export * from "./components/information";
|
|
4
|
-
export * from "./components/mimeTypeProcessor";
|
|
5
|
-
export * from "./components/restRouteProcessor";
|
|
6
|
-
export * from "./components/socketRouteProcessor";
|
|
7
|
-
export * from "./models/config/authenticationAdminComponentConfig";
|
|
8
|
-
export * from "./models/config/authenticationComponentConfig";
|
|
9
|
-
export * from "./models/config/informationComponentConfig";
|
|
10
|
-
export * from "./models/config/mimeTypeProcessorConfig";
|
|
11
|
-
export * from "./models/config/restRouteProcessorConfig";
|
|
12
|
-
export * from "./models/config/socketRouteProcessorConfig";
|
|
13
|
-
export * from "./models/IEngineServerConfig";
|
|
14
|
-
export * from "./models/types/authenticationAdminComponentType";
|
|
15
|
-
export * from "./models/types/authenticationComponentType";
|
|
16
|
-
export * from "./models/types/informationComponentType";
|
|
17
|
-
export * from "./models/types/mimeTypeProcessorType";
|
|
18
|
-
export * from "./models/types/restRouteProcessorType";
|
|
19
|
-
export * from "./models/types/socketRouteProcessorType";
|
|
1
|
+
export * from "./components/authentication.js";
|
|
2
|
+
export * from "./components/authenticationAdmin.js";
|
|
3
|
+
export * from "./components/information.js";
|
|
4
|
+
export * from "./components/mimeTypeProcessor.js";
|
|
5
|
+
export * from "./components/restRouteProcessor.js";
|
|
6
|
+
export * from "./components/socketRouteProcessor.js";
|
|
7
|
+
export * from "./models/config/authenticationAdminComponentConfig.js";
|
|
8
|
+
export * from "./models/config/authenticationComponentConfig.js";
|
|
9
|
+
export * from "./models/config/informationComponentConfig.js";
|
|
10
|
+
export * from "./models/config/mimeTypeProcessorConfig.js";
|
|
11
|
+
export * from "./models/config/restRouteProcessorConfig.js";
|
|
12
|
+
export * from "./models/config/socketRouteProcessorConfig.js";
|
|
13
|
+
export * from "./models/IEngineServerConfig.js";
|
|
14
|
+
export * from "./models/types/authenticationAdminComponentType.js";
|
|
15
|
+
export * from "./models/types/authenticationComponentType.js";
|
|
16
|
+
export * from "./models/types/informationComponentType.js";
|
|
17
|
+
export * from "./models/types/mimeTypeProcessorType.js";
|
|
18
|
+
export * from "./models/types/restRouteProcessorType.js";
|
|
19
|
+
export * from "./models/types/socketRouteProcessorType.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { IWebServerOptions } from "@twin.org/api-models";
|
|
2
2
|
import type { IEngineCoreTypeConfig } from "@twin.org/engine-models";
|
|
3
3
|
import type { IEngineConfig } from "@twin.org/engine-types";
|
|
4
|
-
import type { AuthenticationAdminComponentConfig } from "./config/authenticationAdminComponentConfig";
|
|
5
|
-
import type { AuthenticationComponentConfig } from "./config/authenticationComponentConfig";
|
|
6
|
-
import type { InformationComponentConfig } from "./config/informationComponentConfig";
|
|
7
|
-
import type { MimeTypeProcessorConfig } from "./config/mimeTypeProcessorConfig";
|
|
8
|
-
import type { RestRouteProcessorConfig } from "./config/restRouteProcessorConfig";
|
|
9
|
-
import type { SocketRouteProcessorConfig } from "./config/socketRouteProcessorConfig";
|
|
4
|
+
import type { AuthenticationAdminComponentConfig } from "./config/authenticationAdminComponentConfig.js";
|
|
5
|
+
import type { AuthenticationComponentConfig } from "./config/authenticationComponentConfig.js";
|
|
6
|
+
import type { InformationComponentConfig } from "./config/informationComponentConfig.js";
|
|
7
|
+
import type { MimeTypeProcessorConfig } from "./config/mimeTypeProcessorConfig.js";
|
|
8
|
+
import type { RestRouteProcessorConfig } from "./config/restRouteProcessorConfig.js";
|
|
9
|
+
import type { SocketRouteProcessorConfig } from "./config/socketRouteProcessorConfig.js";
|
|
10
10
|
/**
|
|
11
11
|
* Extended engine server config with known types.
|
|
12
12
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IEntityStorageAuthenticationAdminServiceConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
|
|
2
|
-
import type { AuthenticationAdminComponentType } from "../types/authenticationAdminComponentType";
|
|
2
|
+
import type { AuthenticationAdminComponentType } from "../types/authenticationAdminComponentType.js";
|
|
3
3
|
/**
|
|
4
4
|
* Authentication admin component config types.
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IEntityStorageAuthenticationServiceConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
|
|
2
2
|
import type { IBaseRestClientConfig } from "@twin.org/api-models";
|
|
3
|
-
import type { AuthenticationComponentType } from "../types/authenticationComponentType";
|
|
3
|
+
import type { AuthenticationComponentType } from "../types/authenticationComponentType.js";
|
|
4
4
|
/**
|
|
5
5
|
* Authentication component config types.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IBaseRestClientConfig } from "@twin.org/api-models";
|
|
2
2
|
import type { IInformationServiceConstructorOptions } from "@twin.org/api-service";
|
|
3
|
-
import type { InformationComponentType } from "../types/informationComponentType";
|
|
3
|
+
import type { InformationComponentType } from "../types/informationComponentType.js";
|
|
4
4
|
/**
|
|
5
5
|
* Information component config types.
|
|
6
6
|
*/
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import type { IAuthHeaderProcessorConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
|
|
2
|
-
import type { ILoggingProcessorConstructorOptions, IRestRouteProcessorConstructorOptions,
|
|
3
|
-
import type {
|
|
2
|
+
import type { IContextIdProcessorConstructorOptions, ILoggingProcessorConstructorOptions, IRestRouteProcessorConstructorOptions, IStaticContextIdProcessorConstructorOptions } from "@twin.org/api-processors";
|
|
3
|
+
import type { ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
|
|
4
|
+
import type { IVerifiableCredentialAuthenticationProcessorConstructorOptions } from "@twin.org/identity-authentication";
|
|
5
|
+
import type { RestRouteProcessorType } from "../types/restRouteProcessorType.js";
|
|
4
6
|
/**
|
|
5
7
|
* REST route processor config types.
|
|
6
8
|
*/
|
|
7
9
|
export type RestRouteProcessorConfig = {
|
|
8
10
|
type: typeof RestRouteProcessorType.AuthHeader;
|
|
9
11
|
options?: IAuthHeaderProcessorConstructorOptions;
|
|
12
|
+
} | {
|
|
13
|
+
type: typeof RestRouteProcessorType.AuthVerifiableCredential;
|
|
14
|
+
options?: IVerifiableCredentialAuthenticationProcessorConstructorOptions;
|
|
10
15
|
} | {
|
|
11
16
|
type: typeof RestRouteProcessorType.Logging;
|
|
12
17
|
options?: ILoggingProcessorConstructorOptions;
|
|
13
18
|
} | {
|
|
14
|
-
type: typeof RestRouteProcessorType.
|
|
15
|
-
options
|
|
19
|
+
type: typeof RestRouteProcessorType.ContextId;
|
|
20
|
+
options: IContextIdProcessorConstructorOptions;
|
|
21
|
+
} | {
|
|
22
|
+
type: typeof RestRouteProcessorType.StaticContextId;
|
|
23
|
+
options: IStaticContextIdProcessorConstructorOptions;
|
|
16
24
|
} | {
|
|
17
|
-
type: typeof RestRouteProcessorType.
|
|
18
|
-
options
|
|
25
|
+
type: typeof RestRouteProcessorType.Tenant;
|
|
26
|
+
options?: ITenantProcessorConstructorOptions;
|
|
19
27
|
} | {
|
|
20
28
|
type: typeof RestRouteProcessorType.RestRoute;
|
|
21
29
|
options?: IRestRouteProcessorConstructorOptions;
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
import type { IAuthHeaderProcessorConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
|
|
2
|
-
import type { ILoggingProcessorConstructorOptions, ISocketRouteProcessorConstructorOptions,
|
|
3
|
-
import type {
|
|
2
|
+
import type { IContextIdProcessorConstructorOptions, ILoggingProcessorConstructorOptions, ISocketRouteProcessorConstructorOptions, IStaticContextIdProcessorConstructorOptions } from "@twin.org/api-processors";
|
|
3
|
+
import type { ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
|
|
4
|
+
import type { IVerifiableCredentialAuthenticationProcessorConstructorOptions } from "@twin.org/identity-authentication";
|
|
5
|
+
import type { SocketRouteProcessorType } from "../types/socketRouteProcessorType.js";
|
|
4
6
|
/**
|
|
5
7
|
* Socket route processor config types.
|
|
6
8
|
*/
|
|
7
9
|
export type SocketRouteProcessorConfig = {
|
|
8
10
|
type: typeof SocketRouteProcessorType.AuthHeader;
|
|
9
11
|
options?: IAuthHeaderProcessorConstructorOptions;
|
|
12
|
+
} | {
|
|
13
|
+
type: typeof SocketRouteProcessorType.AuthVerifiableCredential;
|
|
14
|
+
options?: IVerifiableCredentialAuthenticationProcessorConstructorOptions;
|
|
10
15
|
} | {
|
|
11
16
|
type: typeof SocketRouteProcessorType.Logging;
|
|
12
17
|
options?: ILoggingProcessorConstructorOptions;
|
|
13
18
|
} | {
|
|
14
|
-
type: typeof SocketRouteProcessorType.
|
|
15
|
-
options
|
|
19
|
+
type: typeof SocketRouteProcessorType.ContextId;
|
|
20
|
+
options: IContextIdProcessorConstructorOptions;
|
|
21
|
+
} | {
|
|
22
|
+
type: typeof SocketRouteProcessorType.StaticContextId;
|
|
23
|
+
options: IStaticContextIdProcessorConstructorOptions;
|
|
16
24
|
} | {
|
|
17
|
-
type: typeof SocketRouteProcessorType.
|
|
18
|
-
options
|
|
25
|
+
type: typeof SocketRouteProcessorType.Tenant;
|
|
26
|
+
options?: ITenantProcessorConstructorOptions;
|
|
19
27
|
} | {
|
|
20
28
|
type: typeof SocketRouteProcessorType.SocketRoute;
|
|
21
29
|
options?: ISocketRouteProcessorConstructorOptions;
|
|
@@ -6,18 +6,26 @@ export declare const RestRouteProcessorType: {
|
|
|
6
6
|
* Auth header.
|
|
7
7
|
*/
|
|
8
8
|
readonly AuthHeader: "auth-header";
|
|
9
|
+
/**
|
|
10
|
+
* Auth verifiable credential.
|
|
11
|
+
*/
|
|
12
|
+
readonly AuthVerifiableCredential: "auth-verifiable-credential";
|
|
9
13
|
/**
|
|
10
14
|
* Logging.
|
|
11
15
|
*/
|
|
12
16
|
readonly Logging: "logging";
|
|
13
17
|
/**
|
|
14
|
-
*
|
|
18
|
+
* Context ID.
|
|
19
|
+
*/
|
|
20
|
+
readonly ContextId: "context-id";
|
|
21
|
+
/**
|
|
22
|
+
* Static Context ID.
|
|
15
23
|
*/
|
|
16
|
-
readonly
|
|
24
|
+
readonly StaticContextId: "static-context-id";
|
|
17
25
|
/**
|
|
18
|
-
*
|
|
26
|
+
* Tenant.
|
|
19
27
|
*/
|
|
20
|
-
readonly
|
|
28
|
+
readonly Tenant: "tenant";
|
|
21
29
|
/**
|
|
22
30
|
* REST Route.
|
|
23
31
|
*/
|
|
@@ -6,18 +6,26 @@ export declare const SocketRouteProcessorType: {
|
|
|
6
6
|
* Auth header.
|
|
7
7
|
*/
|
|
8
8
|
readonly AuthHeader: "auth-header";
|
|
9
|
+
/**
|
|
10
|
+
* Auth verifiable credential.
|
|
11
|
+
*/
|
|
12
|
+
readonly AuthVerifiableCredential: "auth-verifiable-credential";
|
|
9
13
|
/**
|
|
10
14
|
* Logging.
|
|
11
15
|
*/
|
|
12
16
|
readonly Logging: "logging";
|
|
13
17
|
/**
|
|
14
|
-
*
|
|
18
|
+
* Context ID.
|
|
19
|
+
*/
|
|
20
|
+
readonly ContextId: "context-id";
|
|
21
|
+
/**
|
|
22
|
+
* Static Context ID.
|
|
15
23
|
*/
|
|
16
|
-
readonly
|
|
24
|
+
readonly StaticContextId: "static-context-id";
|
|
17
25
|
/**
|
|
18
|
-
*
|
|
26
|
+
* Tenant.
|
|
19
27
|
*/
|
|
20
|
-
readonly
|
|
28
|
+
readonly Tenant: "tenant";
|
|
21
29
|
/**
|
|
22
30
|
* Socket Route.
|
|
23
31
|
*/
|