@twin.org/engine-models 0.0.1-next.1

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 (188) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +21 -0
  3. package/dist/cjs/index.cjs +550 -0
  4. package/dist/esm/index.mjs +517 -0
  5. package/dist/types/factories/engineCoreFactory.d.ts +6 -0
  6. package/dist/types/factories/engineServerFactory.d.ts +6 -0
  7. package/dist/types/index.d.ts +74 -0
  8. package/dist/types/models/IEngineCore.d.ts +55 -0
  9. package/dist/types/models/IEngineCoreContext.d.ts +33 -0
  10. package/dist/types/models/IEngineServer.d.ts +32 -0
  11. package/dist/types/models/IEngineState.d.ts +13 -0
  12. package/dist/types/models/IEngineStateStorage.d.ts +20 -0
  13. package/dist/types/models/config/IEngineCoreConfig.d.ts +141 -0
  14. package/dist/types/models/config/IEngineCoreTypeBaseConfig.d.ts +13 -0
  15. package/dist/types/models/config/IEngineCoreTypeConfig.d.ts +11 -0
  16. package/dist/types/models/config/IEngineServerConfig.d.ts +36 -0
  17. package/dist/types/models/config/typeConfig/attestationComponentConfig.d.ts +12 -0
  18. package/dist/types/models/config/typeConfig/attestationConnectorConfig.d.ts +21 -0
  19. package/dist/types/models/config/typeConfig/auditableItemGraphComponentConfig.d.ts +14 -0
  20. package/dist/types/models/config/typeConfig/auditableItemStreamComponentConfig.d.ts +14 -0
  21. package/dist/types/models/config/typeConfig/authenticationComponentConfig.d.ts +13 -0
  22. package/dist/types/models/config/typeConfig/backgroundTaskConnectorConfig.d.ts +13 -0
  23. package/dist/types/models/config/typeConfig/blobStorageComponentConfig.d.ts +13 -0
  24. package/dist/types/models/config/typeConfig/blobStorageConnectorConfig.d.ts +42 -0
  25. package/dist/types/models/config/typeConfig/dltConfig.d.ts +11 -0
  26. package/dist/types/models/config/typeConfig/entityStorageComponentConfig.d.ts +12 -0
  27. package/dist/types/models/config/typeConfig/entityStorageConnectorConfig.d.ts +46 -0
  28. package/dist/types/models/config/typeConfig/faucetConnectorConfig.d.ts +18 -0
  29. package/dist/types/models/config/typeConfig/identityComponentConfig.d.ts +11 -0
  30. package/dist/types/models/config/typeConfig/identityConnectorConfig.d.ts +18 -0
  31. package/dist/types/models/config/typeConfig/identityProfileComponentConfig.d.ts +10 -0
  32. package/dist/types/models/config/typeConfig/identityProfileConnectorConfig.d.ts +10 -0
  33. package/dist/types/models/config/typeConfig/immutableProofComponentConfig.d.ts +16 -0
  34. package/dist/types/models/config/typeConfig/immutableStorageConnectorConfig.d.ts +17 -0
  35. package/dist/types/models/config/typeConfig/informationComponentConfig.d.ts +11 -0
  36. package/dist/types/models/config/typeConfig/loggingComponentConfig.d.ts +10 -0
  37. package/dist/types/models/config/typeConfig/loggingConnectorConfig.d.ts +25 -0
  38. package/dist/types/models/config/typeConfig/mimeTypeProcessorConfig.d.ts +8 -0
  39. package/dist/types/models/config/typeConfig/nftComponentConfig.d.ts +11 -0
  40. package/dist/types/models/config/typeConfig/nftConnectorConfig.d.ts +17 -0
  41. package/dist/types/models/config/typeConfig/restRouteProcessorConfig.d.ts +32 -0
  42. package/dist/types/models/config/typeConfig/socketRouteProcessorConfig.d.ts +32 -0
  43. package/dist/types/models/config/typeConfig/telemetryComponentConfig.d.ts +10 -0
  44. package/dist/types/models/config/typeConfig/telemetryConnectorConfig.d.ts +12 -0
  45. package/dist/types/models/config/typeConfig/vaultConnectorConfig.d.ts +17 -0
  46. package/dist/types/models/config/typeConfig/walletConnectorConfig.d.ts +22 -0
  47. package/dist/types/models/engineTypeInitialiser.d.ts +7 -0
  48. package/dist/types/models/restRouteGenerator.d.ts +5 -0
  49. package/dist/types/models/socketRouteGenerator.d.ts +5 -0
  50. package/dist/types/models/types/attestationComponentType.d.ts +13 -0
  51. package/dist/types/models/types/attestationConnectorType.d.ts +17 -0
  52. package/dist/types/models/types/auditableItemGraphComponentType.d.ts +13 -0
  53. package/dist/types/models/types/auditableItemStreamComponentType.d.ts +13 -0
  54. package/dist/types/models/types/authenticationComponentType.d.ts +13 -0
  55. package/dist/types/models/types/backgroundTaskConnectorType.d.ts +13 -0
  56. package/dist/types/models/types/blobStorageComponentType.d.ts +13 -0
  57. package/dist/types/models/types/blobStorageConnectorType.d.ts +33 -0
  58. package/dist/types/models/types/dltConfigType.d.ts +13 -0
  59. package/dist/types/models/types/entityStorageComponentType.d.ts +13 -0
  60. package/dist/types/models/types/entityStorageConnectorType.d.ts +33 -0
  61. package/dist/types/models/types/faucetConnectorType.d.ts +17 -0
  62. package/dist/types/models/types/identityComponentType.d.ts +13 -0
  63. package/dist/types/models/types/identityConnectorType.d.ts +17 -0
  64. package/dist/types/models/types/identityProfileComponentType.d.ts +13 -0
  65. package/dist/types/models/types/identityProfileConnectorType.d.ts +13 -0
  66. package/dist/types/models/types/immutableProofComponentType.d.ts +13 -0
  67. package/dist/types/models/types/immutableStorageConnectorType.d.ts +17 -0
  68. package/dist/types/models/types/informationComponentType.d.ts +13 -0
  69. package/dist/types/models/types/loggingComponentType.d.ts +13 -0
  70. package/dist/types/models/types/loggingConnectorType.d.ts +21 -0
  71. package/dist/types/models/types/mimeTypeProcessorType.d.ts +13 -0
  72. package/dist/types/models/types/nftComponentType.d.ts +13 -0
  73. package/dist/types/models/types/nftConnectorType.d.ts +17 -0
  74. package/dist/types/models/types/restRouteProcessorType.d.ts +29 -0
  75. package/dist/types/models/types/socketRouteProcessorType.d.ts +29 -0
  76. package/dist/types/models/types/telemetryComponentType.d.ts +13 -0
  77. package/dist/types/models/types/telemetryConnectorType.d.ts +13 -0
  78. package/dist/types/models/types/vaultConnectorType.d.ts +17 -0
  79. package/dist/types/models/types/walletConnectorType.d.ts +17 -0
  80. package/docs/changelog.md +5 -0
  81. package/docs/examples.md +1 -0
  82. package/docs/reference/index.md +114 -0
  83. package/docs/reference/interfaces/IEngineCore.md +139 -0
  84. package/docs/reference/interfaces/IEngineCoreConfig.md +231 -0
  85. package/docs/reference/interfaces/IEngineCoreContext.md +47 -0
  86. package/docs/reference/interfaces/IEngineCoreTypeBaseConfig.md +23 -0
  87. package/docs/reference/interfaces/IEngineServer.md +83 -0
  88. package/docs/reference/interfaces/IEngineServerConfig.md +51 -0
  89. package/docs/reference/interfaces/IEngineState.md +19 -0
  90. package/docs/reference/interfaces/IEngineStateStorage.md +47 -0
  91. package/docs/reference/type-aliases/AttestationComponentConfig.md +23 -0
  92. package/docs/reference/type-aliases/AttestationComponentType.md +5 -0
  93. package/docs/reference/type-aliases/AttestationConnectorConfig.md +5 -0
  94. package/docs/reference/type-aliases/AttestationConnectorType.md +5 -0
  95. package/docs/reference/type-aliases/AuditableItemGraphComponentConfig.md +31 -0
  96. package/docs/reference/type-aliases/AuditableItemGraphComponentType.md +5 -0
  97. package/docs/reference/type-aliases/AuditableItemStreamComponentConfig.md +31 -0
  98. package/docs/reference/type-aliases/AuditableItemStreamComponentType.md +5 -0
  99. package/docs/reference/type-aliases/AuthenticationComponentConfig.md +27 -0
  100. package/docs/reference/type-aliases/AuthenticationComponentType.md +5 -0
  101. package/docs/reference/type-aliases/BackgroundTaskConnectorConfig.md +27 -0
  102. package/docs/reference/type-aliases/BackgroundTaskConnectorType.md +5 -0
  103. package/docs/reference/type-aliases/BlobStorageComponentConfig.md +27 -0
  104. package/docs/reference/type-aliases/BlobStorageComponentType.md +5 -0
  105. package/docs/reference/type-aliases/BlobStorageConnectorConfig.md +5 -0
  106. package/docs/reference/type-aliases/BlobStorageConnectorType.md +5 -0
  107. package/docs/reference/type-aliases/DltConfig.md +19 -0
  108. package/docs/reference/type-aliases/DltConfigType.md +5 -0
  109. package/docs/reference/type-aliases/EngineTypeInitialiser.md +23 -0
  110. package/docs/reference/type-aliases/EntityStorageComponentConfig.md +23 -0
  111. package/docs/reference/type-aliases/EntityStorageComponentType.md +5 -0
  112. package/docs/reference/type-aliases/EntityStorageConnectorConfig.md +5 -0
  113. package/docs/reference/type-aliases/EntityStorageConnectorType.md +5 -0
  114. package/docs/reference/type-aliases/FaucetConnectorConfig.md +5 -0
  115. package/docs/reference/type-aliases/FaucetConnectorType.md +5 -0
  116. package/docs/reference/type-aliases/IEngineCoreTypeConfig.md +19 -0
  117. package/docs/reference/type-aliases/IImmutableProofComponentType.md +5 -0
  118. package/docs/reference/type-aliases/IdentityComponentConfig.md +19 -0
  119. package/docs/reference/type-aliases/IdentityComponentType.md +5 -0
  120. package/docs/reference/type-aliases/IdentityConnectorConfig.md +5 -0
  121. package/docs/reference/type-aliases/IdentityConnectorType.md +5 -0
  122. package/docs/reference/type-aliases/IdentityProfileComponentConfig.md +19 -0
  123. package/docs/reference/type-aliases/IdentityProfileComponentType.md +5 -0
  124. package/docs/reference/type-aliases/IdentityProfileConnectorConfig.md +19 -0
  125. package/docs/reference/type-aliases/IdentityProfileConnectorType.md +5 -0
  126. package/docs/reference/type-aliases/ImmutableProofComponentConfig.md +39 -0
  127. package/docs/reference/type-aliases/ImmutableStorageConnectorConfig.md +5 -0
  128. package/docs/reference/type-aliases/ImmutableStorageConnectorType.md +5 -0
  129. package/docs/reference/type-aliases/InformationComponentConfig.md +19 -0
  130. package/docs/reference/type-aliases/InformationComponentType.md +5 -0
  131. package/docs/reference/type-aliases/LoggingComponentConfig.md +19 -0
  132. package/docs/reference/type-aliases/LoggingComponentType.md +5 -0
  133. package/docs/reference/type-aliases/LoggingConnectorConfig.md +5 -0
  134. package/docs/reference/type-aliases/LoggingConnectorType.md +5 -0
  135. package/docs/reference/type-aliases/MimeTypeProcessorConfig.md +15 -0
  136. package/docs/reference/type-aliases/MimeTypeProcessorType.md +5 -0
  137. package/docs/reference/type-aliases/NftComponentConfig.md +19 -0
  138. package/docs/reference/type-aliases/NftComponentType.md +5 -0
  139. package/docs/reference/type-aliases/NftConnectorConfig.md +5 -0
  140. package/docs/reference/type-aliases/NftConnectorType.md +5 -0
  141. package/docs/reference/type-aliases/RestRouteGenerator.md +15 -0
  142. package/docs/reference/type-aliases/RestRouteProcessorConfig.md +5 -0
  143. package/docs/reference/type-aliases/RestRouteProcessorType.md +5 -0
  144. package/docs/reference/type-aliases/SocketRouteGenerator.md +15 -0
  145. package/docs/reference/type-aliases/SocketRouteProcessorConfig.md +5 -0
  146. package/docs/reference/type-aliases/SocketRouteProcessorType.md +5 -0
  147. package/docs/reference/type-aliases/TelemetryComponentConfig.md +19 -0
  148. package/docs/reference/type-aliases/TelemetryComponentType.md +5 -0
  149. package/docs/reference/type-aliases/TelemetryConnectorConfig.md +27 -0
  150. package/docs/reference/type-aliases/TelemetryConnectorType.md +5 -0
  151. package/docs/reference/type-aliases/VaultConnectorConfig.md +5 -0
  152. package/docs/reference/type-aliases/VaultConnectorType.md +5 -0
  153. package/docs/reference/type-aliases/WalletConnectorConfig.md +5 -0
  154. package/docs/reference/type-aliases/WalletConnectorType.md +5 -0
  155. package/docs/reference/variables/AttestationComponentType.md +13 -0
  156. package/docs/reference/variables/AttestationConnectorType.md +19 -0
  157. package/docs/reference/variables/AuditableItemGraphComponentType.md +13 -0
  158. package/docs/reference/variables/AuditableItemStreamComponentType.md +13 -0
  159. package/docs/reference/variables/AuthenticationComponentType.md +13 -0
  160. package/docs/reference/variables/BackgroundTaskConnectorType.md +13 -0
  161. package/docs/reference/variables/BlobStorageComponentType.md +13 -0
  162. package/docs/reference/variables/BlobStorageConnectorType.md +43 -0
  163. package/docs/reference/variables/DltConfigType.md +13 -0
  164. package/docs/reference/variables/EngineCoreFactory.md +5 -0
  165. package/docs/reference/variables/EngineServerFactory.md +5 -0
  166. package/docs/reference/variables/EntityStorageComponentType.md +13 -0
  167. package/docs/reference/variables/EntityStorageConnectorType.md +43 -0
  168. package/docs/reference/variables/FaucetConnectorType.md +19 -0
  169. package/docs/reference/variables/IdentityComponentType.md +13 -0
  170. package/docs/reference/variables/IdentityConnectorType.md +19 -0
  171. package/docs/reference/variables/IdentityProfileComponentType.md +13 -0
  172. package/docs/reference/variables/IdentityProfileConnectorType.md +13 -0
  173. package/docs/reference/variables/ImmutableProofComponentType.md +13 -0
  174. package/docs/reference/variables/ImmutableStorageConnectorType.md +19 -0
  175. package/docs/reference/variables/InformationComponentType.md +13 -0
  176. package/docs/reference/variables/LoggingComponentType.md +13 -0
  177. package/docs/reference/variables/LoggingConnectorType.md +25 -0
  178. package/docs/reference/variables/MimeTypeProcessorType.md +13 -0
  179. package/docs/reference/variables/NftComponentType.md +13 -0
  180. package/docs/reference/variables/NftConnectorType.md +19 -0
  181. package/docs/reference/variables/RestRouteProcessorType.md +37 -0
  182. package/docs/reference/variables/SocketRouteProcessorType.md +37 -0
  183. package/docs/reference/variables/TelemetryComponentType.md +13 -0
  184. package/docs/reference/variables/TelemetryConnectorType.md +13 -0
  185. package/docs/reference/variables/VaultConnectorType.md +19 -0
  186. package/docs/reference/variables/WalletConnectorType.md +19 -0
  187. package/locales/en.json +1 -0
  188. package/package.json +101 -0
