@twin.org/messaging-connector-entity-storage 0.0.1-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -0
  3. package/dist/cjs/index.cjs +538 -0
  4. package/dist/esm/index.mjs +533 -0
  5. package/dist/types/entities/emailEntry.d.ts +38 -0
  6. package/dist/types/entities/pushNotificationDeviceEntry.d.ts +30 -0
  7. package/dist/types/entities/pushNotificationMessageEntry.d.ts +34 -0
  8. package/dist/types/entities/smsEntry.d.ts +30 -0
  9. package/dist/types/entityStorageMessagingEmailConnector.d.ts +29 -0
  10. package/dist/types/entityStorageMessagingPushNotificationConnector.d.ts +35 -0
  11. package/dist/types/entityStorageMessagingSmsConnector.d.ts +27 -0
  12. package/dist/types/index.d.ts +11 -0
  13. package/dist/types/models/IEntityStorageMessagingEmailConnectorConstructorOptions.d.ts +14 -0
  14. package/dist/types/models/IEntityStorageMessagingPushNotificationConnectorConstructorOptions.d.ts +19 -0
  15. package/dist/types/models/IEntityStorageMessagingSmsConnectorConstructorOptions.d.ts +14 -0
  16. package/dist/types/schema.d.ts +12 -0
  17. package/docs/changelog.md +5 -0
  18. package/docs/examples.md +1 -0
  19. package/docs/reference/classes/EmailEntry.md +77 -0
  20. package/docs/reference/classes/EntityStorageMessagingEmailConnector.md +91 -0
  21. package/docs/reference/classes/EntityStorageMessagingPushNotificationConnector.md +117 -0
  22. package/docs/reference/classes/EntityStorageMessagingSmsConnector.md +79 -0
  23. package/docs/reference/classes/PushNotificationDeviceEntry.md +61 -0
  24. package/docs/reference/classes/PushNotificationMessageEntry.md +69 -0
  25. package/docs/reference/classes/SmsEntry.md +61 -0
  26. package/docs/reference/functions/initSchema.md +33 -0
  27. package/docs/reference/index.md +21 -0
  28. package/docs/reference/interfaces/IEntityStorageMessagingEmailConnectorConstructorOptions.md +25 -0
  29. package/docs/reference/interfaces/IEntityStorageMessagingPushNotificationConnectorConstructorOptions.md +39 -0
  30. package/docs/reference/interfaces/IEntityStorageMessagingSmsConnectorConstructorOptions.md +25 -0
  31. package/locales/en.json +19 -0
  32. package/package.json +41 -0
