@zerotal/notifications 1.1.0 → 1.3.0
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/package.json +5 -5
- package/src/Notifiable.ts +2 -2
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ await Notify.route({ mail: "ops@acme.test" }).notify(new DeployFinished(build));
|
|
|
76
76
|
import { Notifiable } from "@zerotal/notifications";
|
|
77
77
|
import { AuthUser } from "@zerotal/auth";
|
|
78
78
|
|
|
79
|
-
export class User extends Notifiable
|
|
79
|
+
export class User extends AuthUser.using(Notifiable) {}
|
|
80
80
|
|
|
81
81
|
await user.notify(new OrderShippedNotification(order)); // send now
|
|
82
82
|
await user.notifyLater(new OrderShippedNotification(order)); // queue
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerotal/notifications",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"maturity": "beta",
|
|
6
6
|
"private": false,
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zerotal/core": "1.
|
|
33
|
-
"@zerotal/orm": "1.
|
|
34
|
-
"@zerotal/queue": "1.
|
|
32
|
+
"@zerotal/core": "1.3.0",
|
|
33
|
+
"@zerotal/orm": "1.3.0",
|
|
34
|
+
"@zerotal/queue": "1.3.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@zerotal/broadcasting": "1.
|
|
37
|
+
"@zerotal/broadcasting": "1.3.0",
|
|
38
38
|
"typescript": "^5.8.0"
|
|
39
39
|
},
|
|
40
40
|
"description": "Multi-channel notifications for Zerotal — mail (SMTP/Resend), database, broadcast, Slack, and SMS.",
|
package/src/Notifiable.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// Notifiable model mixin — compose it
|
|
4
4
|
// onto any model that should receive notifications (typically User):
|
|
5
5
|
//
|
|
6
|
-
// import {
|
|
6
|
+
// import { Model } from "@zerotal/orm";
|
|
7
7
|
// import { Notifiable } from "@zerotal/notifications";
|
|
8
8
|
//
|
|
9
|
-
// export class User extends
|
|
9
|
+
// export class User extends Model.using(Notifiable) {
|
|
10
10
|
// @column() email!: string;
|
|
11
11
|
// }
|
|
12
12
|
//
|