@twin.org/messaging-connector-entity-storage 0.0.1 → 0.0.2-next.1
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 +6 -13
- package/dist/esm/index.mjs +7 -14
- package/dist/types/models/IEntityStorageMessagingEmailConnectorConstructorOptions.d.ts +2 -2
- package/dist/types/models/IEntityStorageMessagingPushNotificationConnectorConstructorOptions.d.ts +2 -2
- package/dist/types/models/IEntityStorageMessagingSmsConnectorConstructorOptions.d.ts +2 -2
- package/docs/changelog.md +23 -0
- package/docs/reference/interfaces/IEntityStorageMessagingEmailConnectorConstructorOptions.md +3 -3
- package/docs/reference/interfaces/IEntityStorageMessagingPushNotificationConnectorConstructorOptions.md +3 -3
- package/docs/reference/interfaces/IEntityStorageMessagingSmsConnectorConstructorOptions.md +3 -3
- package/package.json +6 -6
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var entity = require('@twin.org/entity');
|
|
4
4
|
var core = require('@twin.org/core');
|
|
5
5
|
var entityStorageModels = require('@twin.org/entity-storage-models');
|
|
6
|
-
var loggingModels = require('@twin.org/logging-models');
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Call defining an email entry.
|
|
@@ -272,7 +271,7 @@ class EntityStorageMessagingEmailConnector {
|
|
|
272
271
|
*/
|
|
273
272
|
CLASS_NAME = "EntityStorageMessagingEmailConnector";
|
|
274
273
|
/**
|
|
275
|
-
* The logging
|
|
274
|
+
* The logging component.
|
|
276
275
|
* @internal
|
|
277
276
|
*/
|
|
278
277
|
_logging;
|
|
@@ -286,9 +285,7 @@ class EntityStorageMessagingEmailConnector {
|
|
|
286
285
|
* @param options The options for the connector.
|
|
287
286
|
*/
|
|
288
287
|
constructor(options) {
|
|
289
|
-
|
|
290
|
-
this._logging = loggingModels.LoggingConnectorFactory.get(options.loggingConnectorType);
|
|
291
|
-
}
|
|
288
|
+
this._logging = core.ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
|
|
292
289
|
this._messagingEmailEntryStorage = entityStorageModels.EntityStorageConnectorFactory.get(options?.messagingEmailEntryStorageConnectorType ??
|
|
293
290
|
core.StringHelper.kebabCase("EmailEntry"));
|
|
294
291
|
}
|
|
@@ -349,7 +346,7 @@ class EntityStorageMessagingPushNotificationConnector {
|
|
|
349
346
|
*/
|
|
350
347
|
CLASS_NAME = "EntityStorageMessagingPushNotificationConnector";
|
|
351
348
|
/**
|
|
352
|
-
* The logging
|
|
349
|
+
* The logging component.
|
|
353
350
|
* @internal
|
|
354
351
|
*/
|
|
355
352
|
_logging;
|
|
@@ -368,9 +365,7 @@ class EntityStorageMessagingPushNotificationConnector {
|
|
|
368
365
|
* @param options The options for the connector.
|
|
369
366
|
*/
|
|
370
367
|
constructor(options) {
|
|
371
|
-
|
|
372
|
-
this._logging = loggingModels.LoggingConnectorFactory.get(options.loggingConnectorType);
|
|
373
|
-
}
|
|
368
|
+
this._logging = core.ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
|
|
374
369
|
this._messagingDeviceEntryStorage = entityStorageModels.EntityStorageConnectorFactory.get(options?.messagingDeviceEntryStorageConnectorType ??
|
|
375
370
|
core.StringHelper.kebabCase("PushNotificationDeviceEntry"));
|
|
376
371
|
this._messagingMessageEntryStorage = entityStorageModels.EntityStorageConnectorFactory.get(options?.messagingMessageEntryStorageConnectorType ??
|
|
@@ -458,7 +453,7 @@ class EntityStorageMessagingSmsConnector {
|
|
|
458
453
|
*/
|
|
459
454
|
CLASS_NAME = "EntityStorageMessagingSmsConnector";
|
|
460
455
|
/**
|
|
461
|
-
* The logging
|
|
456
|
+
* The logging component.
|
|
462
457
|
* @internal
|
|
463
458
|
*/
|
|
464
459
|
_logging;
|
|
@@ -472,9 +467,7 @@ class EntityStorageMessagingSmsConnector {
|
|
|
472
467
|
* @param options The options for the connector.
|
|
473
468
|
*/
|
|
474
469
|
constructor(options) {
|
|
475
|
-
|
|
476
|
-
this._logging = loggingModels.LoggingConnectorFactory.get(options.loggingConnectorType);
|
|
477
|
-
}
|
|
470
|
+
this._logging = core.ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
|
|
478
471
|
this._messagingSmsEntryStorage = entityStorageModels.EntityStorageConnectorFactory.get(options?.messagingSmsEntryStorageConnectorType ?? core.StringHelper.kebabCase("SmsEntry"));
|
|
479
472
|
}
|
|
480
473
|
/**
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { property, SortDirection, entity, EntitySchemaFactory, EntitySchemaHelper } from '@twin.org/entity';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentFactory, StringHelper, Guards, Converter, RandomHelper, GeneralError } from '@twin.org/core';
|
|
3
3
|
import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
|
|
4
|
-
import { LoggingConnectorFactory } from '@twin.org/logging-models';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Call defining an email entry.
|
|
@@ -270,7 +269,7 @@ class EntityStorageMessagingEmailConnector {
|
|
|
270
269
|
*/
|
|
271
270
|
CLASS_NAME = "EntityStorageMessagingEmailConnector";
|
|
272
271
|
/**
|
|
273
|
-
* The logging
|
|
272
|
+
* The logging component.
|
|
274
273
|
* @internal
|
|
275
274
|
*/
|
|
276
275
|
_logging;
|
|
@@ -284,9 +283,7 @@ class EntityStorageMessagingEmailConnector {
|
|
|
284
283
|
* @param options The options for the connector.
|
|
285
284
|
*/
|
|
286
285
|
constructor(options) {
|
|
287
|
-
|
|
288
|
-
this._logging = LoggingConnectorFactory.get(options.loggingConnectorType);
|
|
289
|
-
}
|
|
286
|
+
this._logging = ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
|
|
290
287
|
this._messagingEmailEntryStorage = EntityStorageConnectorFactory.get(options?.messagingEmailEntryStorageConnectorType ??
|
|
291
288
|
StringHelper.kebabCase("EmailEntry"));
|
|
292
289
|
}
|
|
@@ -347,7 +344,7 @@ class EntityStorageMessagingPushNotificationConnector {
|
|
|
347
344
|
*/
|
|
348
345
|
CLASS_NAME = "EntityStorageMessagingPushNotificationConnector";
|
|
349
346
|
/**
|
|
350
|
-
* The logging
|
|
347
|
+
* The logging component.
|
|
351
348
|
* @internal
|
|
352
349
|
*/
|
|
353
350
|
_logging;
|
|
@@ -366,9 +363,7 @@ class EntityStorageMessagingPushNotificationConnector {
|
|
|
366
363
|
* @param options The options for the connector.
|
|
367
364
|
*/
|
|
368
365
|
constructor(options) {
|
|
369
|
-
|
|
370
|
-
this._logging = LoggingConnectorFactory.get(options.loggingConnectorType);
|
|
371
|
-
}
|
|
366
|
+
this._logging = ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
|
|
372
367
|
this._messagingDeviceEntryStorage = EntityStorageConnectorFactory.get(options?.messagingDeviceEntryStorageConnectorType ??
|
|
373
368
|
StringHelper.kebabCase("PushNotificationDeviceEntry"));
|
|
374
369
|
this._messagingMessageEntryStorage = EntityStorageConnectorFactory.get(options?.messagingMessageEntryStorageConnectorType ??
|
|
@@ -456,7 +451,7 @@ class EntityStorageMessagingSmsConnector {
|
|
|
456
451
|
*/
|
|
457
452
|
CLASS_NAME = "EntityStorageMessagingSmsConnector";
|
|
458
453
|
/**
|
|
459
|
-
* The logging
|
|
454
|
+
* The logging component.
|
|
460
455
|
* @internal
|
|
461
456
|
*/
|
|
462
457
|
_logging;
|
|
@@ -470,9 +465,7 @@ class EntityStorageMessagingSmsConnector {
|
|
|
470
465
|
* @param options The options for the connector.
|
|
471
466
|
*/
|
|
472
467
|
constructor(options) {
|
|
473
|
-
|
|
474
|
-
this._logging = LoggingConnectorFactory.get(options.loggingConnectorType);
|
|
475
|
-
}
|
|
468
|
+
this._logging = ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
|
|
476
469
|
this._messagingSmsEntryStorage = EntityStorageConnectorFactory.get(options?.messagingSmsEntryStorageConnectorType ?? StringHelper.kebabCase("SmsEntry"));
|
|
477
470
|
}
|
|
478
471
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface IEntityStorageMessagingEmailConnectorConstructorOptions {
|
|
5
5
|
/**
|
|
6
|
-
* The type of logging
|
|
6
|
+
* The type of logging component to use, defaults to no logging.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
loggingComponentType?: string;
|
|
9
9
|
/**
|
|
10
10
|
* The type of entity storage connector to use for the email entries.
|
|
11
11
|
* @default email-entry
|
package/dist/types/models/IEntityStorageMessagingPushNotificationConnectorConstructorOptions.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface IEntityStorageMessagingPushNotificationConnectorConstructorOptions {
|
|
5
5
|
/**
|
|
6
|
-
* The type of logging
|
|
6
|
+
* The type of logging component to use, defaults to no logging.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
loggingComponentType?: string;
|
|
9
9
|
/**
|
|
10
10
|
* The type of entity storage connector to use for the push notifications entries.
|
|
11
11
|
* @default push-notification-device-entry
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface IEntityStorageMessagingSmsConnectorConstructorOptions {
|
|
5
5
|
/**
|
|
6
|
-
* The type of logging
|
|
6
|
+
* The type of logging component to use, defaults to no logging.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
loggingComponentType?: string;
|
|
9
9
|
/**
|
|
10
10
|
* The type of entity storage connector to use for the sms entries.
|
|
11
11
|
* @default sms-entry
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @twin.org/messaging-connector-entity-storage - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/messaging/compare/messaging-connector-entity-storage-v0.0.2-next.0...messaging-connector-entity-storage-v0.0.2-next.1) (2025-08-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Entity Storage email connector init ([#2](https://github.com/twinfoundation/messaging/issues/2)) ([65b344d](https://github.com/twinfoundation/messaging/commit/65b344de0d2d3d557d921e3d32e263dcb04ee9b3))
|
|
9
|
+
* update dependencies ([53dcde6](https://github.com/twinfoundation/messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
|
|
10
|
+
* update framework core ([fc476b4](https://github.com/twinfoundation/messaging/commit/fc476b48e6075de0ae871e3cec1fa179aa04b5eb))
|
|
11
|
+
* use shared store mechanism ([#8](https://github.com/twinfoundation/messaging/issues/8)) ([9ad65c2](https://github.com/twinfoundation/messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/twinfoundation/messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
|
|
17
|
+
* Make SMS entry error property optional ([#5](https://github.com/twinfoundation/messaging/issues/5)) ([e0faf83](https://github.com/twinfoundation/messaging/commit/e0faf83e028a2c5dc45a5e8ba1a546013e4a3c8c))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Dependencies
|
|
21
|
+
|
|
22
|
+
* The following workspace dependencies were updated
|
|
23
|
+
* dependencies
|
|
24
|
+
* @twin.org/messaging-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
25
|
+
|
|
3
26
|
## 0.0.1 (2025-07-08)
|
|
4
27
|
|
|
5
28
|
|
package/docs/reference/interfaces/IEntityStorageMessagingEmailConnectorConstructorOptions.md
CHANGED
|
@@ -4,11 +4,11 @@ Options for the entity storage messaging email connector.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### loggingComponentType?
|
|
8
8
|
|
|
9
|
-
> `optional` **
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
10
|
|
|
11
|
-
The type of logging
|
|
11
|
+
The type of logging component to use, defaults to no logging.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
@@ -4,11 +4,11 @@ Options for the entity storage messaging push notification connector.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### loggingComponentType?
|
|
8
8
|
|
|
9
|
-
> `optional` **
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
10
|
|
|
11
|
-
The type of logging
|
|
11
|
+
The type of logging component to use, defaults to no logging.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
@@ -4,11 +4,11 @@ Options for the entity storage messaging SMS connector.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### loggingComponentType?
|
|
8
8
|
|
|
9
|
-
> `optional` **
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
10
|
|
|
11
|
-
The type of logging
|
|
11
|
+
The type of logging component to use, defaults to no logging.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/messaging-connector-entity-storage",
|
|
3
|
-
"version": "0.0.1",
|
|
3
|
+
"version": "0.0.2-next.1",
|
|
4
4
|
"description": "Messaging connector implementation using the Entity Storage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "
|
|
18
|
-
"@twin.org/entity": "
|
|
19
|
-
"@twin.org/logging-models": "
|
|
20
|
-
"@twin.org/messaging-models": "
|
|
21
|
-
"@twin.org/nameof": "
|
|
17
|
+
"@twin.org/core": "next",
|
|
18
|
+
"@twin.org/entity": "next",
|
|
19
|
+
"@twin.org/logging-models": "next",
|
|
20
|
+
"@twin.org/messaging-models": "0.0.2-next.1",
|
|
21
|
+
"@twin.org/nameof": "next"
|
|
22
22
|
},
|
|
23
23
|
"main": "./dist/cjs/index.cjs",
|
|
24
24
|
"module": "./dist/esm/index.mjs",
|