@twin.org/engine-types 0.0.3-next.50 → 0.0.3-next.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/es/components/entityStorage.js +7 -2
  2. package/dist/es/components/entityStorage.js.map +1 -1
  3. package/dist/es/components/rightsManagementPolicyInformationSource.js +8 -1
  4. package/dist/es/components/rightsManagementPolicyInformationSource.js.map +1 -1
  5. package/dist/es/components/wallet.js +1 -1
  6. package/dist/es/components/wallet.js.map +1 -1
  7. package/dist/es/models/IEngineConfig.js.map +1 -1
  8. package/dist/es/models/config/entityStorageConnectorConfig.js.map +1 -1
  9. package/dist/es/models/config/rightsManagementPolicyInformationSourceComponentConfig.js.map +1 -1
  10. package/dist/es/models/types/entityStorageConnectorType.js +1 -1
  11. package/dist/es/models/types/entityStorageConnectorType.js.map +1 -1
  12. package/dist/es/models/types/rightsManagementPolicyInformationSourceComponentType.js +4 -0
  13. package/dist/es/models/types/rightsManagementPolicyInformationSourceComponentType.js.map +1 -1
  14. package/dist/types/components/entityStorage.d.ts +1 -1
  15. package/dist/types/components/wallet.d.ts +1 -1
  16. package/dist/types/models/IEngineConfig.d.ts +1 -1
  17. package/dist/types/models/config/entityStorageConnectorConfig.d.ts +5 -1
  18. package/dist/types/models/config/rightsManagementPolicyInformationSourceComponentConfig.d.ts +4 -1
  19. package/dist/types/models/types/entityStorageConnectorType.d.ts +1 -1
  20. package/dist/types/models/types/rightsManagementPolicyInformationSourceComponentType.d.ts +4 -0
  21. package/docs/changelog.md +30 -0
  22. package/docs/reference/functions/initialiseEntityStorageComponent.md +1 -1
  23. package/docs/reference/functions/initialiseWalletConnector.md +1 -1
  24. package/docs/reference/interfaces/IEngineConfig.md +1 -1
  25. package/docs/reference/type-aliases/EntityStorageConnectorConfig.md +1 -1
  26. package/docs/reference/type-aliases/RightsManagementPolicyInformationSourceComponentConfig.md +1 -1
  27. package/docs/reference/variables/EntityStorageConnectorType.md +1 -1
  28. package/docs/reference/variables/RightsManagementPolicyInformationSourceComponentType.md +6 -0
  29. package/package.json +3 -3
