@voyantjs/notifications 0.77.11 → 0.77.13
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/routes.d.ts +2 -2
- package/dist/schema.d.ts +1 -1
- package/dist/service-reminders.d.ts +2 -2
- package/dist/service-reminders.js +1 -1
- package/dist/service-sequence.js +1 -1
- package/dist/service-templates.d.ts +2 -2
- package/dist/tasks/deliver-reminder.d.ts +1 -1
- package/dist/validation.d.ts +4 -4
- package/package.json +7 -7
package/dist/routes.d.ts
CHANGED
|
@@ -942,7 +942,7 @@ export declare function createNotificationsRoutes(options?: NotificationsRoutesO
|
|
|
942
942
|
targetType: "booking_confirmed" | "invoice" | "booking_payment_schedule" | "payment_complete" | "booking_cancelled_non_payment";
|
|
943
943
|
targetId: string;
|
|
944
944
|
dedupeKey: string;
|
|
945
|
-
status: "failed" | "queued" | "skipped" | "
|
|
945
|
+
status: "failed" | "queued" | "skipped" | "processing" | "sent";
|
|
946
946
|
recipient: string | null;
|
|
947
947
|
scheduledFor: string;
|
|
948
948
|
processedAt: string;
|
|
@@ -1018,7 +1018,7 @@ export declare function createNotificationsRoutes(options?: NotificationsRoutesO
|
|
|
1018
1018
|
targetType: "booking_confirmed" | "invoice" | "booking_payment_schedule" | "payment_complete" | "booking_cancelled_non_payment";
|
|
1019
1019
|
targetId: string;
|
|
1020
1020
|
dedupeKey: string;
|
|
1021
|
-
status: "failed" | "queued" | "skipped" | "
|
|
1021
|
+
status: "failed" | "queued" | "skipped" | "processing" | "sent";
|
|
1022
1022
|
recipient: string | null;
|
|
1023
1023
|
scheduledFor: string;
|
|
1024
1024
|
processedAt: string;
|
package/dist/schema.d.ts
CHANGED
|
@@ -1176,7 +1176,7 @@ export declare const notificationReminderRuns: import("drizzle-orm/pg-core").PgT
|
|
|
1176
1176
|
tableName: "notification_reminder_runs";
|
|
1177
1177
|
dataType: "string";
|
|
1178
1178
|
columnType: "PgEnumColumn";
|
|
1179
|
-
data: "failed" | "queued" | "skipped" | "
|
|
1179
|
+
data: "failed" | "queued" | "skipped" | "processing" | "sent";
|
|
1180
1180
|
driverParam: string;
|
|
1181
1181
|
notNull: true;
|
|
1182
1182
|
hasDefault: false;
|
|
@@ -20,7 +20,7 @@ export declare function dispatchReminderEventRules(db: PostgresJsDatabase, dispa
|
|
|
20
20
|
createdAt: Date;
|
|
21
21
|
updatedAt: Date;
|
|
22
22
|
organizationId: string | null;
|
|
23
|
-
status: "failed" | "queued" | "skipped" | "
|
|
23
|
+
status: "failed" | "queued" | "skipped" | "processing" | "sent";
|
|
24
24
|
scheduledFor: Date;
|
|
25
25
|
errorMessage: string | null;
|
|
26
26
|
bookingId: string | null;
|
|
@@ -49,7 +49,7 @@ export declare function deliverReminderRun(db: PostgresJsDatabase, dispatcher: N
|
|
|
49
49
|
organizationId: string | null;
|
|
50
50
|
paymentSessionId: string | null;
|
|
51
51
|
notificationDeliveryId: string | null;
|
|
52
|
-
status: "failed" | "queued" | "skipped" | "
|
|
52
|
+
status: "failed" | "queued" | "skipped" | "processing" | "sent";
|
|
53
53
|
recipient: string | null;
|
|
54
54
|
scheduledFor: Date;
|
|
55
55
|
processedAt: Date;
|
|
@@ -136,7 +136,7 @@ async function hasOutstandingBookingBalance(db, bookingId) {
|
|
|
136
136
|
const [openInvoice] = await db
|
|
137
137
|
.select({ id: invoices.id })
|
|
138
138
|
.from(invoices)
|
|
139
|
-
.where(and(eq(invoices.bookingId, bookingId), gt(invoices.balanceDueCents, 0), or(eq(invoices.status, "
|
|
139
|
+
.where(and(eq(invoices.bookingId, bookingId), gt(invoices.balanceDueCents, 0), or(eq(invoices.status, "issued"), eq(invoices.status, "partially_paid"), eq(invoices.status, "overdue"))))
|
|
140
140
|
.limit(1);
|
|
141
141
|
return Boolean(openInvoice);
|
|
142
142
|
}
|
package/dist/service-sequence.js
CHANGED
|
@@ -324,7 +324,7 @@ export async function fetchOpenInvoiceTargets(db, envelopes = {}) {
|
|
|
324
324
|
const conditions = [
|
|
325
325
|
gt(invoices.balanceDueCents, 0),
|
|
326
326
|
or(eq(invoices.invoiceType, "invoice"), eq(invoices.invoiceType, "proforma")),
|
|
327
|
-
or(eq(invoices.status, "
|
|
327
|
+
or(eq(invoices.status, "issued"), eq(invoices.status, "partially_paid"), eq(invoices.status, "overdue")),
|
|
328
328
|
];
|
|
329
329
|
if (envelopes.invoiceDueDate) {
|
|
330
330
|
conditions.push(gte(invoices.dueDate, envelopes.invoiceDueDate.from), lte(invoices.dueDate, envelopes.invoiceDueDate.to));
|
|
@@ -165,7 +165,7 @@ export declare function listReminderRuns(db: PostgresJsDatabase, query: Notifica
|
|
|
165
165
|
targetType: "booking_confirmed" | "invoice" | "booking_payment_schedule" | "payment_complete" | "booking_cancelled_non_payment";
|
|
166
166
|
targetId: string;
|
|
167
167
|
dedupeKey: string;
|
|
168
|
-
status: "failed" | "queued" | "skipped" | "
|
|
168
|
+
status: "failed" | "queued" | "skipped" | "processing" | "sent";
|
|
169
169
|
recipient: string | null;
|
|
170
170
|
scheduledFor: string;
|
|
171
171
|
processedAt: string;
|
|
@@ -215,7 +215,7 @@ export declare function getReminderRunById(db: PostgresJsDatabase, id: string):
|
|
|
215
215
|
targetType: "booking_confirmed" | "invoice" | "booking_payment_schedule" | "payment_complete" | "booking_cancelled_non_payment";
|
|
216
216
|
targetId: string;
|
|
217
217
|
dedupeKey: string;
|
|
218
|
-
status: "failed" | "queued" | "skipped" | "
|
|
218
|
+
status: "failed" | "queued" | "skipped" | "processing" | "sent";
|
|
219
219
|
recipient: string | null;
|
|
220
220
|
scheduledFor: string;
|
|
221
221
|
processedAt: string;
|
|
@@ -4,6 +4,6 @@ export declare function deliverQueuedNotificationReminder(db: PostgresJsDatabase
|
|
|
4
4
|
reminderRunId: string;
|
|
5
5
|
}, options?: NotificationTaskRuntimeOptions): Promise<{
|
|
6
6
|
reminderRunId: string;
|
|
7
|
-
status: "failed" | "queued" | "skipped" | "
|
|
7
|
+
status: "failed" | "queued" | "skipped" | "processing" | "sent" | null;
|
|
8
8
|
}>;
|
|
9
9
|
//# sourceMappingURL=deliver-reminder.d.ts.map
|
package/dist/validation.d.ts
CHANGED
|
@@ -40,8 +40,8 @@ export declare const notificationReminderRunStatusSchema: z.ZodEnum<{
|
|
|
40
40
|
failed: "failed";
|
|
41
41
|
queued: "queued";
|
|
42
42
|
skipped: "skipped";
|
|
43
|
-
sent: "sent";
|
|
44
43
|
processing: "processing";
|
|
44
|
+
sent: "sent";
|
|
45
45
|
}>;
|
|
46
46
|
export declare const notificationReminderStageAnchorSchema: z.ZodEnum<{
|
|
47
47
|
due_date: "due_date";
|
|
@@ -382,8 +382,8 @@ export declare const notificationReminderRunListQuerySchema: z.ZodObject<{
|
|
|
382
382
|
failed: "failed";
|
|
383
383
|
queued: "queued";
|
|
384
384
|
skipped: "skipped";
|
|
385
|
-
sent: "sent";
|
|
386
385
|
processing: "processing";
|
|
386
|
+
sent: "sent";
|
|
387
387
|
}>>;
|
|
388
388
|
}, z.core.$strip>;
|
|
389
389
|
export declare const notificationReminderRunRuleSummarySchema: z.ZodObject<{
|
|
@@ -454,8 +454,8 @@ export declare const notificationReminderRunRecordSchema: z.ZodObject<{
|
|
|
454
454
|
failed: "failed";
|
|
455
455
|
queued: "queued";
|
|
456
456
|
skipped: "skipped";
|
|
457
|
-
sent: "sent";
|
|
458
457
|
processing: "processing";
|
|
458
|
+
sent: "sent";
|
|
459
459
|
}>;
|
|
460
460
|
recipient: z.ZodNullable<z.ZodString>;
|
|
461
461
|
scheduledFor: z.ZodString;
|
|
@@ -534,8 +534,8 @@ export declare const notificationReminderRunListResponseSchema: z.ZodObject<{
|
|
|
534
534
|
failed: "failed";
|
|
535
535
|
queued: "queued";
|
|
536
536
|
skipped: "skipped";
|
|
537
|
-
sent: "sent";
|
|
538
537
|
processing: "processing";
|
|
538
|
+
sent: "sent";
|
|
539
539
|
}>;
|
|
540
540
|
recipient: z.ZodNullable<z.ZodString>;
|
|
541
541
|
scheduledFor: z.ZodString;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/notifications",
|
|
3
|
-
"version": "0.77.
|
|
3
|
+
"version": "0.77.13",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"hono": "^4.12.10",
|
|
62
62
|
"liquidjs": "^10.24.0",
|
|
63
63
|
"zod": "^4.3.6",
|
|
64
|
-
"@voyantjs/bookings": "0.77.
|
|
65
|
-
"@voyantjs/core": "0.77.
|
|
66
|
-
"@voyantjs/db": "0.77.
|
|
67
|
-
"@voyantjs/finance": "0.77.
|
|
68
|
-
"@voyantjs/hono": "0.77.
|
|
69
|
-
"@voyantjs/legal": "0.77.
|
|
64
|
+
"@voyantjs/bookings": "0.77.13",
|
|
65
|
+
"@voyantjs/core": "0.77.13",
|
|
66
|
+
"@voyantjs/db": "0.77.13",
|
|
67
|
+
"@voyantjs/finance": "0.77.13",
|
|
68
|
+
"@voyantjs/hono": "0.77.13",
|
|
69
|
+
"@voyantjs/legal": "0.77.13"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"typescript": "^6.0.2",
|