@twin.org/engine-types 0.0.3-next.35 → 0.0.3-next.36

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.
@@ -28,6 +28,8 @@ export function initialiseDataspaceControlPlaneComponent(engineCore, context, in
28
28
  // live.
29
29
  const partitionContextIds = ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node, ContextIdKeys.Tenant]);
30
30
  initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.transferProcessEntityStorageType, "TransferProcess", partitionContextIds);
31
+ // Tenant-supplied partial datasets are stored [Node]-only
32
+ initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.dataspaceAppDatasetEntityStorageType, "DataspaceAppDataset", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node]));
31
33
  return new DataspaceControlPlaneService(EngineTypeHelper.mergeConfig({
32
34
  loggingComponentType: engineCore.getRegisteredInstanceTypeOptional("loggingComponent"),
33
35
  trustComponentType: engineCore.getRegisteredInstanceTypeOptional("trustComponent"),
@@ -36,7 +38,8 @@ export function initialiseDataspaceControlPlaneComponent(engineCore, context, in
36
38
  federatedCatalogueComponentType: engineCore.getRegisteredInstanceType("federatedCatalogueComponent"),
37
39
  identityComponentType: engineCore.getRegisteredInstanceTypeOptional("identityComponent"),
38
40
  identityAuthenticationComponentType: engineCore.getRegisteredInstanceTypeOptional("identityAuthenticationComponent"),
39
- taskSchedulerComponentType: engineCore.getRegisteredInstanceTypeOptional("taskSchedulerComponent")
41
+ taskSchedulerComponentType: engineCore.getRegisteredInstanceTypeOptional("taskSchedulerComponent"),
42
+ urlTransformerComponentType: engineCore.getRegisteredInstanceType("urlTransformerComponent")
40
43
  }, createConfig.options));
41
44
  };
42
45
  instanceTypeName = "dataspace-control-plane-service";