@@ -66,7 +66,12 @@ export function initialiseEntityStorageConnector(engineCore, context, typeCustom
66
66
  if (type === EntityStorageConnectorType.Memory) {
67
67
  entityStorageConnector = new MemoryEntityStorageConnector({
68
68
  entitySchema: schema,
69
- partitionContextIds
69
+ partitionContextIds,
70
+ ...entityStorageConfig.options,
71
+ config: {
72
+ ...entityStorageConfig.options.config,
73
+ storageKey: `${entityStorageConfig.options.storagePrefix ?? ""}${instanceName}`
74
+ }
70
75
  });
71
76
  }
72
77
  else if (type === EntityStorageConnectorType.File) {
@@ -172,7 +177,7 @@ export function initialiseEntityStorageConnector(engineCore, context, typeCustom
172
177
  }
173
178
  }
174
179
  /**
175
- * Initialise the entity storage connector.
180
+ * Initialise the entity storage component.
176
181
  * @param engineCore The engine core.
177
182
  * @param context The context for the engine.
178
183
  * @param instanceConfig The instance config.
@@ -1 +1 @@
1
- {"version":3,"file":"entityStorage.js","sourceRoot":"","sources":["../../../src/components/entityStorage.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACN,gBAAgB,EAChB,YAAY,EACZ,IAAI,EAEJ,EAAE,EACF,YAAY,EACZ,MAAM,gBAAgB,CAAC;AAMxB,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,O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AAO,CAAC,iBAAiB,EACtC,YAAY,CAAC,OAAO,CAAC,mBAAmB,CACxC,CAAC;YAEF,OAAO,IAAI,oBAAoB,CAC9B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,EAAE;gBACtF,iBAAiB,EAAE,SAAS;aAC5B,CAAC,CACF,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,GAAG,SAAS,CAAC;IAC9B,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,0BAA0B,CAAC,UAAU,EAAE,CAAC;QAC1E,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACnF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,uBAAuB,CAC1B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,EAAE;YACtF,UAAU,EAAE,SAAS;SACrB,CAAC,CACF,CAAC;QACH,gBAAgB,GAAG,GAAG,4BAAwC,IAAI,SAAS,EAAE,CAAC;IAC/E,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport path from \"node:path\";\nimport {\n\tComponentFactory,\n\tGeneralError,\n\tI18n,\n\ttype IComponent,\n\tIs,\n\tStringHelper\n} from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { CosmosDbEntityStorageConnector } from \"@twin.org/entity-storage-connector-cosmosdb\";\nimport { DynamoDbEntityStorageConnector } from \"@twin.org/entity-storage-connector-dynamodb\";\nimport { FileEntityStorageConnector } from \"@twin.org/entity-storage-connector-file\";\nimport { FirestoreEntityStorageConnector } from \"@twin.org/entity-storage-connector-gcp-firestore\";\nimport { MemoryEntityStorageConnector } from \"@twin.org/entity-storage-connector-memory\";\nimport { MongoDbEntityStorageConnector } from \"@twin.org/entity-storage-connector-mongodb\";\nimport { MySqlEntityStorageConnector } from \"@twin.org/entity-storage-connector-mysql\";\nimport { PostgreSqlEntityStorageConnector } from \"@twin.org/entity-storage-connector-postgresql\";\nimport { ScyllaDBTableConnector } from \"@twin.org/entity-storage-connector-scylladb\";\nimport {\n\tEntityStorageConnectorFactory,\n\ttype IEntityStorageConnector\n} from \"@twin.org/entity-storage-models\";\nimport { EntityStorageRestClient } from \"@twin.org/entity-storage-rest-client\";\nimport { EntityStorageService } from \"@twin.org/entity-storage-service\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport type { EntityStorageComponentConfig } from \"../models/config/entityStorageComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { EntityStorageComponentType } from \"../models/types/entityStorageComponentType.js\";\nimport { EntityStorageConnectorType } from \"../models/types/entityStorageConnectorType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the entity storage connector.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param typeCustom Override the type of connector to use instead of default configuration.\n * @param schema The schema for the entity storage.\n * @param partitionContextIds The context IDs to use for partitioning the data.\n * @throws GeneralError when the configuration is invalid.\n */\nexport function initialiseEntityStorageConnector(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\ttypeCustom: string | undefined,\n\tschema: string,\n\tpartitionContextIds: string[]\n): void {\n\tconst kebabName = StringHelper.kebabCase(schema);\n\tlet instanceName = kebabName;\n\n\tlet entityStorageConfig;\n\n\tif (Is.stringValue(typeCustom)) {\n\t\t// A custom type has been specified, so look it up\n\t\tentityStorageConfig = context.config.types.entityStorageConnector?.find(\n\t\t\tc => c.type === typeCustom || c.overrideInstanceType === typeCustom\n\t\t);\n\t\tif (Is.empty(entityStorageConfig)) {\n\t\t\tthrow new GeneralError(\"engineTypes\", \"entityStorageCustomMissing\", {\n\t\t\t\ttypeCustom,\n\t\t\t\tstorageName: instanceName\n\t\t\t});\n\t\t}\n\n\t\t// Since we have a custom type we need to use that as the instance name for the\n\t\t// connector so that it can be looked up by other components\n\t\tinstanceName = typeCustom;\n\t} else {\n\t\t// The default entity storage method is either the one with the isDefault flag set\n\t\t// or pick the first one if no default is set.\n\t\tentityStorageConfig =\n\t\t\tcontext.config.types.entityStorageConnector?.find(c => c.isDefault ?? false) ??\n\t\t\tcontext.config.types.entityStorageConnector?.[0];\n\t\tif (Is.empty(entityStorageConfig)) {\n\t\t\tthrow new GeneralError(\"engineTypes\", \"entityStorageMissing\", {\n\t\t\t\tstorageName: instanceName\n\t\t\t});\n\t\t}\n\t}\n\n\tif (!EntityStorageConnectorFactory.hasName(instanceName)) {\n\t\tconst type = entityStorageConfig.type;\n\t\tlet entityStorageConnector: IEntityStorageConnector;\n\n\t\tengineCore.logInfo(\n\t\t\tI18n.formatMessage(\"info.engineTypes.configuringEntityStorage\", {\n\t\t\t\telement: \"Entity Storage\",\n\t\t\t\tstorageName: instanceName,\n\t\t\t\tstorageType: type\n\t\t\t})\n\t\t);\n\n\t\tif (type === EntityStorageConnectorType.Memory) {\n\t\t\tentityStorageConnector = new MemoryEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.File) {\n\t\t\tentityStorageConnector = new FileEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tdirectory: path.join(\n\t\t\t\t\t\tentityStorageConfig.options.config.directory,\n\t\t\t\t\t\t`${entityStorageConfig.options.folderPrefix ?? \"\"}${instanceName}`\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.AwsDynamoDb) {\n\t\t\tentityStorageConnector = new DynamoDbEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\ttableName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.AzureCosmosDb) {\n\t\t\tentityStorageConnector = new CosmosDbEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tcontainerId: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.GcpFirestoreDb) {\n\t\t\tentityStorageConnector = new FirestoreEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tcollectionName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.ScyllaDb) {\n\t\t\tentityStorageConnector = new ScyllaDBTableConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\ttableName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.MySqlDb) {\n\t\t\tentityStorageConnector = new MySqlEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\ttableName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.MongoDb) {\n\t\t\tentityStorageConnector = new MongoDbEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tcollection: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.PostgreSql) {\n\t\t\tentityStorageConnector = new PostgreSqlEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\ttableName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthrow new GeneralError(\"engineTypes\", \"connectorUnknownType\", {\n\t\t\t\ttype,\n\t\t\t\tconnectorType: \"entityStorageConnector\"\n\t\t\t});\n\t\t}\n\n\t\tcontext.componentInstances.push({\n\t\t\tinstanceType: instanceName,\n\t\t\tcomponent: entityStorageConnector,\n\t\t\tinitialised: false\n\t\t});\n\t\tEntityStorageConnectorFactory.register(instanceName, () => entityStorageConnector);\n\t}\n}\n\n/**\n * Initialise the entity storage 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 initialiseEntityStorageComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: EntityStorageComponentConfig\n): EngineTypeInitialiserReturn<EntityStorageComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === EntityStorageComponentType.Service) {\n\t\tconst kebabName = StringHelper.kebabCase(instanceConfig.options.entityStorageType);\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\t// See if there is a custom entity storage for this type, otherwise just use the default one.\n\t\t\tconst hasCustom = context.config.types.entityStorageConnector?.some(\n\t\t\t\tc => c.type === kebabName || c.overrideInstanceType === kebabName\n\t\t\t);\n\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\thasCustom ? kebabName : undefined,\n\t\t\t\tcreateConfig.options.entityStorageType,\n\t\t\t\tcreateConfig.options.partitionContextIds\n\t\t\t);\n\n\t\t\treturn new EntityStorageService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options, {\n\t\t\t\t\tentityStorageType: kebabName\n\t\t\t\t})\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = kebabName;\n\t} else if (instanceConfig.type === EntityStorageComponentType.RestClient) {\n\t\tconst kebabName = StringHelper.kebabCase(instanceConfig.options.entityStorageType);\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew EntityStorageRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options, {\n\t\t\t\t\tpathPrefix: kebabName\n\t\t\t\t})\n\t\t\t);\n\t\tinstanceTypeName = `${nameofKebabCase(EntityStorageRestClient)}-${kebabName}`;\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":"entityStorage.js","sourceRoot":"","sources":["../../../src/components/entityStorage.ts"],"names":[],"m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,uBAAuB,CAC1B,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,EAAE;YACtF,UAAU,EAAE,SAAS;SACrB,CAAC,CACF,CAAC;QACH,gBAAgB,GAAG,GAAG,4BAAwC,IAAI,SAAS,EAAE,CAAC;IAC/E,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport path from \"node:path\";\nimport {\n\tComponentFactory,\n\tGeneralError,\n\tI18n,\n\ttype IComponent,\n\tIs,\n\tStringHelper\n} from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { CosmosDbEntityStorageConnector } from \"@twin.org/entity-storage-connector-cosmosdb\";\nimport { DynamoDbEntityStorageConnector } from \"@twin.org/entity-storage-connector-dynamodb\";\nimport { FileEntityStorageConnector } from \"@twin.org/entity-storage-connector-file\";\nimport { FirestoreEntityStorageConnector } from \"@twin.org/entity-storage-connector-gcp-firestore\";\nimport { MemoryEntityStorageConnector } from \"@twin.org/entity-storage-connector-memory\";\nimport { MongoDbEntityStorageConnector } from \"@twin.org/entity-storage-connector-mongodb\";\nimport { MySqlEntityStorageConnector } from \"@twin.org/entity-storage-connector-mysql\";\nimport { PostgreSqlEntityStorageConnector } from \"@twin.org/entity-storage-connector-postgresql\";\nimport { ScyllaDBTableConnector } from \"@twin.org/entity-storage-connector-scylladb\";\nimport {\n\tEntityStorageConnectorFactory,\n\ttype IEntityStorageConnector\n} from \"@twin.org/entity-storage-models\";\nimport { EntityStorageRestClient } from \"@twin.org/entity-storage-rest-client\";\nimport { EntityStorageService } from \"@twin.org/entity-storage-service\";\nimport { nameofKebabCase } from \"@twin.org/nameof\";\nimport type { EntityStorageComponentConfig } from \"../models/config/entityStorageComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { EntityStorageComponentType } from \"../models/types/entityStorageComponentType.js\";\nimport { EntityStorageConnectorType } from \"../models/types/entityStorageConnectorType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the entity storage connector.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param typeCustom Override the type of connector to use instead of default configuration.\n * @param schema The schema for the entity storage.\n * @param partitionContextIds The context IDs to use for partitioning the data.\n * @throws GeneralError when the configuration is invalid.\n */\nexport function initialiseEntityStorageConnector(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\ttypeCustom: string | undefined,\n\tschema: string,\n\tpartitionContextIds: string[]\n): void {\n\tconst kebabName = StringHelper.kebabCase(schema);\n\tlet instanceName = kebabName;\n\n\tlet entityStorageConfig;\n\n\tif (Is.stringValue(typeCustom)) {\n\t\t// A custom type has been specified, so look it up\n\t\tentityStorageConfig = context.config.types.entityStorageConnector?.find(\n\t\t\tc => c.type === typeCustom || c.overrideInstanceType === typeCustom\n\t\t);\n\t\tif (Is.empty(entityStorageConfig)) {\n\t\t\tthrow new GeneralError(\"engineTypes\", \"entityStorageCustomMissing\", {\n\t\t\t\ttypeCustom,\n\t\t\t\tstorageName: instanceName\n\t\t\t});\n\t\t}\n\n\t\t// Since we have a custom type we need to use that as the instance name for the\n\t\t// connector so that it can be looked up by other components\n\t\tinstanceName = typeCustom;\n\t} else {\n\t\t// The default entity storage method is either the one with the isDefault flag set\n\t\t// or pick the first one if no default is set.\n\t\tentityStorageConfig =\n\t\t\tcontext.config.types.entityStorageConnector?.find(c => c.isDefault ?? false) ??\n\t\t\tcontext.config.types.entityStorageConnector?.[0];\n\t\tif (Is.empty(entityStorageConfig)) {\n\t\t\tthrow new GeneralError(\"engineTypes\", \"entityStorageMissing\", {\n\t\t\t\tstorageName: instanceName\n\t\t\t});\n\t\t}\n\t}\n\n\tif (!EntityStorageConnectorFactory.hasName(instanceName)) {\n\t\tconst type = entityStorageConfig.type;\n\t\tlet entityStorageConnector: IEntityStorageConnector;\n\n\t\tengineCore.logInfo(\n\t\t\tI18n.formatMessage(\"info.engineTypes.configuringEntityStorage\", {\n\t\t\t\telement: \"Entity Storage\",\n\t\t\t\tstorageName: instanceName,\n\t\t\t\tstorageType: type\n\t\t\t})\n\t\t);\n\n\t\tif (type === EntityStorageConnectorType.Memory) {\n\t\t\tentityStorageConnector = new MemoryEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tstorageKey: `${entityStorageConfig.options.storagePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.File) {\n\t\t\tentityStorageConnector = new FileEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tdirectory: path.join(\n\t\t\t\t\t\tentityStorageConfig.options.config.directory,\n\t\t\t\t\t\t`${entityStorageConfig.options.folderPrefix ?? \"\"}${instanceName}`\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.AwsDynamoDb) {\n\t\t\tentityStorageConnector = new DynamoDbEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\ttableName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.AzureCosmosDb) {\n\t\t\tentityStorageConnector = new CosmosDbEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tcontainerId: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.GcpFirestoreDb) {\n\t\t\tentityStorageConnector = new FirestoreEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tcollectionName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.ScyllaDb) {\n\t\t\tentityStorageConnector = new ScyllaDBTableConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\ttableName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.MySqlDb) {\n\t\t\tentityStorageConnector = new MySqlEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\ttableName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.MongoDb) {\n\t\t\tentityStorageConnector = new MongoDbEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\tcollection: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (type === EntityStorageConnectorType.PostgreSql) {\n\t\t\tentityStorageConnector = new PostgreSqlEntityStorageConnector({\n\t\t\t\tentitySchema: schema,\n\t\t\t\tpartitionContextIds,\n\t\t\t\t...entityStorageConfig.options,\n\t\t\t\tconfig: {\n\t\t\t\t\t...entityStorageConfig.options.config,\n\t\t\t\t\ttableName: `${entityStorageConfig.options.tablePrefix ?? \"\"}${instanceName}`\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthrow new GeneralError(\"engineTypes\", \"connectorUnknownType\", {\n\t\t\t\ttype,\n\t\t\t\tconnectorType: \"entityStorageConnector\"\n\t\t\t});\n\t\t}\n\n\t\tcontext.componentInstances.push({\n\t\t\tinstanceType: instanceName,\n\t\t\tcomponent: entityStorageConnector,\n\t\t\tinitialised: false\n\t\t});\n\t\tEntityStorageConnectorFactory.register(instanceName, () => entityStorageConnector);\n\t}\n}\n\n/**\n * Initialise the entity storage 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 initialiseEntityStorageComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: EntityStorageComponentConfig\n): EngineTypeInitialiserReturn<EntityStorageComponentConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === EntityStorageComponentType.Service) {\n\t\tconst kebabName = StringHelper.kebabCase(instanceConfig.options.entityStorageType);\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\t// See if there is a custom entity storage for this type, otherwise just use the default one.\n\t\t\tconst hasCustom = context.config.types.entityStorageConnector?.some(\n\t\t\t\tc => c.type === kebabName || c.overrideInstanceType === kebabName\n\t\t\t);\n\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\thasCustom ? kebabName : undefined,\n\t\t\t\tcreateConfig.options.entityStorageType,\n\t\t\t\tcreateConfig.options.partitionContextIds\n\t\t\t);\n\n\t\t\treturn new EntityStorageService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options, {\n\t\t\t\t\tentityStorageType: kebabName\n\t\t\t\t})\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = kebabName;\n\t} else if (instanceConfig.type === EntityStorageComponentType.RestClient) {\n\t\tconst kebabName = StringHelper.kebabCase(instanceConfig.options.entityStorageType);\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew EntityStorageRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options, {\n\t\t\t\t\tpathPrefix: kebabName\n\t\t\t\t})\n\t\t\t);\n\t\tinstanceTypeName = `${nameofKebabCase(EntityStorageRestClient)}-${kebabName}`;\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,5 +1,5 @@
1
1
  import { PolicyInformationSourceFactory } from "@twin.org/rights-management-models";
2
- import { IdentityPolicyInformationSource, StaticPolicyInformationSource } from "@twin.org/rights-management-plugins";
2
+ import { IdentityPolicyInformationSource, IdentityProfilePolicyInformationSource, StaticPolicyInformationSource } from "@twin.org/rights-management-plugins";
3
3
  import { RightsManagementPolicyInformationSourceComponentType } from "../models/types/rightsManagementPolicyInformationSourceComponentType.js";
4
4
  import { EngineTypeHelper } from "../utils/engineTypeHelper.js";
5
5
  /**
@@ -19,6 +19,13 @@ export function initialiseRightsManagementPolicyInformationSourceComponent(engin
19
19
  }, createConfig.options));
20
20
  instanceTypeName = "identity-policy-information-source";
21
21
  }
22
+ else if (instanceConfig.type === RightsManagementPolicyInformationSourceComponentType.IdentityProfile) {
23
+ createComponent = (createConfig) => new IdentityProfilePolicyInformationSource(EngineTypeHelper.mergeConfig({
24
+ loggingComponentType: engineCore.getRegisteredLoggerType("IdentityProfilePolicyInformationSource"),
25
+ identityProfileComponentType: engineCore.getRegisteredInstanceType("identityProfileComponent")
26
+ }, createConfig.options));
27
+ instanceTypeName = "identity-profile-policy-information-source";
28
+ }
22
29
  else if (instanceConfig.type === RightsManagementPolicyInformationSourceComponentType.Static) {
23
30
  createComponent = (createConfig) => new StaticPolicyInformationSource(EngineTypeHelper.mergeConfig({
24
31
  loggingComponentType: engineCore.getRegisteredLoggerType("StaticPolicyInformationSource")
@@ -1 +1 @@
1
- {"version":3,"file":"rightsManagementPolicyInformationSource.js","sourceRoot":"","sources":["../../../src/components/rightsManagementPolicyInformationSource.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EACN,+BAA+B,EAC/B,6BAA6B,EAC7B,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAAE,oDAAoD,EAAE,MAAM,yEAAyE,CAAC;AAC/I,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,0DAA0D,CACzE,UAAsC,EACtC,OAA0C,EAC1C,cAAsE;IAEtE,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,oDAAoD,CAAC,QAAQ,EAAE,CAAC;QAC3F,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,+BAA+B,CAClC,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,uBAAuB,mCAEvD;YACD,6BAA6B,EAAE,UAAU,CAAC,yBAAyB,CAClE,2BAA2B,CAC3B;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,uCAAmD,CAAC;IACrE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,oDAAoD,CAAC,MAAM,EAAE,CAAC;QAChG,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,6BAA6B,CAChC,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,uBAAuB,iCAEvD;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,qCAAiD,CAAC;IACnE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,8BAA8B;KACvC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport 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 { PolicyInformationSourceFactory } from \"@twin.org/rights-management-models\";\nimport {\n\tIdentityPolicyInformationSource,\n\tStaticPolicyInformationSource\n} from \"@twin.org/rights-management-plugins\";\nimport type { RightsManagementPolicyInformationSourceComponentConfig } from \"../models/config/rightsManagementPolicyInformationSourceComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { RightsManagementPolicyInformationSourceComponentType } from \"../models/types/rightsManagementPolicyInformationSourceComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the rights management policy information source 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 initialiseRightsManagementPolicyInformationSourceComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: RightsManagementPolicyInformationSourceComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof PolicyInformationSourceFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RightsManagementPolicyInformationSourceComponentType.Identity) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew IdentityPolicyInformationSource(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredLoggerType(\n\t\t\t\t\t\t\tnameof(IdentityPolicyInformationSource)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tidentityResolverComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"identityResolverComponent\"\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(IdentityPolicyInformationSource);\n\t} else if (instanceConfig.type === RightsManagementPolicyInformationSourceComponentType.Static) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticPolicyInformationSource(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredLoggerType(\n\t\t\t\t\t\t\tnameof(StaticPolicyInformationSource)\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(StaticPolicyInformationSource);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: PolicyInformationSourceFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"rightsManagementPolicyInformationSource.js","sourceRoot":"","sources":["../../../src/components/rights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mC,EAAE,EAAE,CACzD,IAAI,6BAA6B,CAChC,gBAAgB,CAAC,WAAW,CAC3B;YACC,oBAAoB,EAAE,UAAU,CAAC,uBAAuB,iCAEvD;SACD,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,gBAAgB,qCAAiD,CAAC;IACnE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,8BAA8B;KACvC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport 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 { PolicyInformationSourceFactory } from \"@twin.org/rights-management-models\";\nimport {\n\tIdentityPolicyInformationSource,\n\tIdentityProfilePolicyInformationSource,\n\tStaticPolicyInformationSource\n} from \"@twin.org/rights-management-plugins\";\nimport type { RightsManagementPolicyInformationSourceComponentConfig } from \"../models/config/rightsManagementPolicyInformationSourceComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { RightsManagementPolicyInformationSourceComponentType } from \"../models/types/rightsManagementPolicyInformationSourceComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the rights management policy information source 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 initialiseRightsManagementPolicyInformationSourceComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: RightsManagementPolicyInformationSourceComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof PolicyInformationSourceFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === RightsManagementPolicyInformationSourceComponentType.Identity) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew IdentityPolicyInformationSource(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredLoggerType(\n\t\t\t\t\t\t\tnameof(IdentityPolicyInformationSource)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tidentityResolverComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"identityResolverComponent\"\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(IdentityPolicyInformationSource);\n\t} else if (\n\t\tinstanceConfig.type === RightsManagementPolicyInformationSourceComponentType.IdentityProfile\n\t) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew IdentityProfilePolicyInformationSource(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredLoggerType(\n\t\t\t\t\t\t\tnameof(IdentityProfilePolicyInformationSource)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tidentityProfileComponentType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"identityProfileComponent\"\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(IdentityProfilePolicyInformationSource);\n\t} else if (instanceConfig.type === RightsManagementPolicyInformationSourceComponentType.Static) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew StaticPolicyInformationSource(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredLoggerType(\n\t\t\t\t\t\t\tnameof(StaticPolicyInformationSource)\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(StaticPolicyInformationSource);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: PolicyInformationSourceFactory\n\t};\n}\n"]}
@@ -8,7 +8,7 @@ import { EngineTypeHelper } from "../utils/engineTypeHelper.js";
8
8
  /**
9
9
  * Initialise a wallet connector.
10
10
  * @param engineCore The engine core.
11
- * @param context The context for the node.
11
+ * @param context The context for the engine.
12
12
  * @param instanceConfig The instance config.
13
13
  * @returns The instance created and the factory for it.
14
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../../src/components/wallet.ts"],"names":[],"mappings":"AASA,OAAO,EACN,4BAA4B,EAC5B,UAAU,IAAI,gBAAgB,EAE9B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAItE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACxC,UAAsC,EACtC,OAA0C,EAC1C,cAAqC;IAErC,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,mBAAmB,CAAC,IAAI,EAAE,CAAC;QACtD,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,MAAM,SAAS,GAAG,gBAAgB,CAAC,eAAe,CACjD,UAAU,CAAC,SAAS,EAAE,EACtB,WAAW,EACX,aAAa,CAAC,IAAI,CAClB,CAAC;YACF,OAAO,IAAI,mBAAmB,CAC7B,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,mBAAmB,EAAE,UAAU,CAAC,yBAAyB,CAAC,iBAAiB,CAAC;gBAC5E,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM;aAClC,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,GAAG,mBAAmB,CAAC,SAAS,CAAC;IAClD,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,mBAAmB,CAAC,aAAa,EAAE,CAAC;QACtE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,gBAAgB,EAAE,CAAC;YACnB,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,8BAA8B,mBAEpD,EAAE,CACF,CAAC;YACF,OAAO,IAAI,4BAA4B,CACtC,gBAAgB,CAAC,WAAW,CAC3B;gBACC,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,mBAAmB,EAAE,UAAU,CAAC,yBAAyB,CAAC,iBAAiB,CAAC;aAC5E,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,GAAG,4BAA4B,CAAC,SAAS,CAAC;IAC3D,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,sBAAsB;KAC/B,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof } from \"@twin.org/nameof\";\nimport {\n\tEntityStorageWalletConnector,\n\tinitSchema as initSchemaWallet,\n\ttype WalletAddress\n} from \"@twin.org/wallet-connector-entity-storage\";\nimport { IotaWalletConnector } from \"@twin.org/wallet-connector-iota\";\nimport { WalletConnectorFactory } from \"@twin.org/wallet-models\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DltConfig } from \"../models/config/dltConfig.js\";\nimport type { WalletConnectorConfig } from \"../models/config/walletConnectorConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DltConfigType } from \"../models/types/dltConfigType.js\";\nimport { WalletConnectorType } from \"../models/types/walletConnectorType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise a wallet connector.\n * @param engineCore The engine core.\n * @param context The context for the node.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseWalletConnector(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: WalletConnectorConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof WalletConnectorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === WalletConnectorType.Iota) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tconst dltConfig = EngineTypeHelper.getConfigOfType<DltConfig>(\n\t\t\t\tengineCore.getConfig(),\n\t\t\t\t\"dltConfig\",\n\t\t\t\tDltConfigType.Iota\n\t\t\t);\n\t\t\treturn new IotaWalletConnector(\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\tfaucetConnectorType: engineCore.getRegisteredInstanceType(\"faucetConnector\"),\n\t\t\t\t\t\tconfig: dltConfig?.options?.config\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 = IotaWalletConnector.NAMESPACE;\n\t} else if (instanceConfig.type === WalletConnectorType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaWallet();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.walletAddressEntityStorageType,\n\t\t\t\tnameof<WalletAddress>(),\n\t\t\t\t[]\n\t\t\t);\n\t\t\treturn new EntityStorageWalletConnector(\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\tfaucetConnectorType: engineCore.getRegisteredInstanceType(\"faucetConnector\")\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 = EntityStorageWalletConnector.NAMESPACE;\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: WalletConnectorFactory\n\t};\n}\n"]}
1
+ {"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../../src/components/wallet.ts"],"names":[],"mappings":"AASA,OAAO,EACN,4BAA4B,EAC5B,UAAU,IAAI,gBAAgB,EAE9B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAItE,OAAO,EAAE,aAAa,EAAE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AAE,UAAU,CAAC,yBAAyB,CAAC,iBAAiB,CAAC;aAC5E,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,GAAG,4BAA4B,CAAC,SAAS,CAAC;IAC3D,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,sBAAsB;KAC/B,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof } from \"@twin.org/nameof\";\nimport {\n\tEntityStorageWalletConnector,\n\tinitSchema as initSchemaWallet,\n\ttype WalletAddress\n} from \"@twin.org/wallet-connector-entity-storage\";\nimport { IotaWalletConnector } from \"@twin.org/wallet-connector-iota\";\nimport { WalletConnectorFactory } from \"@twin.org/wallet-models\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DltConfig } from \"../models/config/dltConfig.js\";\nimport type { WalletConnectorConfig } from \"../models/config/walletConnectorConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DltConfigType } from \"../models/types/dltConfigType.js\";\nimport { WalletConnectorType } from \"../models/types/walletConnectorType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise a wallet 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 initialiseWalletConnector(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: WalletConnectorConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof WalletConnectorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === WalletConnectorType.Iota) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tconst dltConfig = EngineTypeHelper.getConfigOfType<DltConfig>(\n\t\t\t\tengineCore.getConfig(),\n\t\t\t\t\"dltConfig\",\n\t\t\t\tDltConfigType.Iota\n\t\t\t);\n\t\t\treturn new IotaWalletConnector(\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\tfaucetConnectorType: engineCore.getRegisteredInstanceType(\"faucetConnector\"),\n\t\t\t\t\t\tconfig: dltConfig?.options?.config\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 = IotaWalletConnector.NAMESPACE;\n\t} else if (instanceConfig.type === WalletConnectorType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaWallet();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.walletAddressEntityStorageType,\n\t\t\t\tnameof<WalletAddress>(),\n\t\t\t\t[]\n\t\t\t);\n\t\t\treturn new EntityStorageWalletConnector(\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\tfaucetConnectorType: engineCore.getRegisteredInstanceType(\"faucetConnector\")\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 = EntityStorageWalletConnector.NAMESPACE;\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: WalletConnectorFactory\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IEngineConfig.js","sourceRoot":"","sources":["../../../src/models/IEngineConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCoreConfig, IEngineCoreTypeConfig } from \"@twin.org/engine-models\";\nimport type { AttestationComponentConfig } from \"./config/attestationComponentConfig.js\";\nimport type { AttestationConnectorConfig } from \"./config/attestationConnectorConfig.js\";\nimport type { AuditableItemGraphComponentConfig } from \"./config/auditableItemGraphComponentConfig.js\";\nimport type { AuditableItemStreamComponentConfig } from \"./config/auditableItemStreamComponentConfig.js\";\nimport type { AutomationActionConfig } from \"./config/automationActionConfig.js\";\nimport type { AutomationComponentConfig } from \"./config/automationComponentConfig.js\";\nimport type { BackgroundTaskComponentConfig } from \"./config/backgroundTaskComponentConfig.js\";\nimport type { BlobStorageComponentConfig } from \"./config/blobStorageComponentConfig.js\";\nimport type { BlobStorageConnectorConfig } from \"./config/blobStorageConnectorConfig.js\";\nimport type { ContextIdHandlerComponentConfig } from \"./config/contextIdHandlerComponentConfig.js\";\nimport type { DataConverterConnectorConfig } from \"./config/dataConverterConnectorConfig.js\";\nimport type { DataExtractorConnectorConfig } from \"./config/dataExtractorConnectorConfig.js\";\nimport type { DataProcessingComponentConfig } from \"./config/dataProcessingComponentConfig.js\";\nimport type { DataspaceControlPlaneComponentConfig } from \"./config/dataspaceControlPlaneComponentConfig.js\";\nimport type { DataspaceDataPlaneComponentConfig } from \"./config/dataspaceDataPlaneComponentConfig.js\";\nimport type { DltConfig } from \"./config/dltConfig.js\";\nimport type { DocumentManagementComponentConfig } from \"./config/documentManagementComponentConfig.js\";\nimport type { EntityStorageComponentConfig } from \"./config/entityStorageComponentConfig.js\";\nimport type { EntityStorageConnectorConfig } from \"./config/entityStorageConnectorConfig.js\";\nimport type { EventBusComponentConfig } from \"./config/eventBusComponentConfig.js\";\nimport type { EventBusConnectorConfig } from \"./config/eventBusConnectorConfig.js\";\nimport type { FaucetConnectorConfig } from \"./config/faucetConnectorConfig.js\";\nimport type { FederatedCatalogueComponentConfig } from \"./config/federatedCatalogueComponentConfig.js\";\nimport type { FederatedCatalogueFilterComponentConfig } from \"./config/federatedCatalogueFilterComponentConfig.js\";\nimport type { HealthComponentConfig } from \"./config/healthComponentConfig.js\";\nimport type { IdentityComponentConfig } from \"./config/identityComponentConfig.js\";\nimport type { IdentityConnectorConfig } from \"./config/identityConnectorConfig.js\";\nimport type { IdentityProfileComponentConfig } from \"./config/identityProfileComponentConfig.js\";\nimport type { IdentityProfileConnectorConfig } from \"./config/identityProfileConnectorConfig.js\";\nimport type { IdentityResolverComponentConfig } from \"./config/identityResolverComponentConfig.js\";\nimport type { IdentityResolverConnectorConfig } from \"./config/identityResolverConnectorConfig.js\";\nimport type { ImmutableProofComponentConfig } from \"./config/immutableProofComponentConfig.js\";\nimport type { LoggingComponentConfig } from \"./config/loggingComponentConfig.js\";\nimport type { LoggingConnectorConfig } from \"./config/loggingConnectorConfig.js\";\nimport type { MessagingAdminComponentConfig } from \"./config/messagingAdminComponentConfig.js\";\nimport type { MessagingComponentConfig } from \"./config/messagingComponentConfig.js\";\nimport type { MessagingEmailConnectorConfig } from \"./config/messagingEmailConnectorConfig.js\";\nimport type { MessagingPushNotificationConnectorConfig } from \"./config/messagingPushNotificationConnectorConfig.js\";\nimport type { MessagingSmsConnectorConfig } from \"./config/messagingSmsConnectorConfig.js\";\nimport type { MetricsCollectorComponentConfig } from \"./config/metricsCollectorComponentConfig.js\";\nimport type { MetricsProducerComponentConfig } from \"./config/metricsProducerComponentConfig.js\";\nimport type { NftComponentConfig } from \"./config/nftComponentConfig.js\";\nimport type { NftConnectorConfig } from \"./config/nftConnectorConfig.js\";\nimport type { NotarizationComponentConfig } from \"./config/notarizationComponentConfig.js\";\nimport type { NotarizationConnectorConfig } from \"./config/notarizationConnectorConfig.js\";\nimport type { PlatformComponentConfig } from \"./config/platformComponentConfig.js\";\nimport type { RightsManagementPapComponentConfig } from \"./config/rightsManagementPapComponentConfig.js\";\nimport type { RightsManagementPdpComponentConfig } from \"./config/rightsManagementPdpComponentConfig.js\";\nimport type { RightsManagementPepComponentConfig } from \"./config/rightsManagementPepComponentConfig.js\";\nimport type { RightsManagementPipComponentConfig } from \"./config/rightsManagementPipComponentConfig.js\";\nimport type { RightsManagementPmpComponentConfig } from \"./config/rightsManagementPmpComponentConfig.js\";\nimport type { RightsManagementPnapComponentConfig } from \"./config/rightsManagementPnapComponentConfig.js\";\nimport type { RightsManagementPnpComponentConfig } from \"./config/rightsManagementPnpComponentConfig.js\";\nimport type { RightsManagementPolicyArbiterComponentConfig } from \"./config/rightsManagementPolicyArbiterComponentConfig.js\";\nimport type { RightsManagementPolicyEnforcementProcessorComponentConfig } from \"./config/rightsManagementPolicyEnforcementProcessorComponentConfig.js\";\nimport type { RightsManagementPolicyExecutionActionComponentConfig } from \"./config/rightsManagementPolicyExecutionActionComponentConfig.js\";\nimport type { RightsManagementPolicyInformationSourceComponentConfig } from \"./config/rightsManagementPolicyInformationSourceComponentConfig.js\";\nimport type { RightsManagementPolicyNegotiatorComponentConfig } from \"./config/rightsManagementPolicyNegotiatorComponentConfig.js\";\nimport type { RightsManagementPolicyObligationEnforcerComponentConfig } from \"./config/rightsManagementPolicyObligationEnforcerComponentConfig.js\";\nimport type { RightsManagementPolicyRequesterComponentConfig } from \"./config/rightsManagementPolicyRequesterComponentConfig.js\";\nimport type { RightsManagementPxpComponentConfig } from \"./config/rightsManagementPxpComponentConfig.js\";\nimport type { SchemaVersionMigrationComponentConfig } from \"./config/schemaVersionMigrationComponentConfig.js\";\nimport type { TaskSchedulerComponentConfig } from \"./config/taskSchedulerComponentConfig.js\";\nimport type { TelemetryComponentConfig } from \"./config/telemetryComponentConfig.js\";\nimport type { TelemetryConnectorConfig } from \"./config/telemetryConnectorConfig.js\";\nimport type { TenantAdminComponentConfig } from \"./config/tenantAdminComponentConfig.js\";\nimport type { TrustComponentConfig } from \"./config/trustComponentConfig.js\";\nimport type { TrustGeneratorComponentConfig } from \"./config/trustGeneratorComponentConfig.js\";\nimport type { TrustVerifierComponentConfig } from \"./config/trustVerifierComponentConfig.js\";\nimport type { VaultConnectorConfig } from \"./config/vaultConnectorConfig.js\";\nimport type { WalletConnectorConfig } from \"./config/walletConnectorConfig.js\";\n\n/**\n * Extended engine core config with known types.\n */\nexport interface IEngineConfig extends IEngineCoreConfig {\n\t/**\n\t * The types to initialise in the engine.\n\t */\n\ttypes: {\n\t\t[type: string]: IEngineCoreTypeConfig[] | undefined;\n\n\t\t/**\n\t\t * Logging connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tloggingConnector?: IEngineCoreTypeConfig<LoggingConnectorConfig>[];\n\n\t\t/**\n\t\t * Logging component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tloggingComponent?: IEngineCoreTypeConfig<LoggingComponentConfig>[];\n\n\t\t/**\n\t\t * Entity storage connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tentityStorageConnector?: IEngineCoreTypeConfig<EntityStorageConnectorConfig>[];\n\n\t\t/**\n\t\t * Entity storage component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tentityStorageComponent?: IEngineCoreTypeConfig<EntityStorageComponentConfig>[];\n\n\t\t/**\n\t\t * Blob storage connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tblobStorageConnector?: IEngineCoreTypeConfig<BlobStorageConnectorConfig>[];\n\n\t\t/**\n\t\t * Blob storage component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tblobStorageComponent?: IEngineCoreTypeConfig<BlobStorageComponentConfig>[];\n\n\t\t/**\n\t\t * Telemetry connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttelemetryConnector?: IEngineCoreTypeConfig<TelemetryConnectorConfig>[];\n\n\t\t/**\n\t\t * Telemetry component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttelemetryComponent?: IEngineCoreTypeConfig<TelemetryComponentConfig>[];\n\n\t\t/**\n\t\t * Metrics producer component options. Creates the `MetricsProducerService` that orchestrates polling.\n\t\t */\n\t\tmetricsProducerComponent?: IEngineCoreTypeConfig<MetricsProducerComponentConfig>[];\n\n\t\t/**\n\t\t * Metrics collector options. Each entry registers a collector in `MetricsCollectorFactory`.\n\t\t */\n\t\tmetricsCollectorComponent?: IEngineCoreTypeConfig<MetricsCollectorComponentConfig>[];\n\n\t\t/**\n\t\t * Messaging email connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingEmailConnector?: IEngineCoreTypeConfig<MessagingEmailConnectorConfig>[];\n\n\t\t/**\n\t\t * Messaging SMS connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingSmsConnector?: IEngineCoreTypeConfig<MessagingSmsConnectorConfig>[];\n\n\t\t/**\n\t\t * Messaging push notification connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingPushNotificationConnector?: IEngineCoreTypeConfig<MessagingPushNotificationConnectorConfig>[];\n\n\t\t/**\n\t\t * Messaging admin component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingAdminComponent?: IEngineCoreTypeConfig<MessagingAdminComponentConfig>[];\n\n\t\t/**\n\t\t * Messaging component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingComponent?: IEngineCoreTypeConfig<MessagingComponentConfig>[];\n\n\t\t/**\n\t\t * Schema version migration component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tschemaVersionMigrationComponent?: IEngineCoreTypeConfig<SchemaVersionMigrationComponentConfig>[];\n\n\t\t/**\n\t\t * Background task component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tbackgroundTaskComponent?: IEngineCoreTypeConfig<BackgroundTaskComponentConfig>[];\n\n\t\t/**\n\t\t * Task scheduler component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttaskSchedulerComponent?: IEngineCoreTypeConfig<TaskSchedulerComponentConfig>[];\n\n\t\t/**\n\t\t * Event bus connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\teventBusConnector?: IEngineCoreTypeConfig<EventBusConnectorConfig>[];\n\n\t\t/**\n\t\t * Event bus component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\teventBusComponent?: IEngineCoreTypeConfig<EventBusComponentConfig>[];\n\n\t\t/**\n\t\t * Automation component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tautomationComponent?: IEngineCoreTypeConfig<AutomationComponentConfig>[];\n\n\t\t/**\n\t\t * Automation action options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tautomationAction?: IEngineCoreTypeConfig<AutomationActionConfig>[];\n\n\t\t/**\n\t\t * Health component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\thealthComponent?: IEngineCoreTypeConfig<HealthComponentConfig>[];\n\n\t\t/**\n\t\t * Vault connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tvaultConnector?: IEngineCoreTypeConfig<VaultConnectorConfig>[];\n\n\t\t/**\n\t\t * DLT options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdltConfig?: IEngineCoreTypeConfig<DltConfig>[];\n\n\t\t/**\n\t\t * Wallet connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\twalletConnector?: IEngineCoreTypeConfig<WalletConnectorConfig>[];\n\n\t\t/**\n\t\t * Immutable proof component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\timmutableProofComponent?: IEngineCoreTypeConfig<ImmutableProofComponentConfig>[];\n\n\t\t/**\n\t\t * Faucet connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tfaucetConnector?: IEngineCoreTypeConfig<FaucetConnectorConfig>[];\n\n\t\t/**\n\t\t * Identity connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityConnector?: IEngineCoreTypeConfig<IdentityConnectorConfig>[];\n\n\t\t/**\n\t\t * Identity component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityComponent?: IEngineCoreTypeConfig<IdentityComponentConfig>[];\n\n\t\t/**\n\t\t * Identity resolver connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityResolverConnector?: IEngineCoreTypeConfig<IdentityResolverConnectorConfig>[];\n\n\t\t/**\n\t\t * Identity resolver component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityResolverComponent?: IEngineCoreTypeConfig<IdentityResolverComponentConfig>[];\n\n\t\t/**\n\t\t * Identity profile connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityProfileConnector?: IEngineCoreTypeConfig<IdentityProfileConnectorConfig>[];\n\n\t\t/**\n\t\t * Identity profile component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityProfileComponent?: IEngineCoreTypeConfig<IdentityProfileComponentConfig>[];\n\n\t\t/**\n\t\t * NFT connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tnftConnector?: IEngineCoreTypeConfig<NftConnectorConfig>[];\n\n\t\t/**\n\t\t * NFT component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tnftComponent?: IEngineCoreTypeConfig<NftComponentConfig>[];\n\n\t\t/**\n\t\t * Notarization connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tnotarizationConnector?: IEngineCoreTypeConfig<NotarizationConnectorConfig>[];\n\n\t\t/**\n\t\t * Notarization component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tnotarizationComponent?: IEngineCoreTypeConfig<NotarizationComponentConfig>[];\n\n\t\t/**\n\t\t * Attestation connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tattestationConnector?: IEngineCoreTypeConfig<AttestationConnectorConfig>[];\n\n\t\t/**\n\t\t * Attestation component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tattestationComponent?: IEngineCoreTypeConfig<AttestationComponentConfig>[];\n\n\t\t/**\n\t\t * Auditable item graph component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauditableItemGraphComponent?: IEngineCoreTypeConfig<AuditableItemGraphComponentConfig>[];\n\n\t\t/**\n\t\t * Auditable item stream component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauditableItemStreamComponent?: IEngineCoreTypeConfig<AuditableItemStreamComponentConfig>[];\n\n\t\t/**\n\t\t * Data converter connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataConverterConnector?: IEngineCoreTypeConfig<DataConverterConnectorConfig>[];\n\n\t\t/**\n\t\t * Data extractor connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataExtractorConnector?: IEngineCoreTypeConfig<DataExtractorConnectorConfig>[];\n\n\t\t/**\n\t\t * Date processing options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataProcessingComponent?: IEngineCoreTypeConfig<DataProcessingComponentConfig>[];\n\n\t\t/**\n\t\t * Document management options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdocumentManagementComponent?: IEngineCoreTypeConfig<DocumentManagementComponentConfig>[];\n\n\t\t/**\n\t\t * Trust component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttrustComponent?: IEngineCoreTypeConfig<TrustComponentConfig>[];\n\n\t\t/**\n\t\t * Trust generator component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttrustGeneratorComponent?: IEngineCoreTypeConfig<TrustGeneratorComponentConfig>[];\n\n\t\t/**\n\t\t * Trust verifier component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttrustVerifierComponent?: IEngineCoreTypeConfig<TrustVerifierComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PAP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPapComponent?: IEngineCoreTypeConfig<RightsManagementPapComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PDP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPdpComponent?: IEngineCoreTypeConfig<RightsManagementPdpComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PEP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPepComponent?: IEngineCoreTypeConfig<RightsManagementPepComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PIP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPipComponent?: IEngineCoreTypeConfig<RightsManagementPipComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PMP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPmpComponent?: IEngineCoreTypeConfig<RightsManagementPmpComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PXP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPxpComponent?: IEngineCoreTypeConfig<RightsManagementPxpComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PNP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPnpComponent?: IEngineCoreTypeConfig<RightsManagementPnpComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PNAP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPnapComponent?: IEngineCoreTypeConfig<RightsManagementPnapComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy arbiter options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPolicyArbiterComponent?: IEngineCoreTypeConfig<RightsManagementPolicyArbiterComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy obligation enforcer options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyObligationEnforcerComponent?: IEngineCoreTypeConfig<RightsManagementPolicyObligationEnforcerComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy enforcement processor options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyEnforcementProcessorComponent?: IEngineCoreTypeConfig<RightsManagementPolicyEnforcementProcessorComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy execution action options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyExecutionActionComponent?: IEngineCoreTypeConfig<RightsManagementPolicyExecutionActionComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy information source options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyInformationSourceComponent?: IEngineCoreTypeConfig<RightsManagementPolicyInformationSourceComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy negotiator options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyNegotiatorComponent?: IEngineCoreTypeConfig<RightsManagementPolicyNegotiatorComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy requester options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyRequesterComponent?: IEngineCoreTypeConfig<RightsManagementPolicyRequesterComponentConfig>[];\n\n\t\t/**\n\t\t * Federated catalogue options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tfederatedCatalogueComponent?: IEngineCoreTypeConfig<FederatedCatalogueComponentConfig>[];\n\n\t\t/**\n\t\t * Federated catalogue filter options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tfederatedCatalogueFilterComponent?: IEngineCoreTypeConfig<FederatedCatalogueFilterComponentConfig>[];\n\n\t\t/**\n\t\t * Dataspace control plane component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataspaceControlPlaneComponent?: IEngineCoreTypeConfig<DataspaceControlPlaneComponentConfig>[];\n\n\t\t/**\n\t\t * Dataspace data plane component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataspaceDataPlaneComponent?: IEngineCoreTypeConfig<DataspaceDataPlaneComponentConfig>[];\n\n\t\t/**\n\t\t * Platform component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tplatformComponent?: IEngineCoreTypeConfig<PlatformComponentConfig>[];\n\n\t\t/**\n\t\t * Tenant admin component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttenantAdminComponent?: IEngineCoreTypeConfig<TenantAdminComponentConfig>[];\n\n\t\t/**\n\t\t * Context Id Handler component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tcontextIdHandlerComponent?: IEngineCoreTypeConfig<ContextIdHandlerComponentConfig>[];\n\t};\n}\n"]}
1
+ {"version":3,"file":"IEngineConfig.js","sourceRoot":"","sources":["../../../src/models/IEngineConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCoreConfig, IEngineCoreTypeConfig } from \"@twin.org/engine-models\";\nimport type { AttestationComponentConfig } from \"./config/attestationComponentConfig.js\";\nimport type { AttestationConnectorConfig } from \"./config/attestationConnectorConfig.js\";\nimport type { AuditableItemGraphComponentConfig } from \"./config/auditableItemGraphComponentConfig.js\";\nimport type { AuditableItemStreamComponentConfig } from \"./config/auditableItemStreamComponentConfig.js\";\nimport type { AutomationActionConfig } from \"./config/automationActionConfig.js\";\nimport type { AutomationComponentConfig } from \"./config/automationComponentConfig.js\";\nimport type { BackgroundTaskComponentConfig } from \"./config/backgroundTaskComponentConfig.js\";\nimport type { BlobStorageComponentConfig } from \"./config/blobStorageComponentConfig.js\";\nimport type { BlobStorageConnectorConfig } from \"./config/blobStorageConnectorConfig.js\";\nimport type { ContextIdHandlerComponentConfig } from \"./config/contextIdHandlerComponentConfig.js\";\nimport type { DataConverterConnectorConfig } from \"./config/dataConverterConnectorConfig.js\";\nimport type { DataExtractorConnectorConfig } from \"./config/dataExtractorConnectorConfig.js\";\nimport type { DataProcessingComponentConfig } from \"./config/dataProcessingComponentConfig.js\";\nimport type { DataspaceControlPlaneComponentConfig } from \"./config/dataspaceControlPlaneComponentConfig.js\";\nimport type { DataspaceDataPlaneComponentConfig } from \"./config/dataspaceDataPlaneComponentConfig.js\";\nimport type { DltConfig } from \"./config/dltConfig.js\";\nimport type { DocumentManagementComponentConfig } from \"./config/documentManagementComponentConfig.js\";\nimport type { EntityStorageComponentConfig } from \"./config/entityStorageComponentConfig.js\";\nimport type { EntityStorageConnectorConfig } from \"./config/entityStorageConnectorConfig.js\";\nimport type { EventBusComponentConfig } from \"./config/eventBusComponentConfig.js\";\nimport type { EventBusConnectorConfig } from \"./config/eventBusConnectorConfig.js\";\nimport type { FaucetConnectorConfig } from \"./config/faucetConnectorConfig.js\";\nimport type { FederatedCatalogueComponentConfig } from \"./config/federatedCatalogueComponentConfig.js\";\nimport type { FederatedCatalogueFilterComponentConfig } from \"./config/federatedCatalogueFilterComponentConfig.js\";\nimport type { HealthComponentConfig } from \"./config/healthComponentConfig.js\";\nimport type { IdentityComponentConfig } from \"./config/identityComponentConfig.js\";\nimport type { IdentityConnectorConfig } from \"./config/identityConnectorConfig.js\";\nimport type { IdentityProfileComponentConfig } from \"./config/identityProfileComponentConfig.js\";\nimport type { IdentityProfileConnectorConfig } from \"./config/identityProfileConnectorConfig.js\";\nimport type { IdentityResolverComponentConfig } from \"./config/identityResolverComponentConfig.js\";\nimport type { IdentityResolverConnectorConfig } from \"./config/identityResolverConnectorConfig.js\";\nimport type { ImmutableProofComponentConfig } from \"./config/immutableProofComponentConfig.js\";\nimport type { LoggingComponentConfig } from \"./config/loggingComponentConfig.js\";\nimport type { LoggingConnectorConfig } from \"./config/loggingConnectorConfig.js\";\nimport type { MessagingAdminComponentConfig } from \"./config/messagingAdminComponentConfig.js\";\nimport type { MessagingComponentConfig } from \"./config/messagingComponentConfig.js\";\nimport type { MessagingEmailConnectorConfig } from \"./config/messagingEmailConnectorConfig.js\";\nimport type { MessagingPushNotificationConnectorConfig } from \"./config/messagingPushNotificationConnectorConfig.js\";\nimport type { MessagingSmsConnectorConfig } from \"./config/messagingSmsConnectorConfig.js\";\nimport type { MetricsCollectorComponentConfig } from \"./config/metricsCollectorComponentConfig.js\";\nimport type { MetricsProducerComponentConfig } from \"./config/metricsProducerComponentConfig.js\";\nimport type { NftComponentConfig } from \"./config/nftComponentConfig.js\";\nimport type { NftConnectorConfig } from \"./config/nftConnectorConfig.js\";\nimport type { NotarizationComponentConfig } from \"./config/notarizationComponentConfig.js\";\nimport type { NotarizationConnectorConfig } from \"./config/notarizationConnectorConfig.js\";\nimport type { PlatformComponentConfig } from \"./config/platformComponentConfig.js\";\nimport type { RightsManagementPapComponentConfig } from \"./config/rightsManagementPapComponentConfig.js\";\nimport type { RightsManagementPdpComponentConfig } from \"./config/rightsManagementPdpComponentConfig.js\";\nimport type { RightsManagementPepComponentConfig } from \"./config/rightsManagementPepComponentConfig.js\";\nimport type { RightsManagementPipComponentConfig } from \"./config/rightsManagementPipComponentConfig.js\";\nimport type { RightsManagementPmpComponentConfig } from \"./config/rightsManagementPmpComponentConfig.js\";\nimport type { RightsManagementPnapComponentConfig } from \"./config/rightsManagementPnapComponentConfig.js\";\nimport type { RightsManagementPnpComponentConfig } from \"./config/rightsManagementPnpComponentConfig.js\";\nimport type { RightsManagementPolicyArbiterComponentConfig } from \"./config/rightsManagementPolicyArbiterComponentConfig.js\";\nimport type { RightsManagementPolicyEnforcementProcessorComponentConfig } from \"./config/rightsManagementPolicyEnforcementProcessorComponentConfig.js\";\nimport type { RightsManagementPolicyExecutionActionComponentConfig } from \"./config/rightsManagementPolicyExecutionActionComponentConfig.js\";\nimport type { RightsManagementPolicyInformationSourceComponentConfig } from \"./config/rightsManagementPolicyInformationSourceComponentConfig.js\";\nimport type { RightsManagementPolicyNegotiatorComponentConfig } from \"./config/rightsManagementPolicyNegotiatorComponentConfig.js\";\nimport type { RightsManagementPolicyObligationEnforcerComponentConfig } from \"./config/rightsManagementPolicyObligationEnforcerComponentConfig.js\";\nimport type { RightsManagementPolicyRequesterComponentConfig } from \"./config/rightsManagementPolicyRequesterComponentConfig.js\";\nimport type { RightsManagementPxpComponentConfig } from \"./config/rightsManagementPxpComponentConfig.js\";\nimport type { SchemaVersionMigrationComponentConfig } from \"./config/schemaVersionMigrationComponentConfig.js\";\nimport type { TaskSchedulerComponentConfig } from \"./config/taskSchedulerComponentConfig.js\";\nimport type { TelemetryComponentConfig } from \"./config/telemetryComponentConfig.js\";\nimport type { TelemetryConnectorConfig } from \"./config/telemetryConnectorConfig.js\";\nimport type { TenantAdminComponentConfig } from \"./config/tenantAdminComponentConfig.js\";\nimport type { TrustComponentConfig } from \"./config/trustComponentConfig.js\";\nimport type { TrustGeneratorComponentConfig } from \"./config/trustGeneratorComponentConfig.js\";\nimport type { TrustVerifierComponentConfig } from \"./config/trustVerifierComponentConfig.js\";\nimport type { VaultConnectorConfig } from \"./config/vaultConnectorConfig.js\";\nimport type { WalletConnectorConfig } from \"./config/walletConnectorConfig.js\";\n\n/**\n * Extended engine core config with known types.\n */\nexport interface IEngineConfig extends IEngineCoreConfig {\n\t/**\n\t * The types to initialise in the engine.\n\t */\n\ttypes: {\n\t\t[type: string]: IEngineCoreTypeConfig[] | undefined;\n\n\t\t/**\n\t\t * Logging connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tloggingConnector?: IEngineCoreTypeConfig<LoggingConnectorConfig>[];\n\n\t\t/**\n\t\t * Logging component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tloggingComponent?: IEngineCoreTypeConfig<LoggingComponentConfig>[];\n\n\t\t/**\n\t\t * Entity storage connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tentityStorageConnector?: IEngineCoreTypeConfig<EntityStorageConnectorConfig>[];\n\n\t\t/**\n\t\t * Entity storage component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tentityStorageComponent?: IEngineCoreTypeConfig<EntityStorageComponentConfig>[];\n\n\t\t/**\n\t\t * Blob storage connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tblobStorageConnector?: IEngineCoreTypeConfig<BlobStorageConnectorConfig>[];\n\n\t\t/**\n\t\t * Blob storage component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tblobStorageComponent?: IEngineCoreTypeConfig<BlobStorageComponentConfig>[];\n\n\t\t/**\n\t\t * Telemetry connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttelemetryConnector?: IEngineCoreTypeConfig<TelemetryConnectorConfig>[];\n\n\t\t/**\n\t\t * Telemetry component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttelemetryComponent?: IEngineCoreTypeConfig<TelemetryComponentConfig>[];\n\n\t\t/**\n\t\t * Metrics producer component options. Creates the `MetricsProducerService` that orchestrates polling.\n\t\t */\n\t\tmetricsProducerComponent?: IEngineCoreTypeConfig<MetricsProducerComponentConfig>[];\n\n\t\t/**\n\t\t * Metrics collector options. Each entry registers a collector in `MetricsCollectorFactory`.\n\t\t */\n\t\tmetricsCollectorComponent?: IEngineCoreTypeConfig<MetricsCollectorComponentConfig>[];\n\n\t\t/**\n\t\t * Messaging email connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingEmailConnector?: IEngineCoreTypeConfig<MessagingEmailConnectorConfig>[];\n\n\t\t/**\n\t\t * Messaging SMS connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingSmsConnector?: IEngineCoreTypeConfig<MessagingSmsConnectorConfig>[];\n\n\t\t/**\n\t\t * Messaging push notification connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingPushNotificationConnector?: IEngineCoreTypeConfig<MessagingPushNotificationConnectorConfig>[];\n\n\t\t/**\n\t\t * Messaging admin component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingAdminComponent?: IEngineCoreTypeConfig<MessagingAdminComponentConfig>[];\n\n\t\t/**\n\t\t * Messaging component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tmessagingComponent?: IEngineCoreTypeConfig<MessagingComponentConfig>[];\n\n\t\t/**\n\t\t * Schema version migration component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tschemaVersionMigrationComponent?: IEngineCoreTypeConfig<SchemaVersionMigrationComponentConfig>[];\n\n\t\t/**\n\t\t * Background task component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tbackgroundTaskComponent?: IEngineCoreTypeConfig<BackgroundTaskComponentConfig>[];\n\n\t\t/**\n\t\t * Task scheduler component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttaskSchedulerComponent?: IEngineCoreTypeConfig<TaskSchedulerComponentConfig>[];\n\n\t\t/**\n\t\t * Event bus connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\teventBusConnector?: IEngineCoreTypeConfig<EventBusConnectorConfig>[];\n\n\t\t/**\n\t\t * Event bus component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\teventBusComponent?: IEngineCoreTypeConfig<EventBusComponentConfig>[];\n\n\t\t/**\n\t\t * Automation component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tautomationComponent?: IEngineCoreTypeConfig<AutomationComponentConfig>[];\n\n\t\t/**\n\t\t * Automation action options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tautomationAction?: IEngineCoreTypeConfig<AutomationActionConfig>[];\n\n\t\t/**\n\t\t * Health component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\thealthComponent?: IEngineCoreTypeConfig<HealthComponentConfig>[];\n\n\t\t/**\n\t\t * Vault connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tvaultConnector?: IEngineCoreTypeConfig<VaultConnectorConfig>[];\n\n\t\t/**\n\t\t * DLT options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdltConfig?: IEngineCoreTypeConfig<DltConfig>[];\n\n\t\t/**\n\t\t * Wallet connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\twalletConnector?: IEngineCoreTypeConfig<WalletConnectorConfig>[];\n\n\t\t/**\n\t\t * Immutable proof component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\timmutableProofComponent?: IEngineCoreTypeConfig<ImmutableProofComponentConfig>[];\n\n\t\t/**\n\t\t * Faucet connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tfaucetConnector?: IEngineCoreTypeConfig<FaucetConnectorConfig>[];\n\n\t\t/**\n\t\t * Identity connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityConnector?: IEngineCoreTypeConfig<IdentityConnectorConfig>[];\n\n\t\t/**\n\t\t * Identity component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityComponent?: IEngineCoreTypeConfig<IdentityComponentConfig>[];\n\n\t\t/**\n\t\t * Identity resolver connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityResolverConnector?: IEngineCoreTypeConfig<IdentityResolverConnectorConfig>[];\n\n\t\t/**\n\t\t * Identity resolver component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityResolverComponent?: IEngineCoreTypeConfig<IdentityResolverComponentConfig>[];\n\n\t\t/**\n\t\t * Identity profile connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityProfileConnector?: IEngineCoreTypeConfig<IdentityProfileConnectorConfig>[];\n\n\t\t/**\n\t\t * Identity profile component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tidentityProfileComponent?: IEngineCoreTypeConfig<IdentityProfileComponentConfig>[];\n\n\t\t/**\n\t\t * NFT connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tnftConnector?: IEngineCoreTypeConfig<NftConnectorConfig>[];\n\n\t\t/**\n\t\t * NFT component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tnftComponent?: IEngineCoreTypeConfig<NftComponentConfig>[];\n\n\t\t/**\n\t\t * Notarization connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tnotarizationConnector?: IEngineCoreTypeConfig<NotarizationConnectorConfig>[];\n\n\t\t/**\n\t\t * Notarization component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tnotarizationComponent?: IEngineCoreTypeConfig<NotarizationComponentConfig>[];\n\n\t\t/**\n\t\t * Attestation connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tattestationConnector?: IEngineCoreTypeConfig<AttestationConnectorConfig>[];\n\n\t\t/**\n\t\t * Attestation component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tattestationComponent?: IEngineCoreTypeConfig<AttestationComponentConfig>[];\n\n\t\t/**\n\t\t * Auditable item graph component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauditableItemGraphComponent?: IEngineCoreTypeConfig<AuditableItemGraphComponentConfig>[];\n\n\t\t/**\n\t\t * Auditable item stream component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tauditableItemStreamComponent?: IEngineCoreTypeConfig<AuditableItemStreamComponentConfig>[];\n\n\t\t/**\n\t\t * Data converter connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataConverterConnector?: IEngineCoreTypeConfig<DataConverterConnectorConfig>[];\n\n\t\t/**\n\t\t * Data extractor connector options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataExtractorConnector?: IEngineCoreTypeConfig<DataExtractorConnectorConfig>[];\n\n\t\t/**\n\t\t * Data processing component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataProcessingComponent?: IEngineCoreTypeConfig<DataProcessingComponentConfig>[];\n\n\t\t/**\n\t\t * Document management options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdocumentManagementComponent?: IEngineCoreTypeConfig<DocumentManagementComponentConfig>[];\n\n\t\t/**\n\t\t * Trust component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttrustComponent?: IEngineCoreTypeConfig<TrustComponentConfig>[];\n\n\t\t/**\n\t\t * Trust generator component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttrustGeneratorComponent?: IEngineCoreTypeConfig<TrustGeneratorComponentConfig>[];\n\n\t\t/**\n\t\t * Trust verifier component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttrustVerifierComponent?: IEngineCoreTypeConfig<TrustVerifierComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PAP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPapComponent?: IEngineCoreTypeConfig<RightsManagementPapComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PDP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPdpComponent?: IEngineCoreTypeConfig<RightsManagementPdpComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PEP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPepComponent?: IEngineCoreTypeConfig<RightsManagementPepComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PIP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPipComponent?: IEngineCoreTypeConfig<RightsManagementPipComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PMP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPmpComponent?: IEngineCoreTypeConfig<RightsManagementPmpComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PXP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPxpComponent?: IEngineCoreTypeConfig<RightsManagementPxpComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PNP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPnpComponent?: IEngineCoreTypeConfig<RightsManagementPnpComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management PNAP options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPnapComponent?: IEngineCoreTypeConfig<RightsManagementPnapComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy arbiter options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\trightsManagementPolicyArbiterComponent?: IEngineCoreTypeConfig<RightsManagementPolicyArbiterComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy obligation enforcer options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyObligationEnforcerComponent?: IEngineCoreTypeConfig<RightsManagementPolicyObligationEnforcerComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy enforcement processor options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyEnforcementProcessorComponent?: IEngineCoreTypeConfig<RightsManagementPolicyEnforcementProcessorComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy execution action options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyExecutionActionComponent?: IEngineCoreTypeConfig<RightsManagementPolicyExecutionActionComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy information source options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyInformationSourceComponent?: IEngineCoreTypeConfig<RightsManagementPolicyInformationSourceComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy negotiator options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyNegotiatorComponent?: IEngineCoreTypeConfig<RightsManagementPolicyNegotiatorComponentConfig>[];\n\n\t\t/**\n\t\t * Rights management policy requester options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\t// eslint-disable-next-line max-len\n\t\trightsManagementPolicyRequesterComponent?: IEngineCoreTypeConfig<RightsManagementPolicyRequesterComponentConfig>[];\n\n\t\t/**\n\t\t * Federated catalogue options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tfederatedCatalogueComponent?: IEngineCoreTypeConfig<FederatedCatalogueComponentConfig>[];\n\n\t\t/**\n\t\t * Federated catalogue filter options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tfederatedCatalogueFilterComponent?: IEngineCoreTypeConfig<FederatedCatalogueFilterComponentConfig>[];\n\n\t\t/**\n\t\t * Dataspace control plane component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataspaceControlPlaneComponent?: IEngineCoreTypeConfig<DataspaceControlPlaneComponentConfig>[];\n\n\t\t/**\n\t\t * Dataspace data plane component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tdataspaceDataPlaneComponent?: IEngineCoreTypeConfig<DataspaceDataPlaneComponentConfig>[];\n\n\t\t/**\n\t\t * Platform component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tplatformComponent?: IEngineCoreTypeConfig<PlatformComponentConfig>[];\n\n\t\t/**\n\t\t * Tenant admin component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\ttenantAdminComponent?: IEngineCoreTypeConfig<TenantAdminComponentConfig>[];\n\n\t\t/**\n\t\t * Context Id Handler component options which can be overridden by individual components by specifying types other than default.\n\t\t */\n\t\tcontextIdHandlerComponent?: IEngineCoreTypeConfig<ContextIdHandlerComponentConfig>[];\n\t};\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"entityStorageConnectorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/entityStorageConnectorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ICosmosDbEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-cosmosdb\";\nimport type { IDynamoDbEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-dynamodb\";\nimport type { IFileEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-file\";\nimport type { IFirestoreEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-gcp-firestore\";\nimport type { IMongoDbEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-mongodb\";\nimport type { IMySqlEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-mysql\";\nimport type { IPostgreSqlEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-postgresql\";\nimport type { IScyllaDBTableConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-scylladb\";\nimport type { EntityStorageConnectorType } from \"../types/entityStorageConnectorType.js\";\n\n/**\n * Entity storage connector config types.\n */\nexport type EntityStorageConnectorConfig =\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.File;\n\t\t\toptions: Omit<IFileEntityStorageConnectorConstructorOptions, \"entitySchema\"> & {\n\t\t\t\tfolderPrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.Memory;\n\t\t\toptions?: never;\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.AwsDynamoDb;\n\t\t\toptions: Omit<\n\t\t\t\tIDynamoDbEntityStorageConnectorConstructorOptions,\n\t\t\t\t\"entitySchema\" | \"config\"\n\t\t\t> & {\n\t\t\t\tconfig: Omit<IDynamoDbEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.AzureCosmosDb;\n\t\t\toptions: Omit<\n\t\t\t\tICosmosDbEntityStorageConnectorConstructorOptions,\n\t\t\t\t\"entitySchema\" | \"config\"\n\t\t\t> & {\n\t\t\t\tconfig: Omit<ICosmosDbEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.GcpFirestoreDb;\n\t\t\toptions: Omit<\n\t\t\t\tIFirestoreEntityStorageConnectorConstructorOptions,\n\t\t\t\t\"entitySchema\" | \"config\"\n\t\t\t> & {\n\t\t\t\tconfig: Omit<IFirestoreEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.ScyllaDb;\n\t\t\toptions: Omit<IScyllaDBTableConnectorConstructorOptions, \"entitySchema\" | \"config\"> & {\n\t\t\t\tconfig: Omit<IScyllaDBTableConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.MySqlDb;\n\t\t\toptions: Omit<IMySqlEntityStorageConnectorConstructorOptions, \"entitySchema\" | \"config\"> & {\n\t\t\t\tconfig: Omit<IMySqlEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.MongoDb;\n\t\t\toptions: Omit<IMongoDbEntityStorageConnectorConstructorOptions, \"entitySchema\" | \"config\"> & {\n\t\t\t\tconfig: Omit<IMongoDbEntityStorageConnectorConstructorOptions[\"config\"], \"collection\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.PostgreSql;\n\t\t\toptions: Omit<\n\t\t\t\tIPostgreSqlEntityStorageConnectorConstructorOptions,\n\t\t\t\t\"entitySchema\" | \"config\"\n\t\t\t> & {\n\t\t\t\tconfig: Omit<IPostgreSqlEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t };\n"]}
1
+ {"version":3,"file":"entityStorageConnectorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/entityStorageConnectorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ICosmosDbEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-cosmosdb\";\nimport type { IDynamoDbEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-dynamodb\";\nimport type { IFileEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-file\";\nimport type { IFirestoreEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-gcp-firestore\";\nimport type { IMemoryEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-memory\";\nimport type { IMongoDbEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-mongodb\";\nimport type { IMySqlEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-mysql\";\nimport type { IPostgreSqlEntityStorageConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-postgresql\";\nimport type { IScyllaDBTableConnectorConstructorOptions } from \"@twin.org/entity-storage-connector-scylladb\";\nimport type { EntityStorageConnectorType } from \"../types/entityStorageConnectorType.js\";\n\n/**\n * Entity storage connector config types.\n */\nexport type EntityStorageConnectorConfig =\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.File;\n\t\t\toptions: Omit<IFileEntityStorageConnectorConstructorOptions, \"entitySchema\"> & {\n\t\t\t\tfolderPrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.Memory;\n\t\t\toptions: Omit<IMemoryEntityStorageConnectorConstructorOptions, \"entitySchema\" | \"config\"> & {\n\t\t\t\tconfig?: Omit<IMemoryEntityStorageConnectorConstructorOptions[\"config\"], \"storageKey\">;\n\t\t\t\tstoragePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.AwsDynamoDb;\n\t\t\toptions: Omit<\n\t\t\t\tIDynamoDbEntityStorageConnectorConstructorOptions,\n\t\t\t\t\"entitySchema\" | \"config\"\n\t\t\t> & {\n\t\t\t\tconfig: Omit<IDynamoDbEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.AzureCosmosDb;\n\t\t\toptions: Omit<\n\t\t\t\tICosmosDbEntityStorageConnectorConstructorOptions,\n\t\t\t\t\"entitySchema\" | \"config\"\n\t\t\t> & {\n\t\t\t\tconfig: Omit<ICosmosDbEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.GcpFirestoreDb;\n\t\t\toptions: Omit<\n\t\t\t\tIFirestoreEntityStorageConnectorConstructorOptions,\n\t\t\t\t\"entitySchema\" | \"config\"\n\t\t\t> & {\n\t\t\t\tconfig: Omit<IFirestoreEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.ScyllaDb;\n\t\t\toptions: Omit<IScyllaDBTableConnectorConstructorOptions, \"entitySchema\" | \"config\"> & {\n\t\t\t\tconfig: Omit<IScyllaDBTableConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.MySqlDb;\n\t\t\toptions: Omit<IMySqlEntityStorageConnectorConstructorOptions, \"entitySchema\" | \"config\"> & {\n\t\t\t\tconfig: Omit<IMySqlEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.MongoDb;\n\t\t\toptions: Omit<IMongoDbEntityStorageConnectorConstructorOptions, \"entitySchema\" | \"config\"> & {\n\t\t\t\tconfig: Omit<IMongoDbEntityStorageConnectorConstructorOptions[\"config\"], \"collection\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t }\n\t| {\n\t\t\ttype: typeof EntityStorageConnectorType.PostgreSql;\n\t\t\toptions: Omit<\n\t\t\t\tIPostgreSqlEntityStorageConnectorConstructorOptions,\n\t\t\t\t\"entitySchema\" | \"config\"\n\t\t\t> & {\n\t\t\t\tconfig: Omit<IPostgreSqlEntityStorageConnectorConstructorOptions[\"config\"], \"tableName\">;\n\t\t\t\ttablePrefix?: string;\n\t\t\t};\n\t };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rightsManagementPolicyInformationSourceComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/rightsManagementPolicyInformationSourceComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tIIdentityPolicyInformationSourceConstructorOptions,\n\tIStaticPolicyInformationSourceConstructorOptions\n} from \"@twin.org/rights-management-plugins\";\nimport type { RightsManagementPolicyInformationSourceComponentType } from \"../types/rightsManagementPolicyInformationSourceComponentType.js\";\n\n/**\n * Rights management policy information source component config types.\n */\nexport type RightsManagementPolicyInformationSourceComponentConfig =\n\t| {\n\t\t\ttype: typeof RightsManagementPolicyInformationSourceComponentType.Identity;\n\t\t\toptions?: IIdentityPolicyInformationSourceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RightsManagementPolicyInformationSourceComponentType.Static;\n\t\t\toptions?: IStaticPolicyInformationSourceConstructorOptions;\n\t };\n"]}
1
+ {"version":3,"file":"rightsManagementPolicyInformationSourceComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/rightsManagementPolicyInformationSourceComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type {\n\tIIdentityPolicyInformationSourceConstructorOptions,\n\tIIdentityProfilePolicyInformationSourceConstructorOptions,\n\tIStaticPolicyInformationSourceConstructorOptions\n} from \"@twin.org/rights-management-plugins\";\nimport type { RightsManagementPolicyInformationSourceComponentType } from \"../types/rightsManagementPolicyInformationSourceComponentType.js\";\n\n/**\n * Rights management policy information source component config types.\n */\nexport type RightsManagementPolicyInformationSourceComponentConfig =\n\t| {\n\t\t\ttype: typeof RightsManagementPolicyInformationSourceComponentType.Identity;\n\t\t\toptions?: IIdentityPolicyInformationSourceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RightsManagementPolicyInformationSourceComponentType.IdentityProfile;\n\t\t\toptions?: IIdentityProfilePolicyInformationSourceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof RightsManagementPolicyInformationSourceComponentType.Static;\n\t\t\toptions?: IStaticPolicyInformationSourceConstructorOptions;\n\t };\n"]}
@@ -6,7 +6,7 @@
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
7
  export const EntityStorageConnectorType = {
8
8
  /**
9
- * Use storage.
9
+ * File storage.
10
10
  */
11
11
  File: "file",
12
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"entityStorageConnectorType.js","sourceRoot":"","sources":["../../../../src/models/types/entityStorageConnectorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,WAAW,EAAE,cAAc;IAE3B;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,cAAc,EAAE,iBAAiB;IAEjC;;OAEG;IACH,OAAO,EAAE,OAAO;IAEhB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Entity storage connector types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const EntityStorageConnectorType = {\n\t/**\n\t * Use storage.\n\t */\n\tFile: \"file\",\n\n\t/**\n\t * Memory.\n\t */\n\tMemory: \"memory\",\n\n\t/**\n\t * ScyllaDb.\n\t */\n\tScyllaDb: \"scylladb\",\n\n\t/**\n\t * AWS DynamoDB.\n\t */\n\tAwsDynamoDb: \"aws-dynamodb\",\n\n\t/**\n\t * Azure CosmosDB.\n\t */\n\tAzureCosmosDb: \"azure-cosmosdb\",\n\n\t/**\n\t * GCP Firestore.\n\t */\n\tGcpFirestoreDb: \"gcp-firestoredb\",\n\n\t/**\n\t * MySqlDb.\n\t */\n\tMySqlDb: \"mysql\",\n\n\t/**\n\t * MongoDb.\n\t */\n\tMongoDb: \"mongodb\",\n\n\t/**\n\t * Postgre SQL.\n\t */\n\tPostgreSql: \"postgresql\"\n} as const;\n\n/**\n * Entity storage connector types.\n */\nexport type EntityStorageConnectorType =\n\t(typeof EntityStorageConnectorType)[keyof typeof EntityStorageConnectorType];\n"]}
1
+ {"version":3,"file":"entityStorageConnectorType.js","sourceRoot":"","sources":["../../../../src/models/types/entityStorageConnectorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,WAAW,EAAE,cAAc;IAE3B;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,cAAc,EAAE,iBAAiB;IAEjC;;OAEG;IACH,OAAO,EAAE,OAAO;IAEhB;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Entity storage connector types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const EntityStorageConnectorType = {\n\t/**\n\t * File storage.\n\t */\n\tFile: \"file\",\n\n\t/**\n\t * Memory.\n\t */\n\tMemory: \"memory\",\n\n\t/**\n\t * ScyllaDb.\n\t */\n\tScyllaDb: \"scylladb\",\n\n\t/**\n\t * AWS DynamoDB.\n\t */\n\tAwsDynamoDb: \"aws-dynamodb\",\n\n\t/**\n\t * Azure CosmosDB.\n\t */\n\tAzureCosmosDb: \"azure-cosmosdb\",\n\n\t/**\n\t * GCP Firestore.\n\t */\n\tGcpFirestoreDb: \"gcp-firestoredb\",\n\n\t/**\n\t * MySqlDb.\n\t */\n\tMySqlDb: \"mysql\",\n\n\t/**\n\t * MongoDb.\n\t */\n\tMongoDb: \"mongodb\",\n\n\t/**\n\t * Postgre SQL.\n\t */\n\tPostgreSql: \"postgresql\"\n} as const;\n\n/**\n * Entity storage connector types.\n */\nexport type EntityStorageConnectorType =\n\t(typeof EntityStorageConnectorType)[keyof typeof EntityStorageConnectorType];\n"]}
@@ -9,6 +9,10 @@ export const RightsManagementPolicyInformationSourceComponentType = {
9
9
  * Identity.
10
10
  */
11
11
  Identity: "identity",
12
+ /**
13
+ * Identity Profile.
14
+ */
15
+ IdentityProfile: "identity-profile",
12
16
  /**
13
17
  * Static.
14
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"rightsManagementPolicyInformationSourceComponentType.js","sourceRoot":"","sources":["../../../../src/models/types/rightsManagementPolicyInformationSourceComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oDAAoD,GAAG;IACnE;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,MAAM,EAAE,QAAQ;CACP,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Rights management Policy Information Source component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const RightsManagementPolicyInformationSourceComponentType = {\n\t/**\n\t * Identity.\n\t */\n\tIdentity: \"identity\",\n\n\t/**\n\t * Static.\n\t */\n\tStatic: \"static\"\n} as const;\n\n/**\n * Rights management Policy Information Source component types.\n */\nexport type RightsManagementPolicyInformationSourceComponentType =\n\t// eslint-disable-next-line max-len\n\t(typeof RightsManagementPolicyInformationSourceComponentType)[keyof typeof RightsManagementPolicyInformationSourceComponentType];\n"]}
1
+ {"version":3,"file":"rightsManagementPolicyInformationSourceComponentType.js","sourceRoot":"","sources":["../../../../src/models/types/rightsManagementPolicyInformationSourceComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oDAAoD,GAAG;IACnE;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,eAAe,EAAE,kBAAkB;IAEnC;;OAEG;IACH,MAAM,EAAE,QAAQ;CACP,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Rights management Policy Information Source component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const RightsManagementPolicyInformationSourceComponentType = {\n\t/**\n\t * Identity.\n\t */\n\tIdentity: \"identity\",\n\n\t/**\n\t * Identity Profile.\n\t */\n\tIdentityProfile: \"identity-profile\",\n\n\t/**\n\t * Static.\n\t */\n\tStatic: \"static\"\n} as const;\n\n/**\n * Rights management Policy Information Source component types.\n */\nexport type RightsManagementPolicyInformationSourceComponentType =\n\t// eslint-disable-next-line max-len\n\t(typeof RightsManagementPolicyInformationSourceComponentType)[keyof typeof RightsManagementPolicyInformationSourceComponentType];\n"]}
@@ -13,7 +13,7 @@ import type { IEngineConfig } from "../models/IEngineConfig.js";
13
13
  */
14
14
  export declare function initialiseEntityStorageConnector(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, typeCustom: string | undefined, schema: string, partitionContextIds: string[]): void;
15
15
  /**
16
- * Initialise the entity storage connector.
16
+ * Initialise the entity storage component.
17
17
  * @param engineCore The engine core.
18
18
  * @param context The context for the engine.
19
19
  * @param instanceConfig The instance config.
@@ -5,7 +5,7 @@ import type { IEngineConfig } from "../models/IEngineConfig.js";
5
5
  /**
6
6
  * Initialise a wallet connector.
7
7
  * @param engineCore The engine core.
8
- * @param context The context for the node.
8
+ * @param context The context for the engine.
9
9
  * @param instanceConfig The instance config.
10
10
  * @returns The instance created and the factory for it.
11
11
  */
@@ -256,7 +256,7 @@ export interface IEngineConfig extends IEngineCoreConfig {
256
256
  */
257
257
  dataExtractorConnector?: IEngineCoreTypeConfig<DataExtractorConnectorConfig>[];
258
258
  /**
259
- * Date processing options which can be overridden by individual components by specifying types other than default.
259
+ * Data processing component options which can be overridden by individual components by specifying types other than default.
260
260
  */
261
261
  dataProcessingComponent?: IEngineCoreTypeConfig<DataProcessingComponentConfig>[];
262
262
  /**
@@ -2,6 +2,7 @@ import type { ICosmosDbEntityStorageConnectorConstructorOptions } from "@twin.or
2
2
  import type { IDynamoDbEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-dynamodb";
3
3
  import type { IFileEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-file";
4
4
  import type { IFirestoreEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-gcp-firestore";
5
+ import type { IMemoryEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-memory";
5
6
  import type { IMongoDbEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-mongodb";
6
7
  import type { IMySqlEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-mysql";
7
8
  import type { IPostgreSqlEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-postgresql";
@@ -17,7 +18,10 @@ export type EntityStorageConnectorConfig = {
17
18
  };
18
19
  } | {
19
20
  type: typeof EntityStorageConnectorType.Memory;
20
- options?: never;
21
+ options: Omit<IMemoryEntityStorageConnectorConstructorOptions, "entitySchema" | "config"> & {
22
+ config?: Omit<IMemoryEntityStorageConnectorConstructorOptions["config"], "storageKey">;
23
+ storagePrefix?: string;
24
+ };
21
25
  } | {
22
26
  type: typeof EntityStorageConnectorType.AwsDynamoDb;
23
27
  options: Omit<IDynamoDbEntityStorageConnectorConstructorOptions, "entitySchema" | "config"> & {
@@ -1,4 +1,4 @@
1
- import type { IIdentityPolicyInformationSourceConstructorOptions, IStaticPolicyInformationSourceConstructorOptions } from "@twin.org/rights-management-plugins";
1
+ import type { IIdentityPolicyInformationSourceConstructorOptions, IIdentityProfilePolicyInformationSourceConstructorOptions, IStaticPolicyInformationSourceConstructorOptions } from "@twin.org/rights-management-plugins";
2
2
  import type { RightsManagementPolicyInformationSourceComponentType } from "../types/rightsManagementPolicyInformationSourceComponentType.js";
3
3
  /**
4
4
  * Rights management policy information source component config types.
@@ -6,6 +6,9 @@ import type { RightsManagementPolicyInformationSourceComponentType } from "../ty
6
6
  export type RightsManagementPolicyInformationSourceComponentConfig = {
7
7
  type: typeof RightsManagementPolicyInformationSourceComponentType.Identity;
8
8
  options?: IIdentityPolicyInformationSourceConstructorOptions;
9
+ } | {
10
+ type: typeof RightsManagementPolicyInformationSourceComponentType.IdentityProfile;
11
+ options?: IIdentityProfilePolicyInformationSourceConstructorOptions;
9
12
  } | {
10
13
  type: typeof RightsManagementPolicyInformationSourceComponentType.Static;
11
14
  options?: IStaticPolicyInformationSourceConstructorOptions;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export declare const EntityStorageConnectorType: {
5
5
  /**
6
- * Use storage.
6
+ * File storage.
7
7
  */
8
8
  readonly File: "file";
9
9
  /**
@@ -6,6 +6,10 @@ export declare const RightsManagementPolicyInformationSourceComponentType: {
6
6
  * Identity.
7
7
  */
8
8
  readonly Identity: "identity";
9
+ /**
10
+ * Identity Profile.
11
+ */
12
+ readonly IdentityProfile: "identity-profile";
9
13
  /**
10
14
  * Static.
11
15
  */
package/docs/changelog.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.52](https://github.com/iotaledger/twin-engine/compare/engine-types-v0.0.3-next.51...engine-types-v0.0.3-next.52) (2026-06-16)
4
+
5
+
6
+ ### Features
7
+
8
+ * add identity profile information source ([e8e57ad](https://github.com/iotaledger/twin-engine/commit/e8e57ad414af50ea0464cf423dc915e83206bf3a))
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.51 to 0.0.3-next.52
16
+ * @twin.org/engine-models bumped from 0.0.3-next.51 to 0.0.3-next.52
17
+
18
+ ## [0.0.3-next.51](https://github.com/iotaledger/twin-engine/compare/engine-types-v0.0.3-next.50...engine-types-v0.0.3-next.51) (2026-06-15)
19
+
20
+
21
+ ### Features
22
+
23
+ * memory entity storage prefix ([e85dd71](https://github.com/iotaledger/twin-engine/commit/e85dd7113943dea92dce46963d054e265d3b481a))
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * The following workspace dependencies were updated
29
+ * dependencies
30
+ * @twin.org/engine-core bumped from 0.0.3-next.50 to 0.0.3-next.51
31
+ * @twin.org/engine-models bumped from 0.0.3-next.50 to 0.0.3-next.51
32
+
3
33
  ## [0.0.3-next.50](https://github.com/iotaledger/twin-engine/compare/engine-types-v0.0.3-next.49...engine-types-v0.0.3-next.50) (2026-06-11)
4
34
 
5
35
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **initialiseEntityStorageComponent**(`engineCore`, `context`, `instanceConfig`): `EngineTypeInitialiserReturn`\<[`EntityStorageComponentConfig`](../type-aliases/EntityStorageComponentConfig.md), `Factory`\<`IComponent`\>\>
4
4
 
5
- Initialise the entity storage connector.
5
+ Initialise the entity storage component.
6
6
 
7
7
  ## Parameters
8
8
 
@@ -16,7 +16,7 @@ The engine core.
16
16
 
17
17
  `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
18
18
 
19
- The context for the node.
19
+ The context for the engine.
20
20
 
21
21
  ### instanceConfig
22
22
 
@@ -334,7 +334,7 @@ Data extractor connector options which can be overridden by individual component
334
334
 
335
335
  > `optional` **dataProcessingComponent?**: `IEngineCoreTypeConfig`\<[`DataProcessingComponentConfig`](../type-aliases/DataProcessingComponentConfig.md)\>[]
336
336
 
337
- Date processing options which can be overridden by individual components by specifying types other than default.
337
+ Data processing component options which can be overridden by individual components by specifying types other than default.
338
338
 
339
339
  #### documentManagementComponent?
340
340
 
@@ -1,5 +1,5 @@
1
1
  # Type Alias: EntityStorageConnectorConfig
2
2
 
3
- > **EntityStorageConnectorConfig** = \{ `type`: *typeof* [`File`](../variables/EntityStorageConnectorType.md#file); `options`: `Omit`\<`IFileEntityStorageConnectorConstructorOptions`, `"entitySchema"`\> & `object`; \} \| \{ `type`: *typeof* [`Memory`](../variables/EntityStorageConnectorType.md#memory); `options?`: `never`; \} \| \{ `type`: *typeof* [`AwsDynamoDb`](../variables/EntityStorageConnectorType.md#awsdynamodb); `options`: `Omit`\<`IDynamoDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`AzureCosmosDb`](../variables/EntityStorageConnectorType.md#azurecosmosdb); `options`: `Omit`\<`ICosmosDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`GcpFirestoreDb`](../variables/EntityStorageConnectorType.md#gcpfirestoredb); `options`: `Omit`\<`IFirestoreEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`ScyllaDb`](../variables/EntityStorageConnectorType.md#scylladb); `options`: `Omit`\<`IScyllaDBTableConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`MySqlDb`](../variables/EntityStorageConnectorType.md#mysqldb); `options`: `Omit`\<`IMySqlEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`MongoDb`](../variables/EntityStorageConnectorType.md#mongodb); `options`: `Omit`\<`IMongoDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`PostgreSql`](../variables/EntityStorageConnectorType.md#postgresql); `options`: `Omit`\<`IPostgreSqlEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \}
3
+ > **EntityStorageConnectorConfig** = \{ `type`: *typeof* [`File`](../variables/EntityStorageConnectorType.md#file); `options`: `Omit`\<`IFileEntityStorageConnectorConstructorOptions`, `"entitySchema"`\> & `object`; \} \| \{ `type`: *typeof* [`Memory`](../variables/EntityStorageConnectorType.md#memory); `options`: `Omit`\<`IMemoryEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`AwsDynamoDb`](../variables/EntityStorageConnectorType.md#awsdynamodb); `options`: `Omit`\<`IDynamoDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`AzureCosmosDb`](../variables/EntityStorageConnectorType.md#azurecosmosdb); `options`: `Omit`\<`ICosmosDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`GcpFirestoreDb`](../variables/EntityStorageConnectorType.md#gcpfirestoredb); `options`: `Omit`\<`IFirestoreEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`ScyllaDb`](../variables/EntityStorageConnectorType.md#scylladb); `options`: `Omit`\<`IScyllaDBTableConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`MySqlDb`](../variables/EntityStorageConnectorType.md#mysqldb); `options`: `Omit`\<`IMySqlEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`MongoDb`](../variables/EntityStorageConnectorType.md#mongodb); `options`: `Omit`\<`IMongoDbEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \} \| \{ `type`: *typeof* [`PostgreSql`](../variables/EntityStorageConnectorType.md#postgresql); `options`: `Omit`\<`IPostgreSqlEntityStorageConnectorConstructorOptions`, `"entitySchema"` \| `"config"`\> & `object`; \}
4
4
 
5
5
  Entity storage connector config types.
@@ -1,5 +1,5 @@
1
1
  # Type Alias: RightsManagementPolicyInformationSourceComponentConfig
2
2
 
3
- > **RightsManagementPolicyInformationSourceComponentConfig** = \{ `type`: *typeof* [`Identity`](../variables/RightsManagementPolicyInformationSourceComponentType.md#identity); `options?`: `IIdentityPolicyInformationSourceConstructorOptions`; \} \| \{ `type`: *typeof* [`Static`](../variables/RightsManagementPolicyInformationSourceComponentType.md#static); `options?`: `IStaticPolicyInformationSourceConstructorOptions`; \}
3
+ > **RightsManagementPolicyInformationSourceComponentConfig** = \{ `type`: *typeof* [`Identity`](../variables/RightsManagementPolicyInformationSourceComponentType.md#identity); `options?`: `IIdentityPolicyInformationSourceConstructorOptions`; \} \| \{ `type`: *typeof* [`IdentityProfile`](../variables/RightsManagementPolicyInformationSourceComponentType.md#identityprofile); `options?`: `IIdentityProfilePolicyInformationSourceConstructorOptions`; \} \| \{ `type`: *typeof* [`Static`](../variables/RightsManagementPolicyInformationSourceComponentType.md#static); `options?`: `IStaticPolicyInformationSourceConstructorOptions`; \}
4
4
 
5
5
  Rights management policy information source component config types.
@@ -10,7 +10,7 @@ Entity storage connector types.
10
10
 
11
11
  > `readonly` **File**: `"file"` = `"file"`
12
12
 
13
- Use storage.
13
+ File storage.
14
14
 
15
15
  ### Memory {#memory}
16
16
 
@@ -12,6 +12,12 @@ Rights management Policy Information Source component types.
12
12
 
13
13
  Identity.
14
14
 
15
+ ### IdentityProfile {#identityprofile}
16
+
17
+ > `readonly` **IdentityProfile**: `"identity-profile"` = `"identity-profile"`
18
+
19
+ Identity Profile.
20
+
15
21
  ### Static {#static}
16
22
 
17
23
  > `readonly` **Static**: `"static"` = `"static"`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/engine-types",
3
- "version": "0.0.3-next.50",
3
+ "version": "0.0.3-next.52",
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.50",
66
- "@twin.org/engine-models": "0.0.3-next.50",
65
+ "@twin.org/engine-core": "0.0.3-next.52",
66
+ "@twin.org/engine-models": "0.0.3-next.52",
67
67
  "@twin.org/entity": "next",
68
68
  "@twin.org/entity-storage-connector-cosmosdb": "next",
69
69
  "@twin.org/entity-storage-connector-dynamodb": "next",