@twin.org/engine-types 0.0.1-next.29 → 0.0.1-next.30
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 +247 -0
- package/dist/esm/index.mjs +248 -9
- package/dist/types/components/messaging.d.ts +46 -0
- package/dist/types/index.d.ts +11 -2
- package/dist/types/models/IEngineConfig.d.ts +20 -0
- package/dist/types/models/config/messagingComponentConfig.d.ts +13 -0
- package/dist/types/models/config/messagingEmailConnectorConfig.d.ts +18 -0
- package/dist/types/models/config/messagingPushNotificationConnectorConfig.d.ts +19 -0
- package/dist/types/models/config/messagingSmsConnectorConfig.d.ts +18 -0
- package/dist/types/models/types/messagingComponentType.d.ts +13 -0
- package/dist/types/models/types/messagingEmailConnectorType.d.ts +17 -0
- package/dist/types/models/types/messagingPushNotificationConnectorType.d.ts +17 -0
- package/dist/types/models/types/messagingSmsConnectorType.d.ts +17 -0
- package/docs/reference/functions/initialiseMessagingComponent.md +33 -0
- package/docs/reference/functions/initialiseMessagingEmailConnector.md +33 -0
- package/docs/reference/functions/initialiseMessagingPushNotificationConnector.md +33 -0
- package/docs/reference/functions/initialiseMessagingSmsConnector.md +33 -0
- package/docs/reference/index.md +16 -0
- package/docs/reference/interfaces/IEngineConfig.md +24 -0
- package/docs/reference/type-aliases/MessagingComponentConfig.md +31 -0
- package/docs/reference/type-aliases/MessagingComponentType.md +5 -0
- package/docs/reference/type-aliases/MessagingEmailConnectorConfig.md +5 -0
- package/docs/reference/type-aliases/MessagingEmailConnectorType.md +5 -0
- package/docs/reference/type-aliases/MessagingPushNotificationConnectorConfig.md +5 -0
- package/docs/reference/type-aliases/MessagingPushNotificationConnectorType.md +5 -0
- package/docs/reference/type-aliases/MessagingSmsConnectorConfig.md +5 -0
- package/docs/reference/type-aliases/MessagingSmsConnectorType.md +5 -0
- package/docs/reference/variables/MessagingComponentType.md +13 -0
- package/docs/reference/variables/MessagingEmailConnectorType.md +19 -0
- package/docs/reference/variables/MessagingPushNotificationConnectorType.md +19 -0
- package/docs/reference/variables/MessagingSmsConnectorType.md +19 -0
- package/package.json +6 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -44,6 +44,10 @@ var loggingConnectorConsole = require('@twin.org/logging-connector-console');
|
|
|
44
44
|
var loggingConnectorEntityStorage = require('@twin.org/logging-connector-entity-storage');
|
|
45
45
|
var loggingModels = require('@twin.org/logging-models');
|
|
46
46
|
var loggingService = require('@twin.org/logging-service');
|
|
47
|
+
var messagingConnectorAws = require('@twin.org/messaging-connector-aws');
|
|
48
|
+
var messagingConnectorEntityStorage = require('@twin.org/messaging-connector-entity-storage');
|
|
49
|
+
var messagingModels = require('@twin.org/messaging-models');
|
|
50
|
+
var messagingService = require('@twin.org/messaging-service');
|
|
47
51
|
var nftConnectorEntityStorage = require('@twin.org/nft-connector-entity-storage');
|
|
48
52
|
var nftConnectorIota = require('@twin.org/nft-connector-iota');
|
|
49
53
|
var nftModels = require('@twin.org/nft-models');
|
|
@@ -1315,6 +1319,241 @@ function initialiseLoggingComponent(engineCore, context, instanceConfig, overrid
|
|
|
1315
1319
|
return finalInstanceType;
|
|
1316
1320
|
}
|
|
1317
1321
|
|
|
1322
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1323
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1324
|
+
/**
|
|
1325
|
+
* Messaging component types.
|
|
1326
|
+
*/
|
|
1327
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1328
|
+
const MessagingComponentType = {
|
|
1329
|
+
/**
|
|
1330
|
+
* Service.
|
|
1331
|
+
*/
|
|
1332
|
+
Service: "service"
|
|
1333
|
+
};
|
|
1334
|
+
|
|
1335
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1336
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1337
|
+
/**
|
|
1338
|
+
* Messaging email connector types.
|
|
1339
|
+
*/
|
|
1340
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1341
|
+
const MessagingEmailConnectorType = {
|
|
1342
|
+
/**
|
|
1343
|
+
* Entity storage.
|
|
1344
|
+
*/
|
|
1345
|
+
EntityStorage: "entity-storage",
|
|
1346
|
+
/**
|
|
1347
|
+
* AWS.
|
|
1348
|
+
*/
|
|
1349
|
+
Aws: "aws"
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1353
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1354
|
+
/**
|
|
1355
|
+
* Messaging push notification connector types.
|
|
1356
|
+
*/
|
|
1357
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1358
|
+
const MessagingPushNotificationConnectorType = {
|
|
1359
|
+
/**
|
|
1360
|
+
* Entity storage.
|
|
1361
|
+
*/
|
|
1362
|
+
EntityStorage: "entity-storage",
|
|
1363
|
+
/**
|
|
1364
|
+
* AWS.
|
|
1365
|
+
*/
|
|
1366
|
+
Aws: "aws"
|
|
1367
|
+
};
|
|
1368
|
+
|
|
1369
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1370
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1371
|
+
/**
|
|
1372
|
+
* Messaging sms connector types.
|
|
1373
|
+
*/
|
|
1374
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1375
|
+
const MessagingSmsConnectorType = {
|
|
1376
|
+
/**
|
|
1377
|
+
* Entity storage.
|
|
1378
|
+
*/
|
|
1379
|
+
EntityStorage: "entity-storage",
|
|
1380
|
+
/**
|
|
1381
|
+
* AWS.
|
|
1382
|
+
*/
|
|
1383
|
+
Aws: "aws"
|
|
1384
|
+
};
|
|
1385
|
+
|
|
1386
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1387
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1388
|
+
/**
|
|
1389
|
+
* Initialise a messaging email connector.
|
|
1390
|
+
* @param engineCore The engine core.
|
|
1391
|
+
* @param context The context for the engine.
|
|
1392
|
+
* @param instanceConfig The instance config.
|
|
1393
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
1394
|
+
* @returns The name of the instance created.
|
|
1395
|
+
* @throws GeneralError if the connector type is unknown.
|
|
1396
|
+
*/
|
|
1397
|
+
function initialiseMessagingEmailConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
1398
|
+
engineCore.logInfo(core.I18n.formatMessage("engineCore.configuring", {
|
|
1399
|
+
element: `Messaging Email Connector: ${instanceConfig.type}`
|
|
1400
|
+
}));
|
|
1401
|
+
const type = instanceConfig.type;
|
|
1402
|
+
let connector;
|
|
1403
|
+
let instanceType;
|
|
1404
|
+
if (type === MessagingEmailConnectorType.EntityStorage) {
|
|
1405
|
+
messagingConnectorEntityStorage.initSchema({ email: true, sms: false, pushNotification: false });
|
|
1406
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingEmailEntryStorageConnectorType, "EmailEntry");
|
|
1407
|
+
connector = new messagingConnectorEntityStorage.EntityStorageMessagingEmailConnector({
|
|
1408
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1409
|
+
...instanceConfig.options
|
|
1410
|
+
});
|
|
1411
|
+
instanceType = messagingConnectorEntityStorage.EntityStorageMessagingEmailConnector.NAMESPACE;
|
|
1412
|
+
}
|
|
1413
|
+
else if (type === MessagingEmailConnectorType.Aws) {
|
|
1414
|
+
connector = new messagingConnectorAws.AwsMessagingEmailConnector({
|
|
1415
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1416
|
+
...instanceConfig.options
|
|
1417
|
+
});
|
|
1418
|
+
instanceType = messagingConnectorAws.AwsMessagingEmailConnector.NAMESPACE;
|
|
1419
|
+
}
|
|
1420
|
+
else {
|
|
1421
|
+
throw new core.GeneralError("engineCore", "connectorUnknownType", {
|
|
1422
|
+
type,
|
|
1423
|
+
connectorType: "messagingEmailConnector"
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
1427
|
+
context.componentInstances.push({ instanceType: finalInstanceType, component: connector });
|
|
1428
|
+
messagingModels.MessagingEmailConnectorFactory.register(finalInstanceType, () => connector);
|
|
1429
|
+
return finalInstanceType;
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Initialise a messaging sms connector.
|
|
1433
|
+
* @param engineCore The engine core.
|
|
1434
|
+
* @param context The context for the engine.
|
|
1435
|
+
* @param instanceConfig The instance config.
|
|
1436
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
1437
|
+
* @returns The name of the instance created.
|
|
1438
|
+
* @throws GeneralError if the connector type is unknown.
|
|
1439
|
+
*/
|
|
1440
|
+
function initialiseMessagingSmsConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
1441
|
+
engineCore.logInfo(core.I18n.formatMessage("engineCore.configuring", {
|
|
1442
|
+
element: `Messaging SMS Connector: ${instanceConfig.type}`
|
|
1443
|
+
}));
|
|
1444
|
+
const type = instanceConfig.type;
|
|
1445
|
+
let connector;
|
|
1446
|
+
let instanceType;
|
|
1447
|
+
if (type === MessagingSmsConnectorType.EntityStorage) {
|
|
1448
|
+
messagingConnectorEntityStorage.initSchema({ email: false, sms: true, pushNotification: false });
|
|
1449
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingSmsEntryStorageConnectorType, "SmsEntry");
|
|
1450
|
+
connector = new messagingConnectorEntityStorage.EntityStorageMessagingSmsConnector({
|
|
1451
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1452
|
+
...instanceConfig.options
|
|
1453
|
+
});
|
|
1454
|
+
instanceType = messagingConnectorEntityStorage.EntityStorageMessagingSmsConnector.NAMESPACE;
|
|
1455
|
+
}
|
|
1456
|
+
else if (type === MessagingSmsConnectorType.Aws) {
|
|
1457
|
+
connector = new messagingConnectorAws.AwsMessagingSmsConnector({
|
|
1458
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1459
|
+
...instanceConfig.options
|
|
1460
|
+
});
|
|
1461
|
+
instanceType = messagingConnectorAws.AwsMessagingSmsConnector.NAMESPACE;
|
|
1462
|
+
}
|
|
1463
|
+
else {
|
|
1464
|
+
throw new core.GeneralError("engineCore", "connectorUnknownType", {
|
|
1465
|
+
type,
|
|
1466
|
+
connectorType: "messagingSmsConnector"
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
1470
|
+
context.componentInstances.push({ instanceType: finalInstanceType, component: connector });
|
|
1471
|
+
messagingModels.MessagingSmsConnectorFactory.register(finalInstanceType, () => connector);
|
|
1472
|
+
return finalInstanceType;
|
|
1473
|
+
}
|
|
1474
|
+
/**
|
|
1475
|
+
* Initialise a messaging push notification connector.
|
|
1476
|
+
* @param engineCore The engine core.
|
|
1477
|
+
* @param context The context for the engine.
|
|
1478
|
+
* @param instanceConfig The instance config.
|
|
1479
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
1480
|
+
* @returns The name of the instance created.
|
|
1481
|
+
* @throws GeneralError if the connector type is unknown.
|
|
1482
|
+
*/
|
|
1483
|
+
function initialiseMessagingPushNotificationConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
1484
|
+
engineCore.logInfo(core.I18n.formatMessage("engineCore.configuring", {
|
|
1485
|
+
element: `Messaging Push Notification Connector: ${instanceConfig.type}`
|
|
1486
|
+
}));
|
|
1487
|
+
const type = instanceConfig.type;
|
|
1488
|
+
let connector;
|
|
1489
|
+
let instanceType;
|
|
1490
|
+
if (type === MessagingPushNotificationConnectorType.EntityStorage) {
|
|
1491
|
+
messagingConnectorEntityStorage.initSchema({ email: false, sms: false, pushNotification: true });
|
|
1492
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingDeviceEntryStorageConnectorType, "PushNotificationDeviceEntry");
|
|
1493
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingMessageEntryStorageConnectorType, "PushNotificationMessageEntry");
|
|
1494
|
+
connector = new messagingConnectorEntityStorage.EntityStorageMessagingPushNotificationConnector({
|
|
1495
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1496
|
+
...instanceConfig.options
|
|
1497
|
+
});
|
|
1498
|
+
instanceType = messagingConnectorEntityStorage.EntityStorageMessagingPushNotificationConnector.NAMESPACE;
|
|
1499
|
+
}
|
|
1500
|
+
else if (type === MessagingPushNotificationConnectorType.Aws) {
|
|
1501
|
+
connector = new messagingConnectorAws.AwsMessagingPushNotificationConnector({
|
|
1502
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1503
|
+
...instanceConfig.options
|
|
1504
|
+
});
|
|
1505
|
+
instanceType = messagingConnectorAws.AwsMessagingPushNotificationConnector.NAMESPACE;
|
|
1506
|
+
}
|
|
1507
|
+
else {
|
|
1508
|
+
throw new core.GeneralError("engineCore", "connectorUnknownType", {
|
|
1509
|
+
type,
|
|
1510
|
+
connectorType: "messagingPushNotificationConnector"
|
|
1511
|
+
});
|
|
1512
|
+
}
|
|
1513
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
1514
|
+
context.componentInstances.push({ instanceType: finalInstanceType, component: connector });
|
|
1515
|
+
messagingModels.MessagingPushNotificationsConnectorFactory.register(finalInstanceType, () => connector);
|
|
1516
|
+
return finalInstanceType;
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* Initialise the messaging component.
|
|
1520
|
+
* @param engineCore The engine core.
|
|
1521
|
+
* @param context The context for the engine.
|
|
1522
|
+
* @param instanceConfig The instance config.
|
|
1523
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
1524
|
+
* @returns The name of the instance created.
|
|
1525
|
+
* @throws GeneralError if the component type is unknown.
|
|
1526
|
+
*/
|
|
1527
|
+
function initialiseMessagingComponent(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
1528
|
+
engineCore.logInfo(core.I18n.formatMessage("engineCore.configuring", {
|
|
1529
|
+
element: `Messaging Component: ${instanceConfig.type}`
|
|
1530
|
+
}));
|
|
1531
|
+
const type = instanceConfig.type;
|
|
1532
|
+
let component;
|
|
1533
|
+
let instanceType;
|
|
1534
|
+
if (type === MessagingComponentType.Service) {
|
|
1535
|
+
messagingService.initSchema();
|
|
1536
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.templateEntryStorageConnectorType, "TemplateEntry");
|
|
1537
|
+
component = new messagingService.MessagingService({
|
|
1538
|
+
messagingEmailConnectorType: context.defaultTypes.messagingEmailConnector,
|
|
1539
|
+
messagingSmsConnectorType: context.defaultTypes.messagingSmsConnector,
|
|
1540
|
+
messagingPushNotificationConnectorType: context.defaultTypes.messagingNotificationConnector,
|
|
1541
|
+
...instanceConfig.options
|
|
1542
|
+
});
|
|
1543
|
+
instanceType = messagingService.MessagingService.NAMESPACE;
|
|
1544
|
+
}
|
|
1545
|
+
else {
|
|
1546
|
+
throw new core.GeneralError("engineCore", "componentUnknownType", {
|
|
1547
|
+
type,
|
|
1548
|
+
componentType: "messagingComponent"
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
1552
|
+
context.componentInstances.push({ instanceType: finalInstanceType, component });
|
|
1553
|
+
core.ComponentFactory.register(finalInstanceType, () => component);
|
|
1554
|
+
return finalInstanceType;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1318
1557
|
// Copyright 2024 IOTA Stiftung.
|
|
1319
1558
|
// SPDX-License-Identifier: Apache-2.0.
|
|
1320
1559
|
/**
|
|
@@ -1712,6 +1951,10 @@ exports.ImmutableProofComponentType = ImmutableProofComponentType;
|
|
|
1712
1951
|
exports.ImmutableStorageConnectorType = ImmutableStorageConnectorType;
|
|
1713
1952
|
exports.LoggingComponentType = LoggingComponentType;
|
|
1714
1953
|
exports.LoggingConnectorType = LoggingConnectorType;
|
|
1954
|
+
exports.MessagingComponentType = MessagingComponentType;
|
|
1955
|
+
exports.MessagingEmailConnectorType = MessagingEmailConnectorType;
|
|
1956
|
+
exports.MessagingPushNotificationConnectorType = MessagingPushNotificationConnectorType;
|
|
1957
|
+
exports.MessagingSmsConnectorType = MessagingSmsConnectorType;
|
|
1715
1958
|
exports.NftComponentType = NftComponentType;
|
|
1716
1959
|
exports.NftConnectorType = NftConnectorType;
|
|
1717
1960
|
exports.TelemetryComponentType = TelemetryComponentType;
|
|
@@ -1738,6 +1981,10 @@ exports.initialiseImmutableProofComponent = initialiseImmutableProofComponent;
|
|
|
1738
1981
|
exports.initialiseImmutableStorageConnector = initialiseImmutableStorageConnector;
|
|
1739
1982
|
exports.initialiseLoggingComponent = initialiseLoggingComponent;
|
|
1740
1983
|
exports.initialiseLoggingConnector = initialiseLoggingConnector;
|
|
1984
|
+
exports.initialiseMessagingComponent = initialiseMessagingComponent;
|
|
1985
|
+
exports.initialiseMessagingEmailConnector = initialiseMessagingEmailConnector;
|
|
1986
|
+
exports.initialiseMessagingPushNotificationConnector = initialiseMessagingPushNotificationConnector;
|
|
1987
|
+
exports.initialiseMessagingSmsConnector = initialiseMessagingSmsConnector;
|
|
1741
1988
|
exports.initialiseNftComponent = initialiseNftComponent;
|
|
1742
1989
|
exports.initialiseNftConnector = initialiseNftConnector;
|
|
1743
1990
|
exports.initialiseTelemetryComponent = initialiseTelemetryComponent;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -27,7 +27,7 @@ import { initSchema as initSchema$3, BlobStorageService } from '@twin.org/blob-s
|
|
|
27
27
|
import { LocalEventBusConnector } from '@twin.org/event-bus-connector-local';
|
|
28
28
|
import { EventBusConnectorFactory } from '@twin.org/event-bus-models';
|
|
29
29
|
import { EventBusService } from '@twin.org/event-bus-service';
|
|
30
|
-
import { EntityStorageFaucetConnector, EntityStorageWalletConnector, initSchema as initSchema$
|
|
30
|
+
import { EntityStorageFaucetConnector, EntityStorageWalletConnector, initSchema as initSchema$d } from '@twin.org/wallet-connector-entity-storage';
|
|
31
31
|
import { IotaFaucetConnector, IotaWalletConnector } from '@twin.org/wallet-connector-iota';
|
|
32
32
|
import { FaucetConnectorFactory, WalletConnectorFactory } from '@twin.org/wallet-models';
|
|
33
33
|
import { initSchema as initSchema$4, EntityStorageIdentityConnector, EntityStorageIdentityProfileConnector } from '@twin.org/identity-connector-entity-storage';
|
|
@@ -42,14 +42,18 @@ import { ConsoleLoggingConnector } from '@twin.org/logging-connector-console';
|
|
|
42
42
|
import { initSchema as initSchema$7, EntityStorageLoggingConnector } from '@twin.org/logging-connector-entity-storage';
|
|
43
43
|
import { MultiLoggingConnector, LoggingConnectorFactory } from '@twin.org/logging-models';
|
|
44
44
|
import { LoggingService } from '@twin.org/logging-service';
|
|
45
|
-
import {
|
|
45
|
+
import { AwsMessagingEmailConnector, AwsMessagingSmsConnector, AwsMessagingPushNotificationConnector } from '@twin.org/messaging-connector-aws';
|
|
46
|
+
import { initSchema as initSchema$8, EntityStorageMessagingEmailConnector, EntityStorageMessagingSmsConnector, EntityStorageMessagingPushNotificationConnector } from '@twin.org/messaging-connector-entity-storage';
|
|
47
|
+
import { MessagingEmailConnectorFactory, MessagingSmsConnectorFactory, MessagingPushNotificationsConnectorFactory } from '@twin.org/messaging-models';
|
|
48
|
+
import { initSchema as initSchema$9, MessagingService } from '@twin.org/messaging-service';
|
|
49
|
+
import { initSchema as initSchema$a, EntityStorageNftConnector } from '@twin.org/nft-connector-entity-storage';
|
|
46
50
|
import { IotaNftConnector } from '@twin.org/nft-connector-iota';
|
|
47
51
|
import { NftConnectorFactory } from '@twin.org/nft-models';
|
|
48
52
|
import { NftService } from '@twin.org/nft-service';
|
|
49
|
-
import { initSchema as initSchema$
|
|
53
|
+
import { initSchema as initSchema$b, EntityStorageTelemetryConnector } from '@twin.org/telemetry-connector-entity-storage';
|
|
50
54
|
import { TelemetryConnectorFactory } from '@twin.org/telemetry-models';
|
|
51
55
|
import { TelemetryService } from '@twin.org/telemetry-service';
|
|
52
|
-
import { initSchema as initSchema$
|
|
56
|
+
import { initSchema as initSchema$c, EntityStorageVaultConnector } from '@twin.org/vault-connector-entity-storage';
|
|
53
57
|
import { HashicorpVaultConnector } from '@twin.org/vault-connector-hashicorp';
|
|
54
58
|
import { VaultConnectorFactory } from '@twin.org/vault-models';
|
|
55
59
|
|
|
@@ -1313,6 +1317,241 @@ function initialiseLoggingComponent(engineCore, context, instanceConfig, overrid
|
|
|
1313
1317
|
return finalInstanceType;
|
|
1314
1318
|
}
|
|
1315
1319
|
|
|
1320
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1321
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1322
|
+
/**
|
|
1323
|
+
* Messaging component types.
|
|
1324
|
+
*/
|
|
1325
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1326
|
+
const MessagingComponentType = {
|
|
1327
|
+
/**
|
|
1328
|
+
* Service.
|
|
1329
|
+
*/
|
|
1330
|
+
Service: "service"
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1334
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1335
|
+
/**
|
|
1336
|
+
* Messaging email connector types.
|
|
1337
|
+
*/
|
|
1338
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1339
|
+
const MessagingEmailConnectorType = {
|
|
1340
|
+
/**
|
|
1341
|
+
* Entity storage.
|
|
1342
|
+
*/
|
|
1343
|
+
EntityStorage: "entity-storage",
|
|
1344
|
+
/**
|
|
1345
|
+
* AWS.
|
|
1346
|
+
*/
|
|
1347
|
+
Aws: "aws"
|
|
1348
|
+
};
|
|
1349
|
+
|
|
1350
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1351
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1352
|
+
/**
|
|
1353
|
+
* Messaging push notification connector types.
|
|
1354
|
+
*/
|
|
1355
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1356
|
+
const MessagingPushNotificationConnectorType = {
|
|
1357
|
+
/**
|
|
1358
|
+
* Entity storage.
|
|
1359
|
+
*/
|
|
1360
|
+
EntityStorage: "entity-storage",
|
|
1361
|
+
/**
|
|
1362
|
+
* AWS.
|
|
1363
|
+
*/
|
|
1364
|
+
Aws: "aws"
|
|
1365
|
+
};
|
|
1366
|
+
|
|
1367
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1368
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1369
|
+
/**
|
|
1370
|
+
* Messaging sms connector types.
|
|
1371
|
+
*/
|
|
1372
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1373
|
+
const MessagingSmsConnectorType = {
|
|
1374
|
+
/**
|
|
1375
|
+
* Entity storage.
|
|
1376
|
+
*/
|
|
1377
|
+
EntityStorage: "entity-storage",
|
|
1378
|
+
/**
|
|
1379
|
+
* AWS.
|
|
1380
|
+
*/
|
|
1381
|
+
Aws: "aws"
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1384
|
+
// Copyright 2024 IOTA Stiftung.
|
|
1385
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
1386
|
+
/**
|
|
1387
|
+
* Initialise a messaging email connector.
|
|
1388
|
+
* @param engineCore The engine core.
|
|
1389
|
+
* @param context The context for the engine.
|
|
1390
|
+
* @param instanceConfig The instance config.
|
|
1391
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
1392
|
+
* @returns The name of the instance created.
|
|
1393
|
+
* @throws GeneralError if the connector type is unknown.
|
|
1394
|
+
*/
|
|
1395
|
+
function initialiseMessagingEmailConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
1396
|
+
engineCore.logInfo(I18n.formatMessage("engineCore.configuring", {
|
|
1397
|
+
element: `Messaging Email Connector: ${instanceConfig.type}`
|
|
1398
|
+
}));
|
|
1399
|
+
const type = instanceConfig.type;
|
|
1400
|
+
let connector;
|
|
1401
|
+
let instanceType;
|
|
1402
|
+
if (type === MessagingEmailConnectorType.EntityStorage) {
|
|
1403
|
+
initSchema$8({ email: true, sms: false, pushNotification: false });
|
|
1404
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingEmailEntryStorageConnectorType, "EmailEntry");
|
|
1405
|
+
connector = new EntityStorageMessagingEmailConnector({
|
|
1406
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1407
|
+
...instanceConfig.options
|
|
1408
|
+
});
|
|
1409
|
+
instanceType = EntityStorageMessagingEmailConnector.NAMESPACE;
|
|
1410
|
+
}
|
|
1411
|
+
else if (type === MessagingEmailConnectorType.Aws) {
|
|
1412
|
+
connector = new AwsMessagingEmailConnector({
|
|
1413
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1414
|
+
...instanceConfig.options
|
|
1415
|
+
});
|
|
1416
|
+
instanceType = AwsMessagingEmailConnector.NAMESPACE;
|
|
1417
|
+
}
|
|
1418
|
+
else {
|
|
1419
|
+
throw new GeneralError("engineCore", "connectorUnknownType", {
|
|
1420
|
+
type,
|
|
1421
|
+
connectorType: "messagingEmailConnector"
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
1425
|
+
context.componentInstances.push({ instanceType: finalInstanceType, component: connector });
|
|
1426
|
+
MessagingEmailConnectorFactory.register(finalInstanceType, () => connector);
|
|
1427
|
+
return finalInstanceType;
|
|
1428
|
+
}
|
|
1429
|
+
/**
|
|
1430
|
+
* Initialise a messaging sms connector.
|
|
1431
|
+
* @param engineCore The engine core.
|
|
1432
|
+
* @param context The context for the engine.
|
|
1433
|
+
* @param instanceConfig The instance config.
|
|
1434
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
1435
|
+
* @returns The name of the instance created.
|
|
1436
|
+
* @throws GeneralError if the connector type is unknown.
|
|
1437
|
+
*/
|
|
1438
|
+
function initialiseMessagingSmsConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
1439
|
+
engineCore.logInfo(I18n.formatMessage("engineCore.configuring", {
|
|
1440
|
+
element: `Messaging SMS Connector: ${instanceConfig.type}`
|
|
1441
|
+
}));
|
|
1442
|
+
const type = instanceConfig.type;
|
|
1443
|
+
let connector;
|
|
1444
|
+
let instanceType;
|
|
1445
|
+
if (type === MessagingSmsConnectorType.EntityStorage) {
|
|
1446
|
+
initSchema$8({ email: false, sms: true, pushNotification: false });
|
|
1447
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingSmsEntryStorageConnectorType, "SmsEntry");
|
|
1448
|
+
connector = new EntityStorageMessagingSmsConnector({
|
|
1449
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1450
|
+
...instanceConfig.options
|
|
1451
|
+
});
|
|
1452
|
+
instanceType = EntityStorageMessagingSmsConnector.NAMESPACE;
|
|
1453
|
+
}
|
|
1454
|
+
else if (type === MessagingSmsConnectorType.Aws) {
|
|
1455
|
+
connector = new AwsMessagingSmsConnector({
|
|
1456
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1457
|
+
...instanceConfig.options
|
|
1458
|
+
});
|
|
1459
|
+
instanceType = AwsMessagingSmsConnector.NAMESPACE;
|
|
1460
|
+
}
|
|
1461
|
+
else {
|
|
1462
|
+
throw new GeneralError("engineCore", "connectorUnknownType", {
|
|
1463
|
+
type,
|
|
1464
|
+
connectorType: "messagingSmsConnector"
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
1468
|
+
context.componentInstances.push({ instanceType: finalInstanceType, component: connector });
|
|
1469
|
+
MessagingSmsConnectorFactory.register(finalInstanceType, () => connector);
|
|
1470
|
+
return finalInstanceType;
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Initialise a messaging push notification connector.
|
|
1474
|
+
* @param engineCore The engine core.
|
|
1475
|
+
* @param context The context for the engine.
|
|
1476
|
+
* @param instanceConfig The instance config.
|
|
1477
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
1478
|
+
* @returns The name of the instance created.
|
|
1479
|
+
* @throws GeneralError if the connector type is unknown.
|
|
1480
|
+
*/
|
|
1481
|
+
function initialiseMessagingPushNotificationConnector(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
1482
|
+
engineCore.logInfo(I18n.formatMessage("engineCore.configuring", {
|
|
1483
|
+
element: `Messaging Push Notification Connector: ${instanceConfig.type}`
|
|
1484
|
+
}));
|
|
1485
|
+
const type = instanceConfig.type;
|
|
1486
|
+
let connector;
|
|
1487
|
+
let instanceType;
|
|
1488
|
+
if (type === MessagingPushNotificationConnectorType.EntityStorage) {
|
|
1489
|
+
initSchema$8({ email: false, sms: false, pushNotification: true });
|
|
1490
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingDeviceEntryStorageConnectorType, "PushNotificationDeviceEntry");
|
|
1491
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.messagingMessageEntryStorageConnectorType, "PushNotificationMessageEntry");
|
|
1492
|
+
connector = new EntityStorageMessagingPushNotificationConnector({
|
|
1493
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1494
|
+
...instanceConfig.options
|
|
1495
|
+
});
|
|
1496
|
+
instanceType = EntityStorageMessagingPushNotificationConnector.NAMESPACE;
|
|
1497
|
+
}
|
|
1498
|
+
else if (type === MessagingPushNotificationConnectorType.Aws) {
|
|
1499
|
+
connector = new AwsMessagingPushNotificationConnector({
|
|
1500
|
+
loggingConnectorType: context.defaultTypes.loggingConnector,
|
|
1501
|
+
...instanceConfig.options
|
|
1502
|
+
});
|
|
1503
|
+
instanceType = AwsMessagingPushNotificationConnector.NAMESPACE;
|
|
1504
|
+
}
|
|
1505
|
+
else {
|
|
1506
|
+
throw new GeneralError("engineCore", "connectorUnknownType", {
|
|
1507
|
+
type,
|
|
1508
|
+
connectorType: "messagingPushNotificationConnector"
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
1512
|
+
context.componentInstances.push({ instanceType: finalInstanceType, component: connector });
|
|
1513
|
+
MessagingPushNotificationsConnectorFactory.register(finalInstanceType, () => connector);
|
|
1514
|
+
return finalInstanceType;
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* Initialise the messaging component.
|
|
1518
|
+
* @param engineCore The engine core.
|
|
1519
|
+
* @param context The context for the engine.
|
|
1520
|
+
* @param instanceConfig The instance config.
|
|
1521
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
1522
|
+
* @returns The name of the instance created.
|
|
1523
|
+
* @throws GeneralError if the component type is unknown.
|
|
1524
|
+
*/
|
|
1525
|
+
function initialiseMessagingComponent(engineCore, context, instanceConfig, overrideInstanceType) {
|
|
1526
|
+
engineCore.logInfo(I18n.formatMessage("engineCore.configuring", {
|
|
1527
|
+
element: `Messaging Component: ${instanceConfig.type}`
|
|
1528
|
+
}));
|
|
1529
|
+
const type = instanceConfig.type;
|
|
1530
|
+
let component;
|
|
1531
|
+
let instanceType;
|
|
1532
|
+
if (type === MessagingComponentType.Service) {
|
|
1533
|
+
initSchema$9();
|
|
1534
|
+
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.templateEntryStorageConnectorType, "TemplateEntry");
|
|
1535
|
+
component = new MessagingService({
|
|
1536
|
+
messagingEmailConnectorType: context.defaultTypes.messagingEmailConnector,
|
|
1537
|
+
messagingSmsConnectorType: context.defaultTypes.messagingSmsConnector,
|
|
1538
|
+
messagingPushNotificationConnectorType: context.defaultTypes.messagingNotificationConnector,
|
|
1539
|
+
...instanceConfig.options
|
|
1540
|
+
});
|
|
1541
|
+
instanceType = MessagingService.NAMESPACE;
|
|
1542
|
+
}
|
|
1543
|
+
else {
|
|
1544
|
+
throw new GeneralError("engineCore", "componentUnknownType", {
|
|
1545
|
+
type,
|
|
1546
|
+
componentType: "messagingComponent"
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
const finalInstanceType = overrideInstanceType ?? instanceType;
|
|
1550
|
+
context.componentInstances.push({ instanceType: finalInstanceType, component });
|
|
1551
|
+
ComponentFactory.register(finalInstanceType, () => component);
|
|
1552
|
+
return finalInstanceType;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1316
1555
|
// Copyright 2024 IOTA Stiftung.
|
|
1317
1556
|
// SPDX-License-Identifier: Apache-2.0.
|
|
1318
1557
|
/**
|
|
@@ -1362,7 +1601,7 @@ function initialiseNftConnector(engineCore, context, instanceConfig, overrideIns
|
|
|
1362
1601
|
let connector;
|
|
1363
1602
|
let instanceType;
|
|
1364
1603
|
if (type === NftConnectorType.EntityStorage) {
|
|
1365
|
-
initSchema$
|
|
1604
|
+
initSchema$a();
|
|
1366
1605
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.nftEntityStorageType, "Nft");
|
|
1367
1606
|
connector = new EntityStorageNftConnector(instanceConfig.options);
|
|
1368
1607
|
instanceType = EntityStorageNftConnector.NAMESPACE;
|
|
@@ -1468,7 +1707,7 @@ function initialiseTelemetryConnector(engineCore, context, instanceConfig, overr
|
|
|
1468
1707
|
let connector;
|
|
1469
1708
|
let instanceType;
|
|
1470
1709
|
if (type === TelemetryConnectorType.EntityStorage) {
|
|
1471
|
-
initSchema$
|
|
1710
|
+
initSchema$b();
|
|
1472
1711
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.telemetryMetricStorageConnectorType, "TelemetryMetric");
|
|
1473
1712
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.telemetryMetricValueStorageConnectorType, "TelemetryMetricValue");
|
|
1474
1713
|
connector = new EntityStorageTelemetryConnector({
|
|
@@ -1559,7 +1798,7 @@ function initialiseVaultConnector(engineCore, context, instanceConfig, overrideI
|
|
|
1559
1798
|
let connector;
|
|
1560
1799
|
let instanceType;
|
|
1561
1800
|
if (type === VaultConnectorType.EntityStorage) {
|
|
1562
|
-
initSchema$
|
|
1801
|
+
initSchema$c();
|
|
1563
1802
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.vaultKeyEntityStorageType, "VaultKey");
|
|
1564
1803
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.vaultSecretEntityStorageType, "VaultSecret");
|
|
1565
1804
|
connector = new EntityStorageVaultConnector(instanceConfig.options);
|
|
@@ -1664,7 +1903,7 @@ function initialiseWalletStorage(engineCore, context, instanceConfig, overrideIn
|
|
|
1664
1903
|
const type = instanceConfig.type;
|
|
1665
1904
|
if (type === WalletConnectorType.Iota) ;
|
|
1666
1905
|
else if (type === WalletConnectorType.EntityStorage) {
|
|
1667
|
-
initSchema$
|
|
1906
|
+
initSchema$d();
|
|
1668
1907
|
initialiseEntityStorageConnector(engineCore, context, instanceConfig.options?.walletAddressEntityStorageType, "WalletAddress");
|
|
1669
1908
|
}
|
|
1670
1909
|
else {
|
|
@@ -1689,4 +1928,4 @@ const DltConfigType = {
|
|
|
1689
1928
|
Iota: "iota"
|
|
1690
1929
|
};
|
|
1691
1930
|
|
|
1692
|
-
export { AttestationComponentType, AttestationConnectorType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, BackgroundTaskConnectorType, BlobStorageComponentType, BlobStorageConnectorType, DltConfigType, EntityStorageComponentType, EntityStorageConnectorType, EventBusComponentType, EventBusConnectorType, FaucetConnectorType, IdentityComponentType, IdentityConnectorType, IdentityProfileComponentType, IdentityProfileConnectorType, ImmutableProofComponentType, ImmutableStorageConnectorType, LoggingComponentType, LoggingConnectorType, NftComponentType, NftConnectorType, TelemetryComponentType, TelemetryConnectorType, VaultConnectorType, WalletConnectorType, initialiseAttestationComponent, initialiseAttestationConnector, initialiseAuditableItemGraphComponent, initialiseAuditableItemStreamComponent, initialiseBackgroundTaskConnector, initialiseBlobStorageComponent, initialiseBlobStorageConnector, initialiseEntityStorageComponent, initialiseEntityStorageConnector, initialiseEventBusComponent, initialiseEventBusConnector, initialiseFaucetConnector, initialiseIdentityComponent, initialiseIdentityConnector, initialiseIdentityProfileComponent, initialiseIdentityProfileConnector, initialiseImmutableProofComponent, initialiseImmutableStorageConnector, initialiseLoggingComponent, initialiseLoggingConnector, initialiseNftComponent, initialiseNftConnector, initialiseTelemetryComponent, initialiseTelemetryConnector, initialiseVaultConnector, initialiseWalletConnector, initialiseWalletStorage };
|
|
1931
|
+
export { AttestationComponentType, AttestationConnectorType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, BackgroundTaskConnectorType, BlobStorageComponentType, BlobStorageConnectorType, DltConfigType, EntityStorageComponentType, EntityStorageConnectorType, EventBusComponentType, EventBusConnectorType, FaucetConnectorType, IdentityComponentType, IdentityConnectorType, IdentityProfileComponentType, IdentityProfileConnectorType, 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, initialiseImmutableProofComponent, initialiseImmutableStorageConnector, initialiseLoggingComponent, initialiseLoggingConnector, initialiseMessagingComponent, initialiseMessagingEmailConnector, initialiseMessagingPushNotificationConnector, initialiseMessagingSmsConnector, initialiseNftComponent, initialiseNftConnector, initialiseTelemetryComponent, initialiseTelemetryConnector, initialiseVaultConnector, initialiseWalletConnector, initialiseWalletStorage };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
|
|
2
|
+
import type { MessagingComponentConfig } from "../models/config/messagingComponentConfig.js";
|
|
3
|
+
import type { MessagingEmailConnectorConfig } from "../models/config/messagingEmailConnectorConfig.js";
|
|
4
|
+
import type { MessagingPushNotificationConnectorConfig } from "../models/config/messagingPushNotificationConnectorConfig.js";
|
|
5
|
+
import type { MessagingSmsConnectorConfig } from "../models/config/messagingSmsConnectorConfig.js";
|
|
6
|
+
import type { IEngineConfig } from "../models/IEngineConfig.js";
|
|
7
|
+
/**
|
|
8
|
+
* Initialise a messaging email connector.
|
|
9
|
+
* @param engineCore The engine core.
|
|
10
|
+
* @param context The context for the engine.
|
|
11
|
+
* @param instanceConfig The instance config.
|
|
12
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
13
|
+
* @returns The name of the instance created.
|
|
14
|
+
* @throws GeneralError if the connector type is unknown.
|
|
15
|
+
*/
|
|
16
|
+
export declare function initialiseMessagingEmailConnector(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: MessagingEmailConnectorConfig, overrideInstanceType?: string): string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Initialise a messaging sms connector.
|
|
19
|
+
* @param engineCore The engine core.
|
|
20
|
+
* @param context The context for the engine.
|
|
21
|
+
* @param instanceConfig The instance config.
|
|
22
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
23
|
+
* @returns The name of the instance created.
|
|
24
|
+
* @throws GeneralError if the connector type is unknown.
|
|
25
|
+
*/
|
|
26
|
+
export declare function initialiseMessagingSmsConnector(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: MessagingSmsConnectorConfig, overrideInstanceType?: string): string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Initialise a messaging push notification connector.
|
|
29
|
+
* @param engineCore The engine core.
|
|
30
|
+
* @param context The context for the engine.
|
|
31
|
+
* @param instanceConfig The instance config.
|
|
32
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
33
|
+
* @returns The name of the instance created.
|
|
34
|
+
* @throws GeneralError if the connector type is unknown.
|
|
35
|
+
*/
|
|
36
|
+
export declare function initialiseMessagingPushNotificationConnector(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: MessagingPushNotificationConnectorConfig, overrideInstanceType?: string): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Initialise the messaging component.
|
|
39
|
+
* @param engineCore The engine core.
|
|
40
|
+
* @param context The context for the engine.
|
|
41
|
+
* @param instanceConfig The instance config.
|
|
42
|
+
* @param overrideInstanceType The instance type to override the default.
|
|
43
|
+
* @returns The name of the instance created.
|
|
44
|
+
* @throws GeneralError if the component type is unknown.
|
|
45
|
+
*/
|
|
46
|
+
export declare function initialiseMessagingComponent(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: MessagingComponentConfig, overrideInstanceType?: string): string | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./components/identityProfile";
|
|
|
11
11
|
export * from "./components/immutableProof";
|
|
12
12
|
export * from "./components/immutableStorage";
|
|
13
13
|
export * from "./components/logging";
|
|
14
|
+
export * from "./components/messaging";
|
|
14
15
|
export * from "./components/nft";
|
|
15
16
|
export * from "./components/telemetry";
|
|
16
17
|
export * from "./components/vault";
|
|
@@ -25,8 +26,8 @@ export * from "./models/config/blobStorageConnectorConfig";
|
|
|
25
26
|
export * from "./models/config/dltConfig";
|
|
26
27
|
export * from "./models/config/entityStorageComponentConfig";
|
|
27
28
|
export * from "./models/config/entityStorageConnectorConfig";
|
|
28
|
-
export * from "./models/config/eventBusConnectorConfig";
|
|
29
29
|
export * from "./models/config/eventBusComponentConfig";
|
|
30
|
+
export * from "./models/config/eventBusConnectorConfig";
|
|
30
31
|
export * from "./models/config/faucetConnectorConfig";
|
|
31
32
|
export * from "./models/config/identityComponentConfig";
|
|
32
33
|
export * from "./models/config/identityConnectorConfig";
|
|
@@ -36,6 +37,10 @@ export * from "./models/config/immutableProofComponentConfig";
|
|
|
36
37
|
export * from "./models/config/immutableStorageConnectorConfig";
|
|
37
38
|
export * from "./models/config/loggingComponentConfig";
|
|
38
39
|
export * from "./models/config/loggingConnectorConfig";
|
|
40
|
+
export * from "./models/config/messagingComponentConfig";
|
|
41
|
+
export * from "./models/config/messagingEmailConnectorConfig";
|
|
42
|
+
export * from "./models/config/messagingPushNotificationConnectorConfig";
|
|
43
|
+
export * from "./models/config/messagingSmsConnectorConfig";
|
|
39
44
|
export * from "./models/config/nftComponentConfig";
|
|
40
45
|
export * from "./models/config/nftConnectorConfig";
|
|
41
46
|
export * from "./models/config/telemetryComponentConfig";
|
|
@@ -53,8 +58,8 @@ export * from "./models/types/blobStorageConnectorType";
|
|
|
53
58
|
export * from "./models/types/dltConfigType";
|
|
54
59
|
export * from "./models/types/entityStorageComponentType";
|
|
55
60
|
export * from "./models/types/entityStorageConnectorType";
|
|
56
|
-
export * from "./models/types/eventBusConnectorType";
|
|
57
61
|
export * from "./models/types/eventBusComponentType";
|
|
62
|
+
export * from "./models/types/eventBusConnectorType";
|
|
58
63
|
export * from "./models/types/faucetConnectorType";
|
|
59
64
|
export * from "./models/types/identityComponentType";
|
|
60
65
|
export * from "./models/types/identityConnectorType";
|
|
@@ -64,6 +69,10 @@ export * from "./models/types/immutableProofComponentType";
|
|
|
64
69
|
export * from "./models/types/immutableStorageConnectorType";
|
|
65
70
|
export * from "./models/types/loggingComponentType";
|
|
66
71
|
export * from "./models/types/loggingConnectorType";
|
|
72
|
+
export * from "./models/types/messagingComponentType";
|
|
73
|
+
export * from "./models/types/messagingEmailConnectorType";
|
|
74
|
+
export * from "./models/types/messagingPushNotificationConnectorType";
|
|
75
|
+
export * from "./models/types/messagingSmsConnectorType";
|
|
67
76
|
export * from "./models/types/nftComponentType";
|
|
68
77
|
export * from "./models/types/nftConnectorType";
|
|
69
78
|
export * from "./models/types/telemetryComponentType";
|
|
@@ -20,6 +20,10 @@ import type { ImmutableProofComponentConfig } from "./config/immutableProofCompo
|
|
|
20
20
|
import type { ImmutableStorageConnectorConfig } from "./config/immutableStorageConnectorConfig";
|
|
21
21
|
import type { LoggingComponentConfig } from "./config/loggingComponentConfig";
|
|
22
22
|
import type { LoggingConnectorConfig } from "./config/loggingConnectorConfig";
|
|
23
|
+
import type { MessagingComponentConfig } from "./config/messagingComponentConfig";
|
|
24
|
+
import type { MessagingEmailConnectorConfig } from "./config/messagingEmailConnectorConfig";
|
|
25
|
+
import type { MessagingPushNotificationConnectorConfig } from "./config/messagingPushNotificationConnectorConfig";
|
|
26
|
+
import type { MessagingSmsConnectorConfig } from "./config/messagingSmsConnectorConfig";
|
|
23
27
|
import type { NftComponentConfig } from "./config/nftComponentConfig";
|
|
24
28
|
import type { NftConnectorConfig } from "./config/nftConnectorConfig";
|
|
25
29
|
import type { TelemetryComponentConfig } from "./config/telemetryComponentConfig";
|
|
@@ -67,6 +71,22 @@ export interface IEngineConfig extends IEngineCoreConfig {
|
|
|
67
71
|
* Telemetry component options which can be overridden by individual components by specifying types other than default.
|
|
68
72
|
*/
|
|
69
73
|
telemetryComponent?: IEngineCoreTypeConfig<TelemetryComponentConfig>[];
|
|
74
|
+
/**
|
|
75
|
+
* Messaging email connector options which can be overridden by individual components by specifying types other than default.
|
|
76
|
+
*/
|
|
77
|
+
messagingEmailConnector?: IEngineCoreTypeConfig<MessagingEmailConnectorConfig>[];
|
|
78
|
+
/**
|
|
79
|
+
* Messaging SMS connector options which can be overridden by individual components by specifying types other than default.
|
|
80
|
+
*/
|
|
81
|
+
messagingSmsConnector?: IEngineCoreTypeConfig<MessagingSmsConnectorConfig>[];
|
|
82
|
+
/**
|
|
83
|
+
* Messaging push notification connector options which can be overridden by individual components by specifying types other than default.
|
|
84
|
+
*/
|
|
85
|
+
messagingPushNotificationConnector?: IEngineCoreTypeConfig<MessagingPushNotificationConnectorConfig>[];
|
|
86
|
+
/**
|
|
87
|
+
* Messaging component options which can be overridden by individual components by specifying types other than default.
|
|
88
|
+
*/
|
|
89
|
+
messagingComponent?: IEngineCoreTypeConfig<MessagingComponentConfig>[];
|
|
70
90
|
/**
|
|
71
91
|
* Background task connector options which can be overridden by individual components by specifying types other than default.
|
|
72
92
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MessagingComponentType } from "../types/messagingComponentType";
|
|
2
|
+
/**
|
|
3
|
+
* Messaging component config types.
|
|
4
|
+
*/
|
|
5
|
+
export type MessagingComponentConfig = {
|
|
6
|
+
type: typeof MessagingComponentType.Service;
|
|
7
|
+
options?: {
|
|
8
|
+
messagingEmailConnectorType?: string;
|
|
9
|
+
messagingPushNotificationConnectorType?: string;
|
|
10
|
+
messagingSmsConnectorType?: string;
|
|
11
|
+
templateEntryStorageConnectorType?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IAwsEmailConnectorConfig } from "@twin.org/messaging-connector-aws";
|
|
2
|
+
import type { MessagingEmailConnectorType } from "../types/messagingEmailConnectorType";
|
|
3
|
+
/**
|
|
4
|
+
* Messaging email connector config types.
|
|
5
|
+
*/
|
|
6
|
+
export type MessagingEmailConnectorConfig = {
|
|
7
|
+
type: typeof MessagingEmailConnectorType.EntityStorage;
|
|
8
|
+
options?: {
|
|
9
|
+
loggingConnectorType?: string;
|
|
10
|
+
messagingEmailEntryStorageConnectorType?: string;
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
type: typeof MessagingEmailConnectorType.Aws;
|
|
14
|
+
options: {
|
|
15
|
+
loggingConnectorType?: string;
|
|
16
|
+
config: IAwsEmailConnectorConfig;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IAwsPushNotificationConnectorConfig } from "@twin.org/messaging-connector-aws";
|
|
2
|
+
import type { MessagingPushNotificationConnectorType } from "../types/messagingPushNotificationConnectorType";
|
|
3
|
+
/**
|
|
4
|
+
* Messaging push notification connector config types.
|
|
5
|
+
*/
|
|
6
|
+
export type MessagingPushNotificationConnectorConfig = {
|
|
7
|
+
type: typeof MessagingPushNotificationConnectorType.EntityStorage;
|
|
8
|
+
options?: {
|
|
9
|
+
loggingConnectorType?: string;
|
|
10
|
+
messagingDeviceEntryStorageConnectorType?: string;
|
|
11
|
+
messagingMessageEntryStorageConnectorType?: string;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
type: typeof MessagingPushNotificationConnectorType.Aws;
|
|
15
|
+
options: {
|
|
16
|
+
loggingConnectorType?: string;
|
|
17
|
+
config: IAwsPushNotificationConnectorConfig;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IAwsSmsConnectorConfig } from "@twin.org/messaging-connector-aws";
|
|
2
|
+
import type { MessagingSmsConnectorType } from "../types/messagingSmsConnectorType";
|
|
3
|
+
/**
|
|
4
|
+
* Messaging sms connector config types.
|
|
5
|
+
*/
|
|
6
|
+
export type MessagingSmsConnectorConfig = {
|
|
7
|
+
type: typeof MessagingSmsConnectorType.EntityStorage;
|
|
8
|
+
options?: {
|
|
9
|
+
loggingConnectorType?: string;
|
|
10
|
+
messagingSmsEntryStorageConnectorType?: string;
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
type: typeof MessagingSmsConnectorType.Aws;
|
|
14
|
+
options: {
|
|
15
|
+
loggingConnectorType?: string;
|
|
16
|
+
config: IAwsSmsConnectorConfig;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messaging component types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const MessagingComponentType: {
|
|
5
|
+
/**
|
|
6
|
+
* Service.
|
|
7
|
+
*/
|
|
8
|
+
readonly Service: "service";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Messaging component types.
|
|
12
|
+
*/
|
|
13
|
+
export type MessagingComponentType = (typeof MessagingComponentType)[keyof typeof MessagingComponentType];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messaging email connector types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const MessagingEmailConnectorType: {
|
|
5
|
+
/**
|
|
6
|
+
* Entity storage.
|
|
7
|
+
*/
|
|
8
|
+
readonly EntityStorage: "entity-storage";
|
|
9
|
+
/**
|
|
10
|
+
* AWS.
|
|
11
|
+
*/
|
|
12
|
+
readonly Aws: "aws";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Messaging email connector types.
|
|
16
|
+
*/
|
|
17
|
+
export type MessagingEmailConnectorType = (typeof MessagingEmailConnectorType)[keyof typeof MessagingEmailConnectorType];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messaging push notification connector types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const MessagingPushNotificationConnectorType: {
|
|
5
|
+
/**
|
|
6
|
+
* Entity storage.
|
|
7
|
+
*/
|
|
8
|
+
readonly EntityStorage: "entity-storage";
|
|
9
|
+
/**
|
|
10
|
+
* AWS.
|
|
11
|
+
*/
|
|
12
|
+
readonly Aws: "aws";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Messaging push notification connector types.
|
|
16
|
+
*/
|
|
17
|
+
export type MessagingPushNotificationConnectorType = (typeof MessagingPushNotificationConnectorType)[keyof typeof MessagingPushNotificationConnectorType];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messaging sms connector types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const MessagingSmsConnectorType: {
|
|
5
|
+
/**
|
|
6
|
+
* Entity storage.
|
|
7
|
+
*/
|
|
8
|
+
readonly EntityStorage: "entity-storage";
|
|
9
|
+
/**
|
|
10
|
+
* AWS.
|
|
11
|
+
*/
|
|
12
|
+
readonly Aws: "aws";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Messaging ems connector types.
|
|
16
|
+
*/
|
|
17
|
+
export type MessagingSmsConnectorType = (typeof MessagingSmsConnectorType)[keyof typeof MessagingSmsConnectorType];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Function: initialiseMessagingComponent()
|
|
2
|
+
|
|
3
|
+
> **initialiseMessagingComponent**(`engineCore`, `context`, `instanceConfig`, `overrideInstanceType`?): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Initialise the messaging component.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
• **engineCore**: `IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md), `IEngineState`\>
|
|
10
|
+
|
|
11
|
+
The engine core.
|
|
12
|
+
|
|
13
|
+
• **context**: `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md), `IEngineState`\>
|
|
14
|
+
|
|
15
|
+
The context for the engine.
|
|
16
|
+
|
|
17
|
+
• **instanceConfig**: [`MessagingComponentConfig`](../type-aliases/MessagingComponentConfig.md)
|
|
18
|
+
|
|
19
|
+
The instance config.
|
|
20
|
+
|
|
21
|
+
• **overrideInstanceType?**: `string`
|
|
22
|
+
|
|
23
|
+
The instance type to override the default.
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`string` \| `undefined`
|
|
28
|
+
|
|
29
|
+
The name of the instance created.
|
|
30
|
+
|
|
31
|
+
## Throws
|
|
32
|
+
|
|
33
|
+
GeneralError if the component type is unknown.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Function: initialiseMessagingEmailConnector()
|
|
2
|
+
|
|
3
|
+
> **initialiseMessagingEmailConnector**(`engineCore`, `context`, `instanceConfig`, `overrideInstanceType`?): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Initialise a messaging email connector.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
• **engineCore**: `IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md), `IEngineState`\>
|
|
10
|
+
|
|
11
|
+
The engine core.
|
|
12
|
+
|
|
13
|
+
• **context**: `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md), `IEngineState`\>
|
|
14
|
+
|
|
15
|
+
The context for the engine.
|
|
16
|
+
|
|
17
|
+
• **instanceConfig**: [`MessagingEmailConnectorConfig`](../type-aliases/MessagingEmailConnectorConfig.md)
|
|
18
|
+
|
|
19
|
+
The instance config.
|
|
20
|
+
|
|
21
|
+
• **overrideInstanceType?**: `string`
|
|
22
|
+
|
|
23
|
+
The instance type to override the default.
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`string` \| `undefined`
|
|
28
|
+
|
|
29
|
+
The name of the instance created.
|
|
30
|
+
|
|
31
|
+
## Throws
|
|
32
|
+
|
|
33
|
+
GeneralError if the connector type is unknown.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Function: initialiseMessagingPushNotificationConnector()
|
|
2
|
+
|
|
3
|
+
> **initialiseMessagingPushNotificationConnector**(`engineCore`, `context`, `instanceConfig`, `overrideInstanceType`?): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Initialise a messaging push notification connector.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
• **engineCore**: `IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md), `IEngineState`\>
|
|
10
|
+
|
|
11
|
+
The engine core.
|
|
12
|
+
|
|
13
|
+
• **context**: `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md), `IEngineState`\>
|
|
14
|
+
|
|
15
|
+
The context for the engine.
|
|
16
|
+
|
|
17
|
+
• **instanceConfig**: [`MessagingPushNotificationConnectorConfig`](../type-aliases/MessagingPushNotificationConnectorConfig.md)
|
|
18
|
+
|
|
19
|
+
The instance config.
|
|
20
|
+
|
|
21
|
+
• **overrideInstanceType?**: `string`
|
|
22
|
+
|
|
23
|
+
The instance type to override the default.
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`string` \| `undefined`
|
|
28
|
+
|
|
29
|
+
The name of the instance created.
|
|
30
|
+
|
|
31
|
+
## Throws
|
|
32
|
+
|
|
33
|
+
GeneralError if the connector type is unknown.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Function: initialiseMessagingSmsConnector()
|
|
2
|
+
|
|
3
|
+
> **initialiseMessagingSmsConnector**(`engineCore`, `context`, `instanceConfig`, `overrideInstanceType`?): `string` \| `undefined`
|
|
4
|
+
|
|
5
|
+
Initialise a messaging sms connector.
|
|
6
|
+
|
|
7
|
+
## Parameters
|
|
8
|
+
|
|
9
|
+
• **engineCore**: `IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md), `IEngineState`\>
|
|
10
|
+
|
|
11
|
+
The engine core.
|
|
12
|
+
|
|
13
|
+
• **context**: `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md), `IEngineState`\>
|
|
14
|
+
|
|
15
|
+
The context for the engine.
|
|
16
|
+
|
|
17
|
+
• **instanceConfig**: [`MessagingSmsConnectorConfig`](../type-aliases/MessagingSmsConnectorConfig.md)
|
|
18
|
+
|
|
19
|
+
The instance config.
|
|
20
|
+
|
|
21
|
+
• **overrideInstanceType?**: `string`
|
|
22
|
+
|
|
23
|
+
The instance type to override the default.
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`string` \| `undefined`
|
|
28
|
+
|
|
29
|
+
The name of the instance created.
|
|
30
|
+
|
|
31
|
+
## Throws
|
|
32
|
+
|
|
33
|
+
GeneralError if the connector type is unknown.
|
package/docs/reference/index.md
CHANGED
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
- [ImmutableStorageConnectorConfig](type-aliases/ImmutableStorageConnectorConfig.md)
|
|
28
28
|
- [LoggingComponentConfig](type-aliases/LoggingComponentConfig.md)
|
|
29
29
|
- [LoggingConnectorConfig](type-aliases/LoggingConnectorConfig.md)
|
|
30
|
+
- [MessagingComponentConfig](type-aliases/MessagingComponentConfig.md)
|
|
31
|
+
- [MessagingEmailConnectorConfig](type-aliases/MessagingEmailConnectorConfig.md)
|
|
32
|
+
- [MessagingPushNotificationConnectorConfig](type-aliases/MessagingPushNotificationConnectorConfig.md)
|
|
33
|
+
- [MessagingSmsConnectorConfig](type-aliases/MessagingSmsConnectorConfig.md)
|
|
30
34
|
- [NftComponentConfig](type-aliases/NftComponentConfig.md)
|
|
31
35
|
- [NftConnectorConfig](type-aliases/NftConnectorConfig.md)
|
|
32
36
|
- [TelemetryComponentConfig](type-aliases/TelemetryComponentConfig.md)
|
|
@@ -54,6 +58,10 @@
|
|
|
54
58
|
- [ImmutableStorageConnectorType](type-aliases/ImmutableStorageConnectorType.md)
|
|
55
59
|
- [LoggingComponentType](type-aliases/LoggingComponentType.md)
|
|
56
60
|
- [LoggingConnectorType](type-aliases/LoggingConnectorType.md)
|
|
61
|
+
- [MessagingComponentType](type-aliases/MessagingComponentType.md)
|
|
62
|
+
- [MessagingEmailConnectorType](type-aliases/MessagingEmailConnectorType.md)
|
|
63
|
+
- [MessagingPushNotificationConnectorType](type-aliases/MessagingPushNotificationConnectorType.md)
|
|
64
|
+
- [MessagingSmsConnectorType](type-aliases/MessagingSmsConnectorType.md)
|
|
57
65
|
- [NftComponentType](type-aliases/NftComponentType.md)
|
|
58
66
|
- [NftConnectorType](type-aliases/NftConnectorType.md)
|
|
59
67
|
- [TelemetryComponentType](type-aliases/TelemetryComponentType.md)
|
|
@@ -84,6 +92,10 @@
|
|
|
84
92
|
- [ImmutableStorageConnectorType](variables/ImmutableStorageConnectorType.md)
|
|
85
93
|
- [LoggingComponentType](variables/LoggingComponentType.md)
|
|
86
94
|
- [LoggingConnectorType](variables/LoggingConnectorType.md)
|
|
95
|
+
- [MessagingComponentType](variables/MessagingComponentType.md)
|
|
96
|
+
- [MessagingEmailConnectorType](variables/MessagingEmailConnectorType.md)
|
|
97
|
+
- [MessagingPushNotificationConnectorType](variables/MessagingPushNotificationConnectorType.md)
|
|
98
|
+
- [MessagingSmsConnectorType](variables/MessagingSmsConnectorType.md)
|
|
87
99
|
- [NftComponentType](variables/NftComponentType.md)
|
|
88
100
|
- [NftConnectorType](variables/NftConnectorType.md)
|
|
89
101
|
- [TelemetryComponentType](variables/TelemetryComponentType.md)
|
|
@@ -113,6 +125,10 @@
|
|
|
113
125
|
- [initialiseImmutableStorageConnector](functions/initialiseImmutableStorageConnector.md)
|
|
114
126
|
- [initialiseLoggingConnector](functions/initialiseLoggingConnector.md)
|
|
115
127
|
- [initialiseLoggingComponent](functions/initialiseLoggingComponent.md)
|
|
128
|
+
- [initialiseMessagingEmailConnector](functions/initialiseMessagingEmailConnector.md)
|
|
129
|
+
- [initialiseMessagingSmsConnector](functions/initialiseMessagingSmsConnector.md)
|
|
130
|
+
- [initialiseMessagingPushNotificationConnector](functions/initialiseMessagingPushNotificationConnector.md)
|
|
131
|
+
- [initialiseMessagingComponent](functions/initialiseMessagingComponent.md)
|
|
116
132
|
- [initialiseNftConnector](functions/initialiseNftConnector.md)
|
|
117
133
|
- [initialiseNftComponent](functions/initialiseNftComponent.md)
|
|
118
134
|
- [initialiseTelemetryConnector](functions/initialiseTelemetryConnector.md)
|
|
@@ -66,6 +66,30 @@ Telemetry connector options which can be overridden by individual components by
|
|
|
66
66
|
|
|
67
67
|
Telemetry component options which can be overridden by individual components by specifying types other than default.
|
|
68
68
|
|
|
69
|
+
#### messagingEmailConnector?
|
|
70
|
+
|
|
71
|
+
> `optional` **messagingEmailConnector**: `IEngineCoreTypeConfig`\<[`MessagingEmailConnectorConfig`](../type-aliases/MessagingEmailConnectorConfig.md)\>[]
|
|
72
|
+
|
|
73
|
+
Messaging email connector options which can be overridden by individual components by specifying types other than default.
|
|
74
|
+
|
|
75
|
+
#### messagingSmsConnector?
|
|
76
|
+
|
|
77
|
+
> `optional` **messagingSmsConnector**: `IEngineCoreTypeConfig`\<[`MessagingSmsConnectorConfig`](../type-aliases/MessagingSmsConnectorConfig.md)\>[]
|
|
78
|
+
|
|
79
|
+
Messaging SMS connector options which can be overridden by individual components by specifying types other than default.
|
|
80
|
+
|
|
81
|
+
#### messagingPushNotificationConnector?
|
|
82
|
+
|
|
83
|
+
> `optional` **messagingPushNotificationConnector**: `IEngineCoreTypeConfig`\<[`MessagingPushNotificationConnectorConfig`](../type-aliases/MessagingPushNotificationConnectorConfig.md)\>[]
|
|
84
|
+
|
|
85
|
+
Messaging push notification connector options which can be overridden by individual components by specifying types other than default.
|
|
86
|
+
|
|
87
|
+
#### messagingComponent?
|
|
88
|
+
|
|
89
|
+
> `optional` **messagingComponent**: `IEngineCoreTypeConfig`\<[`MessagingComponentConfig`](../type-aliases/MessagingComponentConfig.md)\>[]
|
|
90
|
+
|
|
91
|
+
Messaging component options which can be overridden by individual components by specifying types other than default.
|
|
92
|
+
|
|
69
93
|
#### backgroundTaskConnector?
|
|
70
94
|
|
|
71
95
|
> `optional` **backgroundTaskConnector**: `IEngineCoreTypeConfig`\<[`BackgroundTaskConnectorConfig`](../type-aliases/BackgroundTaskConnectorConfig.md)\>[]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Type Alias: MessagingComponentConfig
|
|
2
|
+
|
|
3
|
+
> **MessagingComponentConfig**: `object`
|
|
4
|
+
|
|
5
|
+
Messaging component config types.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### type
|
|
10
|
+
|
|
11
|
+
> **type**: *typeof* `MessagingComponentType.Service`
|
|
12
|
+
|
|
13
|
+
### options?
|
|
14
|
+
|
|
15
|
+
> `optional` **options**: `object`
|
|
16
|
+
|
|
17
|
+
### options.messagingEmailConnectorType?
|
|
18
|
+
|
|
19
|
+
> `optional` **messagingEmailConnectorType**: `string`
|
|
20
|
+
|
|
21
|
+
### options.messagingPushNotificationConnectorType?
|
|
22
|
+
|
|
23
|
+
> `optional` **messagingPushNotificationConnectorType**: `string`
|
|
24
|
+
|
|
25
|
+
### options.messagingSmsConnectorType?
|
|
26
|
+
|
|
27
|
+
> `optional` **messagingSmsConnectorType**: `string`
|
|
28
|
+
|
|
29
|
+
### options.templateEntryStorageConnectorType?
|
|
30
|
+
|
|
31
|
+
> `optional` **templateEntryStorageConnectorType**: `string`
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: MessagingEmailConnectorType
|
|
2
|
+
|
|
3
|
+
> **MessagingEmailConnectorType**: *typeof* [`MessagingEmailConnectorType`](../variables/MessagingEmailConnectorType.md)\[keyof *typeof* [`MessagingEmailConnectorType`](../variables/MessagingEmailConnectorType.md)\]
|
|
4
|
+
|
|
5
|
+
Messaging email connector types.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: MessagingPushNotificationConnectorType
|
|
2
|
+
|
|
3
|
+
> **MessagingPushNotificationConnectorType**: *typeof* [`MessagingPushNotificationConnectorType`](../variables/MessagingPushNotificationConnectorType.md)\[keyof *typeof* [`MessagingPushNotificationConnectorType`](../variables/MessagingPushNotificationConnectorType.md)\]
|
|
4
|
+
|
|
5
|
+
Messaging push notification connector types.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: MessagingSmsConnectorType
|
|
2
|
+
|
|
3
|
+
> **MessagingSmsConnectorType**: *typeof* [`MessagingSmsConnectorType`](../variables/MessagingSmsConnectorType.md)\[keyof *typeof* [`MessagingSmsConnectorType`](../variables/MessagingSmsConnectorType.md)\]
|
|
4
|
+
|
|
5
|
+
Messaging ems connector types.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: MessagingEmailConnectorType
|
|
2
|
+
|
|
3
|
+
> `const` **MessagingEmailConnectorType**: `object`
|
|
4
|
+
|
|
5
|
+
Messaging email connector types.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### EntityStorage
|
|
10
|
+
|
|
11
|
+
> `readonly` **EntityStorage**: `"entity-storage"` = `"entity-storage"`
|
|
12
|
+
|
|
13
|
+
Entity storage.
|
|
14
|
+
|
|
15
|
+
### Aws
|
|
16
|
+
|
|
17
|
+
> `readonly` **Aws**: `"aws"` = `"aws"`
|
|
18
|
+
|
|
19
|
+
AWS.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: MessagingPushNotificationConnectorType
|
|
2
|
+
|
|
3
|
+
> `const` **MessagingPushNotificationConnectorType**: `object`
|
|
4
|
+
|
|
5
|
+
Messaging push notification connector types.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### EntityStorage
|
|
10
|
+
|
|
11
|
+
> `readonly` **EntityStorage**: `"entity-storage"` = `"entity-storage"`
|
|
12
|
+
|
|
13
|
+
Entity storage.
|
|
14
|
+
|
|
15
|
+
### Aws
|
|
16
|
+
|
|
17
|
+
> `readonly` **Aws**: `"aws"` = `"aws"`
|
|
18
|
+
|
|
19
|
+
AWS.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Variable: MessagingSmsConnectorType
|
|
2
|
+
|
|
3
|
+
> `const` **MessagingSmsConnectorType**: `object`
|
|
4
|
+
|
|
5
|
+
Messaging sms connector types.
|
|
6
|
+
|
|
7
|
+
## Type declaration
|
|
8
|
+
|
|
9
|
+
### EntityStorage
|
|
10
|
+
|
|
11
|
+
> `readonly` **EntityStorage**: `"entity-storage"` = `"entity-storage"`
|
|
12
|
+
|
|
13
|
+
Entity storage.
|
|
14
|
+
|
|
15
|
+
### Aws
|
|
16
|
+
|
|
17
|
+
> `readonly` **Aws**: `"aws"` = `"aws"`
|
|
18
|
+
|
|
19
|
+
AWS.
|
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.30",
|
|
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.30",
|
|
22
22
|
"@twin.org/entity": "next",
|
|
23
23
|
"@twin.org/modules": "next",
|
|
24
24
|
"@twin.org/nameof": "next"
|
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
"@twin.org/logging-connector-entity-storage": "next",
|
|
67
67
|
"@twin.org/logging-models": "next",
|
|
68
68
|
"@twin.org/logging-service": "next",
|
|
69
|
+
"@twin.org/messaging-connector-aws": "next",
|
|
70
|
+
"@twin.org/messaging-connector-entity-storage": "next",
|
|
71
|
+
"@twin.org/messaging-models": "next",
|
|
72
|
+
"@twin.org/messaging-service": "next",
|
|
69
73
|
"@twin.org/nft-connector-entity-storage": "next",
|
|
70
74
|
"@twin.org/nft-connector-iota": "next",
|
|
71
75
|
"@twin.org/nft-models": "next",
|