@twin.org/engine-types 0.0.1-next.37 → 0.0.1-next.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +197 -1
- package/dist/esm/index.mjs +216 -26
- package/dist/types/components/dataProcessing.d.ts +35 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/models/IEngineConfig.d.ts +17 -2
- package/dist/types/models/config/dataConverterConnectorConfig.d.ts +11 -0
- package/dist/types/models/config/dataExtractorConnectorConfig.d.ts +8 -0
- package/dist/types/models/config/dataProcessingComponentConfig.d.ts +9 -0
- package/dist/types/models/config/entityStorageConnectorConfig.d.ts +14 -0
- package/dist/types/models/types/dataConverterConnectorType.d.ts +17 -0
- package/dist/types/models/types/dataExtractorConnectorType.d.ts +13 -0
- package/dist/types/models/types/dataProcessingComponentType.d.ts +13 -0
- package/dist/types/models/types/entityStorageConnectorType.d.ts +8 -0
- package/docs/reference/functions/initialiseDataConverterConnector.md +41 -0
- package/docs/reference/functions/initialiseDataExtractorConnector.md +41 -0
- package/docs/reference/functions/initialiseDataProcessingComponent.md +41 -0
- package/docs/reference/index.md +12 -0
- package/docs/reference/interfaces/IEngineConfig.md +20 -2
- package/docs/reference/type-aliases/DataConverterConnectorConfig.md +5 -0
- package/docs/reference/type-aliases/DataConverterConnectorType.md +5 -0
- package/docs/reference/type-aliases/DataExtractorConnectorConfig.md +15 -0
- package/docs/reference/type-aliases/DataExtractorConnectorType.md +5 -0
- package/docs/reference/type-aliases/DataProcessingComponentConfig.md +15 -0
- package/docs/reference/type-aliases/DataProcessingComponentType.md +5 -0
- package/docs/reference/type-aliases/EntityStorageConnectorConfig.md +1 -1
- package/docs/reference/variables/DataConverterConnectorType.md +19 -0
- package/docs/reference/variables/DataExtractorConnectorType.md +13 -0
- package/docs/reference/variables/DataProcessingComponentType.md +13 -0
- package/docs/reference/variables/EntityStorageConnectorType.md +12 -0
- package/package.json +8 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -11,7 +11,9 @@ var entityStorageConnectorDynamodb = require('@twin.org/entity-storage-connector
|
|
|
11
11
|
var entityStorageConnectorFile = require('@twin.org/entity-storage-connector-file');
|
|
12
12
|
var entityStorageConnectorGcpFirestore = require('@twin.org/entity-storage-connector-gcp-firestore');
|
|
13
13
|
var entityStorageConnectorMemory = require('@twin.org/entity-storage-connector-memory');
|
|
14
|
+
var entityStorageConnectorMongodb = require('@twin.org/entity-storage-connector-mongodb');
|
|
14
15
|
var entityStorageConnectorMysql = require('@twin.org/entity-storage-connector-mysql');
|
|
16
|
+
var entityStorageConnectorPostgresql = require('@twin.org/entity-storage-connector-postgresql');
|
|
15
17
|
var entityStorageConnectorScylladb = require('@twin.org/entity-storage-connector-scylladb');
|
|
16
18
|
var entityStorageModels = require('@twin.org/entity-storage-models');
|
|
17
19
|
var entityStorageService = require('@twin.org/entity-storage-service');
|
|
@@ -26,6 +28,10 @@ var blobStorageConnectorIpfs = require('@twin.org/blob-storage-connector-ipfs');
|
|
|
26
28
|
var blobStorageConnectorMemory = require('@twin.org/blob-storage-connector-memory');
|
|
27
29
|
var blobStorageModels = require('@twin.org/blob-storage-models');
|
|
28
30
|
var blobStorageService = require('@twin.org/blob-storage-service');
|
|
31
|
+
var dataProcessingConverters = require('@twin.org/data-processing-converters');
|
|
32
|
+
var dataProcessingExtractors = require('@twin.org/data-processing-extractors');
|
|
33
|
+
var dataProcessingModels = require('@twin.org/data-processing-models');
|
|
34
|
+
var dataProcessingService = require('@twin.org/data-processing-service');
|
|
29
35
|
var eventBusConnectorLocal = require('@twin.org/event-bus-connector-local');
|
|
30
36
|
var eventBusModels = require('@twin.org/event-bus-models');
|
|
31
37
|
var eventBusService = require('@twin.org/event-bus-service');
|
|
@@ -214,7 +220,15 @@ const EntityStorageConnectorType = {
|
|
|
214
220
|
/**
|
|
215
221
|
* MySqlDb.
|
|
216
222
|
*/
|
|
217
|
-
MySqlDb: "mysql"
|
|
223
|
+
MySqlDb: "mysql",
|
|
224
|
+
/**
|
|
225
|
+
* MongoDb.
|
|
226
|
+
*/
|
|
227
|
+
MongoDb: "mongodb",
|
|
228
|
+
/**
|
|
229
|
+
* Postgre SQL.
|
|
230
|
+
*/
|
|
231
|
+
PostgreSql: "postgresql"
|
|
218
232
|
};
|
|
219
233
|
|
|
220
234
|
// Copyright 2024 IOTA Stiftung.
|
|
@@ -325,6 +339,26 @@ function initialiseEntityStorageConnector(engineCore, context, typeCustom, schem
|
|
|
325
339
|
}
|
|
326
340
|
});
|
|
327
341
|
}
|
|
342
|
+
else if (type === EntityStorageConnectorType.MongoDb) {
|
|
343
|
+
entityStorageConnector = new entityStorageConnectorMongodb.MongoDbEntityStorageConnector({
|
|
344
|
+
entitySchema: schema,
|
|
345
|
+
...entityStorageConfig.options,
|
|
346
|
+
config: {
|
|
347
|
+
...entityStorageConfig.options.config,
|
|
348
|
+
collection: `${entityStorageConfig.options.tablePrefix ?? ""}${instanceName}`
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
else if (type === EntityStorageConnectorType.PostgreSql) {
|
|
353
|
+
entityStorageConnector = new entityStorageConnectorPostgresql.PostgreSqlEntityStorageConnector({
|
|
354
|
+
entitySchema: schema,
|
|
355
|
+
...entityStorageConfig.options,
|
|
356
|
+
config: {
|
|
357
|
+
...entityStorageConfig.options.config,
|
|
358
|
+
tableName: `${entityStorageConfig.options.tablePrefix ?? ""}${instanceName}`
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
328
362
|
else {
|
|
329
363
|
throw new core.GeneralError("engineCore", "connectorUnknownType", {
|
|
330
364
|
type,
|
|
@@ -712,6 +746,162 @@ function initialiseBlobStorageComponent(engineCore, context, instanceConfig, ove
|
|
|
712
746
|
return finalInstanceType;
|
|
713
747
|
}
|
|
714
748
|
|
|
749
|
+
// Copyright 2024 IOTA Stiftung.
|
|
750
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
751
|
+
/**
|
|
752
|
+
* Data converter connector types.
|
|
753
|
+
*/
|
|
754
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
755
|
+
const DataConverterConnectorType = {
|
|
756
|
+
/**
|
|
757
|
+
* JSON.
|
|
758
|
+
*/
|
|
759
|
+
Json: "json",
|
|
760
|
+
/**
|
|
761
|
+
* Xml.
|
|
762
|
+
*/
|
|
763
|
+
Xml: "xml"
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
// Copyright 2024 IOTA Stiftung.
|
|
767
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
768
|
+
/**
|
|
769
|
+
* Data extractor connector types.
|
|
770
|
+
*/
|
|
771
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
772
|
+
const DataExtractorConnectorType = {
|
|
773
|
+
/**
|
|
774
|
+
* JSON Path.
|
|
775
|
+
*/
|
|
776
|
+
JsonPath: "json-path"
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
// Copyright 2024 IOTA Stiftung.
|
|
780
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
781
|
+
/**
|
|
782
|
+
* Data processing component types.
|
|
783
|
+
*/
|
|
784
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
785
|
+
const DataProcessingComponentType = {
|
|
786
|
+
/**
|
|
787
|
+
* Service.
|
|
788
|
+
*/
|
|
789
|
+
Service: "service"
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
// Copyright 2024 IOTA Stiftung.
|
|
793
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
794
|
+
/**
|
|
795
|
+
* Initialise the data converter connector.
|
|
796
|
+
* @param engineCore The engine core.
|
|
797
|
+
* @param context The context for the engine.
|
|
798
|
+
* @param instanceConfig The instance config.
|
|
799
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
800
|
+
* @returns The name of the instance created.
|
|
801
|
+
* @throws GeneralError if the connector type is unknown.
|
|
802
|
+
*/
|
|
803
|
+
function initialiseDataConverterConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
804
|
+
engineCore.logInfo(core.I18n.formatMessage("engineCore.configuring", {
|
|
805
|
+
element: `Data Converter Connector: ${instanceConfig.type}`
|
|
806
|
+
}));
|
|
807
|
+
const type = instanceConfig.type;
|
|
808
|
+
let connector;
|
|
809
|
+
let instanceType;
|
|
810
|
+
if (type === DataConverterConnectorType.Json) {
|
|
811
|
+
connector = new dataProcessingConverters.JsonConverterConnector();
|
|
812
|
+
instanceType = dataProcessingConverters.JsonConverterConnector.NAMESPACE;
|
|
813
|
+
}
|
|
814
|
+
else if (type === DataConverterConnectorType.Xml) {
|
|
815
|
+
connector = new dataProcessingConverters.XmlConverterConnector();
|
|
816
|
+
instanceType = dataProcessingConverters.XmlConverterConnector.NAMESPACE;
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
throw new core.GeneralError("engineCore", "connectorUnknownType", {
|
|
820
|
+
type,
|
|
821
|
+
connectorType: "dataConverterConnector"
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
825
|
+
context.componentInstances.push({
|
|
826
|
+
instanceType: finalInstanceType,
|
|
827
|
+
component: connector
|
|
828
|
+
});
|
|
829
|
+
dataProcessingModels.DataConverterConnectorFactory.register(finalInstanceType, () => connector);
|
|
830
|
+
return finalInstanceType;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Initialise the data extractor connector.
|
|
834
|
+
* @param engineCore The engine core.
|
|
835
|
+
* @param context The context for the engine.
|
|
836
|
+
* @param instanceConfig The instance config.
|
|
837
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
838
|
+
* @returns The name of the instance created.
|
|
839
|
+
* @throws GeneralError if the connector type is unknown.
|
|
840
|
+
*/
|
|
841
|
+
function initialiseDataExtractorConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
842
|
+
engineCore.logInfo(core.I18n.formatMessage("engineCore.configuring", {
|
|
843
|
+
element: `Data Extractor Connector: ${instanceConfig.type}`
|
|
844
|
+
}));
|
|
845
|
+
const type = instanceConfig.type;
|
|
846
|
+
let connector;
|
|
847
|
+
let instanceType;
|
|
848
|
+
if (type === DataExtractorConnectorType.JsonPath) {
|
|
849
|
+
connector = new dataProcessingExtractors.JsonPathExtractorConnector();
|
|
850
|
+
instanceType = dataProcessingExtractors.JsonPathExtractorConnector.NAMESPACE;
|
|
851
|
+
}
|
|
852
|
+
else {
|
|
853
|
+
throw new core.GeneralError("engineCore", "connectorUnknownType", {
|
|
854
|
+
type,
|
|
855
|
+
connectorType: "dataExtractorConnector"
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
859
|
+
context.componentInstances.push({
|
|
860
|
+
instanceType: finalInstanceType,
|
|
861
|
+
component: connector
|
|
862
|
+
});
|
|
863
|
+
dataProcessingModels.DataExtractorConnectorFactory.register(finalInstanceType, () => connector);
|
|
864
|
+
return finalInstanceType;
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* Initialise the data processing component.
|
|
868
|
+
* @param engineCore The engine core.
|
|
869
|
+
* @param context The context for the engine.
|
|
870
|
+
* @param instanceConfig The instance config.
|
|
871
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
872
|
+
* @returns The name of the instance created.
|
|
873
|
+
* @throws GeneralError if the component type is unknown.
|
|
874
|
+
*/
|
|
875
|
+
function initialiseDataProcessingComponent(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
876
|
+
engineCore.logInfo(core.I18n.formatMessage("engineCore.configuring", {
|
|
877
|
+
element: `Data Processing Component: ${instanceConfig.type}`
|
|
878
|
+
}));
|
|
879
|
+
const type = instanceConfig.type;
|
|
880
|
+
let component;
|
|
881
|
+
let instanceType;
|
|
882
|
+
if (type === DataProcessingComponentType.Service) {
|
|
883
|
+
dataProcessingService.initSchema();
|
|
884
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.extractionRuleGroupStorageConnectorType, "ExtractionRuleGroup");
|
|
885
|
+
component = new dataProcessingService.DataProcessingService({
|
|
886
|
+
...instanceConfig.options
|
|
887
|
+
});
|
|
888
|
+
instanceType = dataProcessingService.DataProcessingService.NAMESPACE;
|
|
889
|
+
}
|
|
890
|
+
else {
|
|
891
|
+
throw new core.GeneralError("engineCore", "componentUnknownType", {
|
|
892
|
+
type,
|
|
893
|
+
componentType: "dataProcessingComponent"
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
897
|
+
context.componentInstances.push({
|
|
898
|
+
instanceType: finalInstanceType,
|
|
899
|
+
component
|
|
900
|
+
});
|
|
901
|
+
core.ComponentFactory.register(finalInstanceType, () => component);
|
|
902
|
+
return finalInstanceType;
|
|
903
|
+
}
|
|
904
|
+
|
|
715
905
|
// Copyright 2024 IOTA Stiftung.
|
|
716
906
|
// SPDX-License-Identifier: Apache-2.0.
|
|
717
907
|
/**
|
|
@@ -2150,6 +2340,9 @@ exports.AuditableItemStreamComponentType = AuditableItemStreamComponentType;
|
|
|
2150
2340
|
exports.BackgroundTaskConnectorType = BackgroundTaskConnectorType;
|
|
2151
2341
|
exports.BlobStorageComponentType = BlobStorageComponentType;
|
|
2152
2342
|
exports.BlobStorageConnectorType = BlobStorageConnectorType;
|
|
2343
|
+
exports.DataConverterConnectorType = DataConverterConnectorType;
|
|
2344
|
+
exports.DataExtractorConnectorType = DataExtractorConnectorType;
|
|
2345
|
+
exports.DataProcessingComponentType = DataProcessingComponentType;
|
|
2153
2346
|
exports.DltConfigType = DltConfigType;
|
|
2154
2347
|
exports.EntityStorageComponentType = EntityStorageComponentType;
|
|
2155
2348
|
exports.EntityStorageConnectorType = EntityStorageConnectorType;
|
|
@@ -2183,6 +2376,9 @@ exports.initialiseAuditableItemStreamComponent = initialiseAuditableItemStreamCo
|
|
|
2183
2376
|
exports.initialiseBackgroundTaskConnector = initialiseBackgroundTaskConnector;
|
|
2184
2377
|
exports.initialiseBlobStorageComponent = initialiseBlobStorageComponent;
|
|
2185
2378
|
exports.initialiseBlobStorageConnector = initialiseBlobStorageConnector;
|
|
2379
|
+
exports.initialiseDataConverterConnector = initialiseDataConverterConnector;
|
|
2380
|
+
exports.initialiseDataExtractorConnector = initialiseDataExtractorConnector;
|
|
2381
|
+
exports.initialiseDataProcessingComponent = initialiseDataProcessingComponent;
|
|
2186
2382
|
exports.initialiseEntityStorageComponent = initialiseEntityStorageComponent;
|
|
2187
2383
|
exports.initialiseEntityStorageConnector = initialiseEntityStorageConnector;
|
|
2188
2384
|
exports.initialiseEventBusComponent = initialiseEventBusComponent;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -9,7 +9,9 @@ import { DynamoDbEntityStorageConnector } from '@twin.org/entity-storage-connect
|
|
|
9
9
|
import { FileEntityStorageConnector } from '@twin.org/entity-storage-connector-file';
|
|
10
10
|
import { FirestoreEntityStorageConnector } from '@twin.org/entity-storage-connector-gcp-firestore';
|
|
11
11
|
import { MemoryEntityStorageConnector } from '@twin.org/entity-storage-connector-memory';
|
|
12
|
+
import { MongoDbEntityStorageConnector } from '@twin.org/entity-storage-connector-mongodb';
|
|
12
13
|
import { MySqlEntityStorageConnector } from '@twin.org/entity-storage-connector-mysql';
|
|
14
|
+
import { PostgreSqlEntityStorageConnector } from '@twin.org/entity-storage-connector-postgresql';
|
|
13
15
|
import { ScyllaDBTableConnector } from '@twin.org/entity-storage-connector-scylladb';
|
|
14
16
|
import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
|
|
15
17
|
import { EntityStorageService } from '@twin.org/entity-storage-service';
|
|
@@ -24,40 +26,44 @@ import { IpfsBlobStorageConnector } from '@twin.org/blob-storage-connector-ipfs'
|
|
|
24
26
|
import { MemoryBlobStorageConnector } from '@twin.org/blob-storage-connector-memory';
|
|
25
27
|
import { BlobStorageConnectorFactory } from '@twin.org/blob-storage-models';
|
|
26
28
|
import { initSchema as initSchema$3, BlobStorageService } from '@twin.org/blob-storage-service';
|
|
29
|
+
import { JsonConverterConnector, XmlConverterConnector } from '@twin.org/data-processing-converters';
|
|
30
|
+
import { JsonPathExtractorConnector } from '@twin.org/data-processing-extractors';
|
|
31
|
+
import { DataConverterConnectorFactory, DataExtractorConnectorFactory } from '@twin.org/data-processing-models';
|
|
32
|
+
import { initSchema as initSchema$4, DataProcessingService } from '@twin.org/data-processing-service';
|
|
27
33
|
import { LocalEventBusConnector } from '@twin.org/event-bus-connector-local';
|
|
28
34
|
import { EventBusConnectorFactory } from '@twin.org/event-bus-models';
|
|
29
35
|
import { EventBusService } from '@twin.org/event-bus-service';
|
|
30
|
-
import { EntityStorageFaucetConnector, EntityStorageWalletConnector, initSchema as initSchema$
|
|
36
|
+
import { EntityStorageFaucetConnector, EntityStorageWalletConnector, initSchema as initSchema$e } from '@twin.org/wallet-connector-entity-storage';
|
|
31
37
|
import { IotaFaucetConnector, IotaWalletConnector } from '@twin.org/wallet-connector-iota';
|
|
32
38
|
import { IotaRebasedFaucetConnector, IotaRebasedWalletConnector } from '@twin.org/wallet-connector-iota-rebased';
|
|
33
39
|
import { FaucetConnectorFactory, WalletConnectorFactory } from '@twin.org/wallet-models';
|
|
34
|
-
import { initSchema as initSchema$
|
|
40
|
+
import { initSchema as initSchema$5, EntityStorageIdentityConnector, EntityStorageIdentityProfileConnector, EntityStorageIdentityResolverConnector } from '@twin.org/identity-connector-entity-storage';
|
|
35
41
|
import { IotaIdentityConnector, IotaIdentityResolverConnector } from '@twin.org/identity-connector-iota';
|
|
36
42
|
import { IotaRebasedIdentityConnector, IotaRebasedIdentityResolverConnector } from '@twin.org/identity-connector-iota-rebased';
|
|
37
43
|
import { IdentityConnectorFactory, IdentityProfileConnectorFactory, IdentityResolverConnectorFactory } from '@twin.org/identity-models';
|
|
38
44
|
import { IdentityService, IdentityProfileService, IdentityResolverService } from '@twin.org/identity-service';
|
|
39
|
-
import { initSchema as initSchema$
|
|
40
|
-
import { initSchema as initSchema$
|
|
45
|
+
import { initSchema as initSchema$6, ImmutableProofService } from '@twin.org/immutable-proof-service';
|
|
46
|
+
import { initSchema as initSchema$7, EntityStorageImmutableStorageConnector } from '@twin.org/immutable-storage-connector-entity-storage';
|
|
41
47
|
import { IotaImmutableStorageConnector } from '@twin.org/immutable-storage-connector-iota';
|
|
42
48
|
import { IotaRebasedImmutableStorageConnector } from '@twin.org/immutable-storage-connector-iota-rebased';
|
|
43
49
|
import { ImmutableStorageConnectorFactory } from '@twin.org/immutable-storage-models';
|
|
44
50
|
import { ConsoleLoggingConnector } from '@twin.org/logging-connector-console';
|
|
45
|
-
import { initSchema as initSchema$
|
|
51
|
+
import { initSchema as initSchema$8, EntityStorageLoggingConnector } from '@twin.org/logging-connector-entity-storage';
|
|
46
52
|
import { MultiLoggingConnector, LoggingConnectorFactory } from '@twin.org/logging-models';
|
|
47
53
|
import { LoggingService } from '@twin.org/logging-service';
|
|
48
54
|
import { AwsMessagingEmailConnector, AwsMessagingSmsConnector, AwsMessagingPushNotificationConnector } from '@twin.org/messaging-connector-aws';
|
|
49
|
-
import { initSchema as initSchema$
|
|
55
|
+
import { initSchema as initSchema$9, EntityStorageMessagingEmailConnector, EntityStorageMessagingSmsConnector, EntityStorageMessagingPushNotificationConnector } from '@twin.org/messaging-connector-entity-storage';
|
|
50
56
|
import { MessagingEmailConnectorFactory, MessagingSmsConnectorFactory, MessagingPushNotificationsConnectorFactory } from '@twin.org/messaging-models';
|
|
51
|
-
import { initSchema as initSchema$
|
|
52
|
-
import { initSchema as initSchema$
|
|
57
|
+
import { initSchema as initSchema$a, MessagingService } from '@twin.org/messaging-service';
|
|
58
|
+
import { initSchema as initSchema$b, EntityStorageNftConnector } from '@twin.org/nft-connector-entity-storage';
|
|
53
59
|
import { IotaNftConnector } from '@twin.org/nft-connector-iota';
|
|
54
60
|
import { IotaRebasedNftConnector } from '@twin.org/nft-connector-iota-rebased';
|
|
55
61
|
import { NftConnectorFactory } from '@twin.org/nft-models';
|
|
56
62
|
import { NftService } from '@twin.org/nft-service';
|
|
57
|
-
import { initSchema as initSchema$
|
|
63
|
+
import { initSchema as initSchema$c, EntityStorageTelemetryConnector } from '@twin.org/telemetry-connector-entity-storage';
|
|
58
64
|
import { TelemetryConnectorFactory } from '@twin.org/telemetry-models';
|
|
59
65
|
import { TelemetryService } from '@twin.org/telemetry-service';
|
|
60
|
-
import { initSchema as initSchema$
|
|
66
|
+
import { initSchema as initSchema$d, EntityStorageVaultConnector } from '@twin.org/vault-connector-entity-storage';
|
|
61
67
|
import { HashicorpVaultConnector } from '@twin.org/vault-connector-hashicorp';
|
|
62
68
|
import { VaultConnectorFactory } from '@twin.org/vault-models';
|
|
63
69
|
|
|
@@ -212,7 +218,15 @@ const EntityStorageConnectorType = {
|
|
|
212
218
|
/**
|
|
213
219
|
* MySqlDb.
|
|
214
220
|
*/
|
|
215
|
-
MySqlDb: "mysql"
|
|
221
|
+
MySqlDb: "mysql",
|
|
222
|
+
/**
|
|
223
|
+
* MongoDb.
|
|
224
|
+
*/
|
|
225
|
+
MongoDb: "mongodb",
|
|
226
|
+
/**
|
|
227
|
+
* Postgre SQL.
|
|
228
|
+
*/
|
|
229
|
+
PostgreSql: "postgresql"
|
|
216
230
|
};
|
|
217
231
|
|
|
218
232
|
// Copyright 2024 IOTA Stiftung.
|
|
@@ -323,6 +337,26 @@ function initialiseEntityStorageConnector(engineCore, context, typeCustom, schem
|
|
|
323
337
|
}
|
|
324
338
|
});
|
|
325
339
|
}
|
|
340
|
+
else if (type === EntityStorageConnectorType.MongoDb) {
|
|
341
|
+
entityStorageConnector = new MongoDbEntityStorageConnector({
|
|
342
|
+
entitySchema: schema,
|
|
343
|
+
...entityStorageConfig.options,
|
|
344
|
+
config: {
|
|
345
|
+
...entityStorageConfig.options.config,
|
|
346
|
+
collection: `${entityStorageConfig.options.tablePrefix ?? ""}${instanceName}`
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
else if (type === EntityStorageConnectorType.PostgreSql) {
|
|
351
|
+
entityStorageConnector = new PostgreSqlEntityStorageConnector({
|
|
352
|
+
entitySchema: schema,
|
|
353
|
+
...entityStorageConfig.options,
|
|
354
|
+
config: {
|
|
355
|
+
...entityStorageConfig.options.config,
|
|
356
|
+
tableName: `${entityStorageConfig.options.tablePrefix ?? ""}${instanceName}`
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
}
|
|
326
360
|
else {
|
|
327
361
|
throw new GeneralError("engineCore", "connectorUnknownType", {
|
|
328
362
|
type,
|
|
@@ -710,6 +744,162 @@ function initialiseBlobStorageComponent(engineCore, context, instanceConfig, ove
|
|
|
710
744
|
return finalInstanceType;
|
|
711
745
|
}
|
|
712
746
|
|
|
747
|
+
// Copyright 2024 IOTA Stiftung.
|
|
748
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
749
|
+
/**
|
|
750
|
+
* Data converter connector types.
|
|
751
|
+
*/
|
|
752
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
753
|
+
const DataConverterConnectorType = {
|
|
754
|
+
/**
|
|
755
|
+
* JSON.
|
|
756
|
+
*/
|
|
757
|
+
Json: "json",
|
|
758
|
+
/**
|
|
759
|
+
* Xml.
|
|
760
|
+
*/
|
|
761
|
+
Xml: "xml"
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
// Copyright 2024 IOTA Stiftung.
|
|
765
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
766
|
+
/**
|
|
767
|
+
* Data extractor connector types.
|
|
768
|
+
*/
|
|
769
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
770
|
+
const DataExtractorConnectorType = {
|
|
771
|
+
/**
|
|
772
|
+
* JSON Path.
|
|
773
|
+
*/
|
|
774
|
+
JsonPath: "json-path"
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
// Copyright 2024 IOTA Stiftung.
|
|
778
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
779
|
+
/**
|
|
780
|
+
* Data processing component types.
|
|
781
|
+
*/
|
|
782
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
783
|
+
const DataProcessingComponentType = {
|
|
784
|
+
/**
|
|
785
|
+
* Service.
|
|
786
|
+
*/
|
|
787
|
+
Service: "service"
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
// Copyright 2024 IOTA Stiftung.
|
|
791
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
792
|
+
/**
|
|
793
|
+
* Initialise the data converter connector.
|
|
794
|
+
* @param engineCore The engine core.
|
|
795
|
+
* @param context The context for the engine.
|
|
796
|
+
* @param instanceConfig The instance config.
|
|
797
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
798
|
+
* @returns The name of the instance created.
|
|
799
|
+
* @throws GeneralError if the connector type is unknown.
|
|
800
|
+
*/
|
|
801
|
+
function initialiseDataConverterConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
802
|
+
engineCore.logInfo(I18n.formatMessage("engineCore.configuring", {
|
|
803
|
+
element: `Data Converter Connector: ${instanceConfig.type}`
|
|
804
|
+
}));
|
|
805
|
+
const type = instanceConfig.type;
|
|
806
|
+
let connector;
|
|
807
|
+
let instanceType;
|
|
808
|
+
if (type === DataConverterConnectorType.Json) {
|
|
809
|
+
connector = new JsonConverterConnector();
|
|
810
|
+
instanceType = JsonConverterConnector.NAMESPACE;
|
|
811
|
+
}
|
|
812
|
+
else if (type === DataConverterConnectorType.Xml) {
|
|
813
|
+
connector = new XmlConverterConnector();
|
|
814
|
+
instanceType = XmlConverterConnector.NAMESPACE;
|
|
815
|
+
}
|
|
816
|
+
else {
|
|
817
|
+
throw new GeneralError("engineCore", "connectorUnknownType", {
|
|
818
|
+
type,
|
|
819
|
+
connectorType: "dataConverterConnector"
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
823
|
+
context.componentInstances.push({
|
|
824
|
+
instanceType: finalInstanceType,
|
|
825
|
+
component: connector
|
|
826
|
+
});
|
|
827
|
+
DataConverterConnectorFactory.register(finalInstanceType, () => connector);
|
|
828
|
+
return finalInstanceType;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Initialise the data extractor connector.
|
|
832
|
+
* @param engineCore The engine core.
|
|
833
|
+
* @param context The context for the engine.
|
|
834
|
+
* @param instanceConfig The instance config.
|
|
835
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
836
|
+
* @returns The name of the instance created.
|
|
837
|
+
* @throws GeneralError if the connector type is unknown.
|
|
838
|
+
*/
|
|
839
|
+
function initialiseDataExtractorConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
840
|
+
engineCore.logInfo(I18n.formatMessage("engineCore.configuring", {
|
|
841
|
+
element: `Data Extractor Connector: ${instanceConfig.type}`
|
|
842
|
+
}));
|
|
843
|
+
const type = instanceConfig.type;
|
|
844
|
+
let connector;
|
|
845
|
+
let instanceType;
|
|
846
|
+
if (type === DataExtractorConnectorType.JsonPath) {
|
|
847
|
+
connector = new JsonPathExtractorConnector();
|
|
848
|
+
instanceType = JsonPathExtractorConnector.NAMESPACE;
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
throw new GeneralError("engineCore", "connectorUnknownType", {
|
|
852
|
+
type,
|
|
853
|
+
connectorType: "dataExtractorConnector"
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
857
|
+
context.componentInstances.push({
|
|
858
|
+
instanceType: finalInstanceType,
|
|
859
|
+
component: connector
|
|
860
|
+
});
|
|
861
|
+
DataExtractorConnectorFactory.register(finalInstanceType, () => connector);
|
|
862
|
+
return finalInstanceType;
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Initialise the data processing component.
|
|
866
|
+
* @param engineCore The engine core.
|
|
867
|
+
* @param context The context for the engine.
|
|
868
|
+
* @param instanceConfig The instance config.
|
|
869
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
870
|
+
* @returns The name of the instance created.
|
|
871
|
+
* @throws GeneralError if the component type is unknown.
|
|
872
|
+
*/
|
|
873
|
+
function initialiseDataProcessingComponent(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
874
|
+
engineCore.logInfo(I18n.formatMessage("engineCore.configuring", {
|
|
875
|
+
element: `Data Processing Component: ${instanceConfig.type}`
|
|
876
|
+
}));
|
|
877
|
+
const type = instanceConfig.type;
|
|
878
|
+
let component;
|
|
879
|
+
let instanceType;
|
|
880
|
+
if (type === DataProcessingComponentType.Service) {
|
|
881
|
+
initSchema$4();
|
|
882
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.extractionRuleGroupStorageConnectorType, "ExtractionRuleGroup");
|
|
883
|
+
component = new DataProcessingService({
|
|
884
|
+
...instanceConfig.options
|
|
885
|
+
});
|
|
886
|
+
instanceType = DataProcessingService.NAMESPACE;
|
|
887
|
+
}
|
|
888
|
+
else {
|
|
889
|
+
throw new GeneralError("engineCore", "componentUnknownType", {
|
|
890
|
+
type,
|
|
891
|
+
componentType: "dataProcessingComponent"
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
895
|
+
context.componentInstances.push({
|
|
896
|
+
instanceType: finalInstanceType,
|
|
897
|
+
component
|
|
898
|
+
});
|
|
899
|
+
ComponentFactory.register(finalInstanceType, () => component);
|
|
900
|
+
return finalInstanceType;
|
|
901
|
+
}
|
|
902
|
+
|
|
713
903
|
// Copyright 2024 IOTA Stiftung.
|
|
714
904
|
// SPDX-License-Identifier: Apache-2.0.
|
|
715
905
|
/**
|
|
@@ -964,7 +1154,7 @@ function initialiseIdentityConnector(engineCore, context, instanceConfig, overri
|
|
|
964
1154
|
instanceType = IotaRebasedIdentityConnector.NAMESPACE;
|
|
965
1155
|
}
|
|
966
1156
|
else if (type === IdentityConnectorType.EntityStorage) {
|
|
967
|
-
initSchema$
|
|
1157
|
+
initSchema$5({ includeProfile: false });
|
|
968
1158
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.didDocumentEntityStorageType, "IdentityDocument");
|
|
969
1159
|
connector = new EntityStorageIdentityConnector({
|
|
970
1160
|
vaultConnectorType: context.defaultTypes.vaultConnector,
|
|
@@ -1060,7 +1250,7 @@ function initialiseIdentityProfileConnector(engineCore, context, instanceConfig,
|
|
|
1060
1250
|
let connector;
|
|
1061
1251
|
let instanceType;
|
|
1062
1252
|
if (type === IdentityProfileConnectorType.EntityStorage) {
|
|
1063
|
-
initSchema$
|
|
1253
|
+
initSchema$5({ includeDocument: false });
|
|
1064
1254
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.profileEntityStorageType, "IdentityProfile");
|
|
1065
1255
|
connector = new EntityStorageIdentityProfileConnector(instanceConfig.options);
|
|
1066
1256
|
instanceType = EntityStorageIdentityProfileConnector.NAMESPACE;
|
|
@@ -1192,7 +1382,7 @@ function initialiseIdentityResolverConnector(engineCore, context, instanceConfig
|
|
|
1192
1382
|
instanceType = IotaRebasedIdentityResolverConnector.NAMESPACE;
|
|
1193
1383
|
}
|
|
1194
1384
|
else if (type === IdentityResolverConnectorType.EntityStorage) {
|
|
1195
|
-
initSchema$
|
|
1385
|
+
initSchema$5({ includeProfile: false });
|
|
1196
1386
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.didDocumentEntityStorageType, "IdentityDocument");
|
|
1197
1387
|
connector = new EntityStorageIdentityResolverConnector({
|
|
1198
1388
|
vaultConnectorType: context.defaultTypes.vaultConnector,
|
|
@@ -1275,7 +1465,7 @@ function initialiseImmutableProofComponent(engineCore, context, instanceConfig,
|
|
|
1275
1465
|
let component;
|
|
1276
1466
|
let instanceType;
|
|
1277
1467
|
if (type === ImmutableProofComponentType.Service) {
|
|
1278
|
-
initSchema$
|
|
1468
|
+
initSchema$6();
|
|
1279
1469
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.immutableProofEntityStorageType, "ImmutableProof");
|
|
1280
1470
|
component = new ImmutableProofService({
|
|
1281
1471
|
vaultConnectorType: context.defaultTypes.vaultConnector,
|
|
@@ -1366,7 +1556,7 @@ function initialiseImmutableStorageConnector(engineCore, context, instanceConfig
|
|
|
1366
1556
|
instanceType = IotaRebasedImmutableStorageConnector.NAMESPACE;
|
|
1367
1557
|
}
|
|
1368
1558
|
else if (type === ImmutableStorageConnectorType.EntityStorage) {
|
|
1369
|
-
initSchema$
|
|
1559
|
+
initSchema$7();
|
|
1370
1560
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.immutableStorageEntityStorageType, "ImmutableItem");
|
|
1371
1561
|
connector = new EntityStorageImmutableStorageConnector(instanceConfig.options);
|
|
1372
1562
|
instanceType = EntityStorageImmutableStorageConnector.NAMESPACE;
|
|
@@ -1443,7 +1633,7 @@ function initialiseLoggingConnector(engineCore, context, instanceConfig, overrid
|
|
|
1443
1633
|
instanceType = ConsoleLoggingConnector.NAMESPACE;
|
|
1444
1634
|
}
|
|
1445
1635
|
else if (type === LoggingConnectorType.EntityStorage) {
|
|
1446
|
-
initSchema$
|
|
1636
|
+
initSchema$8();
|
|
1447
1637
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.logEntryStorageConnectorType, "LogEntry");
|
|
1448
1638
|
connector = new EntityStorageLoggingConnector(instanceConfig.options);
|
|
1449
1639
|
instanceType = EntityStorageLoggingConnector.NAMESPACE;
|
|
@@ -1581,7 +1771,7 @@ function initialiseMessagingEmailConnector(engineCore, context, instanceConfig,
|
|
|
1581
1771
|
let connector;
|
|
1582
1772
|
let instanceType;
|
|
1583
1773
|
if (type === MessagingEmailConnectorType.EntityStorage) {
|
|
1584
|
-
initSchema$
|
|
1774
|
+
initSchema$9({ email: true, sms: false, pushNotification: false });
|
|
1585
1775
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingEmailEntryStorageConnectorType, "EmailEntry");
|
|
1586
1776
|
connector = new EntityStorageMessagingEmailConnector({
|
|
1587
1777
|
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
@@ -1624,7 +1814,7 @@ function initialiseMessagingSmsConnector(engineCore, context, instanceConfig, ov
|
|
|
1624
1814
|
let connector;
|
|
1625
1815
|
let instanceType;
|
|
1626
1816
|
if (type === MessagingSmsConnectorType.EntityStorage) {
|
|
1627
|
-
initSchema$
|
|
1817
|
+
initSchema$9({ email: false, sms: true, pushNotification: false });
|
|
1628
1818
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingSmsEntryStorageConnectorType, "SmsEntry");
|
|
1629
1819
|
connector = new EntityStorageMessagingSmsConnector({
|
|
1630
1820
|
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
@@ -1667,7 +1857,7 @@ function initialiseMessagingPushNotificationConnector(engineCore, context, insta
|
|
|
1667
1857
|
let connector;
|
|
1668
1858
|
let instanceType;
|
|
1669
1859
|
if (type === MessagingPushNotificationConnectorType.EntityStorage) {
|
|
1670
|
-
initSchema$
|
|
1860
|
+
initSchema$9({ email: false, sms: false, pushNotification: true });
|
|
1671
1861
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingDeviceEntryStorageConnectorType, "PushNotificationDeviceEntry");
|
|
1672
1862
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingMessageEntryStorageConnectorType, "PushNotificationMessageEntry");
|
|
1673
1863
|
connector = new EntityStorageMessagingPushNotificationConnector({
|
|
@@ -1711,7 +1901,7 @@ function initialiseMessagingComponent(engineCore, context, instanceConfig, overr
|
|
|
1711
1901
|
let component;
|
|
1712
1902
|
let instanceType;
|
|
1713
1903
|
if (type === MessagingComponentType.Service) {
|
|
1714
|
-
initSchema$
|
|
1904
|
+
initSchema$a();
|
|
1715
1905
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.templateEntryStorageConnectorType, "TemplateEntry");
|
|
1716
1906
|
component = new MessagingService({
|
|
1717
1907
|
messagingEmailConnectorType: context.defaultTypes.messagingEmailConnector,
|
|
@@ -1786,7 +1976,7 @@ function initialiseNftConnector(engineCore, context, instanceConfig, overrideIns
|
|
|
1786
1976
|
let connector;
|
|
1787
1977
|
let instanceType;
|
|
1788
1978
|
if (type === NftConnectorType.EntityStorage) {
|
|
1789
|
-
initSchema$
|
|
1979
|
+
initSchema$b();
|
|
1790
1980
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.nftEntityStorageType, "Nft");
|
|
1791
1981
|
connector = new EntityStorageNftConnector(instanceConfig.options);
|
|
1792
1982
|
instanceType = EntityStorageNftConnector.NAMESPACE;
|
|
@@ -1899,7 +2089,7 @@ function initialiseTelemetryConnector(engineCore, context, instanceConfig, overr
|
|
|
1899
2089
|
let connector;
|
|
1900
2090
|
let instanceType;
|
|
1901
2091
|
if (type === TelemetryConnectorType.EntityStorage) {
|
|
1902
|
-
initSchema$
|
|
2092
|
+
initSchema$c();
|
|
1903
2093
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.telemetryMetricStorageConnectorType, "TelemetryMetric");
|
|
1904
2094
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.telemetryMetricValueStorageConnectorType, "TelemetryMetricValue");
|
|
1905
2095
|
connector = new EntityStorageTelemetryConnector({
|
|
@@ -1990,7 +2180,7 @@ function initialiseVaultConnector(engineCore, context, instanceConfig, overrideI
|
|
|
1990
2180
|
let connector;
|
|
1991
2181
|
let instanceType;
|
|
1992
2182
|
if (type === VaultConnectorType.EntityStorage) {
|
|
1993
|
-
initSchema$
|
|
2183
|
+
initSchema$d();
|
|
1994
2184
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.vaultKeyEntityStorageType, "VaultKey");
|
|
1995
2185
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.vaultSecretEntityStorageType, "VaultSecret");
|
|
1996
2186
|
connector = new EntityStorageVaultConnector(instanceConfig.options);
|
|
@@ -2112,7 +2302,7 @@ function initialiseWalletStorage(engineCore, context, instanceConfig, overrideIn
|
|
|
2112
2302
|
const type = instanceConfig.type;
|
|
2113
2303
|
if (type === WalletConnectorType.Iota) ;
|
|
2114
2304
|
else if (type === WalletConnectorType.EntityStorage) {
|
|
2115
|
-
initSchema$
|
|
2305
|
+
initSchema$e();
|
|
2116
2306
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.walletAddressEntityStorageType, "WalletAddress");
|
|
2117
2307
|
}
|
|
2118
2308
|
else {
|
|
@@ -2141,4 +2331,4 @@ const DltConfigType = {
|
|
|
2141
2331
|
IotaRebased: "iota-rebased"
|
|
2142
2332
|
};
|
|
2143
2333
|
|
|
2144
|
-
export { AttestationComponentType, AttestationConnectorType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, BackgroundTaskConnectorType, BlobStorageComponentType, BlobStorageConnectorType, DltConfigType, EntityStorageComponentType, EntityStorageConnectorType, EventBusComponentType, EventBusConnectorType, FaucetConnectorType, IdentityComponentType, IdentityConnectorType, IdentityProfileComponentType, IdentityProfileConnectorType, IdentityResolverComponentType, IdentityResolverConnectorType, ImmutableProofComponentType, ImmutableStorageConnectorType, LoggingComponentType, LoggingConnectorType, MessagingComponentType, MessagingEmailConnectorType, MessagingPushNotificationConnectorType, MessagingSmsConnectorType, NftComponentType, NftConnectorType, TelemetryComponentType, TelemetryConnectorType, VaultConnectorType, WalletConnectorType, initialiseAttestationComponent, initialiseAttestationConnector, initialiseAuditableItemGraphComponent, initialiseAuditableItemStreamComponent, initialiseBackgroundTaskConnector, initialiseBlobStorageComponent, initialiseBlobStorageConnector, initialiseEntityStorageComponent, initialiseEntityStorageConnector, initialiseEventBusComponent, initialiseEventBusConnector, initialiseFaucetConnector, initialiseIdentityComponent, initialiseIdentityConnector, initialiseIdentityProfileComponent, initialiseIdentityProfileConnector, initialiseIdentityResolverComponent, initialiseIdentityResolverConnector, initialiseImmutableProofComponent, initialiseImmutableStorageConnector, initialiseLoggingComponent, initialiseLoggingConnector, initialiseMessagingComponent, initialiseMessagingEmailConnector, initialiseMessagingPushNotificationConnector, initialiseMessagingSmsConnector, initialiseNftComponent, initialiseNftConnector, initialiseTelemetryComponent, initialiseTelemetryConnector, initialiseVaultConnector, initialiseWalletConnector, initialiseWalletStorage };
|
|
2334
|
+
export { AttestationComponentType, AttestationConnectorType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, BackgroundTaskConnectorType, BlobStorageComponentType, BlobStorageConnectorType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType, DltConfigType, EntityStorageComponentType, EntityStorageConnectorType, EventBusComponentType, EventBusConnectorType, FaucetConnectorType, IdentityComponentType, IdentityConnectorType, IdentityProfileComponentType, IdentityProfileConnectorType, IdentityResolverComponentType, IdentityResolverConnectorType, ImmutableProofComponentType, ImmutableStorageConnectorType, LoggingComponentType, LoggingConnectorType, MessagingComponentType, MessagingEmailConnectorType, MessagingPushNotificationConnectorType, MessagingSmsConnectorType, NftComponentType, NftConnectorType, TelemetryComponentType, TelemetryConnectorType, VaultConnectorType, WalletConnectorType, initialiseAttestationComponent, initialiseAttestationConnector, initialiseAuditableItemGraphComponent, initialiseAuditableItemStreamComponent, initialiseBackgroundTaskConnector, initialiseBlobStorageComponent, initialiseBlobStorageConnector, initialiseDataConverterConnector, initialiseDataExtractorConnector, initialiseDataProcessingComponent, initialiseEntityStorageComponent, initialiseEntityStorageConnector, initialiseEventBusComponent, initialiseEventBusConnector, initialiseFaucetConnector, initialiseIdentityComponent, initialiseIdentityConnector, initialiseIdentityProfileComponent, initialiseIdentityProfileConnector, initialiseIdentityResolverComponent, initialiseIdentityResolverConnector, initialiseImmutableProofComponent, initialiseImmutableStorageConnector, initialiseLoggingComponent, initialiseLoggingConnector, initialiseMessagingComponent, initialiseMessagingEmailConnector, initialiseMessagingPushNotificationConnector, initialiseMessagingSmsConnector, initialiseNftComponent, initialiseNftConnector, initialiseTelemetryComponent, initialiseTelemetryConnector, initialiseVaultConnector, initialiseWalletConnector, initialiseWalletStorage };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
2
|
+
import type { DataConverterConnectorConfig } from "../models/config/dataConverterConnectorConfig";
|
|
3
|
+
import type { DataExtractorConnectorConfig } from "../models/config/dataExtractorConnectorConfig";
|
|
4
|
+
import type { DataProcessingComponentConfig } from "../models/config/dataProcessingComponentConfig";
|
|
5
|
+
import type { IEngineConfig } from "../models/IEngineConfig";
|
|
6
|
+
/**
|
|
7
|
+
* Initialise the data converter connector.
|
|
8
|
+
* @param engineCore The engine core.
|
|
9
|
+
* @param context The context for the engine.
|
|
10
|
+
* @param instanceConfig The instance config.
|
|
11
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
12
|
+
* @returns The name of the instance created.
|
|
13
|
+
* @throws GeneralError if the connector type is unknown.
|
|
14
|
+
*/
|
|
15
|
+
export declare function initialiseDataConverterConnector(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: DataConverterConnectorConfig, overrideInstanceType?: string): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Initialise the data extractor connector.
|
|
18
|
+
* @param engineCore The engine core.
|
|
19
|
+
* @param context The context for the engine.
|
|
20
|
+
* @param instanceConfig The instance config.
|
|
21
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
22
|
+
* @returns The name of the instance created.
|
|
23
|
+
* @throws GeneralError if the connector type is unknown.
|
|
24
|
+
*/
|
|
25
|
+
export declare function initialiseDataExtractorConnector(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: DataExtractorConnectorConfig, overrideInstanceType?: string): string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Initialise the data processing component.
|
|
28
|
+
* @param engineCore The engine core.
|
|
29
|
+
* @param context The context for the engine.
|
|
30
|
+
* @param instanceConfig The instance config.
|
|
31
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
32
|
+
* @returns The name of the instance created.
|
|
33
|
+
* @throws GeneralError if the component type is unknown.
|
|
34
|
+
*/
|
|
35
|
+
export declare function initialiseDataProcessingComponent(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: DataProcessingComponentConfig, overrideInstanceType?: string): string | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./components/auditableItemGraph";
|
|
|
3
3
|
export * from "./components/auditableItemStream";
|
|
4
4
|
export * from "./components/backgroundTask";
|
|
5
5
|
export * from "./components/blobStorage";
|
|
6
|
+
export * from "./components/dataProcessing";
|
|
6
7
|
export * from "./components/entityStorage";
|
|
7
8
|
export * from "./components/eventBus";
|
|
8
9
|
export * from "./components/faucet";
|
|
@@ -24,6 +25,9 @@ export * from "./models/config/auditableItemStreamComponentConfig";
|
|
|
24
25
|
export * from "./models/config/backgroundTaskConnectorConfig";
|
|
25
26
|
export * from "./models/config/blobStorageComponentConfig";
|
|
26
27
|
export * from "./models/config/blobStorageConnectorConfig";
|
|
28
|
+
export * from "./models/config/dataConverterConnectorConfig";
|
|
29
|
+
export * from "./models/config/dataExtractorConnectorConfig";
|
|
30
|
+
export * from "./models/config/dataProcessingComponentConfig";
|
|
27
31
|
export * from "./models/config/dltConfig";
|
|
28
32
|
export * from "./models/config/entityStorageComponentConfig";
|
|
29
33
|
export * from "./models/config/entityStorageConnectorConfig";
|
|
@@ -58,6 +62,9 @@ export * from "./models/types/auditableItemStreamComponentType";
|
|
|
58
62
|
export * from "./models/types/backgroundTaskConnectorType";
|
|
59
63
|
export * from "./models/types/blobStorageComponentType";
|
|
60
64
|
export * from "./models/types/blobStorageConnectorType";
|
|
65
|
+
export * from "./models/types/dataConverterConnectorType";
|
|
66
|
+
export * from "./models/types/dataExtractorConnectorType";
|
|
67
|
+
export * from "./models/types/dataProcessingComponentType";
|
|
61
68
|
export * from "./models/types/dltConfigType";
|
|
62
69
|
export * from "./models/types/entityStorageComponentType";
|
|
63
70
|
export * from "./models/types/entityStorageConnectorType";
|
|
@@ -6,6 +6,9 @@ import type { AuditableItemStreamComponentConfig } from "./config/auditableItemS
|
|
|
6
6
|
import type { BackgroundTaskConnectorConfig } from "./config/backgroundTaskConnectorConfig";
|
|
7
7
|
import type { BlobStorageComponentConfig } from "./config/blobStorageComponentConfig";
|
|
8
8
|
import type { BlobStorageConnectorConfig } from "./config/blobStorageConnectorConfig";
|
|
9
|
+
import type { DataConverterConnectorConfig } from "./config/dataConverterConnectorConfig";
|
|
10
|
+
import type { DataExtractorConnectorConfig } from "./config/dataExtractorConnectorConfig";
|
|
11
|
+
import type { DataProcessingComponentConfig } from "./config/dataProcessingComponentConfig";
|
|
9
12
|
import type { DltConfig } from "./config/dltConfig";
|
|
10
13
|
import type { EntityStorageComponentConfig } from "./config/entityStorageComponentConfig";
|
|
11
14
|
import type { EntityStorageConnectorConfig } from "./config/entityStorageConnectorConfig";
|
|
@@ -162,7 +165,7 @@ export interface IEngineConfig extends IEngineCoreConfig {
|
|
|
162
165
|
*/
|
|
163
166
|
attestationConnector?: IEngineCoreTypeConfig<AttestationConnectorConfig>[];
|
|
164
167
|
/**
|
|
165
|
-
* Attestation component
|
|
168
|
+
* Attestation component options which can be overridden by individual components by specifying types other than default.
|
|
166
169
|
*/
|
|
167
170
|
attestationComponent?: IEngineCoreTypeConfig<AttestationComponentConfig>[];
|
|
168
171
|
/**
|
|
@@ -170,8 +173,20 @@ export interface IEngineConfig extends IEngineCoreConfig {
|
|
|
170
173
|
*/
|
|
171
174
|
auditableItemGraphComponent?: IEngineCoreTypeConfig<AuditableItemGraphComponentConfig>[];
|
|
172
175
|
/**
|
|
173
|
-
* Auditable item stream component
|
|
176
|
+
* Auditable item stream component options which can be overridden by individual components by specifying types other than default.
|
|
174
177
|
*/
|
|
175
178
|
auditableItemStreamComponent?: IEngineCoreTypeConfig<AuditableItemStreamComponentConfig>[];
|
|
179
|
+
/**
|
|
180
|
+
* Data converter connector options which can be overridden by individual components by specifying types other than default.
|
|
181
|
+
*/
|
|
182
|
+
dataConverterConnector?: IEngineCoreTypeConfig<DataConverterConnectorConfig>[];
|
|
183
|
+
/**
|
|
184
|
+
* Data extractor connector options which can be overridden by individual components by specifying types other than default.
|
|
185
|
+
*/
|
|
186
|
+
dataExtractorConnector?: IEngineCoreTypeConfig<DataExtractorConnectorConfig>[];
|
|
187
|
+
/**
|
|
188
|
+
* Date processing options which can be overridden by individual components by specifying types other than default.
|
|
189
|
+
*/
|
|
190
|
+
dataProcessingComponent?: IEngineCoreTypeConfig<DataProcessingComponentConfig>[];
|
|
176
191
|
};
|
|
177
192
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DataConverterConnectorType } from "../types/dataConverterConnectorType";
|
|
2
|
+
/**
|
|
3
|
+
* Data converter connector config types.
|
|
4
|
+
*/
|
|
5
|
+
export type DataConverterConnectorConfig = {
|
|
6
|
+
type: typeof DataConverterConnectorType.Json;
|
|
7
|
+
options?: never;
|
|
8
|
+
} | {
|
|
9
|
+
type: typeof DataConverterConnectorType.Xml;
|
|
10
|
+
options?: never;
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IDataProcessingServiceConstructorOptions } from "@twin.org/data-processing-service";
|
|
2
|
+
import type { DataProcessingComponentType } from "../types/dataProcessingComponentType";
|
|
3
|
+
/**
|
|
4
|
+
* Data processing component config types.
|
|
5
|
+
*/
|
|
6
|
+
export type DataProcessingComponentConfig = {
|
|
7
|
+
type: typeof DataProcessingComponentType.Service;
|
|
8
|
+
options?: IDataProcessingServiceConstructorOptions;
|
|
9
|
+
};
|
|
@@ -2,7 +2,9 @@ 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 { IMongoDbEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-mongodb";
|
|
5
6
|
import type { IMySqlEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-mysql";
|
|
7
|
+
import type { IPostgreSqlEntityStorageConnectorConstructorOptions } from "@twin.org/entity-storage-connector-postgresql";
|
|
6
8
|
import type { IScyllaDBTableConnectorConstructorOptions } from "@twin.org/entity-storage-connector-scylladb";
|
|
7
9
|
import type { EntityStorageConnectorType } from "../types/entityStorageConnectorType";
|
|
8
10
|
/**
|
|
@@ -46,4 +48,16 @@ export type EntityStorageConnectorConfig = {
|
|
|
46
48
|
config: Omit<IMySqlEntityStorageConnectorConstructorOptions["config"], "tableName">;
|
|
47
49
|
tablePrefix?: string;
|
|
48
50
|
};
|
|
51
|
+
} | {
|
|
52
|
+
type: typeof EntityStorageConnectorType.MongoDb;
|
|
53
|
+
options: Omit<IMongoDbEntityStorageConnectorConstructorOptions, "entitySchema" | "config"> & {
|
|
54
|
+
config: Omit<IMongoDbEntityStorageConnectorConstructorOptions["config"], "collection">;
|
|
55
|
+
tablePrefix?: string;
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
type: typeof EntityStorageConnectorType.PostgreSql;
|
|
59
|
+
options: Omit<IPostgreSqlEntityStorageConnectorConstructorOptions, "entitySchema" | "config"> & {
|
|
60
|
+
config: Omit<IPostgreSqlEntityStorageConnectorConstructorOptions["config"], "tableName">;
|
|
61
|
+
tablePrefix?: string;
|
|
62
|
+
};
|
|
49
63
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data converter connector types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DataConverterConnectorType: {
|
|
5
|
+
/**
|
|
6
|
+
* JSON.
|
|
7
|
+
*/
|
|
8
|
+
readonly Json: "json";
|
|
9
|
+
/**
|
|
10
|
+
* Xml.
|
|
11
|
+
*/
|
|
12
|
+
readonly Xml: "xml";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Data converter connector types.
|
|
16
|
+
*/
|
|
17
|
+
export type DataConverterConnectorType = (typeof DataConverterConnectorType)[keyof typeof DataConverterConnectorType];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data extractor connector types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DataExtractorConnectorType: {
|
|
5
|
+
/**
|
|
6
|
+
* JSON Path.
|
|
7
|
+
*/
|
|
8
|
+
readonly JsonPath: "json-path";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Data extractor connector types.
|
|
12
|
+
*/
|
|
13
|
+
export type DataExtractorConnectorType = (typeof DataExtractorConnectorType)[keyof typeof DataExtractorConnectorType];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data processing component types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const DataProcessingComponentType: {
|
|
5
|
+
/**
|
|
6
|
+
* Service.
|
|
7
|
+
*/
|
|
8
|
+
readonly Service: "service";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Data processing component types.
|
|
12
|
+
*/
|
|
13
|
+
export type DataProcessingComponentType = (typeof DataProcessingComponentType)[keyof typeof DataProcessingComponentType];
|
|
@@ -30,6 +30,14 @@ export declare const EntityStorageConnectorType: {
|
|
|
30
30
|
* MySqlDb.
|
|
31
31
|
*/
|
|
32
32
|
readonly MySqlDb: "mysql";
|
|
33
|
+
/**
|
|
34
|
+
* MongoDb.
|
|
35
|
+
*/
|
|
36
|
+
readonly MongoDb: "mongodb";
|
|
37
|
+
/**
|
|
38
|
+
* Postgre SQL.
|
|
39
|
+
*/
|
|
40
|
+
readonly PostgreSql: "postgresql";
|
|
33
41
|
};
|
|
34
42
|
/**
|
|
35
43
|
* Entity storage connector types.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Function: initialiseDataConverterConnector()
|
|
2
|
+
|
|
3
|
+
> **initialiseDataConverterConnector**(`engineCore`, `context`, `instanceConfig`, `overrideInstanceType`?): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Initialise the data converter connector.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### engineCore
|
|
10
|
+
|
|
11
|
+
`IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
|
|
12
|
+
|
|
13
|
+
The engine core.
|
|
14
|
+
|
|
15
|
+
### context
|
|
16
|
+
|
|
17
|
+
`IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
|
|
18
|
+
|
|
19
|
+
The context for the engine.
|
|
20
|
+
|
|
21
|
+
### instanceConfig
|
|
22
|
+
|
|
23
|
+
[`DataConverterConnectorConfig`](../type-aliases/DataConverterConnectorConfig.md)
|
|
24
|
+
|
|
25
|
+
The instance config.
|
|
26
|
+
|
|
27
|
+
### overrideInstanceType?
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
The instance type to override the default.
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`string` \| `undefined`
|
|
36
|
+
|
|
37
|
+
The name of the instance created.
|
|
38
|
+
|
|
39
|
+
## Throws
|
|
40
|
+
|
|
41
|
+
GeneralError if the connector type is unknown.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Function: initialiseDataExtractorConnector()
|
|
2
|
+
|
|
3
|
+
> **initialiseDataExtractorConnector**(`engineCore`, `context`, `instanceConfig`, `overrideInstanceType`?): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Initialise the data extractor connector.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### engineCore
|
|
10
|
+
|
|
11
|
+
`IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
|
|
12
|
+
|
|
13
|
+
The engine core.
|
|
14
|
+
|
|
15
|
+
### context
|
|
16
|
+
|
|
17
|
+
`IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
|
|
18
|
+
|
|
19
|
+
The context for the engine.
|
|
20
|
+
|
|
21
|
+
### instanceConfig
|
|
22
|
+
|
|
23
|
+
[`DataExtractorConnectorConfig`](../type-aliases/DataExtractorConnectorConfig.md)
|
|
24
|
+
|
|
25
|
+
The instance config.
|
|
26
|
+
|
|
27
|
+
### overrideInstanceType?
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
The instance type to override the default.
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`string` \| `undefined`
|
|
36
|
+
|
|
37
|
+
The name of the instance created.
|
|
38
|
+
|
|
39
|
+
## Throws
|
|
40
|
+
|
|
41
|
+
GeneralError if the connector type is unknown.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Function: initialiseDataProcessingComponent()
|
|
2
|
+
|
|
3
|
+
> **initialiseDataProcessingComponent**(`engineCore`, `context`, `instanceConfig`, `overrideInstanceType`?): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Initialise the data processing component.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
### engineCore
|
|
10
|
+
|
|
11
|
+
`IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
|
|
12
|
+
|
|
13
|
+
The engine core.
|
|
14
|
+
|
|
15
|
+
### context
|
|
16
|
+
|
|
17
|
+
`IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
|
|
18
|
+
|
|
19
|
+
The context for the engine.
|
|
20
|
+
|
|
21
|
+
### instanceConfig
|
|
22
|
+
|
|
23
|
+
[`DataProcessingComponentConfig`](../type-aliases/DataProcessingComponentConfig.md)
|
|
24
|
+
|
|
25
|
+
The instance config.
|
|
26
|
+
|
|
27
|
+
### overrideInstanceType?
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
The instance type to override the default.
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`string` \| `undefined`
|
|
36
|
+
|
|
37
|
+
The name of the instance created.
|
|
38
|
+
|
|
39
|
+
## Throws
|
|
40
|
+
|
|
41
|
+
GeneralError if the component type is unknown.
|
package/docs/reference/index.md
CHANGED
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
- [BackgroundTaskConnectorConfig](type-aliases/BackgroundTaskConnectorConfig.md)
|
|
14
14
|
- [BlobStorageComponentConfig](type-aliases/BlobStorageComponentConfig.md)
|
|
15
15
|
- [BlobStorageConnectorConfig](type-aliases/BlobStorageConnectorConfig.md)
|
|
16
|
+
- [DataConverterConnectorConfig](type-aliases/DataConverterConnectorConfig.md)
|
|
17
|
+
- [DataExtractorConnectorConfig](type-aliases/DataExtractorConnectorConfig.md)
|
|
18
|
+
- [DataProcessingComponentConfig](type-aliases/DataProcessingComponentConfig.md)
|
|
16
19
|
- [DltConfig](type-aliases/DltConfig.md)
|
|
17
20
|
- [EntityStorageComponentConfig](type-aliases/EntityStorageComponentConfig.md)
|
|
18
21
|
- [EntityStorageConnectorConfig](type-aliases/EntityStorageConnectorConfig.md)
|
|
@@ -46,6 +49,9 @@
|
|
|
46
49
|
- [BackgroundTaskConnectorType](type-aliases/BackgroundTaskConnectorType.md)
|
|
47
50
|
- [BlobStorageComponentType](type-aliases/BlobStorageComponentType.md)
|
|
48
51
|
- [BlobStorageConnectorType](type-aliases/BlobStorageConnectorType.md)
|
|
52
|
+
- [DataConverterConnectorType](type-aliases/DataConverterConnectorType.md)
|
|
53
|
+
- [DataExtractorConnectorType](type-aliases/DataExtractorConnectorType.md)
|
|
54
|
+
- [DataProcessingComponentType](type-aliases/DataProcessingComponentType.md)
|
|
49
55
|
- [DltConfigType](type-aliases/DltConfigType.md)
|
|
50
56
|
- [EntityStorageComponentType](type-aliases/EntityStorageComponentType.md)
|
|
51
57
|
- [EntityStorageConnectorType](type-aliases/EntityStorageConnectorType.md)
|
|
@@ -82,6 +88,9 @@
|
|
|
82
88
|
- [BackgroundTaskConnectorType](variables/BackgroundTaskConnectorType.md)
|
|
83
89
|
- [BlobStorageComponentType](variables/BlobStorageComponentType.md)
|
|
84
90
|
- [BlobStorageConnectorType](variables/BlobStorageConnectorType.md)
|
|
91
|
+
- [DataConverterConnectorType](variables/DataConverterConnectorType.md)
|
|
92
|
+
- [DataExtractorConnectorType](variables/DataExtractorConnectorType.md)
|
|
93
|
+
- [DataProcessingComponentType](variables/DataProcessingComponentType.md)
|
|
85
94
|
- [DltConfigType](variables/DltConfigType.md)
|
|
86
95
|
- [EntityStorageComponentType](variables/EntityStorageComponentType.md)
|
|
87
96
|
- [EntityStorageConnectorType](variables/EntityStorageConnectorType.md)
|
|
@@ -118,6 +127,9 @@
|
|
|
118
127
|
- [initialiseBackgroundTaskConnector](functions/initialiseBackgroundTaskConnector.md)
|
|
119
128
|
- [initialiseBlobStorageConnector](functions/initialiseBlobStorageConnector.md)
|
|
120
129
|
- [initialiseBlobStorageComponent](functions/initialiseBlobStorageComponent.md)
|
|
130
|
+
- [initialiseDataConverterConnector](functions/initialiseDataConverterConnector.md)
|
|
131
|
+
- [initialiseDataExtractorConnector](functions/initialiseDataExtractorConnector.md)
|
|
132
|
+
- [initialiseDataProcessingComponent](functions/initialiseDataProcessingComponent.md)
|
|
121
133
|
- [initialiseEntityStorageConnector](functions/initialiseEntityStorageConnector.md)
|
|
122
134
|
- [initialiseEntityStorageComponent](functions/initialiseEntityStorageComponent.md)
|
|
123
135
|
- [initialiseEventBusConnector](functions/initialiseEventBusConnector.md)
|
|
@@ -202,7 +202,7 @@ Attestation connector options which can be overridden by individual components b
|
|
|
202
202
|
|
|
203
203
|
> `optional` **attestationComponent**: `IEngineCoreTypeConfig`\<[`AttestationComponentConfig`](../type-aliases/AttestationComponentConfig.md)\>[]
|
|
204
204
|
|
|
205
|
-
Attestation component
|
|
205
|
+
Attestation component options which can be overridden by individual components by specifying types other than default.
|
|
206
206
|
|
|
207
207
|
#### auditableItemGraphComponent?
|
|
208
208
|
|
|
@@ -214,7 +214,25 @@ Auditable item graph component options which can be overridden by individual com
|
|
|
214
214
|
|
|
215
215
|
> `optional` **auditableItemStreamComponent**: `IEngineCoreTypeConfig`\<[`AuditableItemStreamComponentConfig`](../type-aliases/AuditableItemStreamComponentConfig.md)\>[]
|
|
216
216
|
|
|
217
|
-
Auditable item stream component
|
|
217
|
+
Auditable item stream component options which can be overridden by individual components by specifying types other than default.
|
|
218
|
+
|
|
219
|
+
#### dataConverterConnector?
|
|
220
|
+
|
|
221
|
+
> `optional` **dataConverterConnector**: `IEngineCoreTypeConfig`\<[`DataConverterConnectorConfig`](../type-aliases/DataConverterConnectorConfig.md)\>[]
|
|
222
|
+
|
|
223
|
+
Data converter connector options which can be overridden by individual components by specifying types other than default.
|
|
224
|
+
|
|
225
|
+
#### dataExtractorConnector?
|
|
226
|
+
|
|
227
|
+
> `optional` **dataExtractorConnector**: `IEngineCoreTypeConfig`\<[`DataExtractorConnectorConfig`](../type-aliases/DataExtractorConnectorConfig.md)\>[]
|
|
228
|
+
|
|
229
|
+
Data extractor connector options which can be overridden by individual components by specifying types other than default.
|
|
230
|
+
|
|
231
|
+
#### dataProcessingComponent?
|
|
232
|
+
|
|
233
|
+
> `optional` **dataProcessingComponent**: `IEngineCoreTypeConfig`\<[`DataProcessingComponentConfig`](../type-aliases/DataProcessingComponentConfig.md)\>[]
|
|
234
|
+
|
|
235
|
+
Date processing options which can be overridden by individual components by specifying types other than default.
|
|
218
236
|
|
|
219
237
|
#### Overrides
|
|
220
238
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: DataConverterConnectorConfig
|
|
2
|
+
|
|
3
|
+
> **DataConverterConnectorConfig**: \{ `type`: *typeof* [`Json`](../variables/DataConverterConnectorType.md#json); `options`: `never`; \} \| \{ `type`: *typeof* [`Xml`](../variables/DataConverterConnectorType.md#xml); `options`: `never`; \}
|
|
4
|
+
|
|
5
|
+
Data converter connector config types.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: DataConverterConnectorType
|
|
2
|
+
|
|
3
|
+
> **DataConverterConnectorType**: *typeof* [`DataConverterConnectorType`](../variables/DataConverterConnectorType.md)\[keyof *typeof* [`DataConverterConnectorType`](../variables/DataConverterConnectorType.md)\]
|
|
4
|
+
|
|
5
|
+
Data converter connector types.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Type Alias: DataExtractorConnectorConfig
|
|
2
|
+
|
|
3
|
+
> **DataExtractorConnectorConfig**: `object`
|
|
4
|
+
|
|
5
|
+
Data extractor connector config types.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### type
|
|
10
|
+
|
|
11
|
+
> **type**: *typeof* [`JsonPath`](../variables/DataExtractorConnectorType.md#jsonpath)
|
|
12
|
+
|
|
13
|
+
### options?
|
|
14
|
+
|
|
15
|
+
> `optional` **options**: `never`
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: DataExtractorConnectorType
|
|
2
|
+
|
|
3
|
+
> **DataExtractorConnectorType**: *typeof* [`DataExtractorConnectorType`](../variables/DataExtractorConnectorType.md)\[keyof *typeof* [`DataExtractorConnectorType`](../variables/DataExtractorConnectorType.md)\]
|
|
4
|
+
|
|
5
|
+
Data extractor connector types.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Type Alias: DataProcessingComponentConfig
|
|
2
|
+
|
|
3
|
+
> **DataProcessingComponentConfig**: `object`
|
|
4
|
+
|
|
5
|
+
Data processing component config types.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### type
|
|
10
|
+
|
|
11
|
+
> **type**: *typeof* [`Service`](../variables/DataProcessingComponentType.md#service)
|
|
12
|
+
|
|
13
|
+
### options?
|
|
14
|
+
|
|
15
|
+
> `optional` **options**: `IDataProcessingServiceConstructorOptions`
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: DataProcessingComponentType
|
|
2
|
+
|
|
3
|
+
> **DataProcessingComponentType**: *typeof* [`DataProcessingComponentType`](../variables/DataProcessingComponentType.md)\[keyof *typeof* [`DataProcessingComponentType`](../variables/DataProcessingComponentType.md)\]
|
|
4
|
+
|
|
5
|
+
Data processing component types.
|
|
@@ -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`; \}
|
|
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`; \}
|
|
4
4
|
|
|
5
5
|
Entity storage connector config types.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: DataConverterConnectorType
|
|
2
|
+
|
|
3
|
+
> `const` **DataConverterConnectorType**: `object`
|
|
4
|
+
|
|
5
|
+
Data converter connector types.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### Json
|
|
10
|
+
|
|
11
|
+
> `readonly` **Json**: `"json"` = `"json"`
|
|
12
|
+
|
|
13
|
+
JSON.
|
|
14
|
+
|
|
15
|
+
### Xml
|
|
16
|
+
|
|
17
|
+
> `readonly` **Xml**: `"xml"` = `"xml"`
|
|
18
|
+
|
|
19
|
+
Xml.
|
|
@@ -47,3 +47,15 @@ GCP Firestore.
|
|
|
47
47
|
> `readonly` **MySqlDb**: `"mysql"` = `"mysql"`
|
|
48
48
|
|
|
49
49
|
MySqlDb.
|
|
50
|
+
|
|
51
|
+
### MongoDb
|
|
52
|
+
|
|
53
|
+
> `readonly` **MongoDb**: `"mongodb"` = `"mongodb"`
|
|
54
|
+
|
|
55
|
+
MongoDb.
|
|
56
|
+
|
|
57
|
+
### PostgreSql
|
|
58
|
+
|
|
59
|
+
> `readonly` **PostgreSql**: `"postgresql"` = `"postgresql"`
|
|
60
|
+
|
|
61
|
+
Postgre SQL.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/engine-types",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.39",
|
|
4
4
|
"description": "Types to use in an engine.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@twin.org/crypto": "next",
|
|
19
19
|
"@twin.org/data-core": "next",
|
|
20
20
|
"@twin.org/data-schema-org": "next",
|
|
21
|
-
"@twin.org/engine-models": "0.0.1-next.
|
|
21
|
+
"@twin.org/engine-models": "0.0.1-next.39",
|
|
22
22
|
"@twin.org/entity": "next",
|
|
23
23
|
"@twin.org/modules": "next",
|
|
24
24
|
"@twin.org/nameof": "next"
|
|
@@ -41,12 +41,18 @@
|
|
|
41
41
|
"@twin.org/blob-storage-connector-memory": "next",
|
|
42
42
|
"@twin.org/blob-storage-models": "next",
|
|
43
43
|
"@twin.org/blob-storage-service": "next",
|
|
44
|
+
"@twin.org/data-processing-converters": "next",
|
|
45
|
+
"@twin.org/data-processing-extractors": "next",
|
|
46
|
+
"@twin.org/data-processing-models": "next",
|
|
47
|
+
"@twin.org/data-processing-service": "next",
|
|
44
48
|
"@twin.org/entity-storage-connector-cosmosdb": "next",
|
|
45
49
|
"@twin.org/entity-storage-connector-dynamodb": "next",
|
|
46
50
|
"@twin.org/entity-storage-connector-file": "next",
|
|
47
51
|
"@twin.org/entity-storage-connector-gcp-firestore": "next",
|
|
48
52
|
"@twin.org/entity-storage-connector-memory": "next",
|
|
53
|
+
"@twin.org/entity-storage-connector-mongodb": "next",
|
|
49
54
|
"@twin.org/entity-storage-connector-mysql": "next",
|
|
55
|
+
"@twin.org/entity-storage-connector-postgresql": "next",
|
|
50
56
|
"@twin.org/entity-storage-connector-scylladb": "next",
|
|
51
57
|
"@twin.org/entity-storage-models": "next",
|
|
52
58
|
"@twin.org/entity-storage-service": "next",
|