@arkstack/notifications 0.12.13 → 0.12.14
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 +7 -7
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DotPath, DotPathValue, MergedConfig } from "@arkstack/common";
|
|
2
2
|
import { Transporter } from "nodemailer";
|
|
3
3
|
import { Model } from "@arkstack/database";
|
|
4
|
-
import * as _$arkormx from "arkormx";
|
|
5
4
|
import { User } from "@arkstack/auth";
|
|
6
5
|
import * as _$twilio_lib_rest_api_v2010_account_message0 from "twilio/lib/rest/api/v2010/account/message.js";
|
|
6
|
+
import * as _$arkormx from "arkormx";
|
|
7
7
|
|
|
8
8
|
//#region src/Contracts/UserNotification.d.ts
|
|
9
9
|
declare abstract class UserNotification extends Model {
|
|
@@ -163,8 +163,8 @@ declare class DbNotification extends NotificationContract<UserNotification> {
|
|
|
163
163
|
type(type: DbNotificationPayload['type']): this;
|
|
164
164
|
action(text?: string | null, link?: string | null): this;
|
|
165
165
|
meta(meta?: NotificationData | null): this;
|
|
166
|
-
create(user: User$1, payload: DbNotificationPayload): Promise<UserNotification
|
|
167
|
-
send(message: string, subject?: string, _recipient?: NotificationRecipient, data?: NotificationData): Promise<UserNotification
|
|
166
|
+
create(user: User$1, payload: DbNotificationPayload): Promise<UserNotification>;
|
|
167
|
+
send(message: string, subject?: string, _recipient?: NotificationRecipient, data?: NotificationData): Promise<UserNotification>;
|
|
168
168
|
}
|
|
169
169
|
//#endregion
|
|
170
170
|
//#region src/drivers/MailNotification.d.ts
|
|
@@ -280,7 +280,7 @@ declare class Notification<D extends keyof DriverMap = keyof DriverMap> {
|
|
|
280
280
|
static email(options?: MailDriverOptions): MailNotification;
|
|
281
281
|
static sms(options?: SmsDriverOptions): SmsNotification;
|
|
282
282
|
static db(): DbNotification;
|
|
283
|
-
static channel(channel?: NotificationChannel | 'email', options?: MailDriverOptions | SmsDriverOptions):
|
|
283
|
+
static channel(channel?: NotificationChannel | 'email', options?: MailDriverOptions | SmsDriverOptions): SmsNotification | MailNotification | DbNotification;
|
|
284
284
|
prepare(recipient?: null | MailRecipient | NotificationRecipient | User$1, data?: NotificationData): DriverMap[D];
|
|
285
285
|
private static createDriver;
|
|
286
286
|
}
|
|
@@ -288,9 +288,9 @@ declare class Notification<D extends keyof DriverMap = keyof DriverMap> {
|
|
|
288
288
|
//#region src/UserNotificationCenter.d.ts
|
|
289
289
|
declare class UserNotificationCenter {
|
|
290
290
|
private static getModel;
|
|
291
|
-
static create(user: User$1, payload: DbNotificationPayload): Promise<UserNotification
|
|
292
|
-
static forUser(user: User$1): Promise<_$arkormx.ArkormCollection<UserNotification
|
|
293
|
-
static unreadForUser(user: User$1): Promise<_$arkormx.ArkormCollection<UserNotification
|
|
291
|
+
static create(user: User$1, payload: DbNotificationPayload): Promise<UserNotification>;
|
|
292
|
+
static forUser(user: User$1): Promise<_$arkormx.ArkormCollection<UserNotification, UserNotification[]>>;
|
|
293
|
+
static unreadForUser(user: User$1): Promise<_$arkormx.ArkormCollection<UserNotification, UserNotification[]>>;
|
|
294
294
|
static markRead(notification: UserNotification | UserNotification['id']): Promise<void>;
|
|
295
295
|
static markAllRead(user: User$1): Promise<void>;
|
|
296
296
|
static delete(notification: UserNotification | UserNotification['id']): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/notifications",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.14",
|
|
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.14"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@arkstack/database": "^0.12.
|
|
41
|
-
"@arkstack/contract": "^0.12.
|
|
40
|
+
"@arkstack/database": "^0.12.14",
|
|
41
|
+
"@arkstack/contract": "^0.12.14"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/nodemailer": "^7.0.11"
|