@twin.org/messaging-service 0.0.3-next.3 → 0.0.3-next.5
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 +68 -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,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0.3-next.
|
|
3
|
+
## [0.0.3-next.5](https://github.com/iotaledger/twin-messaging/compare/messaging-service-v0.0.3-next.4...messaging-service-v0.0.3-next.5) (2026-05-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update dependencies ([eda66c5](https://github.com/iotaledger/twin-messaging/commit/eda66c5c670f36f1ba86a8f768e4781b629c88ff))
|
|
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.4 to 0.0.3-next.5
|
|
16
|
+
|
|
17
|
+
## [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* typescript 6 update ([0aabd3e](https://github.com/iotaledger/twin-messaging/commit/0aabd3e05fbdf1cbc5df34cf24c461a75abc9d7e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/messaging-models bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
30
|
+
|
|
31
|
+
## [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
32
|
|
|
5
33
|
|
|
6
34
|
### Miscellaneous Chores
|
|
@@ -14,7 +42,7 @@
|
|
|
14
42
|
* dependencies
|
|
15
43
|
* @twin.org/messaging-models bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
16
44
|
|
|
17
|
-
## [0.0.3-next.2](https://github.com/
|
|
45
|
+
## [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
46
|
|
|
19
47
|
|
|
20
48
|
### Miscellaneous Chores
|
|
@@ -28,26 +56,26 @@
|
|
|
28
56
|
* dependencies
|
|
29
57
|
* @twin.org/messaging-models bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
30
58
|
|
|
31
|
-
## [0.0.3-next.1](https://github.com/
|
|
59
|
+
## [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
60
|
|
|
33
61
|
|
|
34
62
|
### Features
|
|
35
63
|
|
|
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/
|
|
64
|
+
* add context id features ([#24](https://github.com/iotaledger/twin-messaging/issues/24)) ([42b94e8](https://github.com/iotaledger/twin-messaging/commit/42b94e8be32c86db6afc5ccf5e9ff2c93d15d05d))
|
|
65
|
+
* add initial templates config ([66b40eb](https://github.com/iotaledger/twin-messaging/commit/66b40eb57a478d9f79de540eb847a4fb37894235))
|
|
66
|
+
* add messaging admin component ([cbaaca3](https://github.com/iotaledger/twin-messaging/commit/cbaaca34db6a9f5c51438c201535b4b43a1aea1f))
|
|
67
|
+
* add validate-locales ([5eeff9b](https://github.com/iotaledger/twin-messaging/commit/5eeff9b9bf6cecf93b249b56c4bb74b4c5bf86c9))
|
|
68
|
+
* eslint migration to flat config ([faa02ec](https://github.com/iotaledger/twin-messaging/commit/faa02ec0ef450db88b08e938415e40cf13625d15))
|
|
69
|
+
* Messaging services ([#3](https://github.com/iotaledger/twin-messaging/issues/3)) ([32571b5](https://github.com/iotaledger/twin-messaging/commit/32571b5abf5d3fc3b168074c23507e926c5d00b0))
|
|
70
|
+
* remove unused namespace ([2201898](https://github.com/iotaledger/twin-messaging/commit/22018988b84e4b3e76da1a1e16f29bfde7e6f0e6))
|
|
71
|
+
* update dependencies ([53dcde6](https://github.com/iotaledger/twin-messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
|
|
72
|
+
* update framework core ([fc476b4](https://github.com/iotaledger/twin-messaging/commit/fc476b48e6075de0ae871e3cec1fa179aa04b5eb))
|
|
73
|
+
* use shared store mechanism ([#8](https://github.com/iotaledger/twin-messaging/issues/8)) ([9ad65c2](https://github.com/iotaledger/twin-messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
|
|
46
74
|
|
|
47
75
|
|
|
48
76
|
### Bug Fixes
|
|
49
77
|
|
|
50
|
-
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/
|
|
78
|
+
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/iotaledger/twin-messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
|
|
51
79
|
|
|
52
80
|
|
|
53
81
|
### Dependencies
|
|
@@ -56,12 +84,12 @@
|
|
|
56
84
|
* dependencies
|
|
57
85
|
* @twin.org/messaging-models bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
58
86
|
|
|
59
|
-
## [0.0.2-next.6](https://github.com/
|
|
87
|
+
## [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
88
|
|
|
61
89
|
|
|
62
90
|
### Features
|
|
63
91
|
|
|
64
|
-
* add validate-locales ([5eeff9b](https://github.com/
|
|
92
|
+
* add validate-locales ([5eeff9b](https://github.com/iotaledger/twin-messaging/commit/5eeff9b9bf6cecf93b249b56c4bb74b4c5bf86c9))
|
|
65
93
|
|
|
66
94
|
|
|
67
95
|
### Dependencies
|
|
@@ -70,7 +98,7 @@
|
|
|
70
98
|
* dependencies
|
|
71
99
|
* @twin.org/messaging-models bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
72
100
|
|
|
73
|
-
## [0.0.2-next.5](https://github.com/
|
|
101
|
+
## [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
102
|
|
|
75
103
|
|
|
76
104
|
### Miscellaneous Chores
|
|
@@ -84,12 +112,12 @@
|
|
|
84
112
|
* dependencies
|
|
85
113
|
* @twin.org/messaging-models bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
86
114
|
|
|
87
|
-
## [0.0.2-next.4](https://github.com/
|
|
115
|
+
## [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
116
|
|
|
89
117
|
|
|
90
118
|
### Features
|
|
91
119
|
|
|
92
|
-
* add initial templates config ([66b40eb](https://github.com/
|
|
120
|
+
* add initial templates config ([66b40eb](https://github.com/iotaledger/twin-messaging/commit/66b40eb57a478d9f79de540eb847a4fb37894235))
|
|
93
121
|
|
|
94
122
|
|
|
95
123
|
### Dependencies
|
|
@@ -98,12 +126,12 @@
|
|
|
98
126
|
* dependencies
|
|
99
127
|
* @twin.org/messaging-models bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
100
128
|
|
|
101
|
-
## [0.0.2-next.3](https://github.com/
|
|
129
|
+
## [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
130
|
|
|
103
131
|
|
|
104
132
|
### Features
|
|
105
133
|
|
|
106
|
-
* add messaging admin component ([cbaaca3](https://github.com/
|
|
134
|
+
* add messaging admin component ([cbaaca3](https://github.com/iotaledger/twin-messaging/commit/cbaaca34db6a9f5c51438c201535b4b43a1aea1f))
|
|
107
135
|
|
|
108
136
|
|
|
109
137
|
### Dependencies
|
|
@@ -112,12 +140,12 @@
|
|
|
112
140
|
* dependencies
|
|
113
141
|
* @twin.org/messaging-models bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
114
142
|
|
|
115
|
-
## [0.0.2-next.2](https://github.com/
|
|
143
|
+
## [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
144
|
|
|
117
145
|
|
|
118
146
|
### Features
|
|
119
147
|
|
|
120
|
-
* eslint migration to flat config ([faa02ec](https://github.com/
|
|
148
|
+
* eslint migration to flat config ([faa02ec](https://github.com/iotaledger/twin-messaging/commit/faa02ec0ef450db88b08e938415e40cf13625d15))
|
|
121
149
|
|
|
122
150
|
|
|
123
151
|
### Dependencies
|
|
@@ -126,21 +154,21 @@
|
|
|
126
154
|
* dependencies
|
|
127
155
|
* @twin.org/messaging-models bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
128
156
|
|
|
129
|
-
## [0.0.2-next.1](https://github.com/
|
|
157
|
+
## [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
158
|
|
|
131
159
|
|
|
132
160
|
### Features
|
|
133
161
|
|
|
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/
|
|
162
|
+
* Messaging services ([#3](https://github.com/iotaledger/twin-messaging/issues/3)) ([32571b5](https://github.com/iotaledger/twin-messaging/commit/32571b5abf5d3fc3b168074c23507e926c5d00b0))
|
|
163
|
+
* remove unused namespace ([2201898](https://github.com/iotaledger/twin-messaging/commit/22018988b84e4b3e76da1a1e16f29bfde7e6f0e6))
|
|
164
|
+
* update dependencies ([53dcde6](https://github.com/iotaledger/twin-messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
|
|
165
|
+
* update framework core ([fc476b4](https://github.com/iotaledger/twin-messaging/commit/fc476b48e6075de0ae871e3cec1fa179aa04b5eb))
|
|
166
|
+
* use shared store mechanism ([#8](https://github.com/iotaledger/twin-messaging/issues/8)) ([9ad65c2](https://github.com/iotaledger/twin-messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
|
|
139
167
|
|
|
140
168
|
|
|
141
169
|
### Bug Fixes
|
|
142
170
|
|
|
143
|
-
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/
|
|
171
|
+
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/iotaledger/twin-messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
|
|
144
172
|
|
|
145
173
|
|
|
146
174
|
### Dependencies
|
|
@@ -154,7 +182,7 @@
|
|
|
154
182
|
|
|
155
183
|
### Features
|
|
156
184
|
|
|
157
|
-
* release to production ([cc714a7](https://github.com/
|
|
185
|
+
* release to production ([cc714a7](https://github.com/iotaledger/twin-messaging/commit/cc714a7e1db251ab8e1a158f7753387a56d60271))
|
|
158
186
|
|
|
159
187
|
|
|
160
188
|
### Dependencies
|
|
@@ -163,7 +191,7 @@
|
|
|
163
191
|
* dependencies
|
|
164
192
|
* @twin.org/messaging-models bumped from ^0.0.0 to ^0.0.1
|
|
165
193
|
|
|
166
|
-
## [0.0.1-next.16](https://github.com/
|
|
194
|
+
## [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
195
|
|
|
168
196
|
|
|
169
197
|
### Miscellaneous Chores
|
|
@@ -177,12 +205,12 @@
|
|
|
177
205
|
* dependencies
|
|
178
206
|
* @twin.org/messaging-models bumped from 0.0.1-next.15 to 0.0.1-next.16
|
|
179
207
|
|
|
180
|
-
## [0.0.1-next.15](https://github.com/
|
|
208
|
+
## [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
209
|
|
|
182
210
|
|
|
183
211
|
### Features
|
|
184
212
|
|
|
185
|
-
* update dependencies ([53dcde6](https://github.com/
|
|
213
|
+
* update dependencies ([53dcde6](https://github.com/iotaledger/twin-messaging/commit/53dcde60d6efaee5957296f6d097cb97c0fb2f9d))
|
|
186
214
|
|
|
187
215
|
|
|
188
216
|
### Dependencies
|
|
@@ -191,12 +219,12 @@
|
|
|
191
219
|
* dependencies
|
|
192
220
|
* @twin.org/messaging-models bumped from 0.0.1-next.14 to 0.0.1-next.15
|
|
193
221
|
|
|
194
|
-
## [0.0.1-next.14](https://github.com/
|
|
222
|
+
## [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
223
|
|
|
196
224
|
|
|
197
225
|
### Features
|
|
198
226
|
|
|
199
|
-
* use shared store mechanism ([#8](https://github.com/
|
|
227
|
+
* use shared store mechanism ([#8](https://github.com/iotaledger/twin-messaging/issues/8)) ([9ad65c2](https://github.com/iotaledger/twin-messaging/commit/9ad65c239ba77bb75604a1f6e51b975357f3228d))
|
|
200
228
|
|
|
201
229
|
|
|
202
230
|
### Dependencies
|
|
@@ -205,17 +233,17 @@
|
|
|
205
233
|
* dependencies
|
|
206
234
|
* @twin.org/messaging-models bumped from 0.0.1-next.13 to 0.0.1-next.14
|
|
207
235
|
|
|
208
|
-
## [0.0.1-next.13](https://github.com/
|
|
236
|
+
## [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
237
|
|
|
210
238
|
|
|
211
239
|
### Features
|
|
212
240
|
|
|
213
|
-
* Messaging services ([#3](https://github.com/
|
|
241
|
+
* Messaging services ([#3](https://github.com/iotaledger/twin-messaging/issues/3)) ([32571b5](https://github.com/iotaledger/twin-messaging/commit/32571b5abf5d3fc3b168074c23507e926c5d00b0))
|
|
214
242
|
|
|
215
243
|
|
|
216
244
|
### Bug Fixes
|
|
217
245
|
|
|
218
|
-
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/
|
|
246
|
+
* Adding format to the MessagingEntries ts number ([8b99d4f](https://github.com/iotaledger/twin-messaging/commit/8b99d4f01c4f2b08da8d2affc1b9554fcb0d3690))
|
|
219
247
|
|
|
220
248
|
|
|
221
249
|
### 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.5",
|
|
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.5",
|
|
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
|
}
|