@@ -0,0 +1,33 @@
1
+ # Function: initSchema()
2
+
3
+ > **initSchema**(`options`?): `void`
4
+
5
+ Initialize the schema for the messaging connector entity storage.
6
+
7
+ ## Parameters
8
+
9
+ ### options?
10
+
11
+ The options for the initialisation.
12
+
13
+ #### email
14
+
15
+ `boolean`
16
+
17
+ Should we register email schemas.
18
+
19
+ #### sms
20
+
21
+ `boolean`
22
+
23
+ Should we register sms schemas.
24
+
25
+ #### pushNotification
26
+
27
+ `boolean`
28
+
29
+ Should we register push notification schemas.
30
+
31
+ ## Returns
32
+
33
+ `void`
@@ -0,0 +1,21 @@
1
+ # @twin.org/messaging-connector-entity-storage
2
+
3
+ ## Classes
4
+
5
+ - [EmailEntry](classes/EmailEntry.md)
6
+ - [PushNotificationDeviceEntry](classes/PushNotificationDeviceEntry.md)
7
+ - [PushNotificationMessageEntry](classes/PushNotificationMessageEntry.md)
8
+ - [SmsEntry](classes/SmsEntry.md)
9
+ - [EntityStorageMessagingEmailConnector](classes/EntityStorageMessagingEmailConnector.md)
10
+ - [EntityStorageMessagingPushNotificationConnector](classes/EntityStorageMessagingPushNotificationConnector.md)
11
+ - [EntityStorageMessagingSmsConnector](classes/EntityStorageMessagingSmsConnector.md)
12
+
13
+ ## Interfaces
14
+
15
+ - [IEntityStorageMessagingEmailConnectorConstructorOptions](interfaces/IEntityStorageMessagingEmailConnectorConstructorOptions.md)
16
+ - [IEntityStorageMessagingPushNotificationConnectorConstructorOptions](interfaces/IEntityStorageMessagingPushNotificationConnectorConstructorOptions.md)
17
+ - [IEntityStorageMessagingSmsConnectorConstructorOptions](interfaces/IEntityStorageMessagingSmsConnectorConstructorOptions.md)
18
+
19
+ ## Functions
20
+
21
+ - [initSchema](functions/initSchema.md)
@@ -0,0 +1,25 @@
1
+ # Interface: IEntityStorageMessagingEmailConnectorConstructorOptions
2
+
3
+ Options for the entity storage messaging email connector.
4
+
5
+ ## Properties
6
+
7
+ ### loggingConnectorType?
8
+
9
+ > `optional` **loggingConnectorType**: `string`
10
+
11
+ The type of logging connector to use, defaults to no logging.
12
+
13
+ ***
14
+
15
+ ### messagingEmailEntryStorageConnectorType?
16
+
17
+ > `optional` **messagingEmailEntryStorageConnectorType**: `string`
18
+
19
+ The type of entity storage connector to use for the email entries.
20
+
21
+ #### Default
22
+
23
+ ```ts
24
+ email-entry
25
+ ```
@@ -0,0 +1,39 @@
1
+ # Interface: IEntityStorageMessagingPushNotificationConnectorConstructorOptions
2
+
3
+ Options for the entity storage messaging push notification connector.
4
+
5
+ ## Properties
6
+
7
+ ### loggingConnectorType?
8
+
9
+ > `optional` **loggingConnectorType**: `string`
10
+
11
+ The type of logging connector to use, defaults to no logging.
12
+
13
+ ***
14
+
15
+ ### messagingDeviceEntryStorageConnectorType?
16
+
17
+ > `optional` **messagingDeviceEntryStorageConnectorType**: `string`
18
+
19
+ The type of entity storage connector to use for the push notifications entries.
20
+
21
+ #### Default
22
+
23
+ ```ts
24
+ push-notification-device-entry
25
+ ```
26
+
27
+ ***
28
+
29
+ ### messagingMessageEntryStorageConnectorType?
30
+
31
+ > `optional` **messagingMessageEntryStorageConnectorType**: `string`
32
+
33
+ The type of entity storage connector to use for the push notifications entries.
34
+
35
+ #### Default
36
+
37
+ ```ts
38
+ push-notification-message-entry
39
+ ```
@@ -0,0 +1,25 @@
1
+ # Interface: IEntityStorageMessagingSmsConnectorConstructorOptions
2
+
3
+ Options for the entity storage messaging SMS connector.
4
+
5
+ ## Properties
6
+
7
+ ### loggingConnectorType?
8
+
9
+ > `optional` **loggingConnectorType**: `string`
10
+
11
+ The type of logging connector to use, defaults to no logging.
12
+
13
+ ***
14
+
15
+ ### messagingSmsEntryStorageConnectorType?
16
+
17
+ > `optional` **messagingSmsEntryStorageConnectorType**: `string`
18
+
19
+ The type of entity storage connector to use for the sms entries.
20
+
21
+ #### Default
22
+
23
+ ```ts
24
+ sms-entry
25
+ ```
@@ -0,0 +1,19 @@
1
+ {
2
+ "info": {
3
+ "entityStorageMessagingConnector": {
4
+ "emailSending": "Sending email",
5
+ "smsSending": "Sending SMS",
6
+ "deviceRegistering": "Registering device",
7
+ "pushNotificationSending": "Sending push notification"
8
+ }
9
+ },
10
+ "error": {
11
+ "entityStorageMessagingConnector": {
12
+ "sendCustomEmailFailed": "Failed to send custom email",
13
+ "readEmailEntryFailed": "Failed to read email entry",
14
+ "sendSMSFailed": "Failed to send SMS",
15
+ "deviceTokenRegisterFailed": "Failed to register device token",
16
+ "sendPushNotificationFailed": "Failed to send push notification"
17
+ }
18
+ }
19
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@twin.org/messaging-connector-entity-storage",
3
+ "version": "0.0.1-next.10",
4
+ "description": "Messaging connector implementation using the Entity Storage",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/twinfoundation/messaging.git",
8
+ "directory": "packages/messaging-connector-entity-storage"
9
+ },
10
+ "author": "adrian.sanchez.sequeira@iota.org",
11
+ "license": "Apache-2.0",
12
+ "type": "module",
13
+ "engines": {
14
+ "node": ">=20.0.0"
15
+ },
16
+ "dependencies": {
17
+ "@twin.org/core": "next",
18
+ "@twin.org/entity": "next",
19
+ "@twin.org/logging-models": "next",
20
+ "@twin.org/messaging-models": "0.0.1-next.10",
21
+ "@twin.org/nameof": "next"
22
+ },
23
+ "main": "./dist/cjs/index.cjs",
24
+ "module": "./dist/esm/index.mjs",
25
+ "types": "./dist/types/index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/types/index.d.ts",
29
+ "require": "./dist/cjs/index.cjs",
30
+ "import": "./dist/esm/index.mjs"
31
+ },
32
+ "./locales": "./locales"
33
+ },
34
+ "files": [
35
+ "dist/cjs",
36
+ "dist/esm",
37
+ "dist/types",
38
+ "locales",
39
+ "docs"
40
+ ]
41
+ }