@twin.org/messaging-service 0.0.3-next.3 → 0.0.3-next.4
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/README.md +1 -1
- package/docs/changelog.md +54 -40
- package/docs/examples.md +95 -1
- package/docs/reference/classes/MessagingAdminService.md +5 -5
- package/docs/reference/classes/MessagingService.md +6 -6
- package/docs/reference/classes/TemplateEntry.md +4 -4
- package/docs/reference/interfaces/IMessagingAdminServiceConfig.md +2 -2
- package/docs/reference/interfaces/IMessagingAdminServiceConstructorOptions.md +4 -4
- package/docs/reference/interfaces/IMessagingServiceConstructorOptions.md +8 -8
- package/package.json +5 -5
package/README.md
CHANGED
package/docs/changelog.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0.3-next.
|
|
3
|
+
## [0.0.3-next.4](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.3-next.3...messaging-service-v0.0.3-next.4) (2026-05-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* typescript 6 update ([0aabd3e](https://github.com/iotaledger/twin-messaging/commit/0aabd3e05fbdf1cbc5df34cf24c461a75abc9d7e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/messaging-models bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
16
|
+
|
|
17
|
+
## [0.0.3-next.3](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.3-next.2...messaging-service-v0.0.3-next.3) (2026-02-26)
|
|
4
18
|
|
|
5
19
|
|
|
6
20
|
### Miscellaneous Chores
|
|
@@ -14,7 +28,7 @@
|
|
|
14
28
|
* dependencies
|
|
15
29
|
* @twin.org/messaging-models bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
16
30
|
|
|
17
|
-
## [0.0.3-next.2](https://github.com/
|
|
31
|
+
## [0.0.3-next.2](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.3-next.1...messaging-service-v0.0.3-next.2) (2026-01-20)
|
|
18
32
|
|
|
19
33
|
|
|
20
34
|
### Miscellaneous Chores
|
|
@@ -28,26 +42,26 @@
|
|
|
28
42
|
* dependencies
|
|
29
43
|
* @twin.org/messaging-models bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
30
44
|
|
|
31
|
-
## [0.0.3-next.1](https://github.com/
|
|
45
|
+
## [0.0.3-next.1](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.3-next.0...messaging-service-v0.0.3-next.1) (2025-11-11)
|
|
32
46
|
|
|
33
47
|
|
|
34
48
|
### Features
|
|
35
49
|
|
|
36
|
-
* add context id features ([#24](https://github.com/
|
|
37
|
-
* add initial templates config ([66b40eb](https://github.com/
|
|
38
|
-
* add messaging admin component ([cbaaca3](https://github.com/
|
|
39
|
-
* add validate-locales ([5eeff9b](https://github.com/
|
|
40
|
-
* eslint migration to flat config ([faa02ec](https://github.com/
|
|
41
|
-
* Messaging services ([#3](https://github.com/
|
|
42
|
-
* remove unused namespace ([2201898](https://github.com/
|
|
43
|
-
* update dependencies ([53dcde6](https://github.com/
|
|
44
|
-
* update framework core ([fc476b4](https://github.com/
|
|
45
|
-
* use shared store mechanism ([#8](https://github.com/
|
|
50
|
+
* add context id features ([#24](https://github.com/iotaledger/twin-messaging/issues/24)) ([42b94e8](https://github.com/iotaledger/twin-messaging/commit/42b94e8be32c86db6afc5ccf5e9ff2c93d15d05d))
|
|
51
|
+
* add initial templates config ([66b40eb](https://github.com/iotaledger/twin-messaging/commit/66b40eb57a478d9f79de540eb847a4fb37894235))
|
|
52
|
+
* add messaging admin component ([cbaaca3](https://github.com/iotaledger/twin-messaging/commit/cbaaca34db6a9f5c51438c201535b4b43a1aea1f))
|
|
53
|
+
* add validate-locales ([5eeff9b](https://github.com/iotaledger/twin-messaging/commit/5eeff9b9bf6cecf93b249b56c4bb74b4c5bf86c9))
|
|
54
|
+
* eslint migration to flat config ([faa02ec](https://github.com/iotaledger/twin-messaging/commit/faa02ec0ef450db88b08e938415e40cf13625d15))
|
|
55
|
+
* Messaging services ([#3](https://github.com/iotaledger/twin-messaging/issues/3)) ([32571b5](https://github.com/iotaledger/twin-messaging/commit/32571b5abf5d3fc3b168074c23507e926c5d00b0))
|
|
56
|
+
* remove unused namespace ([2201898](https://github.com/iotaledger/twin-messaging/commit/22018988b84e4b3e76da1a1e16f29bfde7e6f0e6))
|
|
57
|
+
* update dependencies ([53dcde6](https://github.com/iotaledger/twin-messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
|
|
58
|
+
* update framework core ([fc476b4](https://github.com/iotaledger/twin-messaging/commit/fc476b48e6075de0ae871e3cec1fa179aa04b5eb))
|
|
59
|
+
* use shared store mechanism ([#8](https://github.com/iotaledger/twin-messaging/issues/8)) ([9ad65c2](https://github.com/iotaledger/twin-messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
|
|
46
60
|
|
|
47
61
|
|
|
48
62
|
### Bug Fixes
|
|
49
63
|
|
|
50
|
-
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/
|
|
64
|
+
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/iotaledger/twin-messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
|
|
51
65
|
|
|
52
66
|
|
|
53
67
|
### Dependencies
|
|
@@ -56,12 +70,12 @@
|
|
|
56
70
|
* dependencies
|
|
57
71
|
* @twin.org/messaging-models bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
58
72
|
|
|
59
|
-
## [0.0.2-next.6](https://github.com/
|
|
73
|
+
## [0.0.2-next.6](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.2-next.5...messaging-service-v0.0.2-next.6) (2025-10-09)
|
|
60
74
|
|
|
61
75
|
|
|
62
76
|
### Features
|
|
63
77
|
|
|
64
|
-
* add validate-locales ([5eeff9b](https://github.com/
|
|
78
|
+
* add validate-locales ([5eeff9b](https://github.com/iotaledger/twin-messaging/commit/5eeff9b9bf6cecf93b249b56c4bb74b4c5bf86c9))
|
|
65
79
|
|
|
66
80
|
|
|
67
81
|
### Dependencies
|
|
@@ -70,7 +84,7 @@
|
|
|
70
84
|
* dependencies
|
|
71
85
|
* @twin.org/messaging-models bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
72
86
|
|
|
73
|
-
## [0.0.2-next.5](https://github.com/
|
|
87
|
+
## [0.0.2-next.5](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.2-next.4...messaging-service-v0.0.2-next.5) (2025-10-02)
|
|
74
88
|
|
|
75
89
|
|
|
76
90
|
### Miscellaneous Chores
|
|
@@ -84,12 +98,12 @@
|
|
|
84
98
|
* dependencies
|
|
85
99
|
* @twin.org/messaging-models bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
86
100
|
|
|
87
|
-
## [0.0.2-next.4](https://github.com/
|
|
101
|
+
## [0.0.2-next.4](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.2-next.3...messaging-service-v0.0.2-next.4) (2025-09-29)
|
|
88
102
|
|
|
89
103
|
|
|
90
104
|
### Features
|
|
91
105
|
|
|
92
|
-
* add initial templates config ([66b40eb](https://github.com/
|
|
106
|
+
* add initial templates config ([66b40eb](https://github.com/iotaledger/twin-messaging/commit/66b40eb57a478d9f79de540eb847a4fb37894235))
|
|
93
107
|
|
|
94
108
|
|
|
95
109
|
### Dependencies
|
|
@@ -98,12 +112,12 @@
|
|
|
98
112
|
* dependencies
|
|
99
113
|
* @twin.org/messaging-models bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
100
114
|
|
|
101
|
-
## [0.0.2-next.3](https://github.com/
|
|
115
|
+
## [0.0.2-next.3](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.2-next.2...messaging-service-v0.0.2-next.3) (2025-09-29)
|
|
102
116
|
|
|
103
117
|
|
|
104
118
|
### Features
|
|
105
119
|
|
|
106
|
-
* add messaging admin component ([cbaaca3](https://github.com/
|
|
120
|
+
* add messaging admin component ([cbaaca3](https://github.com/iotaledger/twin-messaging/commit/cbaaca34db6a9f5c51438c201535b4b43a1aea1f))
|
|
107
121
|
|
|
108
122
|
|
|
109
123
|
### Dependencies
|
|
@@ -112,12 +126,12 @@
|
|
|
112
126
|
* dependencies
|
|
113
127
|
* @twin.org/messaging-models bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
114
128
|
|
|
115
|
-
## [0.0.2-next.2](https://github.com/
|
|
129
|
+
## [0.0.2-next.2](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.2-next.1...messaging-service-v0.0.2-next.2) (2025-08-29)
|
|
116
130
|
|
|
117
131
|
|
|
118
132
|
### Features
|
|
119
133
|
|
|
120
|
-
* eslint migration to flat config ([faa02ec](https://github.com/
|
|
134
|
+
* eslint migration to flat config ([faa02ec](https://github.com/iotaledger/twin-messaging/commit/faa02ec0ef450db88b08e938415e40cf13625d15))
|
|
121
135
|
|
|
122
136
|
|
|
123
137
|
### Dependencies
|
|
@@ -126,21 +140,21 @@
|
|
|
126
140
|
* dependencies
|
|
127
141
|
* @twin.org/messaging-models bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
128
142
|
|
|
129
|
-
## [0.0.2-next.1](https://github.com/
|
|
143
|
+
## [0.0.2-next.1](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.2-next.0...messaging-service-v0.0.2-next.1) (2025-08-20)
|
|
130
144
|
|
|
131
145
|
|
|
132
146
|
### Features
|
|
133
147
|
|
|
134
|
-
* Messaging services ([#3](https://github.com/
|
|
135
|
-
* remove unused namespace ([2201898](https://github.com/
|
|
136
|
-
* update dependencies ([53dcde6](https://github.com/
|
|
137
|
-
* update framework core ([fc476b4](https://github.com/
|
|
138
|
-
* use shared store mechanism ([#8](https://github.com/
|
|
148
|
+
* Messaging services ([#3](https://github.com/iotaledger/twin-messaging/issues/3)) ([32571b5](https://github.com/iotaledger/twin-messaging/commit/32571b5abf5d3fc3b168074c23507e926c5d00b0))
|
|
149
|
+
* remove unused namespace ([2201898](https://github.com/iotaledger/twin-messaging/commit/22018988b84e4b3e76da1a1e16f29bfde7e6f0e6))
|
|
150
|
+
* update dependencies ([53dcde6](https://github.com/iotaledger/twin-messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
|
|
151
|
+
* update framework core ([fc476b4](https://github.com/iotaledger/twin-messaging/commit/fc476b48e6075de0ae871e3cec1fa179aa04b5eb))
|
|
152
|
+
* use shared store mechanism ([#8](https://github.com/iotaledger/twin-messaging/issues/8)) ([9ad65c2](https://github.com/iotaledger/twin-messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
|
|
139
153
|
|
|
140
154
|
|
|
141
155
|
### Bug Fixes
|
|
142
156
|
|
|
143
|
-
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/
|
|
157
|
+
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/iotaledger/twin-messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
|
|
144
158
|
|
|
145
159
|
|
|
146
160
|
### Dependencies
|
|
@@ -154,7 +168,7 @@
|
|
|
154
168
|
|
|
155
169
|
### Features
|
|
156
170
|
|
|
157
|
-
* release to production ([cc714a7](https://github.com/
|
|
171
|
+
* release to production ([cc714a7](https://github.com/iotaledger/twin-messaging/commit/cc714a7e1db251ab8e1a158f7753387a56d60271))
|
|
158
172
|
|
|
159
173
|
|
|
160
174
|
### Dependencies
|
|
@@ -163,7 +177,7 @@
|
|
|
163
177
|
* dependencies
|
|
164
178
|
* @twin.org/messaging-models bumped from ^0.0.0 to ^0.0.1
|
|
165
179
|
|
|
166
|
-
## [0.0.1-next.16](https://github.com/
|
|
180
|
+
## [0.0.1-next.16](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.1-next.15...messaging-service-v0.0.1-next.16) (2025-06-30)
|
|
167
181
|
|
|
168
182
|
|
|
169
183
|
### Miscellaneous Chores
|
|
@@ -177,12 +191,12 @@
|
|
|
177
191
|
* dependencies
|
|
178
192
|
* @twin.org/messaging-models bumped from 0.0.1-next.15 to 0.0.1-next.16
|
|
179
193
|
|
|
180
|
-
## [0.0.1-next.15](https://github.com/
|
|
194
|
+
## [0.0.1-next.15](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.1-next.14...messaging-service-v0.0.1-next.15) (2025-06-12)
|
|
181
195
|
|
|
182
196
|
|
|
183
197
|
### Features
|
|
184
198
|
|
|
185
|
-
* update dependencies ([53dcde6](https://github.com/
|
|
199
|
+
* update dependencies ([53dcde6](https://github.com/iotaledger/twin-messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
|
|
186
200
|
|
|
187
201
|
|
|
188
202
|
### Dependencies
|
|
@@ -191,12 +205,12 @@
|
|
|
191
205
|
* dependencies
|
|
192
206
|
* @twin.org/messaging-models bumped from 0.0.1-next.14 to 0.0.1-next.15
|
|
193
207
|
|
|
194
|
-
## [0.0.1-next.14](https://github.com/
|
|
208
|
+
## [0.0.1-next.14](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.1-next.13...messaging-service-v0.0.1-next.14) (2025-04-17)
|
|
195
209
|
|
|
196
210
|
|
|
197
211
|
### Features
|
|
198
212
|
|
|
199
|
-
* use shared store mechanism ([#8](https://github.com/
|
|
213
|
+
* use shared store mechanism ([#8](https://github.com/iotaledger/twin-messaging/issues/8)) ([9ad65c2](https://github.com/iotaledger/twin-messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
|
|
200
214
|
|
|
201
215
|
|
|
202
216
|
### Dependencies
|
|
@@ -205,17 +219,17 @@
|
|
|
205
219
|
* dependencies
|
|
206
220
|
* @twin.org/messaging-models bumped from 0.0.1-next.13 to 0.0.1-next.14
|
|
207
221
|
|
|
208
|
-
## [0.0.1-next.13](https://github.com/
|
|
222
|
+
## [0.0.1-next.13](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.1-next.12...messaging-service-v0.0.1-next.13) (2025-03-28)
|
|
209
223
|
|
|
210
224
|
|
|
211
225
|
### Features
|
|
212
226
|
|
|
213
|
-
* Messaging services ([#3](https://github.com/
|
|
227
|
+
* Messaging services ([#3](https://github.com/iotaledger/twin-messaging/issues/3)) ([32571b5](https://github.com/iotaledger/twin-messaging/commit/32571b5abf5d3fc3b168074c23507e926c5d00b0))
|
|
214
228
|
|
|
215
229
|
|
|
216
230
|
### Bug Fixes
|
|
217
231
|
|
|
218
|
-
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/
|
|
232
|
+
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/iotaledger/twin-messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
|
|
219
233
|
|
|
220
234
|
|
|
221
235
|
### Dependencies
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,95 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Messaging Service Examples
|
|
2
|
+
|
|
3
|
+
These examples show how to manage templates and send templated messages through configured connectors.
|
|
4
|
+
|
|
5
|
+
## MessagingService
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { MessagingService } from '@twin.org/messaging-service';
|
|
9
|
+
|
|
10
|
+
const messagingService = new MessagingService({
|
|
11
|
+
messagingAdminComponentType: 'messaging-admin',
|
|
12
|
+
messagingEmailConnectorType: 'messaging-email',
|
|
13
|
+
messagingPushNotificationConnectorType: 'messaging-push-notification',
|
|
14
|
+
messagingSmsConnectorType: 'messaging-sms'
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
console.log(messagingService.className()); // MessagingService
|
|
18
|
+
|
|
19
|
+
const emailSent = await messagingService.sendCustomEmail(
|
|
20
|
+
'service@example.org',
|
|
21
|
+
['alice@example.org', 'bob@example.org'],
|
|
22
|
+
'welcome-email',
|
|
23
|
+
{
|
|
24
|
+
firstName: 'Alice',
|
|
25
|
+
organisation: 'Twin Foundation'
|
|
26
|
+
},
|
|
27
|
+
'en'
|
|
28
|
+
);
|
|
29
|
+
console.log(emailSent); // true
|
|
30
|
+
|
|
31
|
+
const deviceAddress = await messagingService.registerDevice('orders-app', 'device-token-001');
|
|
32
|
+
console.log(deviceAddress); // orders-app:device-token-001
|
|
33
|
+
|
|
34
|
+
const pushSent = await messagingService.sendSinglePushNotification(
|
|
35
|
+
deviceAddress,
|
|
36
|
+
'delivery-update',
|
|
37
|
+
{
|
|
38
|
+
orderNumber: 'ORD-4829',
|
|
39
|
+
status: 'Out for delivery'
|
|
40
|
+
},
|
|
41
|
+
'en'
|
|
42
|
+
);
|
|
43
|
+
console.log(pushSent); // true
|
|
44
|
+
|
|
45
|
+
const smsSent = await messagingService.sendSMS(
|
|
46
|
+
'+441234567890',
|
|
47
|
+
'security-code',
|
|
48
|
+
{
|
|
49
|
+
code: '482931'
|
|
50
|
+
},
|
|
51
|
+
'en'
|
|
52
|
+
);
|
|
53
|
+
console.log(smsSent); // true
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## MessagingAdminService
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { MessagingAdminService } from '@twin.org/messaging-service';
|
|
60
|
+
|
|
61
|
+
const adminService = new MessagingAdminService({
|
|
62
|
+
config: {
|
|
63
|
+
defaultLocale: 'en'
|
|
64
|
+
},
|
|
65
|
+
templateEntryStorageConnectorType: 'template-entry'
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
console.log(adminService.className()); // MessagingAdminService
|
|
69
|
+
|
|
70
|
+
await adminService.setTemplate(
|
|
71
|
+
'welcome-email',
|
|
72
|
+
'en',
|
|
73
|
+
'Welcome {{firstName}}',
|
|
74
|
+
'Hi {{firstName}}, thanks for joining {{organisation}}.'
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
const template = await adminService.getTemplate('welcome-email', 'en');
|
|
78
|
+
console.log(template.title); // Welcome {{firstName}}
|
|
79
|
+
|
|
80
|
+
await adminService.removeTemplate('welcome-email', 'en');
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## TemplateEntry
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import { TemplateEntry } from '@twin.org/messaging-service';
|
|
87
|
+
|
|
88
|
+
const templateEntry = new TemplateEntry();
|
|
89
|
+
templateEntry.id = 'security-code:en';
|
|
90
|
+
templateEntry.title = 'Security code';
|
|
91
|
+
templateEntry.content = 'Your code is {{code}}.';
|
|
92
|
+
templateEntry.dateCreated = new Date().toISOString();
|
|
93
|
+
|
|
94
|
+
console.log(templateEntry.id); // security-code:en
|
|
95
|
+
```
|
|
@@ -28,7 +28,7 @@ The options for the connector.
|
|
|
28
28
|
|
|
29
29
|
## Properties
|
|
30
30
|
|
|
31
|
-
### CLASS\_NAME
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
32
|
|
|
33
33
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ Runtime name for the class.
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
-
### className()
|
|
39
|
+
### className() {#classname}
|
|
40
40
|
|
|
41
41
|
> **className**(): `string`
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ The class name of the component.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### setTemplate()
|
|
57
|
+
### setTemplate() {#settemplate}
|
|
58
58
|
|
|
59
59
|
> **setTemplate**(`templateId`, `locale`, `title`, `content`): `Promise`\<`void`\>
|
|
60
60
|
|
|
@@ -98,7 +98,7 @@ Nothing.
|
|
|
98
98
|
|
|
99
99
|
***
|
|
100
100
|
|
|
101
|
-
### getTemplate()
|
|
101
|
+
### getTemplate() {#gettemplate}
|
|
102
102
|
|
|
103
103
|
> **getTemplate**(`templateId`, `locale`): `Promise`\<\{ `title`: `string`; `content`: `string`; \}\>
|
|
104
104
|
|
|
@@ -130,7 +130,7 @@ The email template.
|
|
|
130
130
|
|
|
131
131
|
***
|
|
132
132
|
|
|
133
|
-
### removeTemplate()
|
|
133
|
+
### removeTemplate() {#removetemplate}
|
|
134
134
|
|
|
135
135
|
> **removeTemplate**(`templateId`, `locale`): `Promise`\<`void`\>
|
|
136
136
|
|
|
@@ -28,7 +28,7 @@ The options for the connector.
|
|
|
28
28
|
|
|
29
29
|
## Properties
|
|
30
30
|
|
|
31
|
-
### CLASS\_NAME
|
|
31
|
+
### CLASS\_NAME {#class_name}
|
|
32
32
|
|
|
33
33
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ Runtime name for the class.
|
|
|
36
36
|
|
|
37
37
|
## Methods
|
|
38
38
|
|
|
39
|
-
### className()
|
|
39
|
+
### className() {#classname}
|
|
40
40
|
|
|
41
41
|
> **className**(): `string`
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ The class name of the component.
|
|
|
54
54
|
|
|
55
55
|
***
|
|
56
56
|
|
|
57
|
-
### sendCustomEmail()
|
|
57
|
+
### sendCustomEmail() {#sendcustomemail}
|
|
58
58
|
|
|
59
59
|
> **sendCustomEmail**(`sender`, `recipients`, `templateId`, `data`, `locale`): `Promise`\<`boolean`\>
|
|
60
60
|
|
|
@@ -102,7 +102,7 @@ If the email was sent successfully.
|
|
|
102
102
|
|
|
103
103
|
***
|
|
104
104
|
|
|
105
|
-
### registerDevice()
|
|
105
|
+
### registerDevice() {#registerdevice}
|
|
106
106
|
|
|
107
107
|
> **registerDevice**(`applicationId`, `deviceToken`): `Promise`\<`string`\>
|
|
108
108
|
|
|
@@ -134,7 +134,7 @@ If the device was registered successfully.
|
|
|
134
134
|
|
|
135
135
|
***
|
|
136
136
|
|
|
137
|
-
### sendSinglePushNotification()
|
|
137
|
+
### sendSinglePushNotification() {#sendsinglepushnotification}
|
|
138
138
|
|
|
139
139
|
> **sendSinglePushNotification**(`deviceAddress`, `templateId`, `data`, `locale`): `Promise`\<`boolean`\>
|
|
140
140
|
|
|
@@ -176,7 +176,7 @@ If the notification was sent successfully.
|
|
|
176
176
|
|
|
177
177
|
***
|
|
178
178
|
|
|
179
|
-
### sendSMS()
|
|
179
|
+
### sendSMS() {#sendsms}
|
|
180
180
|
|
|
181
181
|
> **sendSMS**(`phoneNumber`, `templateId`, `data`, `locale`): `Promise`\<`boolean`\>
|
|
182
182
|
|
|
@@ -14,7 +14,7 @@ Call defining a template message entry.
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
### id
|
|
17
|
+
### id {#id}
|
|
18
18
|
|
|
19
19
|
> **id**: `string`
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ The id.
|
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
25
|
-
### title
|
|
25
|
+
### title {#title}
|
|
26
26
|
|
|
27
27
|
> **title**: `string`
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ The title.
|
|
|
30
30
|
|
|
31
31
|
***
|
|
32
32
|
|
|
33
|
-
### content
|
|
33
|
+
### content {#content}
|
|
34
34
|
|
|
35
35
|
> **content**: `string`
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ The content.
|
|
|
38
38
|
|
|
39
39
|
***
|
|
40
40
|
|
|
41
|
-
### dateCreated
|
|
41
|
+
### dateCreated {#datecreated}
|
|
42
42
|
|
|
43
43
|
> **dateCreated**: `string`
|
|
44
44
|
|
|
@@ -4,9 +4,9 @@ Options for the messaging service.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### defaultLocale?
|
|
7
|
+
### defaultLocale? {#defaultlocale}
|
|
8
8
|
|
|
9
|
-
> `optional` **defaultLocale
|
|
9
|
+
> `optional` **defaultLocale?**: `string`
|
|
10
10
|
|
|
11
11
|
The default locale to use for the messaging service.
|
|
12
12
|
|
|
@@ -4,9 +4,9 @@ Options for the messaging admin service.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### templateEntryStorageConnectorType?
|
|
7
|
+
### templateEntryStorageConnectorType? {#templateentrystorageconnectortype}
|
|
8
8
|
|
|
9
|
-
> `optional` **templateEntryStorageConnectorType
|
|
9
|
+
> `optional` **templateEntryStorageConnectorType?**: `string`
|
|
10
10
|
|
|
11
11
|
The type of the entity connector to use.
|
|
12
12
|
|
|
@@ -18,8 +18,8 @@ template-entry
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### config?
|
|
21
|
+
### config? {#config}
|
|
22
22
|
|
|
23
|
-
> `optional` **config
|
|
23
|
+
> `optional` **config?**: [`IMessagingAdminServiceConfig`](IMessagingAdminServiceConfig.md)
|
|
24
24
|
|
|
25
25
|
The configuration for the messaging admin service.
|
|
@@ -4,33 +4,33 @@ Options for the messaging service.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### messagingEmailConnectorType?
|
|
7
|
+
### messagingEmailConnectorType? {#messagingemailconnectortype}
|
|
8
8
|
|
|
9
|
-
> `optional` **messagingEmailConnectorType
|
|
9
|
+
> `optional` **messagingEmailConnectorType?**: `string`
|
|
10
10
|
|
|
11
11
|
The type of the email messaging connector to use, defaults to not configured.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### messagingPushNotificationConnectorType?
|
|
15
|
+
### messagingPushNotificationConnectorType? {#messagingpushnotificationconnectortype}
|
|
16
16
|
|
|
17
|
-
> `optional` **messagingPushNotificationConnectorType
|
|
17
|
+
> `optional` **messagingPushNotificationConnectorType?**: `string`
|
|
18
18
|
|
|
19
19
|
The type of the push notifications messaging connector to use, defaults to not configured.
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### messagingSmsConnectorType?
|
|
23
|
+
### messagingSmsConnectorType? {#messagingsmsconnectortype}
|
|
24
24
|
|
|
25
|
-
> `optional` **messagingSmsConnectorType
|
|
25
|
+
> `optional` **messagingSmsConnectorType?**: `string`
|
|
26
26
|
|
|
27
27
|
The type of the sms messaging connector to use, defaults to not configured.
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
31
|
-
### messagingAdminComponentType?
|
|
31
|
+
### messagingAdminComponentType? {#messagingadmincomponenttype}
|
|
32
32
|
|
|
33
|
-
> `optional` **messagingAdminComponentType
|
|
33
|
+
> `optional` **messagingAdminComponentType?**: `string`
|
|
34
34
|
|
|
35
35
|
The type of the messaging admin component to use.
|
|
36
36
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/messaging-service",
|
|
3
|
-
"version": "0.0.3-next.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3-next.4",
|
|
4
|
+
"description": "Implements the messaging service layer that orchestrates delivery workflows across connectors.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/iotaledger/messaging.git",
|
|
8
8
|
"directory": "packages/messaging-service"
|
|
9
9
|
},
|
|
10
10
|
"author": "adrian.sanchez.sequeira@iota.org",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@twin.org/entity": "next",
|
|
19
19
|
"@twin.org/entity-storage-models": "next",
|
|
20
20
|
"@twin.org/logging-models": "next",
|
|
21
|
-
"@twin.org/messaging-models": "0.0.3-next.
|
|
21
|
+
"@twin.org/messaging-models": "0.0.3-next.4",
|
|
22
22
|
"@twin.org/nameof": "next"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/es/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"business-logic"
|
|
49
49
|
],
|
|
50
50
|
"bugs": {
|
|
51
|
-
"url": "git+https://github.com/
|
|
51
|
+
"url": "git+https://github.com/iotaledger/messaging/issues"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://twindev.org"
|
|
54
54
|
}
|