@voyantjs/notifications 0.28.3 → 0.29.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.
@@ -0,0 +1,203 @@
1
+ import { and, asc, eq } from "drizzle-orm";
2
+ import { notificationReminderRuleStages, notificationReminderStageChannels, notificationSettings, } from "./schema.js";
3
+ import { DEFAULT_NOTIFICATION_SETTINGS } from "./service-sequence.js";
4
+ export async function listReminderRuleStages(db, reminderRuleId) {
5
+ return db
6
+ .select()
7
+ .from(notificationReminderRuleStages)
8
+ .where(eq(notificationReminderRuleStages.reminderRuleId, reminderRuleId))
9
+ .orderBy(asc(notificationReminderRuleStages.orderIndex));
10
+ }
11
+ export async function getReminderRuleStageById(db, stageId) {
12
+ const [row] = await db
13
+ .select()
14
+ .from(notificationReminderRuleStages)
15
+ .where(eq(notificationReminderRuleStages.id, stageId))
16
+ .limit(1);
17
+ return row ?? null;
18
+ }
19
+ export async function createReminderRuleStage(db, reminderRuleId, input) {
20
+ const [row] = await db
21
+ .insert(notificationReminderRuleStages)
22
+ .values({
23
+ reminderRuleId,
24
+ orderIndex: input.orderIndex,
25
+ name: input.name ?? null,
26
+ anchor: input.anchor,
27
+ windowStartDays: input.windowStartDays,
28
+ windowEndDays: input.windowEndDays,
29
+ cadenceKind: input.cadenceKind,
30
+ cadenceEveryDays: input.cadenceEveryDays ?? null,
31
+ cadenceIntervals: input.cadenceIntervals ?? null,
32
+ maxSendsInStage: input.maxSendsInStage ?? null,
33
+ respectQuietHours: input.respectQuietHours,
34
+ metadata: input.metadata ?? null,
35
+ })
36
+ .returning();
37
+ if (!row)
38
+ throw new Error("Failed to create reminder stage");
39
+ return row;
40
+ }
41
+ export async function updateReminderRuleStage(db, stageId, input) {
42
+ const updates = { updatedAt: new Date() };
43
+ if (input.name !== undefined)
44
+ updates.name = input.name ?? null;
45
+ if (input.orderIndex !== undefined)
46
+ updates.orderIndex = input.orderIndex;
47
+ if (input.anchor !== undefined)
48
+ updates.anchor = input.anchor;
49
+ if (input.windowStartDays !== undefined)
50
+ updates.windowStartDays = input.windowStartDays;
51
+ if (input.windowEndDays !== undefined)
52
+ updates.windowEndDays = input.windowEndDays;
53
+ if (input.cadenceKind !== undefined)
54
+ updates.cadenceKind = input.cadenceKind;
55
+ if (input.cadenceEveryDays !== undefined)
56
+ updates.cadenceEveryDays = input.cadenceEveryDays ?? null;
57
+ if (input.cadenceIntervals !== undefined)
58
+ updates.cadenceIntervals = input.cadenceIntervals ?? null;
59
+ if (input.maxSendsInStage !== undefined)
60
+ updates.maxSendsInStage = input.maxSendsInStage ?? null;
61
+ if (input.respectQuietHours !== undefined)
62
+ updates.respectQuietHours = input.respectQuietHours;
63
+ if (input.metadata !== undefined)
64
+ updates.metadata = input.metadata ?? null;
65
+ const [row] = await db
66
+ .update(notificationReminderRuleStages)
67
+ .set(updates)
68
+ .where(eq(notificationReminderRuleStages.id, stageId))
69
+ .returning();
70
+ return row ?? null;
71
+ }
72
+ export async function deleteReminderRuleStage(db, stageId) {
73
+ const rows = await db
74
+ .delete(notificationReminderRuleStages)
75
+ .where(eq(notificationReminderRuleStages.id, stageId))
76
+ .returning({ id: notificationReminderRuleStages.id });
77
+ return rows.length > 0;
78
+ }
79
+ export async function reorderReminderRuleStages(db, reminderRuleId, input) {
80
+ const now = new Date();
81
+ await db.transaction(async (tx) => {
82
+ for (let i = 0; i < input.stageIds.length; i += 1) {
83
+ const stageId = input.stageIds[i];
84
+ await tx
85
+ .update(notificationReminderRuleStages)
86
+ .set({ orderIndex: i, updatedAt: now })
87
+ .where(and(eq(notificationReminderRuleStages.id, stageId), eq(notificationReminderRuleStages.reminderRuleId, reminderRuleId)));
88
+ }
89
+ });
90
+ return listReminderRuleStages(db, reminderRuleId);
91
+ }
92
+ export async function listStageChannels(db, stageId) {
93
+ return db
94
+ .select()
95
+ .from(notificationReminderStageChannels)
96
+ .where(eq(notificationReminderStageChannels.stageId, stageId))
97
+ .orderBy(asc(notificationReminderStageChannels.orderIndex), asc(notificationReminderStageChannels.createdAt));
98
+ }
99
+ export async function createStageChannel(db, stageId, input) {
100
+ const [row] = await db
101
+ .insert(notificationReminderStageChannels)
102
+ .values({
103
+ stageId,
104
+ orderIndex: input.orderIndex,
105
+ channel: input.channel,
106
+ provider: input.provider ?? null,
107
+ templateId: input.templateId ?? null,
108
+ templateSlug: input.templateSlug ?? null,
109
+ recipientKind: input.recipientKind,
110
+ recipientRole: input.recipientRole ?? null,
111
+ metadata: input.metadata ?? null,
112
+ })
113
+ .returning();
114
+ if (!row)
115
+ throw new Error("Failed to create stage channel");
116
+ return row;
117
+ }
118
+ export async function updateStageChannel(db, channelId, input) {
119
+ const updates = { updatedAt: new Date() };
120
+ if (input.orderIndex !== undefined)
121
+ updates.orderIndex = input.orderIndex;
122
+ if (input.channel !== undefined)
123
+ updates.channel = input.channel;
124
+ if (input.provider !== undefined)
125
+ updates.provider = input.provider ?? null;
126
+ if (input.templateId !== undefined)
127
+ updates.templateId = input.templateId ?? null;
128
+ if (input.templateSlug !== undefined)
129
+ updates.templateSlug = input.templateSlug ?? null;
130
+ if (input.recipientKind !== undefined)
131
+ updates.recipientKind = input.recipientKind;
132
+ if (input.recipientRole !== undefined)
133
+ updates.recipientRole = input.recipientRole ?? null;
134
+ if (input.metadata !== undefined)
135
+ updates.metadata = input.metadata ?? null;
136
+ const [row] = await db
137
+ .update(notificationReminderStageChannels)
138
+ .set(updates)
139
+ .where(eq(notificationReminderStageChannels.id, channelId))
140
+ .returning();
141
+ return row ?? null;
142
+ }
143
+ export async function deleteStageChannel(db, channelId) {
144
+ const rows = await db
145
+ .delete(notificationReminderStageChannels)
146
+ .where(eq(notificationReminderStageChannels.id, channelId))
147
+ .returning({ id: notificationReminderStageChannels.id });
148
+ return rows.length > 0;
149
+ }
150
+ export async function getNotificationSettingsRecord(db, scope = "default") {
151
+ const [row] = await db
152
+ .select()
153
+ .from(notificationSettings)
154
+ .where(eq(notificationSettings.scope, scope))
155
+ .limit(1);
156
+ return row ?? { ...DEFAULT_NOTIFICATION_SETTINGS, scope };
157
+ }
158
+ export async function upsertNotificationSettings(db, input) {
159
+ const scope = input.scope ?? "default";
160
+ const existing = await db
161
+ .select()
162
+ .from(notificationSettings)
163
+ .where(eq(notificationSettings.scope, scope))
164
+ .limit(1);
165
+ const updates = { updatedAt: new Date() };
166
+ if (input.quietHoursLocal !== undefined)
167
+ updates.quietHoursLocal = input.quietHoursLocal ?? null;
168
+ if (input.blackoutDates !== undefined)
169
+ updates.blackoutDates = input.blackoutDates ?? null;
170
+ if (input.skipWeekends !== undefined)
171
+ updates.skipWeekends = input.skipWeekends;
172
+ if (input.recipientRateLimitPerDay !== undefined)
173
+ updates.recipientRateLimitPerDay = input.recipientRateLimitPerDay ?? null;
174
+ if (input.suppressionWindowHours !== undefined)
175
+ updates.suppressionWindowHours = input.suppressionWindowHours;
176
+ if (input.metadata !== undefined)
177
+ updates.metadata = input.metadata ?? null;
178
+ if (existing[0]) {
179
+ const [row] = await db
180
+ .update(notificationSettings)
181
+ .set(updates)
182
+ .where(eq(notificationSettings.scope, scope))
183
+ .returning();
184
+ if (!row)
185
+ throw new Error("Failed to update notification settings");
186
+ return row;
187
+ }
188
+ const [row] = await db
189
+ .insert(notificationSettings)
190
+ .values({
191
+ scope,
192
+ quietHoursLocal: input.quietHoursLocal ?? null,
193
+ blackoutDates: input.blackoutDates ?? null,
194
+ skipWeekends: input.skipWeekends ?? false,
195
+ recipientRateLimitPerDay: input.recipientRateLimitPerDay ?? null,
196
+ suppressionWindowHours: input.suppressionWindowHours ?? 24,
197
+ metadata: input.metadata ?? null,
198
+ })
199
+ .returning();
200
+ if (!row)
201
+ throw new Error("Failed to create notification settings");
202
+ return row;
203
+ }
@@ -96,7 +96,8 @@ export declare function listReminderRules(db: PostgresJsDatabase, query: Notific
96
96
  provider: string | null;
97
97
  templateId: string | null;
98
98
  templateSlug: string | null;
99
- relativeDaysFromDueDate: number;
99
+ priority: number;
100
+ suppressionGroup: string | null;
100
101
  isSystem: boolean;
101
102
  metadata: Record<string, unknown> | null;
102
103
  createdAt: Date;
@@ -116,7 +117,8 @@ export declare function getReminderRuleById(db: PostgresJsDatabase, id: string):
116
117
  provider: string | null;
117
118
  templateId: string | null;
118
119
  templateSlug: string | null;
119
- relativeDaysFromDueDate: number;
120
+ priority: number;
121
+ suppressionGroup: string | null;
120
122
  isSystem: boolean;
121
123
  metadata: Record<string, unknown> | null;
122
124
  createdAt: Date;
@@ -134,9 +136,10 @@ export declare function createReminderRule(db: PostgresJsDatabase, data: CreateN
134
136
  channel: "email" | "sms";
135
137
  targetType: "booking_confirmed" | "invoice" | "booking_payment_schedule" | "payment_complete" | "booking_cancelled_non_payment";
136
138
  templateId: string | null;
139
+ priority: number;
137
140
  isSystem: boolean;
138
141
  templateSlug: string | null;
139
- relativeDaysFromDueDate: number;
142
+ suppressionGroup: string | null;
140
143
  } | null>;
141
144
  export declare function updateReminderRule(db: PostgresJsDatabase, id: string, data: UpdateNotificationReminderRuleInput): Promise<{
142
145
  id: string;
@@ -148,7 +151,8 @@ export declare function updateReminderRule(db: PostgresJsDatabase, id: string, d
148
151
  provider: string | null;
149
152
  templateId: string | null;
150
153
  templateSlug: string | null;
151
- relativeDaysFromDueDate: number;
154
+ priority: number;
155
+ suppressionGroup: string | null;
152
156
  isSystem: boolean;
153
157
  metadata: Record<string, unknown> | null;
154
158
  createdAt: Date;
@@ -161,7 +165,7 @@ export declare function listReminderRuns(db: PostgresJsDatabase, query: Notifica
161
165
  targetType: "booking_confirmed" | "invoice" | "booking_payment_schedule" | "payment_complete" | "booking_cancelled_non_payment";
162
166
  targetId: string;
163
167
  dedupeKey: string;
164
- status: "failed" | "sent" | "processing" | "skipped" | "queued";
168
+ status: "failed" | "queued" | "skipped" | "sent" | "processing";
165
169
  recipient: string | null;
166
170
  scheduledFor: string;
167
171
  processedAt: string;
@@ -188,7 +192,6 @@ export declare function listReminderRuns(db: PostgresJsDatabase, query: Notifica
188
192
  provider: string | null;
189
193
  templateId: string | null;
190
194
  templateSlug: string | null;
191
- relativeDaysFromDueDate: number;
192
195
  };
193
196
  delivery: {
194
197
  id: string;
@@ -212,7 +215,7 @@ export declare function getReminderRunById(db: PostgresJsDatabase, id: string):
212
215
  targetType: "booking_confirmed" | "invoice" | "booking_payment_schedule" | "payment_complete" | "booking_cancelled_non_payment";
213
216
  targetId: string;
214
217
  dedupeKey: string;
215
- status: "failed" | "sent" | "processing" | "skipped" | "queued";
218
+ status: "failed" | "queued" | "skipped" | "sent" | "processing";
216
219
  recipient: string | null;
217
220
  scheduledFor: string;
218
221
  processedAt: string;
@@ -239,7 +242,6 @@ export declare function getReminderRunById(db: PostgresJsDatabase, id: string):
239
242
  provider: string | null;
240
243
  templateId: string | null;
241
244
  templateSlug: string | null;
242
- relativeDaysFromDueDate: number;
243
245
  };
244
246
  delivery: {
245
247
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"service-templates.d.ts","sourceRoot":"","sources":["../src/service-templates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAQjE,OAAO,KAAK,EACV,mCAAmC,EACnC,+BAA+B,EAC/B,iCAAiC,EACjC,gCAAgC,EAEhC,6BAA6B,EAC7B,mCAAmC,EACnC,+BAA+B,EAChC,MAAM,qBAAqB,CAAA;AAsG5B,wBAAsB,aAAa,CAAC,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,6BAA6B;;;;;;;;;;;;;;;;;;;;GAyB/F;AAED,wBAAsB,eAAe,CAAC,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;UAOvE;AAED,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;UAO3E;AAED,wBAAsB,cAAc,CAClC,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAE,+BAA+B;;;;;;;;;;;;;;;UAItC;AAED,wBAAsB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E,kBAAkB,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;UAOvE;AAED,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;UAO3E;AAED,wBAAsB,cAAc,CAClC,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAE,+BAA+B;;;;;;;;;;;;;;;UAItC;AAED,wBAAsB,cAAc,CAClC,EAAE,EAAE,kBAAkB,EACtB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,+BAA+B;;;;;;;;;;;;;;;UAQtC;AAED,wBAAsB,iBAAiB,CACrC,EAAE,EAAE,kBAAkB,EACtB,KAAK,EAAE,iCAAiC;;;;;;;;;;;;;;;;;;;;;GA0BzC;AAED,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;UAO3E;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAE,mCAAmC;;;;;;;;;;;;;;;;UAI1C;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,kBAAkB,EACtB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,mCAAmC;;;;;;;;;;;;;;;;UAQ1C;AAED,wBAAsB,gBAAgB,CACpC,EAAE,EAAE,kBAAkB,EACtB,KAAK,EAAE,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoGxC;AAED,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAoD1E"}
@@ -40,7 +40,6 @@ function normalizeReminderRun(row) {
40
40
  provider: row.ruleProvider ?? null,
41
41
  templateId: row.ruleTemplateId ?? null,
42
42
  templateSlug: row.ruleTemplateSlug ?? null,
43
- relativeDaysFromDueDate: row.relativeDaysFromDueDate,
44
43
  },
45
44
  delivery: row.deliveryId &&
46
45
  row.deliveryStatus &&
@@ -213,7 +212,6 @@ export async function listReminderRuns(db, query) {
213
212
  ruleProvider: notificationReminderRules.provider,
214
213
  ruleTemplateId: notificationReminderRules.templateId,
215
214
  ruleTemplateSlug: notificationReminderRules.templateSlug,
216
- relativeDaysFromDueDate: notificationReminderRules.relativeDaysFromDueDate,
217
215
  deliveryId: notificationDeliveries.id,
218
216
  deliveryStatus: notificationDeliveries.status,
219
217
  deliveryChannel: notificationDeliveries.channel,
@@ -262,7 +260,6 @@ export async function getReminderRunById(db, id) {
262
260
  ruleProvider: notificationReminderRules.provider,
263
261
  ruleTemplateId: notificationReminderRules.templateId,
264
262
  ruleTemplateSlug: notificationReminderRules.templateSlug,
265
- relativeDaysFromDueDate: notificationReminderRules.relativeDaysFromDueDate,
266
263
  deliveryId: notificationDeliveries.id,
267
264
  deliveryStatus: notificationDeliveries.status,
268
265
  deliveryChannel: notificationDeliveries.channel,
package/dist/service.d.ts CHANGED
@@ -4,7 +4,9 @@ export { createNotificationService, NotificationError, previewNotificationTempla
4
4
  import { createDefaultBookingDocumentAttachment } from "./service-booking-documents.js";
5
5
  import { getDeliveryById, listDeliveries, resendDelivery, sendInvoiceNotification, sendNotification, sendPaymentSessionNotification } from "./service-deliveries.js";
6
6
  import { runDueReminders } from "./service-reminders.js";
7
+ import { previewReminders } from "./service-sequence.js";
7
8
  import { previewNotificationTemplate } from "./service-shared.js";
9
+ import { createReminderRuleStage, createStageChannel, deleteReminderRuleStage, deleteStageChannel, getNotificationSettingsRecord, getReminderRuleStageById, listReminderRuleStages, listStageChannels, reorderReminderRuleStages, updateReminderRuleStage, updateStageChannel, upsertNotificationSettings } from "./service-stages.js";
8
10
  import { createReminderRule, createTemplate, getReminderRuleById, getReminderRunById, getTemplateById, getTemplateBySlug, listReminderRules, listReminderRuns, listTemplates, updateReminderRule, updateTemplate } from "./service-templates.js";
9
11
  export declare const notificationsService: {
10
12
  listTemplates: typeof listTemplates;
@@ -24,6 +26,19 @@ export declare const notificationsService: {
24
26
  updateReminderRule: typeof updateReminderRule;
25
27
  listReminderRuns: typeof listReminderRuns;
26
28
  runDueReminders: typeof runDueReminders;
29
+ previewReminders: typeof previewReminders;
30
+ listReminderRuleStages: typeof listReminderRuleStages;
31
+ getReminderRuleStageById: typeof getReminderRuleStageById;
32
+ createReminderRuleStage: typeof createReminderRuleStage;
33
+ updateReminderRuleStage: typeof updateReminderRuleStage;
34
+ deleteReminderRuleStage: typeof deleteReminderRuleStage;
35
+ reorderReminderRuleStages: typeof reorderReminderRuleStages;
36
+ listStageChannels: typeof listStageChannels;
37
+ createStageChannel: typeof createStageChannel;
38
+ updateStageChannel: typeof updateStageChannel;
39
+ deleteStageChannel: typeof deleteStageChannel;
40
+ getNotificationSettings: typeof getNotificationSettingsRecord;
41
+ upsertNotificationSettings: typeof upsertNotificationSettings;
27
42
  sendPaymentSessionNotification: typeof sendPaymentSessionNotification;
28
43
  sendInvoiceNotification: typeof sendInvoiceNotification;
29
44
  listBookingDocumentBundle: (db: import("drizzle-orm/postgres-js").PostgresJsDatabase, bookingId: string) => Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,gCAAgC,CAAA;AACvF,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAEL,sCAAsC,EACvC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,8BAA8B,EAC/B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA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kB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,6BAA6B,EAC7B,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACf,MAAM,wBAAwB,CAAA;AAE/B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuCm0T,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CADp2T,CAAA"}
package/dist/service.js CHANGED
@@ -3,7 +3,9 @@ export { createNotificationService, NotificationError, previewNotificationTempla
3
3
  import { bookingDocumentNotificationsService, createDefaultBookingDocumentAttachment, } from "./service-booking-documents.js";
4
4
  import { getDeliveryById, listDeliveries, resendDelivery, sendInvoiceNotification, sendNotification, sendPaymentSessionNotification, } from "./service-deliveries.js";
5
5
  import { runDueReminders } from "./service-reminders.js";
6
+ import { previewReminders } from "./service-sequence.js";
6
7
  import { previewNotificationTemplate } from "./service-shared.js";
8
+ import { createReminderRuleStage, createStageChannel, deleteReminderRuleStage, deleteStageChannel, getNotificationSettingsRecord, getReminderRuleStageById, listReminderRuleStages, listStageChannels, reorderReminderRuleStages, updateReminderRuleStage, updateStageChannel, upsertNotificationSettings, } from "./service-stages.js";
7
9
  import { createReminderRule, createTemplate, getReminderRuleById, getReminderRunById, getTemplateById, getTemplateBySlug, listReminderRules, listReminderRuns, listTemplates, updateReminderRule, updateTemplate, } from "./service-templates.js";
8
10
  export const notificationsService = {
9
11
  listTemplates,
@@ -23,6 +25,19 @@ export const notificationsService = {
23
25
  updateReminderRule,
24
26
  listReminderRuns,
25
27
  runDueReminders,
28
+ previewReminders,
29
+ listReminderRuleStages,
30
+ getReminderRuleStageById,
31
+ createReminderRuleStage,
32
+ updateReminderRuleStage,
33
+ deleteReminderRuleStage,
34
+ reorderReminderRuleStages,
35
+ listStageChannels,
36
+ createStageChannel,
37
+ updateStageChannel,
38
+ deleteStageChannel,
39
+ getNotificationSettings: getNotificationSettingsRecord,
40
+ upsertNotificationSettings,
26
41
  sendPaymentSessionNotification,
27
42
  sendInvoiceNotification,
28
43
  listBookingDocumentBundle: bookingDocumentNotificationsService.listBookingDocumentBundle,
@@ -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" | "sent" | "processing" | "skipped" | "queued" | null;
7
+ status: "failed" | "queued" | "skipped" | "sent" | "processing" | null;
8
8
  }>;
9
9
  //# sourceMappingURL=deliver-reminder.d.ts.map
@@ -38,11 +38,33 @@ export declare const notificationReminderTargetTypeSchema: z.ZodEnum<{
38
38
  }>;
39
39
  export declare const notificationReminderRunStatusSchema: z.ZodEnum<{
40
40
  failed: "failed";
41
+ queued: "queued";
42
+ skipped: "skipped";
41
43
  sent: "sent";
42
44
  processing: "processing";
43
- skipped: "skipped";
44
- queued: "queued";
45
45
  }>;
46
+ export declare const notificationReminderStageAnchorSchema: z.ZodEnum<{
47
+ due_date: "due_date";
48
+ booking_created_at: "booking_created_at";
49
+ departure_date: "departure_date";
50
+ invoice_issued_at: "invoice_issued_at";
51
+ last_send_at: "last_send_at";
52
+ }>;
53
+ export declare const notificationReminderStageCadenceKindSchema: z.ZodEnum<{
54
+ once: "once";
55
+ every_n_days: "every_n_days";
56
+ escalating: "escalating";
57
+ }>;
58
+ export declare const notificationStageRecipientKindSchema: z.ZodEnum<{
59
+ primary: "primary";
60
+ cc: "cc";
61
+ bcc: "bcc";
62
+ }>;
63
+ export declare const notificationReminderStageCadenceIntervalSchema: z.ZodObject<{
64
+ whenDaysUntilDueGT: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
65
+ whenDaysUntilDueLT: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
66
+ repeatEveryDays: z.ZodCoercedNumber<unknown>;
67
+ }, z.core.$strip>;
46
68
  export declare const notificationDocumentTypeSchema: z.ZodEnum<{
47
69
  invoice: "invoice";
48
70
  proforma: "proforma";
@@ -172,7 +194,8 @@ export declare const insertNotificationReminderRuleSchema: z.ZodObject<{
172
194
  provider: z.ZodNullable<z.ZodOptional<z.ZodString>>;
173
195
  templateId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
174
196
  templateSlug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
175
- relativeDaysFromDueDate: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
197
+ priority: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
198
+ suppressionGroup: z.ZodNullable<z.ZodOptional<z.ZodString>>;
176
199
  isSystem: z.ZodDefault<z.ZodBoolean>;
177
200
  metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
178
201
  }, z.core.$strip>;
@@ -198,10 +221,120 @@ export declare const updateNotificationReminderRuleSchema: z.ZodObject<{
198
221
  provider: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
199
222
  templateId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
200
223
  templateSlug: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
201
- relativeDaysFromDueDate: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
224
+ priority: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
225
+ suppressionGroup: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
202
226
  isSystem: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
203
227
  metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
204
228
  }, z.core.$strip>;
229
+ export declare const insertNotificationReminderRuleStageSchema: z.ZodObject<{
230
+ name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
231
+ orderIndex: z.ZodCoercedNumber<unknown>;
232
+ anchor: z.ZodEnum<{
233
+ due_date: "due_date";
234
+ booking_created_at: "booking_created_at";
235
+ departure_date: "departure_date";
236
+ invoice_issued_at: "invoice_issued_at";
237
+ last_send_at: "last_send_at";
238
+ }>;
239
+ windowStartDays: z.ZodCoercedNumber<unknown>;
240
+ windowEndDays: z.ZodCoercedNumber<unknown>;
241
+ cadenceKind: z.ZodEnum<{
242
+ once: "once";
243
+ every_n_days: "every_n_days";
244
+ escalating: "escalating";
245
+ }>;
246
+ cadenceEveryDays: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
247
+ cadenceIntervals: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
248
+ whenDaysUntilDueGT: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
249
+ whenDaysUntilDueLT: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
250
+ repeatEveryDays: z.ZodCoercedNumber<unknown>;
251
+ }, z.core.$strip>>>>;
252
+ maxSendsInStage: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
253
+ respectQuietHours: z.ZodDefault<z.ZodBoolean>;
254
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
255
+ }, z.core.$strip>;
256
+ export declare const updateNotificationReminderRuleStageSchema: z.ZodObject<{
257
+ name: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
258
+ orderIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
259
+ anchor: z.ZodOptional<z.ZodEnum<{
260
+ due_date: "due_date";
261
+ booking_created_at: "booking_created_at";
262
+ departure_date: "departure_date";
263
+ invoice_issued_at: "invoice_issued_at";
264
+ last_send_at: "last_send_at";
265
+ }>>;
266
+ windowStartDays: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
267
+ windowEndDays: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
268
+ cadenceKind: z.ZodOptional<z.ZodEnum<{
269
+ once: "once";
270
+ every_n_days: "every_n_days";
271
+ escalating: "escalating";
272
+ }>>;
273
+ cadenceEveryDays: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>>;
274
+ cadenceIntervals: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
275
+ whenDaysUntilDueGT: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
276
+ whenDaysUntilDueLT: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
277
+ repeatEveryDays: z.ZodCoercedNumber<unknown>;
278
+ }, z.core.$strip>>>>>;
279
+ maxSendsInStage: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>>;
280
+ respectQuietHours: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
281
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
282
+ }, z.core.$strip>;
283
+ export declare const reorderReminderRuleStagesSchema: z.ZodObject<{
284
+ stageIds: z.ZodArray<z.ZodString>;
285
+ }, z.core.$strip>;
286
+ export declare const insertNotificationReminderStageChannelSchema: z.ZodObject<{
287
+ orderIndex: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
288
+ channel: z.ZodEnum<{
289
+ email: "email";
290
+ sms: "sms";
291
+ }>;
292
+ provider: z.ZodNullable<z.ZodOptional<z.ZodString>>;
293
+ templateId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
294
+ templateSlug: z.ZodNullable<z.ZodOptional<z.ZodString>>;
295
+ recipientKind: z.ZodDefault<z.ZodEnum<{
296
+ primary: "primary";
297
+ cc: "cc";
298
+ bcc: "bcc";
299
+ }>>;
300
+ recipientRole: z.ZodNullable<z.ZodOptional<z.ZodString>>;
301
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
302
+ }, z.core.$strip>;
303
+ export declare const updateNotificationReminderStageChannelSchema: z.ZodObject<{
304
+ orderIndex: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
305
+ channel: z.ZodOptional<z.ZodEnum<{
306
+ email: "email";
307
+ sms: "sms";
308
+ }>>;
309
+ provider: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
310
+ templateId: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
311
+ templateSlug: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
312
+ recipientKind: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
313
+ primary: "primary";
314
+ cc: "cc";
315
+ bcc: "bcc";
316
+ }>>>;
317
+ recipientRole: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
318
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
319
+ }, z.core.$strip>;
320
+ export declare const updateNotificationSettingsSchema: z.ZodObject<{
321
+ scope: z.ZodOptional<z.ZodDefault<z.ZodString>>;
322
+ quietHoursLocal: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
323
+ start: z.ZodString;
324
+ end: z.ZodString;
325
+ tz: z.ZodString;
326
+ }, z.core.$strip>>>>;
327
+ blackoutDates: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>>;
328
+ skipWeekends: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
329
+ recipientRateLimitPerDay: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>>;
330
+ suppressionWindowHours: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
331
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
332
+ }, z.core.$strip>;
333
+ export declare const previewRemindersQuerySchema: z.ZodObject<{
334
+ date: z.ZodOptional<z.ZodString>;
335
+ ruleId: z.ZodOptional<z.ZodString>;
336
+ targetId: z.ZodOptional<z.ZodString>;
337
+ }, z.core.$strip>;
205
338
  export declare const notificationReminderRuleListQuerySchema: z.ZodObject<{
206
339
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
207
340
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -245,10 +378,10 @@ export declare const notificationReminderRunListQuerySchema: z.ZodObject<{
245
378
  recipient: z.ZodOptional<z.ZodString>;
246
379
  status: z.ZodOptional<z.ZodEnum<{
247
380
  failed: "failed";
381
+ queued: "queued";
382
+ skipped: "skipped";
248
383
  sent: "sent";
249
384
  processing: "processing";
250
- skipped: "skipped";
251
- queued: "queued";
252
385
  }>>;
253
386
  }, z.core.$strip>;
254
387
  export declare const notificationReminderRunRuleSummarySchema: z.ZodObject<{
@@ -274,7 +407,6 @@ export declare const notificationReminderRunRuleSummarySchema: z.ZodObject<{
274
407
  provider: z.ZodNullable<z.ZodString>;
275
408
  templateId: z.ZodNullable<z.ZodString>;
276
409
  templateSlug: z.ZodNullable<z.ZodString>;
277
- relativeDaysFromDueDate: z.ZodNumber;
278
410
  }, z.core.$strip>;
279
411
  export declare const notificationReminderRunDeliverySummarySchema: z.ZodObject<{
280
412
  id: z.ZodString;
@@ -318,10 +450,10 @@ export declare const notificationReminderRunRecordSchema: z.ZodObject<{
318
450
  dedupeKey: z.ZodString;
319
451
  status: z.ZodEnum<{
320
452
  failed: "failed";
453
+ queued: "queued";
454
+ skipped: "skipped";
321
455
  sent: "sent";
322
456
  processing: "processing";
323
- skipped: "skipped";
324
- queued: "queued";
325
457
  }>;
326
458
  recipient: z.ZodNullable<z.ZodString>;
327
459
  scheduledFor: z.ZodString;
@@ -362,7 +494,6 @@ export declare const notificationReminderRunRecordSchema: z.ZodObject<{
362
494
  provider: z.ZodNullable<z.ZodString>;
363
495
  templateId: z.ZodNullable<z.ZodString>;
364
496
  templateSlug: z.ZodNullable<z.ZodString>;
365
- relativeDaysFromDueDate: z.ZodNumber;
366
497
  }, z.core.$strip>;
367
498
  delivery: z.ZodNullable<z.ZodObject<{
368
499
  id: z.ZodString;
@@ -399,10 +530,10 @@ export declare const notificationReminderRunListResponseSchema: z.ZodObject<{
399
530
  dedupeKey: z.ZodString;
400
531
  status: z.ZodEnum<{
401
532
  failed: "failed";
533
+ queued: "queued";
534
+ skipped: "skipped";
402
535
  sent: "sent";
403
536
  processing: "processing";
404
- skipped: "skipped";
405
- queued: "queued";
406
537
  }>;
407
538
  recipient: z.ZodNullable<z.ZodString>;
408
539
  scheduledFor: z.ZodString;
@@ -443,7 +574,6 @@ export declare const notificationReminderRunListResponseSchema: z.ZodObject<{
443
574
  provider: z.ZodNullable<z.ZodString>;
444
575
  templateId: z.ZodNullable<z.ZodString>;
445
576
  templateSlug: z.ZodNullable<z.ZodString>;
446
- relativeDaysFromDueDate: z.ZodNumber;
447
577
  }, z.core.$strip>;
448
578
  delivery: z.ZodNullable<z.ZodObject<{
449
579
  id: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,yBAAyB;;;EAA2B,CAAA;AACjE,eAAO,MAAM,gCAAgC;;;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