@twin.org/messaging-connector-entity-storage 0.0.1-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.
Files changed (27) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -0
  3. package/dist/cjs/index.cjs +256 -0
  4. package/dist/esm/index.mjs +252 -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 +32 -0
  10. package/dist/types/entityStorageMessagingPushNotificationConnector.d.ts +38 -0
  11. package/dist/types/entityStorageMessagingSmsConnector.d.ts +30 -0
  12. package/dist/types/index.d.ts +6 -0
  13. package/dist/types/models/IEntityStorageMessagingEmailConnectorConfig.d.ts +5 -0
  14. package/dist/types/models/IEntityStorageMessagingPushNotificationsConnectorConfig.d.ts +5 -0
  15. package/dist/types/models/IEntityStorageMessagingSmsConnectorConfig.d.ts +5 -0
  16. package/dist/types/schema.d.ts +4 -0
  17. package/docs/changelog.md +5 -0
  18. package/docs/examples.md +1 -0
  19. package/docs/reference/classes/EntityStorageMessagingEmailConnector.md +85 -0
  20. package/docs/reference/classes/EntityStorageMessagingPushNotificationConnector.md +109 -0
  21. package/docs/reference/classes/EntityStorageMessagingSmsConnector.md +77 -0
  22. package/docs/reference/index.md +13 -0
  23. package/docs/reference/type-aliases/IEntityStorageMessagingEmailConnectorConfig.md +5 -0
  24. package/docs/reference/type-aliases/IEntityStorageMessagingPushNotificationsConnectorConfig.md +5 -0
  25. package/docs/reference/type-aliases/IEntityStorageMessagingSmsConnectorConfig.md +5 -0
  26. package/locales/en.json +19 -0
  27. package/package.json +41 -0
