@twin.org/engine-server-types 0.0.3-next.5 → 0.0.3-next.51

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.
Files changed (94) hide show
  1. package/README.md +1 -1
  2. package/dist/es/components/authentication.js +24 -19
  3. package/dist/es/components/authentication.js.map +1 -1
  4. package/dist/es/components/authenticationAdmin.js +19 -15
  5. package/dist/es/components/authenticationAdmin.js.map +1 -1
  6. package/dist/es/components/authenticationAudit.js +35 -0
  7. package/dist/es/components/authenticationAudit.js.map +1 -0
  8. package/dist/es/components/authenticationRate.js +37 -0
  9. package/dist/es/components/authenticationRate.js.map +1 -0
  10. package/dist/es/components/hosting.js +29 -0
  11. package/dist/es/components/hosting.js.map +1 -0
  12. package/dist/es/components/information.js +12 -9
  13. package/dist/es/components/information.js.map +1 -1
  14. package/dist/es/components/mimeTypeProcessor.js +7 -7
  15. package/dist/es/components/mimeTypeProcessor.js.map +1 -1
  16. package/dist/es/components/restRouteProcessor.js +44 -47
  17. package/dist/es/components/restRouteProcessor.js.map +1 -1
  18. package/dist/es/components/socketRouteProcessor.js +43 -43
  19. package/dist/es/components/socketRouteProcessor.js.map +1 -1
  20. package/dist/es/index.js +9 -0
  21. package/dist/es/index.js.map +1 -1
  22. package/dist/es/models/IEngineServerConfig.js.map +1 -1
  23. package/dist/es/models/config/authenticationAuditComponentConfig.js +2 -0
  24. package/dist/es/models/config/authenticationAuditComponentConfig.js.map +1 -0
  25. package/dist/es/models/config/authenticationRateComponentConfig.js +2 -0
  26. package/dist/es/models/config/authenticationRateComponentConfig.js.map +1 -0
  27. package/dist/es/models/config/hostingComponentConfig.js +2 -0
  28. package/dist/es/models/config/hostingComponentConfig.js.map +1 -0
  29. package/dist/es/models/config/restRouteProcessorConfig.js.map +1 -1
  30. package/dist/es/models/config/socketRouteProcessorConfig.js.map +1 -1
  31. package/dist/es/models/types/authenticationAuditComponentType.js +13 -0
  32. package/dist/es/models/types/authenticationAuditComponentType.js.map +1 -0
  33. package/dist/es/models/types/authenticationRateComponentType.js +13 -0
  34. package/dist/es/models/types/authenticationRateComponentType.js.map +1 -0
  35. package/dist/es/models/types/hostingComponentType.js +13 -0
  36. package/dist/es/models/types/hostingComponentType.js.map +1 -0
  37. package/dist/es/models/types/restRouteProcessorType.js +4 -0
  38. package/dist/es/models/types/restRouteProcessorType.js.map +1 -1
  39. package/dist/es/models/types/socketRouteProcessorType.js +4 -0
  40. package/dist/es/models/types/socketRouteProcessorType.js.map +1 -1
  41. package/dist/types/components/authentication.d.ts +3 -7
  42. package/dist/types/components/authenticationAdmin.d.ts +3 -7
  43. package/dist/types/components/authenticationAudit.d.ts +12 -0
  44. package/dist/types/components/authenticationRate.d.ts +12 -0
  45. package/dist/types/components/hosting.d.ts +12 -0
  46. package/dist/types/components/information.d.ts +3 -7
  47. package/dist/types/components/mimeTypeProcessor.d.ts +2 -7
  48. package/dist/types/components/restRouteProcessor.d.ts +2 -7
  49. package/dist/types/components/socketRouteProcessor.d.ts +2 -7
  50. package/dist/types/index.d.ts +9 -0
  51. package/dist/types/models/IEngineServerConfig.d.ts +21 -6
  52. package/dist/types/models/config/authenticationAuditComponentConfig.d.ts +9 -0
  53. package/dist/types/models/config/authenticationRateComponentConfig.d.ts +9 -0
  54. package/dist/types/models/config/hostingComponentConfig.d.ts +9 -0
  55. package/dist/types/models/config/restRouteProcessorConfig.d.ts +4 -5
  56. package/dist/types/models/config/socketRouteProcessorConfig.d.ts +4 -5
  57. package/dist/types/models/types/authenticationAuditComponentType.d.ts +13 -0
  58. package/dist/types/models/types/authenticationRateComponentType.d.ts +13 -0
  59. package/dist/types/models/types/hostingComponentType.d.ts +13 -0
  60. package/dist/types/models/types/restRouteProcessorType.d.ts +4 -0
  61. package/dist/types/models/types/socketRouteProcessorType.d.ts +4 -0
  62. package/docs/changelog.md +906 -119
  63. package/docs/examples.md +64 -1
  64. package/docs/reference/functions/initialiseAuthenticationAdminComponent.md +2 -2
  65. package/docs/reference/functions/initialiseAuthenticationAuditComponent.md +31 -0
  66. package/docs/reference/functions/initialiseAuthenticationComponent.md +2 -2
  67. package/docs/reference/functions/initialiseAuthenticationRateComponent.md +31 -0
  68. package/docs/reference/functions/initialiseHostingComponent.md +31 -0
  69. package/docs/reference/functions/initialiseInformationComponent.md +2 -2
  70. package/docs/reference/functions/initialiseMimeTypeProcessorComponent.md +2 -2
  71. package/docs/reference/functions/initialiseRestRouteProcessorComponent.md +2 -2
  72. package/docs/reference/functions/initialiseSocketRouteProcessorComponent.md +2 -2
  73. package/docs/reference/index.md +12 -0
  74. package/docs/reference/interfaces/IEngineServerConfig.md +509 -15
  75. package/docs/reference/type-aliases/AuthenticationAdminComponentConfig.md +3 -3
  76. package/docs/reference/type-aliases/AuthenticationAuditComponentConfig.md +17 -0
  77. package/docs/reference/type-aliases/AuthenticationAuditComponentType.md +5 -0
  78. package/docs/reference/type-aliases/AuthenticationRateComponentConfig.md +17 -0
  79. package/docs/reference/type-aliases/AuthenticationRateComponentType.md +5 -0
  80. package/docs/reference/type-aliases/HostingComponentConfig.md +17 -0
  81. package/docs/reference/type-aliases/HostingComponentType.md +5 -0
  82. package/docs/reference/type-aliases/MimeTypeProcessorConfig.md +3 -3
  83. package/docs/reference/type-aliases/RestRouteProcessorConfig.md +1 -1
  84. package/docs/reference/type-aliases/SocketRouteProcessorConfig.md +1 -1
  85. package/docs/reference/variables/AuthenticationAdminComponentType.md +1 -1
  86. package/docs/reference/variables/AuthenticationAuditComponentType.md +13 -0
  87. package/docs/reference/variables/AuthenticationComponentType.md +2 -2
  88. package/docs/reference/variables/AuthenticationRateComponentType.md +13 -0
  89. package/docs/reference/variables/HostingComponentType.md +13 -0
  90. package/docs/reference/variables/InformationComponentType.md +2 -2
  91. package/docs/reference/variables/MimeTypeProcessorType.md +1 -1
  92. package/docs/reference/variables/RestRouteProcessorType.md +13 -7
  93. package/docs/reference/variables/SocketRouteProcessorType.md +13 -7
  94. package/package.json +6 -7
