@wopr-network/platform-core 1.54.0 → 1.56.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/dist/auth/better-auth.d.ts +2 -0
- package/dist/auth/better-auth.js +2 -2
- package/dist/email/default-templates.js +49 -49
- package/dist/email/drizzle-notification-template-repository.d.ts +11 -0
- package/dist/email/drizzle-notification-template-repository.js +18 -0
- package/dist/email/notification-service.d.ts +4 -1
- package/dist/email/notification-service.js +37 -31
- package/dist/email/notification-service.test.js +14 -0
- package/dist/email/notification-templates.js +154 -111
- package/dist/email/templates.d.ts +9 -9
- package/dist/email/templates.js +61 -55
- package/dist/email/templates.test.js +1 -1
- package/package.json +1 -1
- package/src/auth/better-auth.ts +6 -2
- package/src/email/default-templates.ts +56 -56
- package/src/email/drizzle-notification-template-repository.ts +27 -0
- package/src/email/notification-service.test.ts +14 -0
- package/src/email/notification-service.ts +36 -30
- package/src/email/notification-templates.ts +155 -107
- package/src/email/templates.test.ts +1 -1
- package/src/email/templates.ts +67 -47
|
@@ -25,6 +25,7 @@ describe("NotificationService", () => {
|
|
|
25
25
|
balanceDollars: "$2.50",
|
|
26
26
|
estimatedDaysRemaining: 5,
|
|
27
27
|
creditsUrl: `${BASE_URL}/billing/credits`,
|
|
28
|
+
brandName: "WOPR",
|
|
28
29
|
});
|
|
29
30
|
});
|
|
30
31
|
});
|
|
@@ -34,6 +35,7 @@ describe("NotificationService", () => {
|
|
|
34
35
|
expect(queue.enqueue).toHaveBeenCalledWith("tenant-1", "credits-depleted", {
|
|
35
36
|
email: "user@example.com",
|
|
36
37
|
creditsUrl: `${BASE_URL}/billing/credits`,
|
|
38
|
+
brandName: "WOPR",
|
|
37
39
|
});
|
|
38
40
|
});
|
|
39
41
|
});
|
|
@@ -45,6 +47,7 @@ describe("NotificationService", () => {
|
|
|
45
47
|
balanceDollars: "$0.50",
|
|
46
48
|
graceDays: 7,
|
|
47
49
|
creditsUrl: `${BASE_URL}/billing/credits`,
|
|
50
|
+
brandName: "WOPR",
|
|
48
51
|
});
|
|
49
52
|
});
|
|
50
53
|
});
|
|
@@ -54,6 +57,7 @@ describe("NotificationService", () => {
|
|
|
54
57
|
expect(queue.enqueue).toHaveBeenCalledWith("tenant-1", "grace-period-warning", {
|
|
55
58
|
email: "user@example.com",
|
|
56
59
|
creditsUrl: `${BASE_URL}/billing/credits`,
|
|
60
|
+
brandName: "WOPR",
|
|
57
61
|
});
|
|
58
62
|
});
|
|
59
63
|
});
|
|
@@ -64,6 +68,7 @@ describe("NotificationService", () => {
|
|
|
64
68
|
email: "user@example.com",
|
|
65
69
|
reason: "Grace period expired",
|
|
66
70
|
creditsUrl: `${BASE_URL}/billing/credits`,
|
|
71
|
+
brandName: "WOPR",
|
|
67
72
|
});
|
|
68
73
|
});
|
|
69
74
|
});
|
|
@@ -73,6 +78,7 @@ describe("NotificationService", () => {
|
|
|
73
78
|
expect(queue.enqueue).toHaveBeenCalledWith("tenant-1", "admin-suspended", {
|
|
74
79
|
email: "user@example.com",
|
|
75
80
|
reason: "ToS violation",
|
|
81
|
+
brandName: "WOPR",
|
|
76
82
|
});
|
|
77
83
|
});
|
|
78
84
|
});
|
|
@@ -81,6 +87,7 @@ describe("NotificationService", () => {
|
|
|
81
87
|
service.notifyAdminReactivated("tenant-1", "user@example.com");
|
|
82
88
|
expect(queue.enqueue).toHaveBeenCalledWith("tenant-1", "admin-reactivated", {
|
|
83
89
|
email: "user@example.com",
|
|
90
|
+
brandName: "WOPR",
|
|
84
91
|
});
|
|
85
92
|
});
|
|
86
93
|
});
|
|
@@ -91,6 +98,7 @@ describe("NotificationService", () => {
|
|
|
91
98
|
email: "user@example.com",
|
|
92
99
|
amountDollars: "$5.00",
|
|
93
100
|
reason: "Support credit",
|
|
101
|
+
brandName: "WOPR",
|
|
94
102
|
});
|
|
95
103
|
});
|
|
96
104
|
});
|
|
@@ -100,6 +108,7 @@ describe("NotificationService", () => {
|
|
|
100
108
|
expect(queue.enqueue).toHaveBeenCalledWith("tenant-1", "role-changed", {
|
|
101
109
|
email: "user@example.com",
|
|
102
110
|
newRole: "tenant_admin",
|
|
111
|
+
brandName: "WOPR",
|
|
103
112
|
});
|
|
104
113
|
});
|
|
105
114
|
});
|
|
@@ -110,6 +119,7 @@ describe("NotificationService", () => {
|
|
|
110
119
|
email: "user@example.com",
|
|
111
120
|
tenantName: "Acme Corp",
|
|
112
121
|
inviteUrl: "https://app.wopr.bot/invite/abc",
|
|
122
|
+
brandName: "WOPR",
|
|
113
123
|
});
|
|
114
124
|
});
|
|
115
125
|
});
|
|
@@ -121,6 +131,7 @@ describe("NotificationService", () => {
|
|
|
121
131
|
channelName: "Discord",
|
|
122
132
|
agentName: "MyBot",
|
|
123
133
|
reason: "Token expired",
|
|
134
|
+
brandName: "WOPR",
|
|
124
135
|
});
|
|
125
136
|
});
|
|
126
137
|
});
|
|
@@ -131,6 +142,7 @@ describe("NotificationService", () => {
|
|
|
131
142
|
email: "user@example.com",
|
|
132
143
|
subject: "Hello there",
|
|
133
144
|
bodyText: "This is the body.",
|
|
145
|
+
brandName: "WOPR",
|
|
134
146
|
});
|
|
135
147
|
});
|
|
136
148
|
});
|
|
@@ -143,6 +155,7 @@ describe("NotificationService", () => {
|
|
|
143
155
|
amountDollars: "$50.00",
|
|
144
156
|
reason: "fraudulent",
|
|
145
157
|
creditsUrl: `${BASE_URL}/billing/credits`,
|
|
158
|
+
brandName: "WOPR",
|
|
146
159
|
});
|
|
147
160
|
});
|
|
148
161
|
});
|
|
@@ -154,6 +167,7 @@ describe("NotificationService", () => {
|
|
|
154
167
|
disputeId: "dp_123",
|
|
155
168
|
amountDollars: "$50.00",
|
|
156
169
|
creditsUrl: `${BASE_URL}/billing/credits`,
|
|
170
|
+
brandName: "WOPR",
|
|
157
171
|
});
|
|
158
172
|
});
|
|
159
173
|
});
|