@@ -0,0 +1,252 @@
1
+ import { Is, Guards, Converter, RandomHelper, GeneralError } from '@twin.org/core';
2
+ import { EntityStorageConnectorFactory } from '@twin.org/entity-storage-models';
3
+ import { LoggingConnectorFactory } from '@twin.org/logging-models';
4
+
5
+ // Copyright 2024 IOTA Stiftung.
6
+ // SPDX-License-Identifier: Apache-2.0.
7
+ /**
8
+ * Class for connecting to the email messaging operations of the Entity Storage.
9
+ */
10
+ class EntityStorageMessagingEmailConnector {
11
+ /**
12
+ * Runtime name for the class.
13
+ */
14
+ CLASS_NAME = "EntityStorageMessagingEmailConnector";
15
+ /**
16
+ * The logging connector.
17
+ * @internal
18
+ */
19
+ _logging;
20
+ /**
21
+ * The entity storage for the emails entries.
22
+ * @internal
23
+ */
24
+ _messagingEntryStorage;
25
+ /**
26
+ * Create a new instance of EntityStorageMessagingEmailConnector.
27
+ * @param options The options for the connector.
28
+ * @param options.loggingConnectorType The type of logging connector to use, defaults to no logging.
29
+ * @param options.messagingEntryStorageConnectorType The type of entity storage connector to use for the email entries.
30
+ * @param options.config The configuration for the email connector.
31
+ */
32
+ constructor(options) {
33
+ if (Is.stringValue(options?.loggingConnectorType)) {
34
+ this._logging = LoggingConnectorFactory.get(options.loggingConnectorType);
35
+ }
36
+ this._messagingEntryStorage = EntityStorageConnectorFactory.get(options?.messagingEntryStorageConnectorType ?? "email-entry");
37
+ }
38
+ /**
39
+ * Store a custom email using Entity Storage.
40
+ * @param sender The sender email address.
41
+ * @param recipients An array of recipients email addresses.
42
+ * @param subject The subject of the email.
43
+ * @param content The html content of the email.
44
+ * @returns True if the email was send successfully, otherwise undefined.
45
+ */
46
+ async sendCustomEmail(sender, recipients, subject, content) {
47
+ Guards.stringValue(this.CLASS_NAME, "sender", sender);
48
+ Guards.arrayValue(this.CLASS_NAME, "recipients", recipients);
49
+ Guards.stringValue(this.CLASS_NAME, "subject", subject);
50
+ Guards.stringValue(this.CLASS_NAME, "content", content);
51
+ try {
52
+ await this._logging?.log({
53
+ level: "info",
54
+ source: this.CLASS_NAME,
55
+ ts: Date.now(),
56
+ message: "emailSending",
57
+ data: {
58
+ type: "Custom Email"
59
+ }
60
+ });
61
+ const id = Converter.bytesToHex(RandomHelper.generate(32));
62
+ const entity = {
63
+ id,
64
+ sender,
65
+ recipients,
66
+ ts: Date.now(),
67
+ message: content,
68
+ subject,
69
+ status: "pending"
70
+ };
71
+ await this._messagingEntryStorage.set(entity);
72
+ return true;
73
+ }
74
+ catch (err) {
75
+ throw new GeneralError(this.CLASS_NAME, "sendCustomEmailFailed", undefined, err);
76
+ }
77
+ }
78
+ }
79
+
80
+ // Copyright 2024 IOTA Stiftung.
81
+ // SPDX-License-Identifier: Apache-2.0.
82
+ /**
83
+ * Class for connecting to the push notifications messaging operations of the Entity Storage.
84
+ */
85
+ class EntityStorageMessagingPushNotificationConnector {
86
+ /**
87
+ * Runtime name for the class.
88
+ */
89
+ CLASS_NAME = "EntityStorageMessagingPushNotificationConnector";
90
+ /**
91
+ * The logging connector.
92
+ * @internal
93
+ */
94
+ _logging;
95
+ /**
96
+ * The entity storage for the push notifications device entries.
97
+ * @internal
98
+ */
99
+ _messagingDeviceEntryStorage;
100
+ /**
101
+ * The entity storage for the push notifications message entries.
102
+ * @internal
103
+ */
104
+ _messagingMessageEntryStorage;
105
+ /**
106
+ * Create a new instance of EntityStorageMessagingPushNotificationConnector.
107
+ * @param options The options for the connector.
108
+ * @param options.loggingConnectorType The type of logging connector to use, defaults to no logging.
109
+ * @param options.messagingEntryStorageConnectorType The type of entity storage connector to use for the push notifications entries.
110
+ * @param options.config The configuration for the push notifications connector.
111
+ */
112
+ constructor(options) {
113
+ if (Is.stringValue(options?.loggingConnectorType)) {
114
+ this._logging = LoggingConnectorFactory.get(options.loggingConnectorType);
115
+ }
116
+ this._messagingDeviceEntryStorage = EntityStorageConnectorFactory.get(options?.messagingEntryStorageConnectorType ?? "push-notifications-device-entry");
117
+ this._messagingMessageEntryStorage = EntityStorageConnectorFactory.get(options?.messagingEntryStorageConnectorType ?? "push-notifications-message-entry");
118
+ }
119
+ /**
120
+ * Registers a device to an specific app in order to send notifications to it.
121
+ * @param applicationId The application address.
122
+ * @param deviceToken The device token.
123
+ * @returns If the device was registered successfully.
124
+ */
125
+ async registerDevice(applicationId, deviceToken) {
126
+ Guards.stringValue(this.CLASS_NAME, "applicationId", applicationId);
127
+ Guards.stringValue(this.CLASS_NAME, "deviceToken", deviceToken);
128
+ try {
129
+ await this._logging?.log({
130
+ level: "info",
131
+ source: this.CLASS_NAME,
132
+ ts: Date.now(),
133
+ message: "deviceRegistering"
134
+ });
135
+ const id = Converter.bytesToHex(RandomHelper.generate(32));
136
+ const entity = {
137
+ id,
138
+ applicationId,
139
+ deviceToken,
140
+ ts: Date.now(),
141
+ status: "pending"
142
+ };
143
+ await this._messagingDeviceEntryStorage.set(entity);
144
+ return id;
145
+ }
146
+ catch (err) {
147
+ throw new GeneralError(this.CLASS_NAME, "deviceTokenRegisterFailed", { property: "applicationId", value: applicationId }, err);
148
+ }
149
+ }
150
+ /**
151
+ * Send a push notification to a device.
152
+ * @param deviceAddress The address of the device.
153
+ * @param title The title of the notification.
154
+ * @param message The message to send.
155
+ * @returns If the notification was sent successfully.
156
+ */
157
+ async sendSinglePushNotification(deviceAddress, title, message) {
158
+ Guards.stringValue(this.CLASS_NAME, "deviceAddress", deviceAddress);
159
+ Guards.stringValue(this.CLASS_NAME, "title", title);
160
+ Guards.stringValue(this.CLASS_NAME, "message", message);
161
+ try {
162
+ await this._logging?.log({
163
+ level: "info",
164
+ source: this.CLASS_NAME,
165
+ ts: Date.now(),
166
+ message: "pushNotificationSending"
167
+ });
168
+ const id = Converter.bytesToHex(RandomHelper.generate(32));
169
+ const entity = {
170
+ id,
171
+ deviceAddress,
172
+ title,
173
+ message,
174
+ ts: Date.now(),
175
+ status: "pending"
176
+ };
177
+ await this._messagingMessageEntryStorage.set(entity);
178
+ return true;
179
+ }
180
+ catch (err) {
181
+ throw new GeneralError(this.CLASS_NAME, "sendPushNotificationFailed", { value: deviceAddress }, err);
182
+ }
183
+ }
184
+ }
185
+
186
+ // Copyright 2024 IOTA Stiftung.
187
+ // SPDX-License-Identifier: Apache-2.0.
188
+ /**
189
+ * Class for connecting to the SMS messaging operations of the Entity Storage.
190
+ */
191
+ class EntityStorageMessagingSmsConnector {
192
+ /**
193
+ * Runtime name for the class.
194
+ */
195
+ CLASS_NAME = "EntityStorageMessagingSmsConnector";
196
+ /**
197
+ * The logging connector.
198
+ * @internal
199
+ */
200
+ _logging;
201
+ /**
202
+ * The entity storage for the sms entries.
203
+ * @internal
204
+ */
205
+ _messagingEntryStorage;
206
+ /**
207
+ * Create a new instance of EntityStorageMessagingSmsConnector.
208
+ * @param options The options for the connector.
209
+ * @param options.loggingConnectorType The type of logging connector to use, defaults to no logging.
210
+ * @param options.messagingEntryStorageConnectorType The type of entity storage connector to use for the sms entries.
211
+ * @param options.config The configuration for the sms connector.
212
+ */
213
+ constructor(options) {
214
+ if (Is.stringValue(options?.loggingConnectorType)) {
215
+ this._logging = LoggingConnectorFactory.get(options.loggingConnectorType);
216
+ }
217
+ this._messagingEntryStorage = EntityStorageConnectorFactory.get(options?.messagingEntryStorageConnectorType ?? "sms-entry");
218
+ }
219
+ /**
220
+ * Send a SMS message to a phone number.
221
+ * @param phoneNumber The recipient phone number.
222
+ * @param message The message to send.
223
+ * @returns If the SMS was sent successfully.
224
+ */
225
+ async sendSMS(phoneNumber, message) {
226
+ Guards.stringValue(this.CLASS_NAME, "phoneNumber", phoneNumber);
227
+ Guards.stringValue(this.CLASS_NAME, "message", message);
228
+ try {
229
+ await this._logging?.log({
230
+ level: "info",
231
+ source: this.CLASS_NAME,
232
+ ts: Date.now(),
233
+ message: "smsSending"
234
+ });
235
+ const id = Converter.bytesToHex(RandomHelper.generate(32));
236
+ const entity = {
237
+ id,
238
+ phoneNumber,
239
+ message,
240
+ ts: Date.now(),
241
+ status: "sent"
242
+ };
243
+ await this._messagingEntryStorage.set(entity);
244
+ return true;
245
+ }
246
+ catch (err) {
247
+ throw new GeneralError(this.CLASS_NAME, "sendSMSFailed", undefined, err);
248
+ }
249
+ }
250
+ }
251
+
252
+ export { EntityStorageMessagingEmailConnector, EntityStorageMessagingPushNotificationConnector, EntityStorageMessagingSmsConnector };
@@ -0,0 +1,38 @@
1
+ import type { IError } from "@twin.org/core";
2
+ /**
3
+ * Call defining an email entry.
4
+ */
5
+ export declare class EmailEntry {
6
+ /**
7
+ * The id.
8
+ */
9
+ id: string;
10
+ /**
11
+ * The sender email address.
12
+ */
13
+ sender: string;
14
+ /**
15
+ * The recipient email addresses.
16
+ */
17
+ recipients: string[];
18
+ /**
19
+ * The timestamp of the email entry.
20
+ */
21
+ ts: number;
22
+ /**
23
+ * The message.
24
+ */
25
+ message: string;
26
+ /**
27
+ * The subject.
28
+ */
29
+ subject: string;
30
+ /**
31
+ * The status.
32
+ */
33
+ status: string;
34
+ /**
35
+ * The error.
36
+ */
37
+ error?: IError;
38
+ }
@@ -0,0 +1,30 @@
1
+ import type { IError } from "@twin.org/core";
2
+ /**
3
+ * Call defining an push notification device entry.
4
+ */
5
+ export declare class PushNotificationDeviceEntry {
6
+ /**
7
+ * The id.
8
+ */
9
+ id: string;
10
+ /**
11
+ * The applicationId.
12
+ */
13
+ applicationId: string;
14
+ /**
15
+ * The device token.
16
+ */
17
+ deviceToken: string;
18
+ /**
19
+ * The timestamp of the push notification device entry.
20
+ */
21
+ ts: number;
22
+ /**
23
+ * The status.
24
+ */
25
+ status: string;
26
+ /**
27
+ * The error.
28
+ */
29
+ error?: IError;
30
+ }
@@ -0,0 +1,34 @@
1
+ import type { IError } from "@twin.org/core";
2
+ /**
3
+ * Call defining an push notification message entry.
4
+ */
5
+ export declare class PushNotificationMessageEntry {
6
+ /**
7
+ * The id.
8
+ */
9
+ id: string;
10
+ /**
11
+ * The device address.
12
+ */
13
+ deviceAddress: string;
14
+ /**
15
+ * The title.
16
+ */
17
+ title: string;
18
+ /**
19
+ * The message.
20
+ */
21
+ message: string;
22
+ /**
23
+ * The timestamp of the push notification entry.
24
+ */
25
+ ts: number;
26
+ /**
27
+ * The status.
28
+ */
29
+ status: string;
30
+ /**
31
+ * The error.
32
+ */
33
+ error?: IError;
34
+ }
@@ -0,0 +1,30 @@
1
+ import type { IError } from "@twin.org/core";
2
+ /**
3
+ * Call defining an sms entry.
4
+ */
5
+ export declare class SmsEntry {
6
+ /**
7
+ * The id.
8
+ */
9
+ id: string;
10
+ /**
11
+ * The phone number to deliver the message.
12
+ */
13
+ phoneNumber: string;
14
+ /**
15
+ * The timestamp of the sms entry.
16
+ */
17
+ ts: number;
18
+ /**
19
+ * The message.
20
+ */
21
+ message: string;
22
+ /**
23
+ * The status.
24
+ */
25
+ status: string;
26
+ /**
27
+ * The error.
28
+ */
29
+ error?: IError;
30
+ }
@@ -0,0 +1,32 @@
1
+ import type { IMessagingEmailConnector } from "@twin.org/messaging-models";
2
+ import type { IEntityStorageMessagingEmailConnectorConfig } from "./models/IEntityStorageMessagingEmailConnectorConfig";
3
+ /**
4
+ * Class for connecting to the email messaging operations of the Entity Storage.
5
+ */
6
+ export declare class EntityStorageMessagingEmailConnector implements IMessagingEmailConnector {
7
+ /**
8
+ * Runtime name for the class.
9
+ */
10
+ readonly CLASS_NAME: string;
11
+ /**
12
+ * Create a new instance of EntityStorageMessagingEmailConnector.
13
+ * @param options The options for the connector.
14
+ * @param options.loggingConnectorType The type of logging connector to use, defaults to no logging.
15
+ * @param options.messagingEntryStorageConnectorType The type of entity storage connector to use for the email entries.
16
+ * @param options.config The configuration for the email connector.
17
+ */
18
+ constructor(options?: {
19
+ loggingConnectorType?: string;
20
+ messagingEntryStorageConnectorType: string;
21
+ config?: IEntityStorageMessagingEmailConnectorConfig;
22
+ });
23
+ /**
24
+ * Store a custom email using Entity Storage.
25
+ * @param sender The sender email address.
26
+ * @param recipients An array of recipients email addresses.
27
+ * @param subject The subject of the email.
28
+ * @param content The html content of the email.
29
+ * @returns True if the email was send successfully, otherwise undefined.
30
+ */
31
+ sendCustomEmail(sender: string, recipients: string[], subject: string, content: string): Promise<boolean>;
32
+ }
@@ -0,0 +1,38 @@
1
+ import type { IMessagingPushNotificationsConnector } from "@twin.org/messaging-models";
2
+ import type { IEntityStorageMessagingPushNotificationsConnectorConfig } from "./models/IEntityStorageMessagingPushNotificationsConnectorConfig";
3
+ /**
4
+ * Class for connecting to the push notifications messaging operations of the Entity Storage.
5
+ */
6
+ export declare class EntityStorageMessagingPushNotificationConnector implements IMessagingPushNotificationsConnector {
7
+ /**
8
+ * Runtime name for the class.
9
+ */
10
+ readonly CLASS_NAME: string;
11
+ /**
12
+ * Create a new instance of EntityStorageMessagingPushNotificationConnector.
13
+ * @param options The options for the connector.
14
+ * @param options.loggingConnectorType The type of logging connector to use, defaults to no logging.
15
+ * @param options.messagingEntryStorageConnectorType The type of entity storage connector to use for the push notifications entries.
16
+ * @param options.config The configuration for the push notifications connector.
17
+ */
18
+ constructor(options?: {
19
+ loggingConnectorType?: string;
20
+ messagingEntryStorageConnectorType: string;
21
+ config?: IEntityStorageMessagingPushNotificationsConnectorConfig;
22
+ });
23
+ /**
24
+ * Registers a device to an specific app in order to send notifications to it.
25
+ * @param applicationId The application address.
26
+ * @param deviceToken The device token.
27
+ * @returns If the device was registered successfully.
28
+ */
29
+ registerDevice(applicationId: string, deviceToken: string): Promise<string>;
30
+ /**
31
+ * Send a push notification to a device.
32
+ * @param deviceAddress The address of the device.
33
+ * @param title The title of the notification.
34
+ * @param message The message to send.
35
+ * @returns If the notification was sent successfully.
36
+ */
37
+ sendSinglePushNotification(deviceAddress: string, title: string, message: string): Promise<boolean>;
38
+ }
@@ -0,0 +1,30 @@
1
+ import type { IMessagingSmsConnector } from "@twin.org/messaging-models";
2
+ import type { IEntityStorageMessagingSmsConnectorConfig } from "./models/IEntityStorageMessagingSmsConnectorConfig";
3
+ /**
4
+ * Class for connecting to the SMS messaging operations of the Entity Storage.
5
+ */
6
+ export declare class EntityStorageMessagingSmsConnector implements IMessagingSmsConnector {
7
+ /**
8
+ * Runtime name for the class.
9
+ */
10
+ readonly CLASS_NAME: string;
11
+ /**
12
+ * Create a new instance of EntityStorageMessagingSmsConnector.
13
+ * @param options The options for the connector.
14
+ * @param options.loggingConnectorType The type of logging connector to use, defaults to no logging.
15
+ * @param options.messagingEntryStorageConnectorType The type of entity storage connector to use for the sms entries.
16
+ * @param options.config The configuration for the sms connector.
17
+ */
18
+ constructor(options?: {
19
+ loggingConnectorType?: string;
20
+ messagingEntryStorageConnectorType: string;
21
+ config?: IEntityStorageMessagingSmsConnectorConfig;
22
+ });
23
+ /**
24
+ * Send a SMS message to a phone number.
25
+ * @param phoneNumber The recipient phone number.
26
+ * @param message The message to send.
27
+ * @returns If the SMS was sent successfully.
28
+ */
29
+ sendSMS(phoneNumber: string, message: string): Promise<boolean>;
30
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./entityStorageMessagingEmailConnector";
2
+ export * from "./entityStorageMessagingPushNotificationConnector";
3
+ export * from "./entityStorageMessagingSmsConnector";
4
+ export * from "./models/IEntityStorageMessagingEmailConnectorConfig";
5
+ export * from "./models/IEntityStorageMessagingPushNotificationsConnectorConfig";
6
+ export * from "./models/IEntityStorageMessagingSmsConnectorConfig";
@@ -0,0 +1,5 @@
1
+ import type { IMessagingEmailConnector } from "@twin.org/messaging-models";
2
+ /**
3
+ * Configuration for the Entity Storage Messaging Email Connector.
4
+ */
5
+ export type IEntityStorageMessagingEmailConnectorConfig = IMessagingEmailConnector;
@@ -0,0 +1,5 @@
1
+ import type { IMessagingPushNotificationsConnector } from "@twin.org/messaging-models";
2
+ /**
3
+ * Configuration for the Entity Storage Messaging Push Notifications Connector.
4
+ */
5
+ export type IEntityStorageMessagingPushNotificationsConnectorConfig = IMessagingPushNotificationsConnector;
@@ -0,0 +1,5 @@
1
+ import type { IMessagingSmsConnector } from "@twin.org/messaging-models";
2
+ /**
3
+ * Configuration for the Entity Storage Messaging Sms Connector.
4
+ */
5
+ export type IEntityStorageMessagingSmsConnectorConfig = IMessagingSmsConnector;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Initialize the schema for the messaging connector entity storage.
3
+ */
4
+ export declare function initSchema(): void;
@@ -0,0 +1,5 @@
1
+ # @twin.org/messaging-connector-entity-storage - Changelog
2
+
3
+ ## v0.0.1-next.2
4
+
5
+ - Initial Release
@@ -0,0 +1 @@
1
+ # @twin.org/messaging-connector-entity-storage - Examples
@@ -0,0 +1,85 @@
1
+ # Class: EntityStorageMessagingEmailConnector
2
+
3
+ Class for connecting to the email messaging operations of the Entity Storage.
4
+
5
+ ## Implements
6
+
7
+ - `IMessagingEmailConnector`
8
+
9
+ ## Constructors
10
+
11
+ ### new EntityStorageMessagingEmailConnector()
12
+
13
+ > **new EntityStorageMessagingEmailConnector**(`options`?): [`EntityStorageMessagingEmailConnector`](EntityStorageMessagingEmailConnector.md)
14
+
15
+ Create a new instance of EntityStorageMessagingEmailConnector.
16
+
17
+ #### Parameters
18
+
19
+ • **options?**
20
+
21
+ The options for the connector.
22
+
23
+ • **options.loggingConnectorType?**: `string`
24
+
25
+ The type of logging connector to use, defaults to no logging.
26
+
27
+ • **options.messagingEntryStorageConnectorType?**: `string`
28
+
29
+ The type of entity storage connector to use for the email entries.
30
+
31
+ • **options.config?**: `IMessagingEmailConnector`
32
+
33
+ The configuration for the email connector.
34
+
35
+ #### Returns
36
+
37
+ [`EntityStorageMessagingEmailConnector`](EntityStorageMessagingEmailConnector.md)
38
+
39
+ ## Properties
40
+
41
+ ### CLASS\_NAME
42
+
43
+ > `readonly` **CLASS\_NAME**: `string`
44
+
45
+ Runtime name for the class.
46
+
47
+ #### Implementation of
48
+
49
+ `IMessagingEmailConnector.CLASS_NAME`
50
+
51
+ ## Methods
52
+
53
+ ### sendCustomEmail()
54
+
55
+ > **sendCustomEmail**(`sender`, `recipients`, `subject`, `content`): `Promise`\<`boolean`\>
56
+
57
+ Store a custom email using Entity Storage.
58
+
59
+ #### Parameters
60
+
61
+ • **sender**: `string`
62
+
63
+ The sender email address.
64
+
65
+ • **recipients**: `string`[]
66
+
67
+ An array of recipients email addresses.
68
+
69
+ • **subject**: `string`
70
+
71
+ The subject of the email.
72
+
73
+ • **content**: `string`
74
+
75
+ The html content of the email.
76
+
77
+ #### Returns
78
+
79
+ `Promise`\<`boolean`\>
80
+
81
+ True if the email was send successfully, otherwise undefined.
82
+
83
+ #### Implementation of
84
+
85
+ `IMessagingEmailConnector.sendCustomEmail`