@@ -2,7 +2,10 @@ 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
4
  import type { AuthenticationAdminComponentConfig } from "./config/authenticationAdminComponentConfig.js";
5
+ import type { AuthenticationAuditComponentConfig } from "./config/authenticationAuditComponentConfig.js";
5
6
  import type { AuthenticationComponentConfig } from "./config/authenticationComponentConfig.js";
7
+ import type { AuthenticationRateComponentConfig } from "./config/authenticationRateComponentConfig.js";
8
+ import type { HostingComponentConfig } from "./config/hostingComponentConfig.js";
6
9
  import type { InformationComponentConfig } from "./config/informationComponentConfig.js";
7
10
  import type { MimeTypeProcessorConfig } from "./config/mimeTypeProcessorConfig.js";
8
11
  import type { RestRouteProcessorConfig } from "./config/restRouteProcessorConfig.js";
@@ -21,27 +24,39 @@ export interface IEngineServerConfig extends IEngineConfig {
21
24
  types: IEngineConfig["types"] & {
22
25
  [type: string]: IEngineCoreTypeConfig[] | undefined;
23
26
  /**
24
- * Information component options which can be overridden by individual components by specifying types other than default..
27
+ * Information component options which can be overridden by individual components by specifying types other than default.
25
28
  */
26
29
  informationComponent?: IEngineCoreTypeConfig<InformationComponentConfig>[];
27
30
  /**
28
- * REST route processors options which can be overridden by individual components by specifying types other than default..
31
+ * Hosting component options which can be overridden by individual components by specifying types other than default.
32
+ */
33
+ hostingComponent?: IEngineCoreTypeConfig<HostingComponentConfig>[];
34
+ /**
35
+ * REST route processors options which can be overridden by individual components by specifying types other than default.
29
36
  */
30
37
  restRouteProcessor?: IEngineCoreTypeConfig<RestRouteProcessorConfig>[];
31
38
  /**
32
- * Socket route processors options which can be overridden by individual components by specifying types other than default..
39
+ * Socket route processors options which can be overridden by individual components by specifying types other than default.
33
40
  */
34
41
  socketRouteProcessor?: IEngineCoreTypeConfig<SocketRouteProcessorConfig>[];
35
42
  /**
36
- * Mime type processors options which can be overridden by individual components by specifying types other than default..
43
+ * Mime type processors options which can be overridden by individual components by specifying types other than default.
37
44
  */
38
45
  mimeTypeProcessor?: IEngineCoreTypeConfig<MimeTypeProcessorConfig>[];
39
46
  /**
40
- * Authentication component options which can be overridden by individual components by specifying types other than default..
47
+ * Authentication audit component options which can be overridden by individual components by specifying types other than default.
48
+ */
49
+ authenticationAuditComponent?: IEngineCoreTypeConfig<AuthenticationAuditComponentConfig>[];
50
+ /**
51
+ * Authentication rate component options which can be overridden by individual components by specifying types other than default.
52
+ */
53
+ authenticationRateComponent?: IEngineCoreTypeConfig<AuthenticationRateComponentConfig>[];
54
+ /**
55
+ * Authentication component options which can be overridden by individual components by specifying types other than default.
41
56
  */
42
57
  authenticationComponent?: IEngineCoreTypeConfig<AuthenticationComponentConfig>[];
43
58
  /**
44
- * Authentication admin component options which can be overridden by individual components by specifying types other than default..
59
+ * Authentication admin component options which can be overridden by individual components by specifying types other than default.
45
60
  */
46
61
  authenticationAdminComponent?: IEngineCoreTypeConfig<AuthenticationAdminComponentConfig>[];
47
62
  };
@@ -0,0 +1,9 @@
1
+ import type { IEntityStorageAuthenticationAuditServiceConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
2
+ import type { AuthenticationAuditComponentType } from "../types/authenticationAuditComponentType.js";
3
+ /**
4
+ * Authentication audit component config types.
5
+ */
6
+ export type AuthenticationAuditComponentConfig = {
7
+ type: typeof AuthenticationAuditComponentType.EntityStorage;
8
+ options?: IEntityStorageAuthenticationAuditServiceConstructorOptions;
9
+ };
@@ -0,0 +1,9 @@
1
+ import type { IEntityStorageAuthenticationRateServiceConstructorOptions } from "@twin.org/api-auth-entity-storage-service";
2
+ import type { AuthenticationRateComponentType } from "../types/authenticationRateComponentType.js";
3
+ /**
4
+ * Authentication rate component config types.
5
+ */
6
+ export type AuthenticationRateComponentConfig = {
7
+ type: typeof AuthenticationRateComponentType.EntityStorage;
8
+ options?: IEntityStorageAuthenticationRateServiceConstructorOptions;
9
+ };
@@ -0,0 +1,9 @@
1
+ import type { IHostingServiceConstructorOptions } from "@twin.org/api-service";
2
+ import type { HostingComponentType } from "../types/hostingComponentType.js";
3
+ /**
4
+ * Hosting component config types.
5
+ */
6
+ export type HostingComponentConfig = {
7
+ type: typeof HostingComponentType.Service;
8
+ options: IHostingServiceConstructorOptions;
9
+ };
@@ -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
- import type { ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
4
- import type { IVerifiableCredentialAuthenticationProcessorConstructorOptions } from "@twin.org/identity-authentication";
3
+ import type { ISingleTenantProcessorConstructorOptions, ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
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;
@@ -24,6 +20,9 @@ export type RestRouteProcessorConfig = {
24
20
  } | {
25
21
  type: typeof RestRouteProcessorType.Tenant;
26
22
  options?: ITenantProcessorConstructorOptions;
23
+ } | {
24
+ type: typeof RestRouteProcessorType.SingleTenant;
25
+ options?: ISingleTenantProcessorConstructorOptions;
27
26
  } | {
28
27
  type: typeof RestRouteProcessorType.RestRoute;
29
28
  options?: IRestRouteProcessorConstructorOptions;
@@ -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
- import type { ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
4
- import type { IVerifiableCredentialAuthenticationProcessorConstructorOptions } from "@twin.org/identity-authentication";
3
+ import type { ISingleTenantProcessorConstructorOptions, ITenantProcessorConstructorOptions } from "@twin.org/api-tenant-processor";
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;
@@ -24,6 +20,9 @@ export type SocketRouteProcessorConfig = {
24
20
  } | {
25
21
  type: typeof SocketRouteProcessorType.Tenant;
26
22
  options?: ITenantProcessorConstructorOptions;
23
+ } | {
24
+ type: typeof SocketRouteProcessorType.SingleTenant;
25
+ options?: ISingleTenantProcessorConstructorOptions;
27
26
  } | {
28
27
  type: typeof SocketRouteProcessorType.SocketRoute;
29
28
  options?: ISocketRouteProcessorConstructorOptions;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Authentication audit component types.
3
+ */
4
+ export declare const AuthenticationAuditComponentType: {
5
+ /**
6
+ * Entity storage.
7
+ */
8
+ readonly EntityStorage: "entity-storage";
9
+ };
10
+ /**
11
+ * Authentication audit component types.
12
+ */
13
+ export type AuthenticationAuditComponentType = (typeof AuthenticationAuditComponentType)[keyof typeof AuthenticationAuditComponentType];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Authentication rate component types.
3
+ */
4
+ export declare const AuthenticationRateComponentType: {
5
+ /**
6
+ * Entity storage.
7
+ */
8
+ readonly EntityStorage: "entity-storage";
9
+ };
10
+ /**
11
+ * Authentication rate component types.
12
+ */
13
+ export type AuthenticationRateComponentType = (typeof AuthenticationRateComponentType)[keyof typeof AuthenticationRateComponentType];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Hosting component types.
3
+ */
4
+ export declare const HostingComponentType: {
5
+ /**
6
+ * Service.
7
+ */
8
+ readonly Service: "service";
9
+ };
10
+ /**
11
+ * Hosting component types.
12
+ */
13
+ export type HostingComponentType = (typeof HostingComponentType)[keyof typeof HostingComponentType];
@@ -26,6 +26,10 @@ export declare const RestRouteProcessorType: {
26
26
  * Tenant.
27
27
  */
28
28
  readonly Tenant: "tenant";
29
+ /**
30
+ * Single Tenant.
31
+ */
32
+ readonly SingleTenant: "single-tenant";
29
33
  /**
30
34
  * REST Route.
31
35
  */
@@ -26,6 +26,10 @@ export declare const SocketRouteProcessorType: {
26
26
  * Tenant.
27
27
  */
28
28
  readonly Tenant: "tenant";
29
+ /**
30
+ * Single Tenant.
31
+ */
32
+ readonly SingleTenant: "single-tenant";
29
33
  /**
30
34
  * Socket Route.
31
35
  */