@voyantjs/notifications-react 0.28.1 → 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.
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/use-notification-reminder-rule-mutation.d.ts +2 -3
- package/dist/hooks/use-notification-reminder-rule-mutation.d.ts.map +1 -1
- package/dist/hooks/use-notification-reminder-rule.d.ts +0 -1
- package/dist/hooks/use-notification-reminder-rule.d.ts.map +1 -1
- package/dist/hooks/use-notification-reminder-rules.d.ts +0 -1
- package/dist/hooks/use-notification-reminder-rules.d.ts.map +1 -1
- package/dist/hooks/use-notification-reminder-runs.d.ts +0 -1
- package/dist/hooks/use-notification-reminder-runs.d.ts.map +1 -1
- package/dist/hooks/use-notification-settings.d.ts +50 -0
- package/dist/hooks/use-notification-settings.d.ts.map +1 -0
- package/dist/hooks/use-notification-settings.js +26 -0
- package/dist/hooks/use-reminder-rule-stage-mutation.d.ts +93 -0
- package/dist/hooks/use-reminder-rule-stage-mutation.d.ts.map +1 -0
- package/dist/hooks/use-reminder-rule-stage-mutation.js +53 -0
- package/dist/hooks/use-reminder-rule-stages.d.ts +25 -0
- package/dist/hooks/use-reminder-rule-stages.d.ts.map +1 -0
- package/dist/hooks/use-reminder-rule-stages.js +12 -0
- package/dist/hooks/use-reminder-stage-channel-mutation.d.ts +48 -0
- package/dist/hooks/use-reminder-stage-channel-mutation.d.ts.map +1 -0
- package/dist/hooks/use-reminder-stage-channel-mutation.js +42 -0
- package/dist/hooks/use-reminder-stage-channels.d.ts +18 -0
- package/dist/hooks/use-reminder-stage-channels.d.ts.map +1 -0
- package/dist/hooks/use-reminder-stage-channels.js +12 -0
- package/dist/hooks/use-reminders-preview.d.ts +21 -0
- package/dist/hooks/use-reminders-preview.d.ts.map +1 -0
- package/dist/hooks/use-reminders-preview.js +12 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/query-keys.d.ts +9 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +4 -0
- package/dist/query-options.d.ts +289 -16
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +42 -1
- package/dist/schemas.d.ts +265 -5
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +85 -1
- package/package.json +5 -5
package/dist/schemas.d.ts
CHANGED
|
@@ -106,7 +106,6 @@ export declare const notificationReminderRuleRecordSchema: z.ZodObject<{
|
|
|
106
106
|
provider: z.ZodNullable<z.ZodString>;
|
|
107
107
|
templateId: z.ZodNullable<z.ZodString>;
|
|
108
108
|
templateSlug: z.ZodNullable<z.ZodString>;
|
|
109
|
-
relativeDaysFromDueDate: z.ZodNumber;
|
|
110
109
|
isSystem: z.ZodBoolean;
|
|
111
110
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
112
111
|
createdAt: z.ZodString;
|
|
@@ -291,7 +290,6 @@ export declare const notificationReminderRuleListResponse: z.ZodObject<{
|
|
|
291
290
|
provider: z.ZodNullable<z.ZodString>;
|
|
292
291
|
templateId: z.ZodNullable<z.ZodString>;
|
|
293
292
|
templateSlug: z.ZodNullable<z.ZodString>;
|
|
294
|
-
relativeDaysFromDueDate: z.ZodNumber;
|
|
295
293
|
isSystem: z.ZodBoolean;
|
|
296
294
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
297
295
|
createdAt: z.ZodString;
|
|
@@ -325,7 +323,6 @@ export declare const notificationReminderRuleSingleResponse: z.ZodObject<{
|
|
|
325
323
|
provider: z.ZodNullable<z.ZodString>;
|
|
326
324
|
templateId: z.ZodNullable<z.ZodString>;
|
|
327
325
|
templateSlug: z.ZodNullable<z.ZodString>;
|
|
328
|
-
relativeDaysFromDueDate: z.ZodNumber;
|
|
329
326
|
isSystem: z.ZodBoolean;
|
|
330
327
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
331
328
|
createdAt: z.ZodString;
|
|
@@ -391,7 +388,6 @@ export declare const notificationReminderRunListResponse: z.ZodObject<{
|
|
|
391
388
|
provider: z.ZodNullable<z.ZodString>;
|
|
392
389
|
templateId: z.ZodNullable<z.ZodString>;
|
|
393
390
|
templateSlug: z.ZodNullable<z.ZodString>;
|
|
394
|
-
relativeDaysFromDueDate: z.ZodNumber;
|
|
395
391
|
}, z.core.$strip>;
|
|
396
392
|
delivery: z.ZodNullable<z.ZodObject<{
|
|
397
393
|
id: z.ZodString;
|
|
@@ -476,7 +472,6 @@ export declare const notificationReminderRunSingleResponse: z.ZodObject<{
|
|
|
476
472
|
provider: z.ZodNullable<z.ZodString>;
|
|
477
473
|
templateId: z.ZodNullable<z.ZodString>;
|
|
478
474
|
templateSlug: z.ZodNullable<z.ZodString>;
|
|
479
|
-
relativeDaysFromDueDate: z.ZodNumber;
|
|
480
475
|
}, z.core.$strip>;
|
|
481
476
|
delivery: z.ZodNullable<z.ZodObject<{
|
|
482
477
|
id: z.ZodString;
|
|
@@ -533,4 +528,269 @@ export declare const notificationReminderRunStatusFilterSchema: z.ZodEnum<{
|
|
|
533
528
|
processing: "processing";
|
|
534
529
|
skipped: "skipped";
|
|
535
530
|
}>;
|
|
531
|
+
export declare const reminderStageAnchorSchema: z.ZodEnum<{
|
|
532
|
+
due_date: "due_date";
|
|
533
|
+
booking_created_at: "booking_created_at";
|
|
534
|
+
departure_date: "departure_date";
|
|
535
|
+
invoice_issued_at: "invoice_issued_at";
|
|
536
|
+
last_send_at: "last_send_at";
|
|
537
|
+
}>;
|
|
538
|
+
export declare const reminderStageCadenceKindSchema: z.ZodEnum<{
|
|
539
|
+
once: "once";
|
|
540
|
+
every_n_days: "every_n_days";
|
|
541
|
+
escalating: "escalating";
|
|
542
|
+
}>;
|
|
543
|
+
export declare const reminderStageRecipientKindSchema: z.ZodEnum<{
|
|
544
|
+
primary: "primary";
|
|
545
|
+
cc: "cc";
|
|
546
|
+
bcc: "bcc";
|
|
547
|
+
}>;
|
|
548
|
+
export declare const reminderStageCadenceIntervalRecord: z.ZodObject<{
|
|
549
|
+
whenDaysUntilDueGT: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
550
|
+
whenDaysUntilDueLT: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
551
|
+
repeatEveryDays: z.ZodNumber;
|
|
552
|
+
}, z.core.$strip>;
|
|
553
|
+
export declare const reminderRuleStageRecordSchema: z.ZodObject<{
|
|
554
|
+
id: z.ZodString;
|
|
555
|
+
reminderRuleId: z.ZodString;
|
|
556
|
+
orderIndex: z.ZodNumber;
|
|
557
|
+
name: z.ZodNullable<z.ZodString>;
|
|
558
|
+
anchor: z.ZodEnum<{
|
|
559
|
+
due_date: "due_date";
|
|
560
|
+
booking_created_at: "booking_created_at";
|
|
561
|
+
departure_date: "departure_date";
|
|
562
|
+
invoice_issued_at: "invoice_issued_at";
|
|
563
|
+
last_send_at: "last_send_at";
|
|
564
|
+
}>;
|
|
565
|
+
windowStartDays: z.ZodNumber;
|
|
566
|
+
windowEndDays: z.ZodNumber;
|
|
567
|
+
cadenceKind: z.ZodEnum<{
|
|
568
|
+
once: "once";
|
|
569
|
+
every_n_days: "every_n_days";
|
|
570
|
+
escalating: "escalating";
|
|
571
|
+
}>;
|
|
572
|
+
cadenceEveryDays: z.ZodNullable<z.ZodNumber>;
|
|
573
|
+
cadenceIntervals: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
574
|
+
whenDaysUntilDueGT: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
575
|
+
whenDaysUntilDueLT: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
576
|
+
repeatEveryDays: z.ZodNumber;
|
|
577
|
+
}, z.core.$strip>>>;
|
|
578
|
+
maxSendsInStage: z.ZodNullable<z.ZodNumber>;
|
|
579
|
+
respectQuietHours: z.ZodBoolean;
|
|
580
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
581
|
+
createdAt: z.ZodString;
|
|
582
|
+
updatedAt: z.ZodString;
|
|
583
|
+
}, z.core.$strip>;
|
|
584
|
+
export type ReminderRuleStageRecord = z.infer<typeof reminderRuleStageRecordSchema>;
|
|
585
|
+
export declare const reminderStageChannelRecordSchema: z.ZodObject<{
|
|
586
|
+
id: z.ZodString;
|
|
587
|
+
stageId: z.ZodString;
|
|
588
|
+
orderIndex: z.ZodNumber;
|
|
589
|
+
channel: z.ZodEnum<{
|
|
590
|
+
email: "email";
|
|
591
|
+
sms: "sms";
|
|
592
|
+
}>;
|
|
593
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
594
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
595
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
596
|
+
recipientKind: z.ZodEnum<{
|
|
597
|
+
primary: "primary";
|
|
598
|
+
cc: "cc";
|
|
599
|
+
bcc: "bcc";
|
|
600
|
+
}>;
|
|
601
|
+
recipientRole: z.ZodNullable<z.ZodString>;
|
|
602
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
603
|
+
createdAt: z.ZodString;
|
|
604
|
+
updatedAt: z.ZodString;
|
|
605
|
+
}, z.core.$strip>;
|
|
606
|
+
export type ReminderStageChannelRecord = z.infer<typeof reminderStageChannelRecordSchema>;
|
|
607
|
+
export declare const notificationQuietHoursConfigSchema: z.ZodObject<{
|
|
608
|
+
start: z.ZodString;
|
|
609
|
+
end: z.ZodString;
|
|
610
|
+
tz: z.ZodString;
|
|
611
|
+
}, z.core.$strip>;
|
|
612
|
+
export declare const notificationSettingsRecordSchema: z.ZodObject<{
|
|
613
|
+
id: z.ZodString;
|
|
614
|
+
scope: z.ZodString;
|
|
615
|
+
quietHoursLocal: z.ZodNullable<z.ZodObject<{
|
|
616
|
+
start: z.ZodString;
|
|
617
|
+
end: z.ZodString;
|
|
618
|
+
tz: z.ZodString;
|
|
619
|
+
}, z.core.$strip>>;
|
|
620
|
+
blackoutDates: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
621
|
+
skipWeekends: z.ZodBoolean;
|
|
622
|
+
holidayCalendar: z.ZodNullable<z.ZodString>;
|
|
623
|
+
recipientRateLimitPerDay: z.ZodNullable<z.ZodNumber>;
|
|
624
|
+
suppressionWindowHours: z.ZodNumber;
|
|
625
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
626
|
+
createdAt: z.ZodString;
|
|
627
|
+
updatedAt: z.ZodString;
|
|
628
|
+
}, z.core.$strip>;
|
|
629
|
+
export type NotificationSettingsRecord = z.infer<typeof notificationSettingsRecordSchema>;
|
|
630
|
+
export declare const remindersPreviewRowSchema: z.ZodObject<{
|
|
631
|
+
ruleId: z.ZodString;
|
|
632
|
+
ruleName: z.ZodString;
|
|
633
|
+
ruleSlug: z.ZodString;
|
|
634
|
+
targetType: z.ZodString;
|
|
635
|
+
targetId: z.ZodString;
|
|
636
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
637
|
+
stageId: z.ZodString;
|
|
638
|
+
stageName: z.ZodNullable<z.ZodString>;
|
|
639
|
+
stageOrderIndex: z.ZodNumber;
|
|
640
|
+
anchor: z.ZodString;
|
|
641
|
+
anchorDate: z.ZodString;
|
|
642
|
+
scheduledAt: z.ZodString;
|
|
643
|
+
sendCountAtFire: z.ZodNumber;
|
|
644
|
+
reasoning: z.ZodString;
|
|
645
|
+
}, z.core.$strip>;
|
|
646
|
+
export type RemindersPreviewRow = z.infer<typeof remindersPreviewRowSchema>;
|
|
647
|
+
export declare const reminderRuleStagesListResponse: z.ZodObject<{
|
|
648
|
+
data: z.ZodArray<z.ZodObject<{
|
|
649
|
+
id: z.ZodString;
|
|
650
|
+
reminderRuleId: z.ZodString;
|
|
651
|
+
orderIndex: z.ZodNumber;
|
|
652
|
+
name: z.ZodNullable<z.ZodString>;
|
|
653
|
+
anchor: z.ZodEnum<{
|
|
654
|
+
due_date: "due_date";
|
|
655
|
+
booking_created_at: "booking_created_at";
|
|
656
|
+
departure_date: "departure_date";
|
|
657
|
+
invoice_issued_at: "invoice_issued_at";
|
|
658
|
+
last_send_at: "last_send_at";
|
|
659
|
+
}>;
|
|
660
|
+
windowStartDays: z.ZodNumber;
|
|
661
|
+
windowEndDays: z.ZodNumber;
|
|
662
|
+
cadenceKind: z.ZodEnum<{
|
|
663
|
+
once: "once";
|
|
664
|
+
every_n_days: "every_n_days";
|
|
665
|
+
escalating: "escalating";
|
|
666
|
+
}>;
|
|
667
|
+
cadenceEveryDays: z.ZodNullable<z.ZodNumber>;
|
|
668
|
+
cadenceIntervals: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
669
|
+
whenDaysUntilDueGT: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
670
|
+
whenDaysUntilDueLT: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
671
|
+
repeatEveryDays: z.ZodNumber;
|
|
672
|
+
}, z.core.$strip>>>;
|
|
673
|
+
maxSendsInStage: z.ZodNullable<z.ZodNumber>;
|
|
674
|
+
respectQuietHours: z.ZodBoolean;
|
|
675
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
676
|
+
createdAt: z.ZodString;
|
|
677
|
+
updatedAt: z.ZodString;
|
|
678
|
+
}, z.core.$strip>>;
|
|
679
|
+
}, z.core.$strip>;
|
|
680
|
+
export declare const reminderRuleStageSingleResponse: z.ZodObject<{
|
|
681
|
+
data: z.ZodObject<{
|
|
682
|
+
id: z.ZodString;
|
|
683
|
+
reminderRuleId: z.ZodString;
|
|
684
|
+
orderIndex: z.ZodNumber;
|
|
685
|
+
name: z.ZodNullable<z.ZodString>;
|
|
686
|
+
anchor: z.ZodEnum<{
|
|
687
|
+
due_date: "due_date";
|
|
688
|
+
booking_created_at: "booking_created_at";
|
|
689
|
+
departure_date: "departure_date";
|
|
690
|
+
invoice_issued_at: "invoice_issued_at";
|
|
691
|
+
last_send_at: "last_send_at";
|
|
692
|
+
}>;
|
|
693
|
+
windowStartDays: z.ZodNumber;
|
|
694
|
+
windowEndDays: z.ZodNumber;
|
|
695
|
+
cadenceKind: z.ZodEnum<{
|
|
696
|
+
once: "once";
|
|
697
|
+
every_n_days: "every_n_days";
|
|
698
|
+
escalating: "escalating";
|
|
699
|
+
}>;
|
|
700
|
+
cadenceEveryDays: z.ZodNullable<z.ZodNumber>;
|
|
701
|
+
cadenceIntervals: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
702
|
+
whenDaysUntilDueGT: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
703
|
+
whenDaysUntilDueLT: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
704
|
+
repeatEveryDays: z.ZodNumber;
|
|
705
|
+
}, z.core.$strip>>>;
|
|
706
|
+
maxSendsInStage: z.ZodNullable<z.ZodNumber>;
|
|
707
|
+
respectQuietHours: z.ZodBoolean;
|
|
708
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
709
|
+
createdAt: z.ZodString;
|
|
710
|
+
updatedAt: z.ZodString;
|
|
711
|
+
}, z.core.$strip>;
|
|
712
|
+
}, z.core.$strip>;
|
|
713
|
+
export declare const reminderStageChannelsListResponse: z.ZodObject<{
|
|
714
|
+
data: z.ZodArray<z.ZodObject<{
|
|
715
|
+
id: z.ZodString;
|
|
716
|
+
stageId: z.ZodString;
|
|
717
|
+
orderIndex: z.ZodNumber;
|
|
718
|
+
channel: z.ZodEnum<{
|
|
719
|
+
email: "email";
|
|
720
|
+
sms: "sms";
|
|
721
|
+
}>;
|
|
722
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
723
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
724
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
725
|
+
recipientKind: z.ZodEnum<{
|
|
726
|
+
primary: "primary";
|
|
727
|
+
cc: "cc";
|
|
728
|
+
bcc: "bcc";
|
|
729
|
+
}>;
|
|
730
|
+
recipientRole: z.ZodNullable<z.ZodString>;
|
|
731
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
732
|
+
createdAt: z.ZodString;
|
|
733
|
+
updatedAt: z.ZodString;
|
|
734
|
+
}, z.core.$strip>>;
|
|
735
|
+
}, z.core.$strip>;
|
|
736
|
+
export declare const reminderStageChannelSingleResponse: z.ZodObject<{
|
|
737
|
+
data: z.ZodObject<{
|
|
738
|
+
id: z.ZodString;
|
|
739
|
+
stageId: z.ZodString;
|
|
740
|
+
orderIndex: z.ZodNumber;
|
|
741
|
+
channel: z.ZodEnum<{
|
|
742
|
+
email: "email";
|
|
743
|
+
sms: "sms";
|
|
744
|
+
}>;
|
|
745
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
746
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
747
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
748
|
+
recipientKind: z.ZodEnum<{
|
|
749
|
+
primary: "primary";
|
|
750
|
+
cc: "cc";
|
|
751
|
+
bcc: "bcc";
|
|
752
|
+
}>;
|
|
753
|
+
recipientRole: z.ZodNullable<z.ZodString>;
|
|
754
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
755
|
+
createdAt: z.ZodString;
|
|
756
|
+
updatedAt: z.ZodString;
|
|
757
|
+
}, z.core.$strip>;
|
|
758
|
+
}, z.core.$strip>;
|
|
759
|
+
export declare const notificationSettingsResponse: z.ZodObject<{
|
|
760
|
+
data: z.ZodObject<{
|
|
761
|
+
id: z.ZodString;
|
|
762
|
+
scope: z.ZodString;
|
|
763
|
+
quietHoursLocal: z.ZodNullable<z.ZodObject<{
|
|
764
|
+
start: z.ZodString;
|
|
765
|
+
end: z.ZodString;
|
|
766
|
+
tz: z.ZodString;
|
|
767
|
+
}, z.core.$strip>>;
|
|
768
|
+
blackoutDates: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
769
|
+
skipWeekends: z.ZodBoolean;
|
|
770
|
+
holidayCalendar: z.ZodNullable<z.ZodString>;
|
|
771
|
+
recipientRateLimitPerDay: z.ZodNullable<z.ZodNumber>;
|
|
772
|
+
suppressionWindowHours: z.ZodNumber;
|
|
773
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
774
|
+
createdAt: z.ZodString;
|
|
775
|
+
updatedAt: z.ZodString;
|
|
776
|
+
}, z.core.$strip>;
|
|
777
|
+
}, z.core.$strip>;
|
|
778
|
+
export declare const remindersPreviewResponse: z.ZodObject<{
|
|
779
|
+
data: z.ZodArray<z.ZodObject<{
|
|
780
|
+
ruleId: z.ZodString;
|
|
781
|
+
ruleName: z.ZodString;
|
|
782
|
+
ruleSlug: z.ZodString;
|
|
783
|
+
targetType: z.ZodString;
|
|
784
|
+
targetId: z.ZodString;
|
|
785
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
786
|
+
stageId: z.ZodString;
|
|
787
|
+
stageName: z.ZodNullable<z.ZodString>;
|
|
788
|
+
stageOrderIndex: z.ZodNumber;
|
|
789
|
+
anchor: z.ZodString;
|
|
790
|
+
anchorDate: z.ZodString;
|
|
791
|
+
scheduledAt: z.ZodString;
|
|
792
|
+
sendCountAtFire: z.ZodNumber;
|
|
793
|
+
reasoning: z.ZodString;
|
|
794
|
+
}, z.core.$strip>>;
|
|
795
|
+
}, z.core.$strip>;
|
|
536
796
|
//# sourceMappingURL=schemas.d.ts.map
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mCAAmC,EAKnC,uCAAuC,IAAI,uCAAuC,EAEnF,MAAM,yBAAyB,CAAA;AAChC,OAAO,EA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eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;iBAE7C,CAAA;AACD,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;iBAAmD,CAAA;AAClG,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;iBAAmD,CAAA;AAC5F,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAAqD,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -63,7 +63,6 @@ export const notificationReminderRuleRecordSchema = z.object({
|
|
|
63
63
|
provider: z.string().nullable(),
|
|
64
64
|
templateId: z.string().nullable(),
|
|
65
65
|
templateSlug: z.string().nullable(),
|
|
66
|
-
relativeDaysFromDueDate: z.number().int(),
|
|
67
66
|
isSystem: z.boolean(),
|
|
68
67
|
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
69
68
|
createdAt: z.string(),
|
|
@@ -87,3 +86,88 @@ export const notificationProviderOptionSchema = z.enum(["automatic", "resend", "
|
|
|
87
86
|
export const notificationTemplateEditorChannelSchema = notificationChannelSchema;
|
|
88
87
|
export const notificationReminderRuleStatusFilterSchema = notificationReminderStatusSchema;
|
|
89
88
|
export const notificationReminderRunStatusFilterSchema = notificationReminderRunStatusSchema;
|
|
89
|
+
export const reminderStageAnchorSchema = z.enum([
|
|
90
|
+
"due_date",
|
|
91
|
+
"booking_created_at",
|
|
92
|
+
"departure_date",
|
|
93
|
+
"invoice_issued_at",
|
|
94
|
+
"last_send_at",
|
|
95
|
+
]);
|
|
96
|
+
export const reminderStageCadenceKindSchema = z.enum(["once", "every_n_days", "escalating"]);
|
|
97
|
+
export const reminderStageRecipientKindSchema = z.enum(["primary", "cc", "bcc"]);
|
|
98
|
+
export const reminderStageCadenceIntervalRecord = z.object({
|
|
99
|
+
whenDaysUntilDueGT: z.number().int().nullable().optional(),
|
|
100
|
+
whenDaysUntilDueLT: z.number().int().nullable().optional(),
|
|
101
|
+
repeatEveryDays: z.number().int(),
|
|
102
|
+
});
|
|
103
|
+
export const reminderRuleStageRecordSchema = z.object({
|
|
104
|
+
id: z.string(),
|
|
105
|
+
reminderRuleId: z.string(),
|
|
106
|
+
orderIndex: z.number().int(),
|
|
107
|
+
name: z.string().nullable(),
|
|
108
|
+
anchor: reminderStageAnchorSchema,
|
|
109
|
+
windowStartDays: z.number().int(),
|
|
110
|
+
windowEndDays: z.number().int(),
|
|
111
|
+
cadenceKind: reminderStageCadenceKindSchema,
|
|
112
|
+
cadenceEveryDays: z.number().int().nullable(),
|
|
113
|
+
cadenceIntervals: z.array(reminderStageCadenceIntervalRecord).nullable(),
|
|
114
|
+
maxSendsInStage: z.number().int().nullable(),
|
|
115
|
+
respectQuietHours: z.boolean(),
|
|
116
|
+
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
117
|
+
createdAt: z.string(),
|
|
118
|
+
updatedAt: z.string(),
|
|
119
|
+
});
|
|
120
|
+
export const reminderStageChannelRecordSchema = z.object({
|
|
121
|
+
id: z.string(),
|
|
122
|
+
stageId: z.string(),
|
|
123
|
+
orderIndex: z.number().int(),
|
|
124
|
+
channel: notificationChannelSchema,
|
|
125
|
+
provider: z.string().nullable(),
|
|
126
|
+
templateId: z.string().nullable(),
|
|
127
|
+
templateSlug: z.string().nullable(),
|
|
128
|
+
recipientKind: reminderStageRecipientKindSchema,
|
|
129
|
+
recipientRole: z.string().nullable(),
|
|
130
|
+
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
131
|
+
createdAt: z.string(),
|
|
132
|
+
updatedAt: z.string(),
|
|
133
|
+
});
|
|
134
|
+
export const notificationQuietHoursConfigSchema = z.object({
|
|
135
|
+
start: z.string(),
|
|
136
|
+
end: z.string(),
|
|
137
|
+
tz: z.string(),
|
|
138
|
+
});
|
|
139
|
+
export const notificationSettingsRecordSchema = z.object({
|
|
140
|
+
id: z.string(),
|
|
141
|
+
scope: z.string(),
|
|
142
|
+
quietHoursLocal: notificationQuietHoursConfigSchema.nullable(),
|
|
143
|
+
blackoutDates: z.array(z.string()).nullable(),
|
|
144
|
+
skipWeekends: z.boolean(),
|
|
145
|
+
holidayCalendar: z.string().nullable(),
|
|
146
|
+
recipientRateLimitPerDay: z.number().int().nullable(),
|
|
147
|
+
suppressionWindowHours: z.number().int(),
|
|
148
|
+
metadata: z.record(z.string(), z.unknown()).nullable(),
|
|
149
|
+
createdAt: z.string(),
|
|
150
|
+
updatedAt: z.string(),
|
|
151
|
+
});
|
|
152
|
+
export const remindersPreviewRowSchema = z.object({
|
|
153
|
+
ruleId: z.string(),
|
|
154
|
+
ruleName: z.string(),
|
|
155
|
+
ruleSlug: z.string(),
|
|
156
|
+
targetType: z.string(),
|
|
157
|
+
targetId: z.string(),
|
|
158
|
+
bookingId: z.string().nullable(),
|
|
159
|
+
stageId: z.string(),
|
|
160
|
+
stageName: z.string().nullable(),
|
|
161
|
+
stageOrderIndex: z.number().int(),
|
|
162
|
+
anchor: z.string(),
|
|
163
|
+
anchorDate: z.string(),
|
|
164
|
+
scheduledAt: z.string(),
|
|
165
|
+
sendCountAtFire: z.number().int(),
|
|
166
|
+
reasoning: z.string(),
|
|
167
|
+
});
|
|
168
|
+
export const reminderRuleStagesListResponse = singleEnvelope(z.array(reminderRuleStageRecordSchema));
|
|
169
|
+
export const reminderRuleStageSingleResponse = singleEnvelope(reminderRuleStageRecordSchema);
|
|
170
|
+
export const reminderStageChannelsListResponse = singleEnvelope(z.array(reminderStageChannelRecordSchema));
|
|
171
|
+
export const reminderStageChannelSingleResponse = singleEnvelope(reminderStageChannelRecordSchema);
|
|
172
|
+
export const notificationSettingsResponse = singleEnvelope(notificationSettingsRecordSchema);
|
|
173
|
+
export const remindersPreviewResponse = singleEnvelope(z.array(remindersPreviewRowSchema));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/notifications-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"zod": "^4.0.0",
|
|
44
|
-
"@voyantjs/notifications": "0.
|
|
44
|
+
"@voyantjs/notifications": "0.29.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"typescript": "^6.0.2",
|
|
53
53
|
"vitest": "^4.1.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@voyantjs/notifications": "0.
|
|
56
|
-
"@voyantjs/react": "0.
|
|
55
|
+
"@voyantjs/notifications": "0.29.0",
|
|
56
|
+
"@voyantjs/react": "0.29.0",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.
|
|
60
|
+
"@voyantjs/react": "0.29.0"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|