@twin.org/messaging-connector-entity-storage 0.0.1 → 0.0.2-next.2

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.
@@ -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 connector.
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
- if (core.Is.stringValue(options?.loggingConnectorType)) {
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 connector.
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
- if (core.Is.stringValue(options?.loggingConnectorType)) {
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 connector.
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
- if (core.Is.stringValue(options?.loggingConnectorType)) {
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
  /**
@@ -1,7 +1,6 @@
1
1
  import { property, SortDirection, entity, EntitySchemaFactory, EntitySchemaHelper } from '@twin.org/entity';
2
- import { Is, StringHelper, Guards, Converter, RandomHelper, GeneralError } from '@twin.org/core';
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 connector.
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
- if (Is.stringValue(options?.loggingConnectorType)) {
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 connector.
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
- if (Is.stringValue(options?.loggingConnectorType)) {
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 connector.
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
- if (Is.stringValue(options?.loggingConnectorType)) {
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 connector to use, defaults to no logging.
6
+ * The type of logging component to use, defaults to no logging.
7
7
  */
8
- loggingConnectorType?: string;
8
+ loggingComponentType?: string;
9
9
  /**
10
10
  * The type of entity storage connector to use for the email entries.
11
11
  * @default email-entry
@@ -3,9 +3,9 @@
3
3
  */
4
4
  export interface IEntityStorageMessagingPushNotificationConnectorConstructorOptions {
5
5
  /**
6
- * The type of logging connector to use, defaults to no logging.
6
+ * The type of logging component to use, defaults to no logging.
7
7
  */
8
- loggingConnectorType?: string;
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 connector to use, defaults to no logging.
6
+ * The type of logging component to use, defaults to no logging.
7
7
  */
8
- loggingConnectorType?: string;
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,42 @@
1
1
  # @twin.org/messaging-connector-entity-storage - Changelog
2
2
 
3
+ ## [0.0.2-next.2](https://github.com/twinfoundation/messaging/compare/messaging-connector-entity-storage-v0.0.2-next.1...messaging-connector-entity-storage-v0.0.2-next.2) (2025-08-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * eslint migration to flat config ([faa02ec](https://github.com/twinfoundation/messaging/commit/faa02ec0ef450db88b08e938415e40cf13625d15))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/messaging-models bumped from 0.0.2-next.1 to 0.0.2-next.2
16
+
17
+ ## [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)
18
+
19
+
20
+ ### Features
21
+
22
+ * Entity Storage email connector init ([#2](https://github.com/twinfoundation/messaging/issues/2)) ([65b344d](https://github.com/twinfoundation/messaging/commit/65b344de0d2d3d557d921e3d32e263dcb04ee9b3))
23
+ * update dependencies ([53dcde6](https://github.com/twinfoundation/messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
24
+ * update framework core ([fc476b4](https://github.com/twinfoundation/messaging/commit/fc476b48e6075de0ae871e3cec1fa179aa04b5eb))
25
+ * use shared store mechanism ([#8](https://github.com/twinfoundation/messaging/issues/8)) ([9ad65c2](https://github.com/twinfoundation/messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/twinfoundation/messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
31
+ * Make SMS entry error property optional ([#5](https://github.com/twinfoundation/messaging/issues/5)) ([e0faf83](https://github.com/twinfoundation/messaging/commit/e0faf83e028a2c5dc45a5e8ba1a546013e4a3c8c))
32
+
33
+
34
+ ### Dependencies
35
+
36
+ * The following workspace dependencies were updated
37
+ * dependencies
38
+ * @twin.org/messaging-models bumped from 0.0.2-next.0 to 0.0.2-next.1
39
+
3
40
  ## 0.0.1 (2025-07-08)
4
41
 
5
42
 
@@ -4,11 +4,11 @@ Options for the entity storage messaging email connector.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### loggingConnectorType?
7
+ ### loggingComponentType?
8
8
 
9
- > `optional` **loggingConnectorType**: `string`
9
+ > `optional` **loggingComponentType**: `string`
10
10
 
11
- The type of logging connector to use, defaults to no 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
- ### loggingConnectorType?
7
+ ### loggingComponentType?
8
8
 
9
- > `optional` **loggingConnectorType**: `string`
9
+ > `optional` **loggingComponentType**: `string`
10
10
 
11
- The type of logging connector to use, defaults to no 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
- ### loggingConnectorType?
7
+ ### loggingComponentType?
8
8
 
9
- > `optional` **loggingConnectorType**: `string`
9
+ > `optional` **loggingComponentType**: `string`
10
10
 
11
- The type of logging connector to use, defaults to no 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.2",
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": "^0.0.1",
18
- "@twin.org/entity": "^0.0.1",
19
- "@twin.org/logging-models": "^0.0.1",
20
- "@twin.org/messaging-models": "^0.0.1",
21
- "@twin.org/nameof": "^0.0.1"
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.2",
21
+ "@twin.org/nameof": "next"
22
22
  },
23
23
  "main": "./dist/cjs/index.cjs",
24
24
  "module": "./dist/esm/index.mjs",