@twin.org/engine-types 0.0.3-next.36 → 0.0.3-next.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/attestation.js +1 -3
- package/dist/es/components/attestation.js.map +1 -1
- package/dist/es/components/automationAction.js +1 -1
- package/dist/es/components/automationAction.js.map +1 -1
- package/dist/es/components/backgroundTask.js +1 -1
- package/dist/es/components/backgroundTask.js.map +1 -1
- package/dist/es/components/dataProcessing.js +1 -1
- package/dist/es/components/dataProcessing.js.map +1 -1
- package/dist/es/components/eventBus.js +1 -1
- package/dist/es/components/eventBus.js.map +1 -1
- package/dist/es/components/federatedCatalogueFilter.js +1 -1
- package/dist/es/components/federatedCatalogueFilter.js.map +1 -1
- package/dist/es/components/identityProfile.js +1 -1
- package/dist/es/components/identityProfile.js.map +1 -1
- package/dist/es/components/messaging.js +2 -2
- package/dist/es/components/messaging.js.map +1 -1
- package/dist/es/components/nft.js +0 -1
- package/dist/es/components/nft.js.map +1 -1
- package/dist/es/components/notarization.js +0 -1
- package/dist/es/components/notarization.js.map +1 -1
- package/dist/es/components/rightsManagementPdp.js +1 -1
- package/dist/es/components/rightsManagementPdp.js.map +1 -1
- package/dist/es/components/rightsManagementPep.js +1 -1
- package/dist/es/components/rightsManagementPep.js.map +1 -1
- package/dist/es/components/rightsManagementPip.js +1 -1
- package/dist/es/components/rightsManagementPip.js.map +1 -1
- package/dist/es/components/rightsManagementPmp.js +1 -1
- package/dist/es/components/rightsManagementPmp.js.map +1 -1
- package/dist/es/components/rightsManagementPolicyExecutionAction.js +1 -1
- package/dist/es/components/rightsManagementPolicyExecutionAction.js.map +1 -1
- package/dist/es/components/rightsManagementPolicyNegotiator.js +1 -1
- package/dist/es/components/rightsManagementPolicyNegotiator.js.map +1 -1
- package/dist/es/components/rightsManagementPolicyObligationEnforcer.js +1 -1
- package/dist/es/components/rightsManagementPolicyObligationEnforcer.js.map +1 -1
- package/dist/es/components/rightsManagementPolicyRequester.js +1 -1
- package/dist/es/components/rightsManagementPolicyRequester.js.map +1 -1
- package/dist/es/components/rightsManagementPxp.js +1 -1
- package/dist/es/components/rightsManagementPxp.js.map +1 -1
- package/dist/es/components/taskScheduler.js +1 -1
- package/dist/es/components/taskScheduler.js.map +1 -1
- package/dist/es/components/telemetry.js +17 -0
- package/dist/es/components/telemetry.js.map +1 -1
- package/dist/es/components/tenant.js +2 -2
- package/dist/es/components/tenant.js.map +1 -1
- package/dist/es/components/trust.js +1 -1
- package/dist/es/components/trust.js.map +1 -1
- package/dist/es/components/trustGenerator.js +1 -1
- package/dist/es/components/trustGenerator.js.map +1 -1
- package/dist/es/components/trustVerifier.js +1 -1
- package/dist/es/components/trustVerifier.js.map +1 -1
- package/dist/es/components/urlTransformer.js +1 -1
- package/dist/es/components/urlTransformer.js.map +1 -1
- package/dist/es/models/config/telemetryConnectorConfig.js.map +1 -1
- package/dist/es/models/types/telemetryConnectorType.js +5 -1
- package/dist/es/models/types/telemetryConnectorType.js.map +1 -1
- package/dist/types/components/tenant.d.ts +1 -1
- package/dist/types/models/config/telemetryConnectorConfig.d.ts +4 -0
- package/dist/types/models/types/telemetryConnectorType.d.ts +4 -0
- package/docs/changelog.md +15 -0
- package/docs/reference/functions/initialiseTenantAdminComponent.md +1 -1
- package/docs/reference/type-aliases/TelemetryConnectorConfig.md +1 -13
- package/docs/reference/variables/TelemetryConnectorType.md +6 -0
- package/package.json +4 -3
|
@@ -22,7 +22,7 @@ export function initialiseRightsManagementPmpComponent(engineCore, context, inst
|
|
|
22
22
|
instanceTypeName = "policy-management-point-service";
|
|
23
23
|
}
|
|
24
24
|
return {
|
|
25
|
-
createComponent
|
|
25
|
+
createComponent,
|
|
26
26
|
instanceTypeName,
|
|
27
27
|
factory: ComponentFactory
|
|
28
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rightsManagementPmp.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPmp.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"rightsManagementPmp.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPmp.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAGvF,OAAO,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AACvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACrD,UAAsC,EACtC,OAA0C,EAC1C,cAAkD;IAElD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,gCAAgC,CAAC,OAAO,EAAE,CAAC;QACtE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,4BAA4B,CAC/B,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;YAC9E,sCAAsC,EAAE,UAAU,CAAC,yBAAyB,CAC3E,8BAA8B,CAC9B;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,oCAAgD,CAAC;IAClE,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ComponentFactory } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { PolicyManagementPointService } from \"@twin.org/rights-management-pmp-service\";\nimport type { RightsManagementPmpComponentConfig } from \"../models/config/rightsManagementPmpComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { RightsManagementPmpComponentType } from \"../models/types/rightsManagementPmpComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the rights management PMP 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 initialiseRightsManagementPmpComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: RightsManagementPmpComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RightsManagementPmpComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew PolicyManagementPointService(\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\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},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(PolicyManagementPointService);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -17,7 +17,7 @@ export function initialiseRightsManagementPolicyExecutionActionComponent(engineC
|
|
|
17
17
|
instanceTypeName = "logging-policy-execution-action";
|
|
18
18
|
}
|
|
19
19
|
return {
|
|
20
|
-
createComponent
|
|
20
|
+
createComponent,
|
|
21
21
|
instanceTypeName,
|
|
22
22
|
factory: PolicyExecutionActionFactory
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rightsManagementPolicyExecutionAction.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyExecutionAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rightsManagementPolicyExecutionAction.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyExecutionAction.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAGnF,OAAO,EAAE,kDAAkD,EAAE,MAAM,uEAAuE,CAAC;AAC3I,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,wDAAwD,CACvE,UAAsC,EACtC,OAA0C,EAC1C,cAAoE;IAEpE,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,kDAAkD,CAAC,OAAO,EAAE,CAAC;QACxF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,4BAA4B,CAC/B,gBAAgB,CAAC,WAAW,CAC3B,EAAE,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,EAClF,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,oCAAgD,CAAC;IAClE,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,4BAA4B;KACrC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { PolicyExecutionActionFactory } from \"@twin.org/rights-management-models\";\nimport { LoggingPolicyExecutionAction } from \"@twin.org/rights-management-plugins\";\nimport type { RightsManagementPolicyExecutionActionComponentConfig } from \"../models/config/rightsManagementPolicyExecutionActionComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { RightsManagementPolicyExecutionActionComponentType } from \"../models/types/rightsManagementPolicyExecutionActionComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the rights management policy execution action 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 initialiseRightsManagementPolicyExecutionActionComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: RightsManagementPolicyExecutionActionComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof PolicyExecutionActionFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RightsManagementPolicyExecutionActionComponentType.Logging) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew LoggingPolicyExecutionAction(\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\tinstanceTypeName = nameofKebabCase(LoggingPolicyExecutionAction);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: PolicyExecutionActionFactory\n\t};\n}\n"]}
|
|
@@ -19,7 +19,7 @@ export function initialiseRightsManagementPolicyNegotiatorComponent(engineCore,
|
|
|
19
19
|
instanceTypeName = "pass-through-policy-negotiator";
|
|
20
20
|
}
|
|
21
21
|
return {
|
|
22
|
-
createComponent
|
|
22
|
+
createComponent,
|
|
23
23
|
instanceTypeName,
|
|
24
24
|
factory: PolicyNegotiatorFactory
|
|
25
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rightsManagementPolicyNegotiator.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyNegotiator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rightsManagementPolicyNegotiator.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyNegotiator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAGlF,OAAO,EAAE,6CAA6C,EAAE,MAAM,kEAAkE,CAAC;AACjI,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,mDAAmD,CAClE,UAAsC,EACtC,OAA0C,EAC1C,cAA+D;IAE/D,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,6CAA6C,CAAC,WAAW,EAAE,CAAC;QACvF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,2BAA2B,CAC9B,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;SAC9E,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,mCAA+C,CAAC;IACjE,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,uBAAuB;KAChC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { PolicyNegotiatorFactory } from \"@twin.org/rights-management-models\";\nimport { PassThroughPolicyNegotiator } from \"@twin.org/rights-management-plugins\";\nimport type { RightsManagementPolicyNegotiatorComponentConfig } from \"../models/config/rightsManagementPolicyNegotiatorComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { RightsManagementPolicyNegotiatorComponentType } from \"../models/types/rightsManagementPolicyNegotiatorComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the rights management policy negotiator 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 initialiseRightsManagementPolicyNegotiatorComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: RightsManagementPolicyNegotiatorComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof PolicyNegotiatorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RightsManagementPolicyNegotiatorComponentType.PassThrough) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew PassThroughPolicyNegotiator(\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},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(PassThroughPolicyNegotiator);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: PolicyNegotiatorFactory\n\t};\n}\n"]}
|
|
@@ -19,7 +19,7 @@ export function initialiseRightsManagementPolicyObligationEnforcerComponent(engi
|
|
|
19
19
|
instanceTypeName = "pass-through-policy-obligation-enforcer";
|
|
20
20
|
}
|
|
21
21
|
return {
|
|
22
|
-
createComponent
|
|
22
|
+
createComponent,
|
|
23
23
|
instanceTypeName,
|
|
24
24
|
factory: PolicyObligationEnforcerFactory
|
|
25
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rightsManagementPolicyObligationEnforcer.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyObligationEnforcer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rightsManagementPolicyObligationEnforcer.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyObligationEnforcer.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAG1F,OAAO,EAAE,qDAAqD,EAAE,MAAM,0EAA0E,CAAC;AACjJ,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,2DAA2D,CAC1E,UAAsC,EACtC,OAA0C,EAC1C,cAAuE;IAEvE,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,qDAAqD,CAAC,WAAW,EAAE,CAAC;QAC/F,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,mCAAmC,CACtC,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;SAC9E,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,4CAAuD,CAAC;IACzE,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,+BAA+B;KACxC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { PolicyObligationEnforcerFactory } from \"@twin.org/rights-management-models\";\nimport { PassThroughPolicyObligationEnforcer } from \"@twin.org/rights-management-plugins\";\nimport type { RightsManagementPolicyObligationEnforcerComponentConfig } from \"../models/config/rightsManagementPolicyObligationEnforcerComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { RightsManagementPolicyObligationEnforcerComponentType } from \"../models/types/rightsManagementPolicyObligationEnforcerComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the rights management policy obligation enforcer 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 initialiseRightsManagementPolicyObligationEnforcerComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: RightsManagementPolicyObligationEnforcerComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof PolicyObligationEnforcerFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RightsManagementPolicyObligationEnforcerComponentType.PassThrough) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew PassThroughPolicyObligationEnforcer(\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},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(PassThroughPolicyObligationEnforcer);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: PolicyObligationEnforcerFactory\n\t};\n}\n"]}
|
|
@@ -17,7 +17,7 @@ export function initialiseRightsManagementPolicyRequesterComponent(engineCore, c
|
|
|
17
17
|
instanceTypeName = "pass-through-policy-requester";
|
|
18
18
|
}
|
|
19
19
|
return {
|
|
20
|
-
createComponent
|
|
20
|
+
createComponent,
|
|
21
21
|
instanceTypeName,
|
|
22
22
|
factory: PolicyRequesterFactory
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rightsManagementPolicyRequester.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyRequester.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rightsManagementPolicyRequester.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyRequester.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAGjF,OAAO,EAAE,4CAA4C,EAAE,MAAM,iEAAiE,CAAC;AAC/H,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,kDAAkD,CACjE,UAAsC,EACtC,OAA0C,EAC1C,cAA8D;IAE9D,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,4CAA4C,CAAC,WAAW,EAAE,CAAC;QACtF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,0BAA0B,CAC7B,gBAAgB,CAAC,WAAW,CAC3B,EAAE,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,EAClF,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,kCAA8C,CAAC;IAChE,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,sBAAsB;KAC/B,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { PolicyRequesterFactory } from \"@twin.org/rights-management-models\";\nimport { PassThroughPolicyRequester } from \"@twin.org/rights-management-plugins\";\nimport type { RightsManagementPolicyRequesterComponentConfig } from \"../models/config/rightsManagementPolicyRequesterComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { RightsManagementPolicyRequesterComponentType } from \"../models/types/rightsManagementPolicyRequesterComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the rights management policy requester 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 initialiseRightsManagementPolicyRequesterComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: RightsManagementPolicyRequesterComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof PolicyRequesterFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RightsManagementPolicyRequesterComponentType.PassThrough) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew PassThroughPolicyRequester(\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\tinstanceTypeName = nameofKebabCase(PassThroughPolicyRequester);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: PolicyRequesterFactory\n\t};\n}\n"]}
|
|
@@ -19,7 +19,7 @@ export function initialiseRightsManagementPxpComponent(engineCore, context, inst
|
|
|
19
19
|
instanceTypeName = "policy-execution-point-service";
|
|
20
20
|
}
|
|
21
21
|
return {
|
|
22
|
-
createComponent
|
|
22
|
+
createComponent,
|
|
23
23
|
instanceTypeName,
|
|
24
24
|
factory: ComponentFactory
|
|
25
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rightsManagementPxp.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPxp.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"rightsManagementPxp.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPxp.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAGtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AACvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACrD,UAAsC,EACtC,OAA0C,EAC1C,cAAkD;IAElD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,gCAAgC,CAAC,OAAO,EAAE,CAAC;QACtE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,2BAA2B,CAC9B,gBAAgB,CAAC,WAAW,CAC3B,EAAE,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,EAClF,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,mCAA+C,CAAC;IACjE,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ComponentFactory } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { PolicyExecutionPointService } from \"@twin.org/rights-management-pxp-service\";\nimport type { RightsManagementPxpComponentConfig } from \"../models/config/rightsManagementPxpComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { RightsManagementPxpComponentType } from \"../models/types/rightsManagementPxpComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the rights management PXP 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 initialiseRightsManagementPxpComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: RightsManagementPxpComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RightsManagementPxpComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew PolicyExecutionPointService(\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\tinstanceTypeName = nameofKebabCase(PolicyExecutionPointService);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskScheduler.js","sourceRoot":"","sources":["../../../src/components/taskScheduler.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,UAAU,EACV,oBAAoB,EAEpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"taskScheduler.js","sourceRoot":"","sources":["../../../src/components/taskScheduler.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,UAAU,EACV,oBAAoB,EAEpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAC/C,UAAsC,EACtC,OAA0C,EAC1C,cAA4C;IAE5C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,0BAA0B,CAAC,OAAO,EAAE,CAAC;QAChE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,UAAU,EAAE,CAAC;YACb,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,8BAA8B,mBAEpD,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;YAEF,OAAO,IAAI,oBAAoB,CAC9B,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,2BAAwC,CAAC;IAC1D,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tinitSchema,\n\tTaskSchedulerService,\n\ttype ScheduledTask\n} from \"@twin.org/background-task-scheduler\";\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory } from \"@twin.org/core\";\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 { TaskSchedulerComponentConfig } from \"../models/config/taskSchedulerComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { TaskSchedulerComponentType } from \"../models/types/taskSchedulerComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise a task scheduler.\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 initialiseTaskSchedulerComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TaskSchedulerComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TaskSchedulerComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchema();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.scheduledTaskEntityStorageType,\n\t\t\t\tnameof<ScheduledTask>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\n\t\t\treturn new TaskSchedulerService(\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(TaskSchedulerService);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
|
|
4
4
|
import { ComponentFactory } from "@twin.org/core";
|
|
5
5
|
import { EntityStorageTelemetryConnector, initSchema } from "@twin.org/telemetry-connector-entity-storage";
|
|
6
|
+
import { OpenTelemetryTelemetryConnector } from "@twin.org/telemetry-connector-opentelemetry";
|
|
6
7
|
import { TelemetryConnectorFactory } from "@twin.org/telemetry-models";
|
|
7
8
|
import { TelemetryRestClient } from "@twin.org/telemetry-rest-client";
|
|
8
9
|
import { TelemetryService } from "@twin.org/telemetry-service";
|
|
@@ -35,6 +36,22 @@ export function initialiseTelemetryConnector(engineCore, context, instanceConfig
|
|
|
35
36
|
};
|
|
36
37
|
instanceTypeName = EntityStorageTelemetryConnector.NAMESPACE;
|
|
37
38
|
}
|
|
39
|
+
else if (instanceConfig.type === TelemetryConnectorType.OpenTelemetry) {
|
|
40
|
+
createComponent = (createConfig) => {
|
|
41
|
+
initSchema();
|
|
42
|
+
// OpenTelemetry connector uses the entity storage internally so we need to initialise it here as well
|
|
43
|
+
initialiseEntityStorageConnector(engineCore, context, createConfig.options?.telemetryMetricStorageConnectorType, "TelemetryMetric", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [
|
|
44
|
+
ContextIdKeys.Node,
|
|
45
|
+
ContextIdKeys.Tenant
|
|
46
|
+
]));
|
|
47
|
+
initialiseEntityStorageConnector(engineCore, context, createConfig.options?.telemetryMetricValueStorageConnectorType, "TelemetryMetricValue", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [
|
|
48
|
+
ContextIdKeys.Node,
|
|
49
|
+
ContextIdKeys.Tenant
|
|
50
|
+
]));
|
|
51
|
+
return new OpenTelemetryTelemetryConnector(EngineTypeHelper.mergeConfig({ loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent") }, createConfig.options));
|
|
52
|
+
};
|
|
53
|
+
instanceTypeName = OpenTelemetryTelemetryConnector.NAMESPACE;
|
|
54
|
+
}
|
|
38
55
|
return {
|
|
39
56
|
createComponent: createComponent,
|
|
40
57
|
instanceTypeName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../src/components/telemetry.ts"],"names":[],"mappings":"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","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 {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport {\n\tEntityStorageTelemetryConnector,\n\tinitSchema,\n\ttype TelemetryMetric,\n\ttype TelemetryMetricValue\n} from \"@twin.org/telemetry-connector-entity-storage\";\nimport { TelemetryConnectorFactory } from \"@twin.org/telemetry-models\";\nimport { TelemetryRestClient } from \"@twin.org/telemetry-rest-client\";\nimport { TelemetryService } from \"@twin.org/telemetry-service\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { TelemetryComponentConfig } from \"../models/config/telemetryComponentConfig.js\";\nimport type { TelemetryConnectorConfig } from \"../models/config/telemetryConnectorConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { TelemetryComponentType } from \"../models/types/telemetryComponentType.js\";\nimport { TelemetryConnectorType } from \"../models/types/telemetryConnectorType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise a telemetry connector.\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 initialiseTelemetryConnector(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TelemetryConnectorConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof TelemetryConnectorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TelemetryConnectorType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchema();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.telemetryMetricStorageConnectorType,\n\t\t\t\tnameof<TelemetryMetric>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.telemetryMetricValueStorageConnectorType,\n\t\t\t\tnameof<TelemetryMetricValue>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\treturn new EntityStorageTelemetryConnector(\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 = EntityStorageTelemetryConnector.NAMESPACE;\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: TelemetryConnectorFactory\n\t};\n}\n\n/**\n * Initialise the telemetry 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 initialiseTelemetryComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TelemetryComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TelemetryComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TelemetryService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{ telemetryConnectorType: engineCore.getRegisteredInstanceType(\"telemetryConnector\") },\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(TelemetryService);\n\t} else if (instanceConfig.type === TelemetryComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TelemetryRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(TelemetryRestClient);\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":"telemetry.js","sourceRoot":"","sources":["../../../src/components/telemetry.ts"],"names":[],"mappings":"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","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 {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport {\n\tEntityStorageTelemetryConnector,\n\tinitSchema,\n\ttype TelemetryMetric,\n\ttype TelemetryMetricValue\n} from \"@twin.org/telemetry-connector-entity-storage\";\nimport { OpenTelemetryTelemetryConnector } from \"@twin.org/telemetry-connector-opentelemetry\";\nimport { TelemetryConnectorFactory } from \"@twin.org/telemetry-models\";\nimport { TelemetryRestClient } from \"@twin.org/telemetry-rest-client\";\nimport { TelemetryService } from \"@twin.org/telemetry-service\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { TelemetryComponentConfig } from \"../models/config/telemetryComponentConfig.js\";\nimport type { TelemetryConnectorConfig } from \"../models/config/telemetryConnectorConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { TelemetryComponentType } from \"../models/types/telemetryComponentType.js\";\nimport { TelemetryConnectorType } from \"../models/types/telemetryConnectorType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise a telemetry connector.\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 initialiseTelemetryConnector(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TelemetryConnectorConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof TelemetryConnectorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TelemetryConnectorType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchema();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.telemetryMetricStorageConnectorType,\n\t\t\t\tnameof<TelemetryMetric>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.telemetryMetricValueStorageConnectorType,\n\t\t\t\tnameof<TelemetryMetricValue>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\treturn new EntityStorageTelemetryConnector(\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 = EntityStorageTelemetryConnector.NAMESPACE;\n\t} else if (instanceConfig.type === TelemetryConnectorType.OpenTelemetry) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchema();\n\t\t\t// OpenTelemetry connector uses the entity storage internally so we need to initialise it here as well\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.telemetryMetricStorageConnectorType,\n\t\t\t\tnameof<TelemetryMetric>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.telemetryMetricValueStorageConnectorType,\n\t\t\t\tnameof<TelemetryMetricValue>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\treturn new OpenTelemetryTelemetryConnector(\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 = OpenTelemetryTelemetryConnector.NAMESPACE;\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: TelemetryConnectorFactory\n\t};\n}\n\n/**\n * Initialise the telemetry 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 initialiseTelemetryComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TelemetryComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TelemetryComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TelemetryService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{ telemetryConnectorType: engineCore.getRegisteredInstanceType(\"telemetryConnector\") },\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(TelemetryService);\n\t} else if (instanceConfig.type === TelemetryComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TelemetryRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(TelemetryRestClient);\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"]}
|
|
@@ -9,7 +9,7 @@ import { EngineTypeHelper } from "../utils/engineTypeHelper.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* Initialise the tenant admin component.
|
|
11
11
|
* @param engineCore The engine core.
|
|
12
|
-
* @param context The context for the engine.
|
|
12
|
+
* @param context The context for the engine.s
|
|
13
13
|
* @param instanceConfig The instance config.
|
|
14
14
|
* @returns The instance created and the factory for it.
|
|
15
15
|
*/
|
|
@@ -25,7 +25,7 @@ export function initialiseTenantAdminComponent(engineCore, context, instanceConf
|
|
|
25
25
|
instanceTypeName = "tenant-admin-service";
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
|
-
createComponent
|
|
28
|
+
createComponent,
|
|
29
29
|
instanceTypeName,
|
|
30
30
|
factory: ComponentFactory
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../../src/components/tenant.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAEN,kBAAkB,EAClB,UAAU,IAAI,gBAAgB,EAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../../src/components/tenant.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAEN,kBAAkB,EAClB,UAAU,IAAI,gBAAgB,EAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAC7C,UAAsC,EACtC,OAA0C,EAC1C,cAA0C;IAE1C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,wBAAwB,CAAC,OAAO,EAAE,CAAC;QAC9D,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,gBAAgB,EAAE,CAAC;YAEnB,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,uBAAuB,YAE7C,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;YACF,OAAO,IAAI,kBAAkB,CAC5B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,yBAAsC,CAAC;IACxD,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\ttype Tenant,\n\tTenantAdminService,\n\tinitSchema as initSchemaTenant\n} from \"@twin.org/api-tenant-processor\";\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory } from \"@twin.org/core\";\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 { TenantAdminComponentConfig } from \"../models/config/tenantAdminComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { TenantAdminComponentType } from \"../models/types/tenantAdminComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the tenant admin component.\n * @param engineCore The engine core.\n * @param context The context for the engine.s\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseTenantAdminComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TenantAdminComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TenantAdminComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaTenant();\n\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.tenantEntityStorageType,\n\t\t\t\tnameof<Tenant>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\t\t\treturn new TenantAdminService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(TenantAdminService);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trust.js","sourceRoot":"","sources":["../../../src/components/trust.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"trust.js","sourceRoot":"","sources":["../../../src/components/trust.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOlD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACvC,UAAsC,EACtC,OAA0C,EAC1C,cAAoC;IAEpC,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,kBAAkB,CAAC,OAAO,EAAE,CAAC;QACxD,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,YAAY,CACf,gBAAgB,CAAC,WAAW,CAC3B,EAAE,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,EAClF,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,kBAAgC,CAAC;IAClD,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ComponentFactory } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { TrustService } from \"@twin.org/trust-service\";\nimport type { TrustComponentConfig } from \"../models/config/trustComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { TrustComponentType } from \"../models/types/trustComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the trust 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 initialiseTrustComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TrustComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TrustComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew TrustService(\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\tinstanceTypeName = nameofKebabCase(TrustService);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -20,7 +20,7 @@ export function initialiseTrustGeneratorComponent(engineCore, context, instanceC
|
|
|
20
20
|
instanceTypeName = "jwt-verifiable-credential-generator";
|
|
21
21
|
}
|
|
22
22
|
return {
|
|
23
|
-
createComponent
|
|
23
|
+
createComponent,
|
|
24
24
|
instanceTypeName,
|
|
25
25
|
factory: TrustGeneratorFactory
|
|
26
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trustGenerator.js","sourceRoot":"","sources":["../../../src/components/trustGenerator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"trustGenerator.js","sourceRoot":"","sources":["../../../src/components/trustGenerator.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,iCAAiC,CAChD,UAAsC,EACtC,OAA0C,EAC1C,cAA6C;IAE7C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,uBAAuB,EAAE,CAAC;QACjF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,gCAAgC,CACnC,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;YAC9E,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;SAChF,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,wCAAoD,CAAC;IACtE,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,qBAAqB;KAC9B,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { JwtVerifiableCredentialGenerator } from \"@twin.org/trust-generators\";\nimport { TrustGeneratorFactory } from \"@twin.org/trust-models\";\nimport type { TrustGeneratorComponentConfig } from \"../models/config/trustGeneratorComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { TrustGeneratorComponentType } from \"../models/types/trustGeneratorComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the trust generator 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 initialiseTrustGeneratorComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TrustGeneratorComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof TrustGeneratorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TrustGeneratorComponentType.JwtVerifiableCredential) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew JwtVerifiableCredentialGenerator(\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\tidentityComponentType: engineCore.getRegisteredInstanceType(\"identityComponent\")\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(JwtVerifiableCredentialGenerator);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: TrustGeneratorFactory\n\t};\n}\n"]}
|
|
@@ -20,7 +20,7 @@ export function initialiseTrustVerifierComponent(engineCore, context, instanceCo
|
|
|
20
20
|
instanceTypeName = "jwt-verifiable-credential-verifier";
|
|
21
21
|
}
|
|
22
22
|
return {
|
|
23
|
-
createComponent
|
|
23
|
+
createComponent,
|
|
24
24
|
instanceTypeName,
|
|
25
25
|
factory: TrustVerifierFactory
|
|
26
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trustVerifier.js","sourceRoot":"","sources":["../../../src/components/trustVerifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"trustVerifier.js","sourceRoot":"","sources":["../../../src/components/trustVerifier.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAC/C,UAAsC,EACtC,OAA0C,EAC1C,cAA4C;IAE5C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,0BAA0B,CAAC,uBAAuB,EAAE,CAAC;QAChF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,+BAA+B,CAClC,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;YAC9E,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;SAChF,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,uCAAmD,CAAC;IACrE,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,oBAAoB;KAC7B,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport { TrustVerifierFactory } from \"@twin.org/trust-models\";\nimport { JwtVerifiableCredentialVerifier } from \"@twin.org/trust-verifiers\";\nimport type { TrustVerifierComponentConfig } from \"../models/config/trustVerifierComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { TrustVerifierComponentType } from \"../models/types/trustVerifierComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the trust verifier 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 initialiseTrustVerifierComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: TrustVerifierComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof TrustVerifierFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === TrustVerifierComponentType.JwtVerifiableCredential) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew JwtVerifiableCredentialVerifier(\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\tidentityComponentType: engineCore.getRegisteredInstanceType(\"identityComponent\")\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(JwtVerifiableCredentialVerifier);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: TrustVerifierFactory\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlTransformer.js","sourceRoot":"","sources":["../../../src/components/urlTransformer.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"urlTransformer.js","sourceRoot":"","sources":["../../../src/components/urlTransformer.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AASlD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,iCAAiC,CAChD,UAAsC,EACtC,OAA0C,EAC1C,cAA6C;IAE7C,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,2BAA2B,CAAC,OAAO,EAAE,CAAC;QACjE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,qBAAqB,CACxB,gBAAgB,CAAC,WAAW,CAC3B;YACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;SAC1E,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,4BAAyC,CAAC;IAC3D,CAAC;IAED,OAAO;QACN,eAAe;QACf,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { UrlTransformerService } from \"@twin.org/api-service\";\nimport { ComponentFactory } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport type { UrlTransformerComponentConfig } from \"../models/config/urlTransformerComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { UrlTransformerComponentType } from \"../models/types/urlTransformerComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the URL transformer 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 initialiseUrlTransformerComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: UrlTransformerComponentConfig\n): EngineTypeInitialiserReturn<UrlTransformerComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === UrlTransformerComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew UrlTransformerService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\")\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(UrlTransformerService);\n\t}\n\n\treturn {\n\t\tcreateComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetryConnectorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/telemetryConnectorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageTelemetryConnectorConstructorOptions } from \"@twin.org/telemetry-connector-entity-storage\";\nimport type { TelemetryConnectorType } from \"../types/telemetryConnectorType.js\";\n\n/**\n * Telemetry connector config types.\n */\
|
|
1
|
+
{"version":3,"file":"telemetryConnectorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/telemetryConnectorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageTelemetryConnectorConstructorOptions } from \"@twin.org/telemetry-connector-entity-storage\";\nimport type { IOpenTelemetryTelemetryConnectorConstructorOptions } from \"@twin.org/telemetry-connector-opentelemetry\";\nimport type { TelemetryConnectorType } from \"../types/telemetryConnectorType.js\";\n\n/**\n * Telemetry connector config types.\n */\nexport type TelemetryConnectorConfig =\n\t| {\n\t\t\ttype: typeof TelemetryConnectorType.EntityStorage;\n\t\t\toptions?: IEntityStorageTelemetryConnectorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof TelemetryConnectorType.OpenTelemetry;\n\t\t\toptions?: IOpenTelemetryTelemetryConnectorConstructorOptions;\n\t };\n"]}
|
|
@@ -8,6 +8,10 @@ export const TelemetryConnectorType = {
|
|
|
8
8
|
/**
|
|
9
9
|
* Entity storage.
|
|
10
10
|
*/
|
|
11
|
-
EntityStorage: "entity-storage"
|
|
11
|
+
EntityStorage: "entity-storage",
|
|
12
|
+
/**
|
|
13
|
+
* OpenTelemetry.
|
|
14
|
+
*/
|
|
15
|
+
OpenTelemetry: "open-telemetry"
|
|
12
16
|
};
|
|
13
17
|
//# sourceMappingURL=telemetryConnectorType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetryConnectorType.js","sourceRoot":"","sources":["../../../../src/models/types/telemetryConnectorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,aAAa,EAAE,gBAAgB;CACtB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Telemetry connector types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const TelemetryConnectorType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\"\n} as const;\n\n/**\n * Telemetry connector types.\n */\nexport type TelemetryConnectorType =\n\t(typeof TelemetryConnectorType)[keyof typeof TelemetryConnectorType];\n"]}
|
|
1
|
+
{"version":3,"file":"telemetryConnectorType.js","sourceRoot":"","sources":["../../../../src/models/types/telemetryConnectorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,aAAa,EAAE,gBAAgB;CACtB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Telemetry connector types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const TelemetryConnectorType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * OpenTelemetry.\n\t */\n\tOpenTelemetry: \"open-telemetry\"\n} as const;\n\n/**\n * Telemetry connector types.\n */\nexport type TelemetryConnectorType =\n\t(typeof TelemetryConnectorType)[keyof typeof TelemetryConnectorType];\n"]}
|
|
@@ -5,7 +5,7 @@ import type { IEngineConfig } from "../models/IEngineConfig.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Initialise the tenant admin component.
|
|
7
7
|
* @param engineCore The engine core.
|
|
8
|
-
* @param context The context for the engine.
|
|
8
|
+
* @param context The context for the engine.s
|
|
9
9
|
* @param instanceConfig The instance config.
|
|
10
10
|
* @returns The instance created and the factory for it.
|
|
11
11
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IEntityStorageTelemetryConnectorConstructorOptions } from "@twin.org/telemetry-connector-entity-storage";
|
|
2
|
+
import type { IOpenTelemetryTelemetryConnectorConstructorOptions } from "@twin.org/telemetry-connector-opentelemetry";
|
|
2
3
|
import type { TelemetryConnectorType } from "../types/telemetryConnectorType.js";
|
|
3
4
|
/**
|
|
4
5
|
* Telemetry connector config types.
|
|
@@ -6,4 +7,7 @@ import type { TelemetryConnectorType } from "../types/telemetryConnectorType.js"
|
|
|
6
7
|
export type TelemetryConnectorConfig = {
|
|
7
8
|
type: typeof TelemetryConnectorType.EntityStorage;
|
|
8
9
|
options?: IEntityStorageTelemetryConnectorConstructorOptions;
|
|
10
|
+
} | {
|
|
11
|
+
type: typeof TelemetryConnectorType.OpenTelemetry;
|
|
12
|
+
options?: IOpenTelemetryTelemetryConnectorConstructorOptions;
|
|
9
13
|
};
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.37](https://github.com/iotaledger/twin-engine/compare/engine-types-v0.0.3-next.36...engine-types-v0.0.3-next.37) (2026-05-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* typescript 6 update ([b227f52](https://github.com/iotaledger/twin-engine/commit/b227f5271b18ac627b932ea8e59d2879ff01ebd7))
|
|
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.36 to 0.0.3-next.37
|
|
16
|
+
* @twin.org/engine-models bumped from 0.0.3-next.36 to 0.0.3-next.37
|
|
17
|
+
|
|
3
18
|
## [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
19
|
|
|
5
20
|
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
# Type Alias: TelemetryConnectorConfig
|
|
2
2
|
|
|
3
|
-
> **TelemetryConnectorConfig** = `
|
|
3
|
+
> **TelemetryConnectorConfig** = \{ `type`: *typeof* [`EntityStorage`](../variables/TelemetryConnectorType.md#entitystorage); `options?`: `IEntityStorageTelemetryConnectorConstructorOptions`; \} \| \{ `type`: *typeof* [`OpenTelemetry`](../variables/TelemetryConnectorType.md#opentelemetry); `options?`: `IOpenTelemetryTelemetryConnectorConstructorOptions`; \}
|
|
4
4
|
|
|
5
5
|
Telemetry connector config types.
|
|
6
|
-
|
|
7
|
-
## Properties
|
|
8
|
-
|
|
9
|
-
### type {#type}
|
|
10
|
-
|
|
11
|
-
> **type**: *typeof* [`EntityStorage`](../variables/TelemetryConnectorType.md#entitystorage)
|
|
12
|
-
|
|
13
|
-
***
|
|
14
|
-
|
|
15
|
-
### options? {#options}
|
|
16
|
-
|
|
17
|
-
> `optional` **options?**: `IEntityStorageTelemetryConnectorConstructorOptions`
|
|
@@ -11,3 +11,9 @@ Telemetry connector types.
|
|
|
11
11
|
> `readonly` **EntityStorage**: `"entity-storage"` = `"entity-storage"`
|
|
12
12
|
|
|
13
13
|
Entity storage.
|
|
14
|
+
|
|
15
|
+
### OpenTelemetry {#opentelemetry}
|
|
16
|
+
|
|
17
|
+
> `readonly` **OpenTelemetry**: `"open-telemetry"` = `"open-telemetry"`
|
|
18
|
+
|
|
19
|
+
OpenTelemetry.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/engine-types",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.37",
|
|
4
4
|
"description": "Component and connector type definitions with configuration helpers for engine composition.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -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.
|
|
66
|
-
"@twin.org/engine-models": "0.0.3-next.
|
|
65
|
+
"@twin.org/engine-core": "0.0.3-next.37",
|
|
66
|
+
"@twin.org/engine-models": "0.0.3-next.37",
|
|
67
67
|
"@twin.org/entity": "next",
|
|
68
68
|
"@twin.org/entity-storage-connector-cosmosdb": "next",
|
|
69
69
|
"@twin.org/entity-storage-connector-dynamodb": "next",
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
"@twin.org/synchronised-storage-rest-client": "next",
|
|
133
133
|
"@twin.org/synchronised-storage-service": "next",
|
|
134
134
|
"@twin.org/telemetry-connector-entity-storage": "next",
|
|
135
|
+
"@twin.org/telemetry-connector-opentelemetry": "next",
|
|
135
136
|
"@twin.org/telemetry-models": "next",
|
|
136
137
|
"@twin.org/telemetry-rest-client": "next",
|
|
137
138
|
"@twin.org/telemetry-service": "next",
|