@arkstack/notifications 0.17.16 → 0.17.18
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 +12 -7
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { User } from "@app/models/User";
|
|
|
7
7
|
import { User as User$1 } from "@arkstack/auth";
|
|
8
8
|
import { PhoneNumber } from "@kanun-hq/plugin-phone";
|
|
9
9
|
import { ArkormCollection, LengthAwarePaginator } from "arkormx";
|
|
10
|
-
|
|
11
10
|
//#region src/Contracts/UserNotification.d.ts
|
|
12
11
|
declare abstract class UserNotification extends Model {
|
|
13
12
|
[key: string]: any;
|
|
@@ -94,9 +93,12 @@ type FirebaseTransportConfig = {
|
|
|
94
93
|
admin_sdk_path?: string;
|
|
95
94
|
};
|
|
96
95
|
type RealtimeDriverOptions<T extends RealtimeDriverName = RealtimeDriverName> = {
|
|
97
|
-
transport?: T;
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
transport?: T;
|
|
97
|
+
/** Channel/topic to broadcast on. Defaults to `${channel_prefix}${user.id}`. */
|
|
98
|
+
channel?: string;
|
|
99
|
+
/** Event name clients subscribe to. Defaults to config `event` or `notification`. */
|
|
100
|
+
event?: string;
|
|
101
|
+
/** Also persist the notification to the database (requires a User recipient). */
|
|
100
102
|
store?: boolean;
|
|
101
103
|
pusher?: PusherTransportConfig;
|
|
102
104
|
firebase?: FirebaseTransportConfig;
|
|
@@ -155,9 +157,12 @@ interface NotificationConfig<T = any> {
|
|
|
155
157
|
table: string;
|
|
156
158
|
};
|
|
157
159
|
realtime?: {
|
|
158
|
-
transport: RealtimeDriverName;
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
transport: RealtimeDriverName;
|
|
161
|
+
/** Prefix for the per-user channel/topic (default `user.`). */
|
|
162
|
+
channel_prefix?: string;
|
|
163
|
+
/** Event name clients subscribe to (default `notification`). */
|
|
164
|
+
event?: string;
|
|
165
|
+
/** Persist broadcasts to the database by default. */
|
|
161
166
|
store?: boolean;
|
|
162
167
|
};
|
|
163
168
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/notifications",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.18",
|
|
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,16 +34,16 @@
|
|
|
34
34
|
"africastalking": "^0.8.0",
|
|
35
35
|
"nodemailer": "^9.0.3",
|
|
36
36
|
"twilio": "^6.0.2",
|
|
37
|
-
"@arkstack/common": "^0.17.
|
|
37
|
+
"@arkstack/common": "^0.17.18"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@kanun-hq/plugin-phone": "^0.1.8",
|
|
41
41
|
"firebase-admin": "^13.0.0",
|
|
42
42
|
"pusher": "^5.2.0",
|
|
43
|
-
"@arkstack/contract": "^0.17.
|
|
44
|
-
"@arkstack/database": "^0.17.
|
|
45
|
-
"@arkstack/driver-express": "^0.17.
|
|
46
|
-
"@arkstack/driver-h3": "^0.17.
|
|
43
|
+
"@arkstack/contract": "^0.17.18",
|
|
44
|
+
"@arkstack/database": "^0.17.18",
|
|
45
|
+
"@arkstack/driver-express": "^0.17.18",
|
|
46
|
+
"@arkstack/driver-h3": "^0.17.18"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
|
49
49
|
"@arkstack/driver-express": {
|