@@ -1 +1 @@
1
- {"version":3,"file":"dataspaceControlPlane.js","sourceRoot":"","sources":["../../../src/components/dataspaceControlPlane.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CAAiC,CAAC,gBAAgB,CAAC;gBAClF,sCAAsC,EAAE,UAAU,CAAC,yBAAyB,CAC3E,8BAA8B,CAC9B;gBACD,mCAAmC,EAAE,UAAU,CAAC,yBAAyB,CACxE,8BAA8B,CAC9B;gBACD,+BAA+B,EAAE,UAAU,CAAC,yBAAyB,CACpE,6BAA6B,CAC7B;gBACD,qBAAqB,EACpB,UAAU,CAAC,iCAAiC,CAAC,mBAAmB,CAAC;gBAClE,mCAAmC,EAAE,UAAU,CAAC,iCAAiC,CAChF,iCAAiC,CACjC;gBACD,0BAA0B,EACzB,UAAU,CAAC,iCAAiC,CAAC,wBAAwB,CAAC;aACvE,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,oCAAgD,CAAC;IAClE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,kCAAkC,CAAC,UAAU,EAAE,CAAC;QAClF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,+BAA+B,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC3D,gBAAgB,wCAAmD,CAAC;IACrE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2025 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 { DataspaceControlPlaneRestClient } from \"@twin.org/dataspace-control-plane-rest-client\";\nimport {\n\tDataspaceControlPlaneService,\n\tinitSchema as initSchemaDataspaceControlPlane\n} from \"@twin.org/dataspace-control-plane-service\";\nimport type { TransferProcess } from \"@twin.org/dataspace-models\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DataspaceControlPlaneComponentConfig } from \"../models/config/dataspaceControlPlaneComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DataspaceControlPlaneComponentType } from \"../models/types/dataspaceControlPlaneComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the dataspace control plane 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 function initialiseDataspaceControlPlaneComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: DataspaceControlPlaneComponentConfig\n): EngineTypeInitialiserReturn<DataspaceControlPlaneComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === DataspaceControlPlaneComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaDataspaceControlPlane();\n\n\t\t\t// Initialize entity storage for TransferProcessEntity.\n\t\t\t// This storage is shared with Data Plane service. Both planes must\n\t\t\t// register the same connector name with the same partition keys,\n\t\t\t// otherwise initialiseEntityStorageConnector silently drops the\n\t\t\t// second registration and the two layers disagree on where records\n\t\t\t// live.\n\t\t\tconst partitionContextIds = ContextIdHelper.pickKeysFromAvailable(\n\t\t\t\tengineCore.getContextIdKeys(),\n\t\t\t\t[ContextIdKeys.Node, ContextIdKeys.Tenant]\n\t\t\t);\n\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.transferProcessEntityStorageType,\n\t\t\t\tnameof<TransferProcess>(),\n\t\t\t\tpartitionContextIds\n\t\t\t);\n\n\t\t\treturn new DataspaceControlPlaneService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceTypeOptional(\"loggingComponent\"),\n\t\t\t\t\t\ttrustComponentType: engineCore.getRegisteredInstanceTypeOptional(\"trustComponent\"),\n\t\t\t\t\t\tpolicyAdministrationPointComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"rightsManagementPapComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpolicyNegotiationPointComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"rightsManagementPnpComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tfederatedCatalogueComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"federatedCatalogueComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tidentityComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"identityComponent\"),\n\t\t\t\t\t\tidentityAuthenticationComponentType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"identityAuthenticationComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttaskSchedulerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"taskSchedulerComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(DataspaceControlPlaneService);\n\t} else if (instanceConfig.type === DataspaceControlPlaneComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew DataspaceControlPlaneRestClient(createConfig.options);\n\t\tinstanceTypeName = nameofKebabCase(DataspaceControlPlaneRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"dataspaceControlPlane.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AqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;YAEF,OAAO,IAAI,4BAA4B,CACtC,gBAAgB,CAAC,WAAW,CAC3B;gBACC,oBAAoB,EAAE,UAAU,CAAC,iCAAiC,CAAC,kBAAkB,CAAC;gBACtF,kBAAkB,EAAE,UAAU,CAAC,iCAAiC,CAAC,gBAAgB,CAAC;gBAClF,sCAAsC,EAAE,UAAU,CAAC,yBAAyB,CAC3E,8BAA8B,CAC9B;gBACD,mCAAmC,EAAE,UAAU,CAAC,yBAAyB,CACxE,8BAA8B,CAC9B;gBACD,+BAA+B,EAAE,UAAU,CAAC,yBAAyB,CACpE,6BAA6B,CAC7B;gBACD,qBAAqB,EACpB,UAAU,CAAC,iCAAiC,CAAC,mBAAmB,CAAC;gBAClE,mCAAmC,EAAE,UAAU,CAAC,iCAAiC,CAChF,iCAAiC,CACjC;gBACD,0BAA0B,EACzB,UAAU,CAAC,iCAAiC,CAAC,wBAAwB,CAAC;gBACvE,2BAA2B,EAC1B,UAAU,CAAC,yBAAyB,CAAC,yBAAyB,CAAC;aAChE,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,oCAAgD,CAAC;IAClE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,kCAAkC,CAAC,UAAU,EAAE,CAAC;QAClF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,+BAA+B,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAC3D,gBAAgB,wCAAmD,CAAC;IACrE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2025 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 { DataspaceControlPlaneRestClient } from \"@twin.org/dataspace-control-plane-rest-client\";\nimport {\n\tDataspaceControlPlaneService,\n\tinitSchema as initSchemaDataspaceControlPlane\n} from \"@twin.org/dataspace-control-plane-service\";\nimport type { DataspaceAppDataset, TransferProcess } from \"@twin.org/dataspace-models\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DataspaceControlPlaneComponentConfig } from \"../models/config/dataspaceControlPlaneComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DataspaceControlPlaneComponentType } from \"../models/types/dataspaceControlPlaneComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the dataspace control plane 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 function initialiseDataspaceControlPlaneComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: DataspaceControlPlaneComponentConfig\n): EngineTypeInitialiserReturn<DataspaceControlPlaneComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === DataspaceControlPlaneComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaDataspaceControlPlane();\n\n\t\t\t// Initialize entity storage for TransferProcessEntity.\n\t\t\t// This storage is shared with Data Plane service. Both planes must\n\t\t\t// register the same connector name with the same partition keys,\n\t\t\t// otherwise initialiseEntityStorageConnector silently drops the\n\t\t\t// second registration and the two layers disagree on where records\n\t\t\t// live.\n\t\t\tconst partitionContextIds = ContextIdHelper.pickKeysFromAvailable(\n\t\t\t\tengineCore.getContextIdKeys(),\n\t\t\t\t[ContextIdKeys.Node, ContextIdKeys.Tenant]\n\t\t\t);\n\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.transferProcessEntityStorageType,\n\t\t\t\tnameof<TransferProcess>(),\n\t\t\t\tpartitionContextIds\n\t\t\t);\n\n\t\t\t// Tenant-supplied partial datasets are stored [Node]-only\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.dataspaceAppDatasetEntityStorageType,\n\t\t\t\tnameof<DataspaceAppDataset>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\n\t\t\treturn new DataspaceControlPlaneService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceTypeOptional(\"loggingComponent\"),\n\t\t\t\t\t\ttrustComponentType: engineCore.getRegisteredInstanceTypeOptional(\"trustComponent\"),\n\t\t\t\t\t\tpolicyAdministrationPointComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"rightsManagementPapComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpolicyNegotiationPointComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"rightsManagementPnpComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tfederatedCatalogueComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"federatedCatalogueComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tidentityComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"identityComponent\"),\n\t\t\t\t\t\tidentityAuthenticationComponentType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"identityAuthenticationComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttaskSchedulerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"taskSchedulerComponent\"),\n\t\t\t\t\t\turlTransformerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"urlTransformerComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(DataspaceControlPlaneService);\n\t} else if (instanceConfig.type === DataspaceControlPlaneComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew DataspaceControlPlaneRestClient(createConfig.options);\n\t\tinstanceTypeName = nameofKebabCase(DataspaceControlPlaneRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
@@ -27,6 +27,10 @@ export function initialiseDataspaceDataPlaneComponent(engineCore, context, insta
27
27
  initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.activityTaskEntityStorageType, "ActivityTask", partitionContextIds);
28
28
  // TransferProcessEntity storage is shared with Control Plane.
29
29
  initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.transferProcessEntityStorageType, "TransferProcess", partitionContextIds);
30
+ // DataspaceAppDataset storage is also shared with the Control Plane —
31
+ // register here too in case the DP component initialises before
32
+ // the CP one in the engine startup order. Read-only on this side.
33
+ initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.dataspaceAppDatasetEntityStorageType, "DataspaceAppDataset", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node]));
30
34
  return new DataspaceDataPlaneService(EngineTypeHelper.mergeConfig({
31
35
  loggingComponentType: engineCore.getRegisteredInstanceTypeOptional("loggingComponent"),
32
36
  backgroundTaskComponentType: engineCore.getRegisteredInstanceTypeOptional("backgroundTaskComponent"),
@@ -1 +1 @@
1
- {"version":3,"file":"dataspaceDataPlane.js","sourceRoot":"","sources":["../../../src/components/dataspaceDataPlane.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;AACnE,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;AAQ9F,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,qCAAqC,CACpD,UAAsC,EACtC,OAA0C,EAC1C,cAAiD;IAEjD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,+BAA+B,CAAC,OAAO,EAAE,CAAC;QACrE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,4BAA4B,EAAE,CAAC;YAE/B,MAAM,mBAAmB,GAAG,eAAe,CAAC,qBAAqB,CAChE,UAAU,CAAC,gBAAgB,EAAE,EAC7B,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAC1C,CAAC;YAEF,oEAAoE;YACpE,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,cAAc,CAAC,OAAO,EAAE,4BAA4B,wBAEpD,mBAAmB,CACnB,CAAC;YACF,gCAAgC,CAC/B,UAAU,EACV,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BAAgB,uCAAkD,CAAC;IACpE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2025 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 { DataspaceDataPlaneRestClient } from \"@twin.org/dataspace-data-plane-rest-client\";\nimport {\n\ttype ActivityLogDetails,\n\ttype ActivityTask,\n\tDataspaceDataPlaneService,\n\tinitSchema as initSchemaDataspaceDataPlane\n} from \"@twin.org/dataspace-data-plane-service\";\nimport { DataspaceDataPlaneSocketClient } from \"@twin.org/dataspace-data-plane-socket-client\";\nimport type { TransferProcess } from \"@twin.org/dataspace-models\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DataspaceDataPlaneComponentConfig } from \"../models/config/dataspaceDataPlaneComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DataspaceDataPlaneComponentType } from \"../models/types/dataspaceDataPlaneComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the dataspace data plane 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 function initialiseDataspaceDataPlaneComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: DataspaceDataPlaneComponentConfig\n): EngineTypeInitialiserReturn<DataspaceDataPlaneComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === DataspaceDataPlaneComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaDataspaceDataPlane();\n\n\t\t\tconst partitionContextIds = ContextIdHelper.pickKeysFromAvailable(\n\t\t\t\tengineCore.getContextIdKeys(),\n\t\t\t\t[ContextIdKeys.Node, ContextIdKeys.Tenant]\n\t\t\t);\n\n\t\t\t// Initialize entity storage for ActivityLogDetails and ActivityTask\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.activityLogEntityStorageType,\n\t\t\t\tnameof<ActivityLogDetails>(),\n\t\t\t\tpartitionContextIds\n\t\t\t);\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.activityTaskEntityStorageType,\n\t\t\t\tnameof<ActivityTask>(),\n\t\t\t\tpartitionContextIds\n\t\t\t);\n\n\t\t\t// TransferProcessEntity storage is shared with Control Plane.\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.transferProcessEntityStorageType,\n\t\t\t\tnameof<TransferProcess>(),\n\t\t\t\tpartitionContextIds\n\t\t\t);\n\n\t\t\treturn new DataspaceDataPlaneService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceTypeOptional(\"loggingComponent\"),\n\t\t\t\t\t\tbackgroundTaskComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"backgroundTaskComponent\"),\n\t\t\t\t\t\ttaskSchedulerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"taskSchedulerComponent\"),\n\t\t\t\t\t\ttrustComponentType: engineCore.getRegisteredInstanceTypeOptional(\"trustComponent\"),\n\t\t\t\t\t\tpepComponentType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"rightsManagementPepComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttenantAdminType: engineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\"),\n\t\t\t\t\t\tpartitionContextIds\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(DataspaceDataPlaneService);\n\t} else if (instanceConfig.type === DataspaceDataPlaneComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew DataspaceDataPlaneRestClient(createConfig.options);\n\t\tinstanceTypeName = nameofKebabCase(DataspaceDataPlaneRestClient);\n\t} else if (instanceConfig.type === DataspaceDataPlaneComponentType.SocketClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew DataspaceDataPlaneSocketClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceTypeOptional(\"loggingComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(DataspaceDataPlaneSocketClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"dataspaceDataPlane.js","sourceRoot":"","sources":["../../../src/components/dataspaceDataPlane.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;AACnE,OAAO,EAAE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;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2025 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 { DataspaceDataPlaneRestClient } from \"@twin.org/dataspace-data-plane-rest-client\";\nimport {\n\ttype ActivityLogDetails,\n\ttype ActivityTask,\n\tDataspaceDataPlaneService,\n\tinitSchema as initSchemaDataspaceDataPlane\n} from \"@twin.org/dataspace-data-plane-service\";\nimport { DataspaceDataPlaneSocketClient } from \"@twin.org/dataspace-data-plane-socket-client\";\nimport type { DataspaceAppDataset, TransferProcess } from \"@twin.org/dataspace-models\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DataspaceDataPlaneComponentConfig } from \"../models/config/dataspaceDataPlaneComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DataspaceDataPlaneComponentType } from \"../models/types/dataspaceDataPlaneComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the dataspace data plane 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 function initialiseDataspaceDataPlaneComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: DataspaceDataPlaneComponentConfig\n): EngineTypeInitialiserReturn<DataspaceDataPlaneComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === DataspaceDataPlaneComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaDataspaceDataPlane();\n\n\t\t\tconst partitionContextIds = ContextIdHelper.pickKeysFromAvailable(\n\t\t\t\tengineCore.getContextIdKeys(),\n\t\t\t\t[ContextIdKeys.Node, ContextIdKeys.Tenant]\n\t\t\t);\n\n\t\t\t// Initialize entity storage for ActivityLogDetails and ActivityTask\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.activityLogEntityStorageType,\n\t\t\t\tnameof<ActivityLogDetails>(),\n\t\t\t\tpartitionContextIds\n\t\t\t);\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.activityTaskEntityStorageType,\n\t\t\t\tnameof<ActivityTask>(),\n\t\t\t\tpartitionContextIds\n\t\t\t);\n\n\t\t\t// TransferProcessEntity storage is shared with Control Plane.\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.transferProcessEntityStorageType,\n\t\t\t\tnameof<TransferProcess>(),\n\t\t\t\tpartitionContextIds\n\t\t\t);\n\n\t\t\t// DataspaceAppDataset storage is also shared with the Control Plane —\n\t\t\t// register here too in case the DP component initialises before\n\t\t\t// the CP one in the engine startup order. Read-only on this side.\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tinstanceConfig.options?.dataspaceAppDatasetEntityStorageType,\n\t\t\t\tnameof<DataspaceAppDataset>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\n\t\t\treturn new DataspaceDataPlaneService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceTypeOptional(\"loggingComponent\"),\n\t\t\t\t\t\tbackgroundTaskComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"backgroundTaskComponent\"),\n\t\t\t\t\t\ttaskSchedulerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceTypeOptional(\"taskSchedulerComponent\"),\n\t\t\t\t\t\ttrustComponentType: engineCore.getRegisteredInstanceTypeOptional(\"trustComponent\"),\n\t\t\t\t\t\tpepComponentType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"rightsManagementPepComponent\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttenantAdminType: engineCore.getRegisteredInstanceTypeOptional(\"tenantAdminComponent\"),\n\t\t\t\t\t\tpartitionContextIds\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(DataspaceDataPlaneService);\n\t} else if (instanceConfig.type === DataspaceDataPlaneComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew DataspaceDataPlaneRestClient(createConfig.options);\n\t\tinstanceTypeName = nameofKebabCase(DataspaceDataPlaneRestClient);\n\t} else if (instanceConfig.type === DataspaceDataPlaneComponentType.SocketClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew DataspaceDataPlaneSocketClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceTypeOptional(\"loggingComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(DataspaceDataPlaneSocketClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
@@ -21,7 +21,10 @@ export function initialiseFederatedCatalogueComponent(engineCore, context, insta
21
21
  createComponent = (createConfig) => {
22
22
  initSchemaFederatedCatalogue();
23
23
  initialiseEntityStorageConnector(engineCore, context, createConfig.options?.datasetEntityStorageType, "Dataset", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node]));
24
- return new FederatedCatalogueService(EngineTypeHelper.mergeConfig({ loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent") }, createConfig.options));
24
+ return new FederatedCatalogueService(EngineTypeHelper.mergeConfig({
25
+ loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
26
+ urlTransformerComponentType: engineCore.getRegisteredInstanceType("urlTransformerComponent")
27
+ }, createConfig.options));
25
28
  };
26
29
  instanceTypeName = "federated-catalogue-service";
27
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"federatedCatalogue.js","sourceRoot":"","sources":["../../../src/components/federatedCatalogue.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAEN,yBAAyB,EACzB,UAAU,IAAI,4BAA4B,EAC1C,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,qCAAqC,CACpD,UAAsC,EACtC,OAA0C,EAC1C,cAAiD;IAEjD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,+BAA+B,CAAC,OAAO,EAAE,CAAC;QACrE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,4BAA4B,EAAE,CAAC;YAC/B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,wBAAwB,aAE9C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;YACF,OAAO,IAAI,yBAAyB,CACnC,gBAAgB,CAAC,WAAW,CAC3B,EAAE,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,EAClF,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,gCAA6C,CAAC;IAC/D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,+BAA+B,CAAC,UAAU,EAAE,CAAC;QAC/E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,4BAA4B,CAC/B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,oCAAgD,CAAC;IAClE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAEhB,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 } from \"@twin.org/core\";\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { FederatedCatalogueRestClient } from \"@twin.org/federated-catalogue-rest-client\";\nimport {\n\ttype Dataset,\n\tFederatedCatalogueService,\n\tinitSchema as initSchemaFederatedCatalogue\n} from \"@twin.org/federated-catalogue-service\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { FederatedCatalogueComponentConfig } from \"../models/config/federatedCatalogueComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { FederatedCatalogueComponentType } from \"../models/types/federatedCatalogueComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the federated catalogue 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 function initialiseFederatedCatalogueComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: FederatedCatalogueComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === FederatedCatalogueComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaFederatedCatalogue();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.datasetEntityStorageType,\n\t\t\t\tnameof<Dataset>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\t\t\treturn new FederatedCatalogueService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{ loggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\") },\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(FederatedCatalogueService);\n\t} else if (instanceConfig.type === FederatedCatalogueComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew FederatedCatalogueRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(FederatedCatalogueRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"federatedCatalogue.js","sourceRoot":"","sources":["../../../src/components/federatedCatalogue.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAEN,yBAAyB,EACzB,UAAU,IAAI,4BAA4B,EAC1C,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,qCAAqC,CACpD,UAAsC,EACtC,OAA0C,EAC1C,cAAiD;IAEjD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,+BAA+B,CAAC,OAAO,EAAE,CAAC;QACrE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,4BAA4B,EAAE,CAAC;YAC/B,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,wBAAwB,aAE9C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;YACF,OAAO,IAAI,yBAAyB,CACnC,gBAAgB,CAAC,WAAW,CAC3B;gBACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;gBAC9E,2BAA2B,EAC1B,UAAU,CAAC,yBAAyB,CAAC,yBAAyB,CAAC;aAChE,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,gCAA6C,CAAC;IAC/D,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,+BAA+B,CAAC,UAAU,EAAE,CAAC;QAC/E,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,4BAA4B,CAC/B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,oCAAgD,CAAC;IAClE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAEhB,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 } from \"@twin.org/core\";\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { FederatedCatalogueRestClient } from \"@twin.org/federated-catalogue-rest-client\";\nimport {\n\ttype Dataset,\n\tFederatedCatalogueService,\n\tinitSchema as initSchemaFederatedCatalogue\n} from \"@twin.org/federated-catalogue-service\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { FederatedCatalogueComponentConfig } from \"../models/config/federatedCatalogueComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { FederatedCatalogueComponentType } from \"../models/types/federatedCatalogueComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the federated catalogue 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 function initialiseFederatedCatalogueComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: FederatedCatalogueComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === FederatedCatalogueComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaFederatedCatalogue();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.datasetEntityStorageType,\n\t\t\t\tnameof<Dataset>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\t\t\treturn new FederatedCatalogueService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\t\t\t\turlTransformerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"urlTransformerComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(FederatedCatalogueService);\n\t} else if (instanceConfig.type === FederatedCatalogueComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew FederatedCatalogueRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(FederatedCatalogueRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rightsManagementPnpComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/rightsManagementPnpComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBaseRestClientConfig } from \"@twin.org/api-models\";\nimport type { IPolicyNegotiationPointServiceConstructorOptions } from \"@twin.org/rights-management-pnp-service\";\nimport type { RightsManagementPnpComponentType } from \"../types/rightsManagementPnpComponentType.js\";\n\n/**\n * Rights management PNP component config types.\n */\nexport type RightsManagementPnpComponentConfig =\n\t| {\n\t\t\ttype: typeof RightsManagementPnpComponentType.Service;\n\t\t\toptions: IPolicyNegotiationPointServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RightsManagementPnpComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
1
+ {"version":3,"file":"rightsManagementPnpComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/rightsManagementPnpComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBaseRestClientConfig } from \"@twin.org/api-models\";\nimport type { IPolicyNegotiationPointServiceConstructorOptions } from \"@twin.org/rights-management-pnp-service\";\nimport type { RightsManagementPnpComponentType } from \"../types/rightsManagementPnpComponentType.js\";\n\n/**\n * Rights management PNP component config types.\n */\nexport type RightsManagementPnpComponentConfig =\n\t| {\n\t\t\ttype: typeof RightsManagementPnpComponentType.Service;\n\t\t\toptions?: IPolicyNegotiationPointServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RightsManagementPnpComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
@@ -6,7 +6,7 @@ import type { RightsManagementPnpComponentType } from "../types/rightsManagement
6
6
  */
7
7
  export type RightsManagementPnpComponentConfig = {
8
8
  type: typeof RightsManagementPnpComponentType.Service;
9
- options: IPolicyNegotiationPointServiceConstructorOptions;
9
+ options?: IPolicyNegotiationPointServiceConstructorOptions;
10
10
  } | {
11
11
  type: typeof RightsManagementPnpComponentType.RestClient;
12
12
  options: IBaseRestClientConfig;
package/docs/changelog.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.3-next.35](https://github.com/twinfoundation/twin-engine/compare/engine-types-v0.0.3-next.34...engine-types-v0.0.3-next.35) (2026-05-05)
3
+ ## [0.0.3-next.36](https://github.com/iotaledger/twin-engine/compare/engine-types-v0.0.3-next.35...engine-types-v0.0.3-next.36) (2026-05-08)
4
+
5
+
6
+ ### Features
7
+
8
+ * inject vaultConnectorType into DSP/PNP/Tenant/catalogue factories ([#107](https://github.com/iotaledger/twin-engine/issues/107)) ([043abbb](https://github.com/iotaledger/twin-engine/commit/043abbb9d9d7fd7f120519cb0b44ad38b4bfcbc1))
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.35 to 0.0.3-next.36
16
+ * @twin.org/engine-models bumped from 0.0.3-next.35 to 0.0.3-next.36
17
+
18
+ ## [0.0.3-next.35](https://github.com/iotaledger/twin-engine/compare/engine-types-v0.0.3-next.34...engine-types-v0.0.3-next.35) (2026-05-05)
4
19
 
5
20
 
6
21
  ### Miscellaneous Chores
@@ -15,12 +30,12 @@
15
30
  * @twin.org/engine-core bumped from 0.0.3-next.34 to 0.0.3-next.35
16
31
  * @twin.org/engine-models bumped from 0.0.3-next.34 to 0.0.3-next.35
17
32
 
18
- ## [0.0.3-next.34](https://github.com/twinfoundation/twin-engine/compare/engine-types-v0.0.3-next.33...engine-types-v0.0.3-next.34) (2026-05-05)
33
+ ## [0.0.3-next.34](https://github.com/iotaledger/twin-engine/compare/engine-types-v0.0.3-next.33...engine-types-v0.0.3-next.34) (2026-05-05)
19
34
 
20
35
 
21
36
  ### Features
22
37
 
23
- * add health and url transformer components ([#111](https://github.com/twinfoundation/twin-engine/issues/111)) ([5f00d4d](https://github.com/twinfoundation/twin-engine/commit/5f00d4db9a2fc35c5595abb59527aeaaa2e6066d))
38
+ * add health and url transformer components ([#111](https://github.com/iotaledger/twin-engine/issues/111)) ([5f00d4d](https://github.com/iotaledger/twin-engine/commit/5f00d4db9a2fc35c5595abb59527aeaaa2e6066d))
24
39
 
25
40
 
26
41
  ### Dependencies
@@ -30,7 +45,7 @@
30
45
  * @twin.org/engine-core bumped from 0.0.3-next.33 to 0.0.3-next.34
31
46
  * @twin.org/engine-models bumped from 0.0.3-next.33 to 0.0.3-next.34
32
47
 
33
- ## [0.0.3-next.33](https://github.com/twinfoundation/twin-engine/compare/engine-types-v0.0.3-next.32...engine-types-v0.0.3-next.33) (2026-05-05)
48
+ ## [0.0.3-next.33](https://github.com/iotaledger/twin-engine/compare/engine-types-v0.0.3-next.32...engine-types-v0.0.3-next.33) (2026-05-05)
34
49
 
35
50
 
36
51
  ### Miscellaneous Chores
@@ -1,5 +1,5 @@
1
1
  # Type Alias: RightsManagementPnpComponentConfig
2
2
 
3
- > **RightsManagementPnpComponentConfig** = \{ `type`: *typeof* [`Service`](../variables/RightsManagementPnpComponentType.md#service); `options`: `IPolicyNegotiationPointServiceConstructorOptions`; \} \| \{ `type`: *typeof* [`RestClient`](../variables/RightsManagementPnpComponentType.md#restclient); `options`: `IBaseRestClientConfig`; \}
3
+ > **RightsManagementPnpComponentConfig** = \{ `type`: *typeof* [`Service`](../variables/RightsManagementPnpComponentType.md#service); `options?`: `IPolicyNegotiationPointServiceConstructorOptions`; \} \| \{ `type`: *typeof* [`RestClient`](../variables/RightsManagementPnpComponentType.md#restclient); `options`: `IBaseRestClientConfig`; \}
4
4
 
5
5
  Rights management PNP component config types.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/engine-types",
3
- "version": "0.0.3-next.35",
3
+ "version": "0.0.3-next.36",
4
4
  "description": "Component and connector type definitions with configuration helpers for engine composition.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/engine.git",
7
+ "url": "git+https://github.com/iotaledger/engine.git",
8
8
  "directory": "packages/engine-types"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -62,8 +62,8 @@
62
62
  "@twin.org/document-management-models": "next",
63
63
  "@twin.org/document-management-rest-client": "next",
64
64
  "@twin.org/document-management-service": "next",
65
- "@twin.org/engine-core": "0.0.3-next.35",
66
- "@twin.org/engine-models": "0.0.3-next.35",
65
+ "@twin.org/engine-core": "0.0.3-next.36",
66
+ "@twin.org/engine-models": "0.0.3-next.36",
67
67
  "@twin.org/entity": "next",
68
68
  "@twin.org/entity-storage-connector-cosmosdb": "next",
69
69
  "@twin.org/entity-storage-connector-dynamodb": "next",
@@ -176,7 +176,7 @@
176
176
  "engine"
177
177
  ],
178
178
  "bugs": {
179
- "url": "git+https://github.com/twinfoundation/engine/issues"
179
+ "url": "git+https://github.com/iotaledger/engine/issues"
180
180
  },
181
181
  "homepage": "https://twindev.org"
182
182
  }