@twin.org/engine-types 0.0.3-next.7 → 0.0.3-next.9

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.
@@ -26,7 +26,6 @@ export async function initialiseDataSpaceConnectorComponent(engineCore, context,
26
26
  loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
27
27
  backgroundTaskComponentType: engineCore.getRegisteredInstanceType("backgroundTaskComponent"),
28
28
  taskSchedulerComponentType: engineCore.getRegisteredInstanceType("taskSchedulerComponent"),
29
- federatedCatalogueComponentType: engineCore.getRegisteredInstanceType("federatedCatalogueComponent"),
30
29
  partitionContextIds,
31
30
  ...instanceConfig.options
32
31
  });
@@ -1 +1 @@
1
- {"version":3,"file":"dataSpaceConnector.js","sourceRoot":"","sources":["../../../src/components/dataSpaceConnector.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAGN,yBAAyB,EACzB,UAAU,IAAI,4BAA4B,EAC1C,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,8CAA8C,CAAC;AAG9F,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AAErG;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,qCAAqC,CAC1D,UAAsC,EACtC,OAA0C,EAC1C,cAAiD;IAMjD,IAAI,SAA0C,CAAC;IAC/C,IAAI,YAAgC,CAAC;IAErC,IAAI,cAAc,CAAC,IAAI,KAAK,+BAA+B,CAAC,OAAO,EAAE,CAAC;QACrE,4BAA4B,EAAE,CAAC;QAE/B,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gB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type { IDataSpaceConnector } from \"@twin.org/data-space-connector-models\";\nimport { DataSpaceConnectorRestClient } from \"@twin.org/data-space-connector-rest-client\";\nimport {\n\ttype ActivityLogDetails,\n\ttype ActivityTask,\n\tDataSpaceConnectorService,\n\tinitSchema as initSchemaDataSpaceConnector\n} from \"@twin.org/data-space-connector-service\";\nimport { DataSpaceConnectorSocketClient } from \"@twin.org/data-space-connector-socket-client\";\nimport type { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DataSpaceConnectorComponentConfig } from \"../models/config/dataSpaceConnectorComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DataSpaceConnectorComponentType } from \"../models/types/dataSpaceConnectorComponentType.js\";\n\n/**\n * Initialise the data space connector component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport async function initialiseDataSpaceConnectorComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: DataSpaceConnectorComponentConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof ComponentFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IDataSpaceConnector | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === DataSpaceConnectorComponentType.Service) {\n\t\tinitSchemaDataSpaceConnector();\n\n\t\tconst partitionContextIds = ContextIdHelper.pickKeysFromAvailable(\n\t\t\tengineCore.getContextIdKeys(),\n\t\t\t[ContextIdKeys.Node, ContextIdKeys.Tenant]\n\t\t);\n\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.activityLogEntityStorageType,\n\t\t\tnameof<ActivityLogDetails>(),\n\t\t\tpartitionContextIds\n\t\t);\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.activityTaskEntityStorageType,\n\t\t\tnameof<ActivityTask>(),\n\t\t\tpartitionContextIds\n\t\t);\n\t\tcomponent = new DataSpaceConnectorService({\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tbackgroundTaskComponentType: engineCore.getRegisteredInstanceType(\"backgroundTaskComponent\"),\n\t\t\ttaskSchedulerComponentType: engineCore.getRegisteredInstanceType(\"taskSchedulerComponent\"),\n\t\t\tfederatedCatalogueComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\"federatedCatalogueComponent\"\n\t\t\t),\n\t\t\tpartitionContextIds,\n\t\t\t...instanceConfig.options\n\t\t});\n\t\tinstanceType = nameofKebabCase(DataSpaceConnectorService);\n\t} else if (instanceConfig.type === DataSpaceConnectorComponentType.RestClient) {\n\t\tcomponent = new DataSpaceConnectorRestClient(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(DataSpaceConnectorRestClient);\n\t} else if (instanceConfig.type === DataSpaceConnectorComponentType.SocketClient) {\n\t\tcomponent = new DataSpaceConnectorSocketClient({\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\t...instanceConfig.options\n\t\t});\n\t\tinstanceType = nameofKebabCase(DataSpaceConnectorSocketClient);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"dataSpaceConnector.js","sourceRoot":"","sources":["../../../src/components/dataSpaceConnector.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC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wBAAwB,CAAC;YAC1F,mBAAmB;YACnB,GAAG,cAAc,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,YAAY,iCAA6C,CAAC;IAC3D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,+BAA+B,CAAC,UAAU,EAAE,CAAC;QAC/E,SAAS,GAAG,IAAI,4BAA4B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACrE,YAAY,qCAAgD,CAAC;IAC9D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,+BAA+B,CAAC,YAAY,EAAE,CAAC;QACjF,SAAS,GAAG,IAAI,8BAA8B,CAAC;YAC9C,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;YAC9E,GAAG,cAAc,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,YAAY,uCAAkD,CAAC;IAChE,CAAC;IAED,OAAO;QACN,SAAS;QACT,YAAY;QACZ,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type { IDataSpaceConnector } from \"@twin.org/data-space-connector-models\";\nimport { DataSpaceConnectorRestClient } from \"@twin.org/data-space-connector-rest-client\";\nimport {\n\ttype ActivityLogDetails,\n\ttype ActivityTask,\n\tDataSpaceConnectorService,\n\tinitSchema as initSchemaDataSpaceConnector\n} from \"@twin.org/data-space-connector-service\";\nimport { DataSpaceConnectorSocketClient } from \"@twin.org/data-space-connector-socket-client\";\nimport type { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DataSpaceConnectorComponentConfig } from \"../models/config/dataSpaceConnectorComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DataSpaceConnectorComponentType } from \"../models/types/dataSpaceConnectorComponentType.js\";\n\n/**\n * Initialise the data space connector component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport async function initialiseDataSpaceConnectorComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: DataSpaceConnectorComponentConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof ComponentFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IDataSpaceConnector | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === DataSpaceConnectorComponentType.Service) {\n\t\tinitSchemaDataSpaceConnector();\n\n\t\tconst partitionContextIds = ContextIdHelper.pickKeysFromAvailable(\n\t\t\tengineCore.getContextIdKeys(),\n\t\t\t[ContextIdKeys.Node, ContextIdKeys.Tenant]\n\t\t);\n\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.activityLogEntityStorageType,\n\t\t\tnameof<ActivityLogDetails>(),\n\t\t\tpartitionContextIds\n\t\t);\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.activityTaskEntityStorageType,\n\t\t\tnameof<ActivityTask>(),\n\t\t\tpartitionContextIds\n\t\t);\n\t\tcomponent = new DataSpaceConnectorService({\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tbackgroundTaskComponentType: engineCore.getRegisteredInstanceType(\"backgroundTaskComponent\"),\n\t\t\ttaskSchedulerComponentType: engineCore.getRegisteredInstanceType(\"taskSchedulerComponent\"),\n\t\t\tpartitionContextIds,\n\t\t\t...instanceConfig.options\n\t\t});\n\t\tinstanceType = nameofKebabCase(DataSpaceConnectorService);\n\t} else if (instanceConfig.type === DataSpaceConnectorComponentType.RestClient) {\n\t\tcomponent = new DataSpaceConnectorRestClient(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(DataSpaceConnectorRestClient);\n\t} else if (instanceConfig.type === DataSpaceConnectorComponentType.SocketClient) {\n\t\tcomponent = new DataSpaceConnectorSocketClient({\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\t...instanceConfig.options\n\t\t});\n\t\tinstanceType = nameofKebabCase(DataSpaceConnectorSocketClient);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
@@ -25,6 +25,7 @@ export async function initialiseImmutableProofComponent(engineCore, context, ins
25
25
  component = new ImmutableProofService({
26
26
  verifiableStorageType: engineCore.getRegisteredInstanceType("verifiableStorageConnector"),
27
27
  identityConnectorType: engineCore.getRegisteredInstanceType("identityConnector"),
28
+ loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
28
29
  backgroundTaskComponentType: engineCore.getRegisteredInstanceType("backgroundTaskComponent"),
29
30
  eventBusComponentType: engineCore.getRegisteredInstanceTypeOptional("eventBusComponent"),
30
31
  ...instanceConfig.options
@@ -1 +1 @@
1
- {"version":3,"file":"immutableProof.js","sourceRoot":"","sources":["../../../src/components/immutableProof.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAGnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAEN,qBAAqB,EACrB,UAAU,IAAI,wBAAwB,EACtC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACtD,UAAsC,EACtC,OAA0C,EAC1C,cAA6C;IAM7C,IAAI,SAA+C,CAAC;IACpD,IAAI,YAAgC,CAAC;IAErC,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,OAAO,EAAE,CAAC;QACjE,wBAAwB,EAAE,CAAC;QAE3B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,cAAc,CAAC,OAAO,EAAE,+BAA+B,oBAEvD,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;YACpE,aAAa,CAAC,IAAI;YAClB,aAAa,CAAC,MAAM;SACpB,CAAC,CACF,CAAC;QAEF,SAAS,GAAG,IAAI,qBAAqB,CAAC;YACrC,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,4BAA4B,CAAC;YACzF,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;YAChF,2BAA2B,EAAE,UAAU,CAAC,yBAAyB,CAAC,yBAAyB,CAAC;YAC5F,qBAAqB,EAAE,UAAU,CAAC,iCAAiC,CAAC,mBAAmB,CAAC;YACxF,GAAG,cAAc,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,YAAY,4BAAyC,CAAC;IACvD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,SAAS,GAAG,IAAI,wBAAwB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACjE,YAAY,gCAA4C,CAAC;IAC1D,CAAC;IAED,OAAO;QACN,SAAS;QACT,YAAY;QACZ,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport type { IImmutableProofComponent } from \"@twin.org/immutable-proof-models\";\nimport { ImmutableProofRestClient } from \"@twin.org/immutable-proof-rest-client\";\nimport {\n\ttype ImmutableProof,\n\tImmutableProofService,\n\tinitSchema as initSchemaImmutableProof\n} from \"@twin.org/immutable-proof-service\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { ImmutableProofComponentConfig } from \"../models/config/immutableProofComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { ImmutableProofComponentType } from \"../models/types/immutableProofComponentType.js\";\n\n/**\n * Initialise the immutable proof component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport async function initialiseImmutableProofComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: ImmutableProofComponentConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof ComponentFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IImmutableProofComponent | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === ImmutableProofComponentType.Service) {\n\t\tinitSchemaImmutableProof();\n\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.immutableProofEntityStorageType,\n\t\t\tnameof<ImmutableProof>(),\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 ImmutableProofService({\n\t\t\tverifiableStorageType: engineCore.getRegisteredInstanceType(\"verifiableStorageConnector\"),\n\t\t\tidentityConnectorType: engineCore.getRegisteredInstanceType(\"identityConnector\"),\n\t\t\tbackgroundTaskComponentType: engineCore.getRegisteredInstanceType(\"backgroundTaskComponent\"),\n\t\t\teventBusComponentType: engineCore.getRegisteredInstanceTypeOptional(\"eventBusComponent\"),\n\t\t\t...instanceConfig.options\n\t\t});\n\t\tinstanceType = nameofKebabCase(ImmutableProofService);\n\t} else if (instanceConfig.type === ImmutableProofComponentType.RestClient) {\n\t\tcomponent = new ImmutableProofRestClient(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(ImmutableProofRestClient);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"immutableProof.js","sourceRoot":"","sources":["../../../src/components/immutableProof.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAGnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAEN,qBAAqB,EACrB,UAAU,IAAI,wBAAwB,EACtC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAE7F;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACtD,UAAsC,EACtC,OAA0C,EAC1C,cAA6C;IAM7C,IAAI,SAA+C,CAAC;IACpD,IAAI,YAAgC,CAAC;IAErC,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,OAAO,EAAE,CAAC;QACjE,wBAAwB,EAAE,CAAC;QAE3B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,cAAc,CAAC,OAAO,EAAE,+BAA+B,oBAEvD,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE;YACpE,aAAa,CAAC,IAAI;YAClB,aAAa,CAAC,MAAM;SACpB,CAAC,CACF,CAAC;QAEF,SAAS,GAAG,IAAI,qBAAqB,CAAC;YACrC,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,4BAA4B,CAAC;YACzF,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;YAChF,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;YAC9E,2BAA2B,EAAE,UAAU,CAAC,yBAAyB,CAAC,yBAAyB,CAAC;YAC5F,qBAAqB,EAAE,UAAU,CAAC,iCAAiC,CAAC,mBAAmB,CAAC;YACxF,GAAG,cAAc,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,YAAY,4BAAyC,CAAC;IACvD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,UAAU,EAAE,CAAC;QAC3E,SAAS,GAAG,IAAI,wBAAwB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACjE,YAAY,gCAA4C,CAAC;IAC1D,CAAC;IAED,OAAO;QACN,SAAS;QACT,YAAY;QACZ,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type { IEngineCore, IEngineCoreContext } from \"@twin.org/engine-models\";\nimport type { IImmutableProofComponent } from \"@twin.org/immutable-proof-models\";\nimport { ImmutableProofRestClient } from \"@twin.org/immutable-proof-rest-client\";\nimport {\n\ttype ImmutableProof,\n\tImmutableProofService,\n\tinitSchema as initSchemaImmutableProof\n} from \"@twin.org/immutable-proof-service\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { ImmutableProofComponentConfig } from \"../models/config/immutableProofComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { ImmutableProofComponentType } from \"../models/types/immutableProofComponentType.js\";\n\n/**\n * Initialise the immutable proof component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport async function initialiseImmutableProofComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: ImmutableProofComponentConfig\n): Promise<{\n\tinstanceType?: string;\n\tfactory?: typeof ComponentFactory;\n\tcomponent?: IComponent;\n}> {\n\tlet component: IImmutableProofComponent | undefined;\n\tlet instanceType: string | undefined;\n\n\tif (instanceConfig.type === ImmutableProofComponentType.Service) {\n\t\tinitSchemaImmutableProof();\n\n\t\tinitialiseEntityStorageConnector(\n\t\t\tengineCore,\n\t\t\tcontext,\n\t\t\tinstanceConfig.options?.immutableProofEntityStorageType,\n\t\t\tnameof<ImmutableProof>(),\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 ImmutableProofService({\n\t\t\tverifiableStorageType: engineCore.getRegisteredInstanceType(\"verifiableStorageConnector\"),\n\t\t\tidentityConnectorType: engineCore.getRegisteredInstanceType(\"identityConnector\"),\n\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\tbackgroundTaskComponentType: engineCore.getRegisteredInstanceType(\"backgroundTaskComponent\"),\n\t\t\teventBusComponentType: engineCore.getRegisteredInstanceTypeOptional(\"eventBusComponent\"),\n\t\t\t...instanceConfig.options\n\t\t});\n\t\tinstanceType = nameofKebabCase(ImmutableProofService);\n\t} else if (instanceConfig.type === ImmutableProofComponentType.RestClient) {\n\t\tcomponent = new ImmutableProofRestClient(instanceConfig.options);\n\t\tinstanceType = nameofKebabCase(ImmutableProofRestClient);\n\t}\n\n\treturn {\n\t\tcomponent,\n\t\tinstanceType,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
package/docs/changelog.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @twin.org/engine-types - Changelog
2
2
 
3
+ ## [0.0.3-next.9](https://github.com/twinfoundation/engine/compare/engine-types-v0.0.3-next.8...engine-types-v0.0.3-next.9) (2026-01-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * inject logging into immutable proof ([#60](https://github.com/twinfoundation/engine/issues/60)) ([8d0bc86](https://github.com/twinfoundation/engine/commit/8d0bc86c01502e9c9031471834ee3da824c18b27))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/engine-core bumped from 0.0.3-next.8 to 0.0.3-next.9
16
+ * @twin.org/engine-models bumped from 0.0.3-next.8 to 0.0.3-next.9
17
+
18
+ ## [0.0.3-next.8](https://github.com/twinfoundation/engine/compare/engine-types-v0.0.3-next.7...engine-types-v0.0.3-next.8) (2026-01-06)
19
+
20
+
21
+ ### Features
22
+
23
+ * update dependencies ([034adac](https://github.com/twinfoundation/engine/commit/034adac97b177d8df9775da92f0cc0dbdfc8ab55))
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * The following workspace dependencies were updated
29
+ * dependencies
30
+ * @twin.org/engine-core bumped from 0.0.3-next.7 to 0.0.3-next.8
31
+ * @twin.org/engine-models bumped from 0.0.3-next.7 to 0.0.3-next.8
32
+
3
33
  ## [0.0.3-next.7](https://github.com/twinfoundation/engine/compare/engine-types-v0.0.3-next.6...engine-types-v0.0.3-next.7) (2025-12-04)
4
34
 
5
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-types",
3
- "version": "0.0.3-next.7",
3
+ "version": "0.0.3-next.9",
4
4
  "description": "Types to use in an engine.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,8 +54,8 @@
54
54
  "@twin.org/document-management-models": "next",
55
55
  "@twin.org/document-management-rest-client": "next",
56
56
  "@twin.org/document-management-service": "next",
57
- "@twin.org/engine-core": "0.0.3-next.7",
58
- "@twin.org/engine-models": "0.0.3-next.7",
57
+ "@twin.org/engine-core": "0.0.3-next.9",
58
+ "@twin.org/engine-models": "0.0.3-next.9",
59
59
  "@twin.org/entity": "next",
60
60
  "@twin.org/entity-storage-connector-cosmosdb": "next",
61
61
  "@twin.org/entity-storage-connector-dynamodb": "next",