@arkstack/notifications 0.12.6 → 0.12.7
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/dist/index.d.ts +44 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -173,12 +173,56 @@ declare class MailNotification extends NotificationContract {
|
|
|
173
173
|
private fileDirectory?;
|
|
174
174
|
constructor(options?: MailDriverOptions);
|
|
175
175
|
from(from: string): this;
|
|
176
|
+
/**
|
|
177
|
+
* The email subject
|
|
178
|
+
*
|
|
179
|
+
* @param subject
|
|
180
|
+
* @returns
|
|
181
|
+
*/
|
|
176
182
|
subject(subject: string): this;
|
|
183
|
+
/**
|
|
184
|
+
* Set email the notification recipeint
|
|
185
|
+
*
|
|
186
|
+
* @param recipient string or array of email addresses
|
|
187
|
+
* @returns
|
|
188
|
+
*/
|
|
177
189
|
recipient(recipient: MailRecipient): this;
|
|
190
|
+
/**
|
|
191
|
+
* Set email the notification view name
|
|
192
|
+
*
|
|
193
|
+
* @param view view name
|
|
194
|
+
* @returns
|
|
195
|
+
*/
|
|
178
196
|
view(view: string): this;
|
|
197
|
+
/**
|
|
198
|
+
* Set email the notification html template
|
|
199
|
+
*
|
|
200
|
+
* @param content view name
|
|
201
|
+
* @returns
|
|
202
|
+
*/
|
|
179
203
|
html(content: string): this;
|
|
204
|
+
/**
|
|
205
|
+
* Set email the notification text template
|
|
206
|
+
*
|
|
207
|
+
* @param content view name
|
|
208
|
+
* @returns
|
|
209
|
+
*/
|
|
180
210
|
text(content: string): this;
|
|
211
|
+
/**
|
|
212
|
+
* Prepare a notification to be sent.
|
|
213
|
+
*
|
|
214
|
+
* @param user The recipient user(s) for the notification.
|
|
215
|
+
*/
|
|
181
216
|
prepare(user?: null | string | string[] | User, data?: Record<string, any>): this;
|
|
217
|
+
/**
|
|
218
|
+
* Send a notification to the specified recipient(s) with the given message.
|
|
219
|
+
*
|
|
220
|
+
* @param message The message content to be sent to the recipient(s).
|
|
221
|
+
* @param subject The message subject to be sent to the recipient(s).
|
|
222
|
+
* @param recipient An array of recipient identifiers
|
|
223
|
+
* @param data Additioal context data
|
|
224
|
+
* @returns
|
|
225
|
+
*/
|
|
182
226
|
send(message: string, subject?: string, recipient?: MailRecipient, data?: NotificationData): Promise<any>;
|
|
183
227
|
private storeFileMail;
|
|
184
228
|
private resolveRecipients;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/notifications",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Framework-agnostic notification module for Arkstack and Nodejs, providing support for multi-channel notification delivery.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net/guide/notifications",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"africastalking": "^0.8.0",
|
|
35
35
|
"nodemailer": "^8.0.7",
|
|
36
36
|
"twilio": "^6.0.0",
|
|
37
|
-
"@arkstack/common": "^0.12.
|
|
37
|
+
"@arkstack/common": "^0.12.7"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@arkstack/
|
|
41
|
-
"@arkstack/
|
|
40
|
+
"@arkstack/contract": "^0.12.7",
|
|
41
|
+
"@arkstack/database": "^0.12.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/nodemailer": "^7.0.11"
|