@@ -0,0 +1,32 @@
1
+ import type { IEngineCoreTypeConfig } from "./config/IEngineCoreTypeConfig";
2
+ import type { RestRouteGenerator } from "./restRouteGenerator";
3
+ import type { SocketRouteGenerator } from "./socketRouteGenerator";
4
+ /**
5
+ * Interface describing the engine server methods.
6
+ */
7
+ export interface IEngineServer {
8
+ /**
9
+ * Add a REST route generator.
10
+ * @param type The type to add the generator for.
11
+ * @param typeConfig The type config.
12
+ * @param generator The generator to add.
13
+ */
14
+ addRestRouteGenerator(type: string, typeConfig: IEngineCoreTypeConfig[] | undefined, generator: RestRouteGenerator): void;
15
+ /**
16
+ * Add a socket route generator.
17
+ * @param type The type to add the generator for.
18
+ * @param typeConfig The type config.
19
+ * @param generator The generator to add.
20
+ */
21
+ addSocketRouteGenerator(type: string, typeConfig: IEngineCoreTypeConfig[] | undefined, generator: SocketRouteGenerator): void;
22
+ /**
23
+ * Start the engine server.
24
+ * @returns Nothing.
25
+ */
26
+ start(): Promise<void>;
27
+ /**
28
+ * Stop the engine server.
29
+ * @returns Nothing.
30
+ */
31
+ stop(): Promise<void>;
32
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The state of the engine.
3
+ */
4
+ export interface IEngineState {
5
+ /**
6
+ * The identity for the node.
7
+ */
8
+ nodeIdentity?: string;
9
+ /**
10
+ * The ids of the bootstrapped components.
11
+ */
12
+ bootstrappedComponents: string[];
13
+ }
@@ -0,0 +1,20 @@
1
+ import type { IEngineCore } from "./IEngineCore";
2
+ import type { IEngineState } from "./IEngineState";
3
+ /**
4
+ * Definition of state storage for engine.
5
+ */
6
+ export interface IEngineStateStorage {
7
+ /**
8
+ * Method for loading the state.
9
+ * @param engineCore The engine core to load the state for.
10
+ * @returns The state of the engine or undefined if it doesn't exist.
11
+ */
12
+ load(engineCore: IEngineCore): Promise<IEngineState | undefined>;
13
+ /**
14
+ * Method for saving the state.
15
+ * @param engineCore The engine core to save the state for.
16
+ * @param state The state of the engine to save.
17
+ * @returns Nothing.
18
+ */
19
+ save(engineCore: IEngineCore, state: IEngineState): Promise<void>;
20
+ }
@@ -0,0 +1,141 @@
1
+ import type { IEngineCoreTypeConfig } from "./IEngineCoreTypeConfig";
2
+ import type { AttestationComponentConfig } from "./typeConfig/attestationComponentConfig";
3
+ import type { AttestationConnectorConfig } from "./typeConfig/attestationConnectorConfig";
4
+ import type { AuditableItemGraphComponentConfig } from "./typeConfig/auditableItemGraphComponentConfig";
5
+ import type { AuditableItemStreamComponentConfig } from "./typeConfig/auditableItemStreamComponentConfig";
6
+ import type { BackgroundTaskConnectorConfig } from "./typeConfig/backgroundTaskConnectorConfig";
7
+ import type { BlobStorageComponentConfig } from "./typeConfig/blobStorageComponentConfig";
8
+ import type { BlobStorageConnectorConfig } from "./typeConfig/blobStorageConnectorConfig";
9
+ import type { DltConfig } from "./typeConfig/dltConfig";
10
+ import type { EntityStorageComponentConfig } from "./typeConfig/entityStorageComponentConfig";
11
+ import type { EntityStorageConnectorConfig } from "./typeConfig/entityStorageConnectorConfig";
12
+ import type { FaucetConnectorConfig } from "./typeConfig/faucetConnectorConfig";
13
+ import type { IdentityComponentConfig } from "./typeConfig/identityComponentConfig";
14
+ import type { IdentityConnectorConfig } from "./typeConfig/identityConnectorConfig";
15
+ import type { IdentityProfileComponentConfig } from "./typeConfig/identityProfileComponentConfig";
16
+ import type { IdentityProfileConnectorConfig } from "./typeConfig/identityProfileConnectorConfig";
17
+ import type { ImmutableProofComponentConfig } from "./typeConfig/immutableProofComponentConfig";
18
+ import type { ImmutableStorageConnectorConfig } from "./typeConfig/immutableStorageConnectorConfig";
19
+ import type { LoggingComponentConfig } from "./typeConfig/loggingComponentConfig";
20
+ import type { LoggingConnectorConfig } from "./typeConfig/loggingConnectorConfig";
21
+ import type { NftComponentConfig } from "./typeConfig/nftComponentConfig";
22
+ import type { NftConnectorConfig } from "./typeConfig/nftConnectorConfig";
23
+ import type { TelemetryComponentConfig } from "./typeConfig/telemetryComponentConfig";
24
+ import type { TelemetryConnectorConfig } from "./typeConfig/telemetryConnectorConfig";
25
+ import type { VaultConnectorConfig } from "./typeConfig/vaultConnectorConfig";
26
+ import type { WalletConnectorConfig } from "./typeConfig/walletConnectorConfig";
27
+ /**
28
+ * Configuration for the engine core.
29
+ */
30
+ export interface IEngineCoreConfig {
31
+ /**
32
+ * Start the engine in debug mode.
33
+ * @default false
34
+ */
35
+ debug?: boolean;
36
+ /**
37
+ * Disable output to the console.
38
+ * @default false
39
+ */
40
+ silent?: boolean;
41
+ /**
42
+ * Logging connector options which can be overridden by individual components by specifying types other than default.
43
+ */
44
+ loggingConnector?: IEngineCoreTypeConfig<LoggingConnectorConfig>[];
45
+ /**
46
+ * Logging component options which can be overridden by individual components by specifying types other than default.
47
+ */
48
+ loggingComponent?: IEngineCoreTypeConfig<LoggingComponentConfig>[];
49
+ /**
50
+ * Entity storage connector options which can be overridden by individual components by specifying types other than default.
51
+ */
52
+ entityStorageConnector?: IEngineCoreTypeConfig<EntityStorageConnectorConfig>[];
53
+ /**
54
+ * Entity storage component options which can be overridden by individual components by specifying types other than default.
55
+ */
56
+ entityStorageComponent?: IEngineCoreTypeConfig<EntityStorageComponentConfig>[];
57
+ /**
58
+ * Blob storage connector options which can be overridden by individual components by specifying types other than default.
59
+ */
60
+ blobStorageConnector?: IEngineCoreTypeConfig<BlobStorageConnectorConfig>[];
61
+ /**
62
+ * Blob storage component options which can be overridden by individual components by specifying types other than default.
63
+ */
64
+ blobStorageComponent?: IEngineCoreTypeConfig<BlobStorageComponentConfig>[];
65
+ /**
66
+ * Telemetry connector options which can be overridden by individual components by specifying types other than default.
67
+ */
68
+ telemetryConnector?: IEngineCoreTypeConfig<TelemetryConnectorConfig>[];
69
+ /**
70
+ * Telemetry component options which can be overridden by individual components by specifying types other than default.
71
+ */
72
+ telemetryComponent?: IEngineCoreTypeConfig<TelemetryComponentConfig>[];
73
+ /**
74
+ * Background task connector options which can be overridden by individual components by specifying types other than default.
75
+ */
76
+ backgroundTaskConnector?: IEngineCoreTypeConfig<BackgroundTaskConnectorConfig>[];
77
+ /**
78
+ * Vault connector options which can be overridden by individual components by specifying types other than default.
79
+ */
80
+ vaultConnector?: IEngineCoreTypeConfig<VaultConnectorConfig>[];
81
+ /**
82
+ * DLT options which can be overridden by individual components by specifying types other than default.
83
+ */
84
+ dltConfig?: IEngineCoreTypeConfig<DltConfig>[];
85
+ /**
86
+ * Wallet connector options which can be overridden by individual components by specifying types other than default.
87
+ */
88
+ walletConnector?: IEngineCoreTypeConfig<WalletConnectorConfig>[];
89
+ /**
90
+ * Immutable storage connector options which can be overridden by individual components by specifying types other than default.
91
+ */
92
+ immutableStorageConnector?: IEngineCoreTypeConfig<ImmutableStorageConnectorConfig>[];
93
+ /**
94
+ * Immutable proof component options which can be overridden by individual components by specifying types other than default.
95
+ */
96
+ immutableProofComponent?: IEngineCoreTypeConfig<ImmutableProofComponentConfig>[];
97
+ /**
98
+ * Faucet connector options which can be overridden by individual components by specifying types other than default.
99
+ */
100
+ faucetConnector?: IEngineCoreTypeConfig<FaucetConnectorConfig>[];
101
+ /**
102
+ * Identity connector options which can be overridden by individual components by specifying types other than default.
103
+ */
104
+ identityConnector?: IEngineCoreTypeConfig<IdentityConnectorConfig>[];
105
+ /**
106
+ * Identity component profile options which can be overridden by individual components by specifying types other than default.
107
+ */
108
+ identityComponent?: IEngineCoreTypeConfig<IdentityComponentConfig>[];
109
+ /**
110
+ * Identity profile connector options which can be overridden by individual components by specifying types other than default.
111
+ */
112
+ identityProfileConnector?: IEngineCoreTypeConfig<IdentityProfileConnectorConfig>[];
113
+ /**
114
+ * Identity profile component profile options which can be overridden by individual components by specifying types other than default.
115
+ */
116
+ identityProfileComponent?: IEngineCoreTypeConfig<IdentityProfileComponentConfig>[];
117
+ /**
118
+ * NFT connector options which can be overridden by individual components by specifying types other than default.
119
+ */
120
+ nftConnector?: IEngineCoreTypeConfig<NftConnectorConfig>[];
121
+ /**
122
+ * NFT component options which can be overridden by individual components by specifying types other than default.
123
+ */
124
+ nftComponent?: IEngineCoreTypeConfig<NftComponentConfig>[];
125
+ /**
126
+ * Attestation connector options which can be overridden by individual components by specifying types other than default.
127
+ */
128
+ attestationConnector?: IEngineCoreTypeConfig<AttestationConnectorConfig>[];
129
+ /**
130
+ * Attestation component profile options which can be overridden by individual components by specifying types other than default.
131
+ */
132
+ attestationComponent?: IEngineCoreTypeConfig<AttestationComponentConfig>[];
133
+ /**
134
+ * Auditable item graph component options which can be overridden by individual components by specifying types other than default.
135
+ */
136
+ auditableItemGraphComponent?: IEngineCoreTypeConfig<AuditableItemGraphComponentConfig>[];
137
+ /**
138
+ * Auditable item stream component profile options which can be overridden by individual components by specifying types other than default.
139
+ */
140
+ auditableItemStreamComponent?: IEngineCoreTypeConfig<AuditableItemStreamComponentConfig>[];
141
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Configuration for the engine core type base.
3
+ */
4
+ export interface IEngineCoreTypeBaseConfig<T = unknown> {
5
+ /**
6
+ * The type of the instance.
7
+ */
8
+ type: string;
9
+ /**
10
+ * The options for the instance.
11
+ */
12
+ options?: T;
13
+ }
@@ -0,0 +1,11 @@
1
+ import type { IEngineCoreTypeBaseConfig } from "./IEngineCoreTypeBaseConfig";
2
+ /**
3
+ * Configuration for the engine core type.
4
+ */
5
+ export type IEngineCoreTypeConfig<T extends IEngineCoreTypeBaseConfig = {
6
+ type: string;
7
+ }> = T & {
8
+ [id: string]: unknown;
9
+ overrideInstanceType?: string;
10
+ isDefault?: boolean;
11
+ };
@@ -0,0 +1,36 @@
1
+ import type { IWebServerOptions } from "@twin.org/api-models";
2
+ import type { IEngineCoreTypeConfig } from "./IEngineCoreTypeConfig";
3
+ import type { AuthenticationComponentConfig } from "./typeConfig/authenticationComponentConfig";
4
+ import type { InformationComponentConfig } from "./typeConfig/informationComponentConfig";
5
+ import type { MimeTypeProcessorConfig } from "./typeConfig/mimeTypeProcessorConfig";
6
+ import type { RestRouteProcessorConfig } from "./typeConfig/restRouteProcessorConfig";
7
+ import type { SocketRouteProcessorConfig } from "./typeConfig/socketRouteProcessorConfig";
8
+ /**
9
+ * Configuration for the engine server.
10
+ */
11
+ export interface IEngineServerConfig {
12
+ /**
13
+ * Configuration for the web server.
14
+ */
15
+ web?: IWebServerOptions;
16
+ /**
17
+ * Information component options which can be overridden by individual components by specifying types other than default..
18
+ */
19
+ informationComponent?: IEngineCoreTypeConfig<InformationComponentConfig>[];
20
+ /**
21
+ * REST route processors options which can be overridden by individual components by specifying types other than default..
22
+ */
23
+ restRouteProcessor?: IEngineCoreTypeConfig<RestRouteProcessorConfig>[];
24
+ /**
25
+ * Socket route processors options which can be overridden by individual components by specifying types other than default..
26
+ */
27
+ socketRouteProcessor?: IEngineCoreTypeConfig<SocketRouteProcessorConfig>[];
28
+ /**
29
+ * Mime type processors options which can be overridden by individual components by specifying types other than default..
30
+ */
31
+ mimeTypeProcessor?: IEngineCoreTypeConfig<MimeTypeProcessorConfig>[];
32
+ /**
33
+ * Authentication component options which can be overridden by individual components by specifying types other than default..
34
+ */
35
+ authenticationComponent?: IEngineCoreTypeConfig<AuthenticationComponentConfig>[];
36
+ }
@@ -0,0 +1,12 @@
1
+ import type { IAttestationServiceConfig } from "@twin.org/attestation-service";
2
+ import type { AttestationComponentType } from "../../types/attestationComponentType";
3
+ /**
4
+ * Attestation component config types.
5
+ */
6
+ export type AttestationComponentConfig = {
7
+ type: typeof AttestationComponentType.Service;
8
+ options?: {
9
+ walletConnectorType?: string;
10
+ config?: IAttestationServiceConfig;
11
+ };
12
+ };
@@ -0,0 +1,21 @@
1
+ import type { IEntityStorageAttestationConnectorConfig } from "@twin.org/attestation-connector-entity-storage";
2
+ import type { IIotaAttestationConnectorConfig } from "@twin.org/attestation-connector-iota";
3
+ import type { AttestationConnectorType } from "../../types/attestationConnectorType";
4
+ /**
5
+ * Attestation config connector types.
6
+ */
7
+ export type AttestationConnectorConfig = {
8
+ type: typeof AttestationConnectorType.EntityStorage;
9
+ options?: {
10
+ identityConnectorType?: string;
11
+ nftConnectorType?: string;
12
+ config?: IEntityStorageAttestationConnectorConfig;
13
+ };
14
+ } | {
15
+ type: typeof AttestationConnectorType.Iota;
16
+ options?: {
17
+ identityConnectorType?: string;
18
+ nftConnectorType?: string;
19
+ config?: IIotaAttestationConnectorConfig;
20
+ };
21
+ };
@@ -0,0 +1,14 @@
1
+ import type { IAuditableItemGraphServiceConfig } from "@twin.org/auditable-item-graph-service";
2
+ import type { AuditableItemGraphComponentType } from "../../types/auditableItemGraphComponentType";
3
+ /**
4
+ * Auditable item graph component config types.
5
+ */
6
+ export type AuditableItemGraphComponentConfig = {
7
+ type: typeof AuditableItemGraphComponentType.Service;
8
+ options?: {
9
+ immutableProofComponentType?: string;
10
+ vertexEntityStorageType?: string;
11
+ changesetEntityStorageType?: string;
12
+ config?: IAuditableItemGraphServiceConfig;
13
+ };
14
+ };
@@ -0,0 +1,14 @@
1
+ import type { IAuditableItemStreamServiceConfig } from "@twin.org/auditable-item-stream-service";
2
+ import type { AuditableItemStreamComponentType } from "../../types/auditableItemStreamComponentType";
3
+ /**
4
+ * Auditable item stream component config types.
5
+ */
6
+ export type AuditableItemStreamComponentConfig = {
7
+ type: typeof AuditableItemStreamComponentType.Service;
8
+ options?: {
9
+ immutableProofComponentType?: string;
10
+ streamEntityStorageType?: string;
11
+ streamEntryEntityStorageType?: string;
12
+ config?: IAuditableItemStreamServiceConfig;
13
+ };
14
+ };
@@ -0,0 +1,13 @@
1
+ import type { IEntityStorageAuthenticationServiceConfig } from "@twin.org/api-auth-entity-storage-service";
2
+ import type { AuthenticationComponentType } from "../../types/authenticationComponentType";
3
+ /**
4
+ * Authentication component config types.
5
+ */
6
+ export type AuthenticationComponentConfig = {
7
+ type: typeof AuthenticationComponentType.AuthEntityStorage;
8
+ options?: {
9
+ userEntityStorageType?: string;
10
+ vaultConnectorType?: string;
11
+ config?: IEntityStorageAuthenticationServiceConfig;
12
+ };
13
+ };
@@ -0,0 +1,13 @@
1
+ import type { IEntityStorageBackgroundTaskConnectorConfig } from "@twin.org/background-task-connector-entity-storage";
2
+ import type { BackgroundTaskConnectorType } from "../../types/backgroundTaskConnectorType";
3
+ /**
4
+ * Background task connector config types.
5
+ */
6
+ export type BackgroundTaskConnectorConfig = {
7
+ type: typeof BackgroundTaskConnectorType.EntityStorage;
8
+ options?: {
9
+ backgroundTaskEntityStorageType?: string;
10
+ loggingConnectorType?: string;
11
+ config?: IEntityStorageBackgroundTaskConnectorConfig;
12
+ };
13
+ };
@@ -0,0 +1,13 @@
1
+ import type { IBlobStorageServiceConfig } from "@twin.org/blob-storage-service";
2
+ import type { BlobStorageComponentType } from "../../types/blobStorageComponentType";
3
+ /**
4
+ * Blob storage component config types.
5
+ */
6
+ export type BlobStorageComponentConfig = {
7
+ type: typeof BlobStorageComponentType.Service;
8
+ options?: {
9
+ entryEntityStorageType?: string;
10
+ vaultConnectorType?: string;
11
+ config?: IBlobStorageServiceConfig;
12
+ };
13
+ };
@@ -0,0 +1,42 @@
1
+ import type { IS3BlobStorageConnectorConfig } from "@twin.org/blob-storage-connector-aws-s3";
2
+ import type { IAzureBlobStorageConnectorConfig } from "@twin.org/blob-storage-connector-azure";
3
+ import type { IFileBlobStorageConnectorConfig } from "@twin.org/blob-storage-connector-file";
4
+ import type { IGcpBlobStorageConnectorConfig } from "@twin.org/blob-storage-connector-gcp";
5
+ import type { IIpfsBlobStorageConnectorConfig } from "@twin.org/blob-storage-connector-ipfs";
6
+ import type { BlobStorageConnectorType } from "../../types/blobStorageConnectorType";
7
+ /**
8
+ * Blob storage connector config types.
9
+ */
10
+ export type BlobStorageConnectorConfig = {
11
+ type: typeof BlobStorageConnectorType.File;
12
+ options: {
13
+ config: IFileBlobStorageConnectorConfig;
14
+ storagePrefix?: string;
15
+ };
16
+ } | {
17
+ type: typeof BlobStorageConnectorType.Memory;
18
+ options?: never;
19
+ } | {
20
+ type: typeof BlobStorageConnectorType.AwsS3;
21
+ options: {
22
+ config: IS3BlobStorageConnectorConfig;
23
+ storagePrefix?: string;
24
+ };
25
+ } | {
26
+ type: typeof BlobStorageConnectorType.AzureStorage;
27
+ options: {
28
+ config: IAzureBlobStorageConnectorConfig;
29
+ storagePrefix?: string;
30
+ };
31
+ } | {
32
+ type: typeof BlobStorageConnectorType.GcpStorage;
33
+ options: {
34
+ config: IGcpBlobStorageConnectorConfig;
35
+ storagePrefix?: string;
36
+ };
37
+ } | {
38
+ type: typeof BlobStorageConnectorType.Ipfs;
39
+ options: {
40
+ config: IIpfsBlobStorageConnectorConfig;
41
+ };
42
+ };
@@ -0,0 +1,11 @@
1
+ import type { IIotaConfig } from "@twin.org/dlt-iota";
2
+ import type { DltConfigType } from "../../types/dltConfigType";
3
+ /**
4
+ * DLT config types.
5
+ */
6
+ export type DltConfig = {
7
+ type: typeof DltConfigType.Iota;
8
+ options?: {
9
+ config?: IIotaConfig;
10
+ };
11
+ };
@@ -0,0 +1,12 @@
1
+ import type { IEntityStorageConfig } from "@twin.org/entity-storage-service";
2
+ import type { EntityStorageComponentType } from "../../types/entityStorageComponentType";
3
+ /**
4
+ * Entity storage component config types.
5
+ */
6
+ export type EntityStorageComponentConfig = {
7
+ type: typeof EntityStorageComponentType.Service;
8
+ options: {
9
+ entityStorageType: string;
10
+ config?: IEntityStorageConfig;
11
+ };
12
+ };
@@ -0,0 +1,46 @@
1
+ import type { ICosmosDbEntityStorageConnectorConfig } from "@twin.org/entity-storage-connector-cosmosdb";
2
+ import type { IDynamoDbEntityStorageConnectorConfig } from "@twin.org/entity-storage-connector-dynamodb";
3
+ import type { IFileEntityStorageConnectorConfig } from "@twin.org/entity-storage-connector-file";
4
+ import type { IFirestoreEntityStorageConnectorConfig } from "@twin.org/entity-storage-connector-gcp-firestore";
5
+ import type { IScyllaDBTableConfig } from "@twin.org/entity-storage-connector-scylladb";
6
+ import type { EntityStorageConnectorType } from "../../types/entityStorageConnectorType";
7
+ /**
8
+ * Entity storage connector config types.
9
+ */
10
+ export type EntityStorageConnectorConfig = {
11
+ type: typeof EntityStorageConnectorType.File;
12
+ options: {
13
+ config: IFileEntityStorageConnectorConfig;
14
+ };
15
+ } | {
16
+ type: typeof EntityStorageConnectorType.Memory;
17
+ options?: never;
18
+ } | {
19
+ type: typeof EntityStorageConnectorType.AwsDynamoDb;
20
+ options: {
21
+ loggingConnectorType?: string;
22
+ config: Omit<IDynamoDbEntityStorageConnectorConfig, "tableName">;
23
+ tablePrefix?: string;
24
+ };
25
+ } | {
26
+ type: typeof EntityStorageConnectorType.AzureCosmosDb;
27
+ options: {
28
+ loggingConnectorType?: string;
29
+ config: Omit<ICosmosDbEntityStorageConnectorConfig, "tableName">;
30
+ tablePrefix?: string;
31
+ };
32
+ } | {
33
+ type: typeof EntityStorageConnectorType.GcpFirestoreDb;
34
+ options: {
35
+ loggingConnectorType?: string;
36
+ config: Omit<IFirestoreEntityStorageConnectorConfig, "tableName">;
37
+ tablePrefix?: string;
38
+ };
39
+ } | {
40
+ type: typeof EntityStorageConnectorType.ScyllaDb;
41
+ options: {
42
+ loggingConnectorType?: string;
43
+ config: Omit<IScyllaDBTableConfig, "tableName">;
44
+ tablePrefix?: string;
45
+ };
46
+ };
@@ -0,0 +1,18 @@
1
+ import type { IIotaFaucetConnectorConfig } from "@twin.org/wallet-connector-iota";
2
+ import type { FaucetConnectorType } from "../../types/faucetConnectorType";
3
+ /**
4
+ * Faucet config types.
5
+ */
6
+ export type FaucetConnectorConfig = {
7
+ type: typeof FaucetConnectorType.EntityStorage;
8
+ options?: {
9
+ walletAddressEntityStorageType?: string;
10
+ };
11
+ } | {
12
+ type: typeof FaucetConnectorType.Iota;
13
+ options: {
14
+ vaultConnectorType?: string;
15
+ faucetConnectorType?: string;
16
+ config: IIotaFaucetConnectorConfig;
17
+ };
18
+ };
@@ -0,0 +1,11 @@
1
+ import type { IIdentityServiceConfig } from "@twin.org/identity-service";
2
+ import type { IdentityComponentType } from "../../types/identityComponentType";
3
+ /**
4
+ * Identity component config types.
5
+ */
6
+ export type IdentityComponentConfig = {
7
+ type: typeof IdentityComponentType.Service;
8
+ options?: {
9
+ config?: IIdentityServiceConfig;
10
+ };
11
+ };
@@ -0,0 +1,18 @@
1
+ import type { IIotaIdentityConnectorConfig } from "@twin.org/identity-connector-iota";
2
+ import type { IdentityConnectorType } from "../../types/identityConnectorType";
3
+ /**
4
+ * Identity config connector types.
5
+ */
6
+ export type IdentityConnectorConfig = {
7
+ type: typeof IdentityConnectorType.EntityStorage;
8
+ options?: {
9
+ didDocumentEntityStorageType?: string;
10
+ vaultConnectorType?: string;
11
+ };
12
+ } | {
13
+ type: typeof IdentityConnectorType.Iota;
14
+ options: {
15
+ vaultConnectorType?: string;
16
+ config: IIotaIdentityConnectorConfig;
17
+ };
18
+ };
@@ -0,0 +1,10 @@
1
+ import type { IdentityComponentType } from "../../types/identityComponentType";
2
+ /**
3
+ * Identity profile component config types.
4
+ */
5
+ export type IdentityProfileComponentConfig = {
6
+ type: typeof IdentityComponentType.Service;
7
+ options?: {
8
+ profileEntityConnectorType?: string;
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ import type { IdentityProfileConnectorType } from "../../types/identityProfileConnectorType";
2
+ /**
3
+ * Identity profile connector config types.
4
+ */
5
+ export type IdentityProfileConnectorConfig = {
6
+ type: typeof IdentityProfileConnectorType.EntityStorage;
7
+ options?: {
8
+ profileEntityStorageType?: string;
9
+ };
10
+ };
@@ -0,0 +1,16 @@
1
+ import type { IImmutableProofServiceConfig } from "@twin.org/immutable-proof-service";
2
+ import type { ImmutableProofComponentType } from "../../types/immutableProofComponentType";
3
+ /**
4
+ * Immutable proof component config types.
5
+ */
6
+ export type ImmutableProofComponentConfig = {
7
+ type: typeof ImmutableProofComponentType.Service;
8
+ options?: {
9
+ vaultConnectorType?: string;
10
+ immutableProofEntityStorageType?: string;
11
+ immutableStorageType?: string;
12
+ identityConnectorType?: string;
13
+ backgroundTaskConnectorType?: string;
14
+ config?: IImmutableProofServiceConfig;
15
+ };
16
+ };
@@ -0,0 +1,17 @@
1
+ import type { IIotaImmutableStorageConnectorConfig } from "@twin.org/immutable-storage-connector-iota";
2
+ import type { ImmutableStorageConnectorType } from "../../types/immutableStorageConnectorType";
3
+ /**
4
+ * Immutable storage connector config types.
5
+ */
6
+ export type ImmutableStorageConnectorConfig = {
7
+ type: typeof ImmutableStorageConnectorType.EntityStorage;
8
+ options?: {
9
+ immutableStorageEntityStorageType?: string;
10
+ };
11
+ } | {
12
+ type: typeof ImmutableStorageConnectorType.Iota;
13
+ options: {
14
+ vaultConnectorType?: string;
15
+ config: IIotaImmutableStorageConnectorConfig;
16
+ };
17
+ };
@@ -0,0 +1,11 @@
1
+ import type { IInformationServiceConfig } from "@twin.org/api-service";
2
+ import type { InformationComponentType } from "../../types/informationComponentType";
3
+ /**
4
+ * Information component config types.
5
+ */
6
+ export type InformationComponentConfig = {
7
+ type: typeof InformationComponentType.Service;
8
+ options: {
9
+ config: IInformationServiceConfig;
10
+ };
11
+ };
@@ -0,0 +1,10 @@
1
+ import type { LoggingComponentType } from "../../types/loggingComponentType";
2
+ /**
3
+ * Logging component config types.
4
+ */
5
+ export type LoggingComponentConfig = {
6
+ type: typeof LoggingComponentType.Service;
7
+ options?: {
8
+ loggingConnectorType?: string;
9
+ };
10
+ };