@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/query-keys.js
CHANGED
|
@@ -9,7 +9,11 @@ export const notificationsQueryKeys = {
|
|
|
9
9
|
reminderRules: () => [...notificationsQueryKeys.all, "reminder-rules"],
|
|
10
10
|
reminderRulesList: (filters) => [...notificationsQueryKeys.reminderRules(), filters],
|
|
11
11
|
reminderRule: (id) => [...notificationsQueryKeys.reminderRules(), id],
|
|
12
|
+
reminderRuleStages: (reminderRuleId) => [...notificationsQueryKeys.reminderRule(reminderRuleId), "stages"],
|
|
13
|
+
reminderStageChannels: (stageId) => [...notificationsQueryKeys.all, "stage-channels", stageId],
|
|
12
14
|
reminderRuns: () => [...notificationsQueryKeys.all, "reminder-runs"],
|
|
13
15
|
reminderRunsList: (filters) => [...notificationsQueryKeys.reminderRuns(), filters],
|
|
14
16
|
reminderRun: (id) => [...notificationsQueryKeys.reminderRuns(), id],
|
|
17
|
+
remindersPreview: (filters) => [...notificationsQueryKeys.all, "preview", filters],
|
|
18
|
+
notificationSettings: () => [...notificationsQueryKeys.all, "settings"],
|
|
15
19
|
};
|
package/dist/query-options.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type FetchWithValidationOptions } from "./client.js";
|
|
2
2
|
import type { UseNotificationDeliveriesOptions, UseNotificationReminderRulesOptions, UseNotificationReminderRunsOptions, UseNotificationTemplateOptions, UseNotificationTemplatesOptions } from "./hooks/index.js";
|
|
3
|
+
import { type RemindersPreviewFilters } from "./query-keys.js";
|
|
3
4
|
export declare function getNotificationTemplatesQueryOptions(client: FetchWithValidationOptions, options?: UseNotificationTemplatesOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
4
5
|
data: {
|
|
5
6
|
id: string;
|
|
@@ -427,7 +428,6 @@ export declare function getNotificationReminderRulesQueryOptions(client: FetchWi
|
|
|
427
428
|
provider: string | null;
|
|
428
429
|
templateId: string | null;
|
|
429
430
|
templateSlug: string | null;
|
|
430
|
-
relativeDaysFromDueDate: number;
|
|
431
431
|
isSystem: boolean;
|
|
432
432
|
metadata: Record<string, unknown> | null;
|
|
433
433
|
createdAt: string;
|
|
@@ -447,7 +447,6 @@ export declare function getNotificationReminderRulesQueryOptions(client: FetchWi
|
|
|
447
447
|
provider: string | null;
|
|
448
448
|
templateId: string | null;
|
|
449
449
|
templateSlug: string | null;
|
|
450
|
-
relativeDaysFromDueDate: number;
|
|
451
450
|
isSystem: boolean;
|
|
452
451
|
metadata: Record<string, unknown> | null;
|
|
453
452
|
createdAt: string;
|
|
@@ -468,7 +467,6 @@ export declare function getNotificationReminderRulesQueryOptions(client: FetchWi
|
|
|
468
467
|
provider: string | null;
|
|
469
468
|
templateId: string | null;
|
|
470
469
|
templateSlug: string | null;
|
|
471
|
-
relativeDaysFromDueDate: number;
|
|
472
470
|
isSystem: boolean;
|
|
473
471
|
metadata: Record<string, unknown> | null;
|
|
474
472
|
createdAt: string;
|
|
@@ -491,7 +489,6 @@ export declare function getNotificationReminderRulesQueryOptions(client: FetchWi
|
|
|
491
489
|
provider: string | null;
|
|
492
490
|
templateId: string | null;
|
|
493
491
|
templateSlug: string | null;
|
|
494
|
-
relativeDaysFromDueDate: number;
|
|
495
492
|
isSystem: boolean;
|
|
496
493
|
metadata: Record<string, unknown> | null;
|
|
497
494
|
createdAt: string;
|
|
@@ -514,7 +511,6 @@ export declare function getNotificationReminderRuleQueryOptions(client: FetchWit
|
|
|
514
511
|
provider: string | null;
|
|
515
512
|
templateId: string | null;
|
|
516
513
|
templateSlug: string | null;
|
|
517
|
-
relativeDaysFromDueDate: number;
|
|
518
514
|
isSystem: boolean;
|
|
519
515
|
metadata: Record<string, unknown> | null;
|
|
520
516
|
createdAt: string;
|
|
@@ -529,7 +525,6 @@ export declare function getNotificationReminderRuleQueryOptions(client: FetchWit
|
|
|
529
525
|
provider: string | null;
|
|
530
526
|
templateId: string | null;
|
|
531
527
|
templateSlug: string | null;
|
|
532
|
-
relativeDaysFromDueDate: number;
|
|
533
528
|
isSystem: boolean;
|
|
534
529
|
metadata: Record<string, unknown> | null;
|
|
535
530
|
createdAt: string;
|
|
@@ -545,7 +540,6 @@ export declare function getNotificationReminderRuleQueryOptions(client: FetchWit
|
|
|
545
540
|
provider: string | null;
|
|
546
541
|
templateId: string | null;
|
|
547
542
|
templateSlug: string | null;
|
|
548
|
-
relativeDaysFromDueDate: number;
|
|
549
543
|
isSystem: boolean;
|
|
550
544
|
metadata: Record<string, unknown> | null;
|
|
551
545
|
createdAt: string;
|
|
@@ -563,7 +557,6 @@ export declare function getNotificationReminderRuleQueryOptions(client: FetchWit
|
|
|
563
557
|
provider: string | null;
|
|
564
558
|
templateId: string | null;
|
|
565
559
|
templateSlug: string | null;
|
|
566
|
-
relativeDaysFromDueDate: number;
|
|
567
560
|
isSystem: boolean;
|
|
568
561
|
metadata: Record<string, unknown> | null;
|
|
569
562
|
createdAt: string;
|
|
@@ -606,7 +599,6 @@ export declare function getNotificationReminderRunsQueryOptions(client: FetchWit
|
|
|
606
599
|
provider: string | null;
|
|
607
600
|
templateId: string | null;
|
|
608
601
|
templateSlug: string | null;
|
|
609
|
-
relativeDaysFromDueDate: number;
|
|
610
602
|
};
|
|
611
603
|
delivery: {
|
|
612
604
|
id: string;
|
|
@@ -657,7 +649,6 @@ export declare function getNotificationReminderRunsQueryOptions(client: FetchWit
|
|
|
657
649
|
provider: string | null;
|
|
658
650
|
templateId: string | null;
|
|
659
651
|
templateSlug: string | null;
|
|
660
|
-
relativeDaysFromDueDate: number;
|
|
661
652
|
};
|
|
662
653
|
delivery: {
|
|
663
654
|
id: string;
|
|
@@ -709,7 +700,6 @@ export declare function getNotificationReminderRunsQueryOptions(client: FetchWit
|
|
|
709
700
|
provider: string | null;
|
|
710
701
|
templateId: string | null;
|
|
711
702
|
templateSlug: string | null;
|
|
712
|
-
relativeDaysFromDueDate: number;
|
|
713
703
|
};
|
|
714
704
|
delivery: {
|
|
715
705
|
id: string;
|
|
@@ -763,7 +753,6 @@ export declare function getNotificationReminderRunsQueryOptions(client: FetchWit
|
|
|
763
753
|
provider: string | null;
|
|
764
754
|
templateId: string | null;
|
|
765
755
|
templateSlug: string | null;
|
|
766
|
-
relativeDaysFromDueDate: number;
|
|
767
756
|
};
|
|
768
757
|
delivery: {
|
|
769
758
|
id: string;
|
|
@@ -817,7 +806,6 @@ export declare function getNotificationReminderRunQueryOptions(client: FetchWith
|
|
|
817
806
|
provider: string | null;
|
|
818
807
|
templateId: string | null;
|
|
819
808
|
templateSlug: string | null;
|
|
820
|
-
relativeDaysFromDueDate: number;
|
|
821
809
|
};
|
|
822
810
|
delivery: {
|
|
823
811
|
id: string;
|
|
@@ -863,7 +851,6 @@ export declare function getNotificationReminderRunQueryOptions(client: FetchWith
|
|
|
863
851
|
provider: string | null;
|
|
864
852
|
templateId: string | null;
|
|
865
853
|
templateSlug: string | null;
|
|
866
|
-
relativeDaysFromDueDate: number;
|
|
867
854
|
};
|
|
868
855
|
delivery: {
|
|
869
856
|
id: string;
|
|
@@ -910,7 +897,6 @@ export declare function getNotificationReminderRunQueryOptions(client: FetchWith
|
|
|
910
897
|
provider: string | null;
|
|
911
898
|
templateId: string | null;
|
|
912
899
|
templateSlug: string | null;
|
|
913
|
-
relativeDaysFromDueDate: number;
|
|
914
900
|
};
|
|
915
901
|
delivery: {
|
|
916
902
|
id: string;
|
|
@@ -959,7 +945,6 @@ export declare function getNotificationReminderRunQueryOptions(client: FetchWith
|
|
|
959
945
|
provider: string | null;
|
|
960
946
|
templateId: string | null;
|
|
961
947
|
templateSlug: string | null;
|
|
962
|
-
relativeDaysFromDueDate: number;
|
|
963
948
|
};
|
|
964
949
|
delivery: {
|
|
965
950
|
id: string;
|
|
@@ -976,4 +961,292 @@ export declare function getNotificationReminderRunQueryOptions(client: FetchWith
|
|
|
976
961
|
[dataTagErrorSymbol]: Error;
|
|
977
962
|
};
|
|
978
963
|
};
|
|
964
|
+
export declare function getReminderRuleStagesQueryOptions(client: FetchWithValidationOptions, reminderRuleId: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
965
|
+
id: string;
|
|
966
|
+
reminderRuleId: string;
|
|
967
|
+
orderIndex: number;
|
|
968
|
+
name: string | null;
|
|
969
|
+
anchor: "due_date" | "booking_created_at" | "departure_date" | "invoice_issued_at" | "last_send_at";
|
|
970
|
+
windowStartDays: number;
|
|
971
|
+
windowEndDays: number;
|
|
972
|
+
cadenceKind: "once" | "every_n_days" | "escalating";
|
|
973
|
+
cadenceEveryDays: number | null;
|
|
974
|
+
cadenceIntervals: {
|
|
975
|
+
repeatEveryDays: number;
|
|
976
|
+
whenDaysUntilDueGT?: number | null | undefined;
|
|
977
|
+
whenDaysUntilDueLT?: number | null | undefined;
|
|
978
|
+
}[] | null;
|
|
979
|
+
maxSendsInStage: number | null;
|
|
980
|
+
respectQuietHours: boolean;
|
|
981
|
+
metadata: Record<string, unknown> | null;
|
|
982
|
+
createdAt: string;
|
|
983
|
+
updatedAt: string;
|
|
984
|
+
}[], Error, {
|
|
985
|
+
id: string;
|
|
986
|
+
reminderRuleId: string;
|
|
987
|
+
orderIndex: number;
|
|
988
|
+
name: string | null;
|
|
989
|
+
anchor: "due_date" | "booking_created_at" | "departure_date" | "invoice_issued_at" | "last_send_at";
|
|
990
|
+
windowStartDays: number;
|
|
991
|
+
windowEndDays: number;
|
|
992
|
+
cadenceKind: "once" | "every_n_days" | "escalating";
|
|
993
|
+
cadenceEveryDays: number | null;
|
|
994
|
+
cadenceIntervals: {
|
|
995
|
+
repeatEveryDays: number;
|
|
996
|
+
whenDaysUntilDueGT?: number | null | undefined;
|
|
997
|
+
whenDaysUntilDueLT?: number | null | undefined;
|
|
998
|
+
}[] | null;
|
|
999
|
+
maxSendsInStage: number | null;
|
|
1000
|
+
respectQuietHours: boolean;
|
|
1001
|
+
metadata: Record<string, unknown> | null;
|
|
1002
|
+
createdAt: string;
|
|
1003
|
+
updatedAt: string;
|
|
1004
|
+
}[], readonly ["notifications", "reminder-rules", string, "stages"]>, "queryFn"> & {
|
|
1005
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
1006
|
+
id: string;
|
|
1007
|
+
reminderRuleId: string;
|
|
1008
|
+
orderIndex: number;
|
|
1009
|
+
name: string | null;
|
|
1010
|
+
anchor: "due_date" | "booking_created_at" | "departure_date" | "invoice_issued_at" | "last_send_at";
|
|
1011
|
+
windowStartDays: number;
|
|
1012
|
+
windowEndDays: number;
|
|
1013
|
+
cadenceKind: "once" | "every_n_days" | "escalating";
|
|
1014
|
+
cadenceEveryDays: number | null;
|
|
1015
|
+
cadenceIntervals: {
|
|
1016
|
+
repeatEveryDays: number;
|
|
1017
|
+
whenDaysUntilDueGT?: number | null | undefined;
|
|
1018
|
+
whenDaysUntilDueLT?: number | null | undefined;
|
|
1019
|
+
}[] | null;
|
|
1020
|
+
maxSendsInStage: number | null;
|
|
1021
|
+
respectQuietHours: boolean;
|
|
1022
|
+
metadata: Record<string, unknown> | null;
|
|
1023
|
+
createdAt: string;
|
|
1024
|
+
updatedAt: string;
|
|
1025
|
+
}[], readonly ["notifications", "reminder-rules", string, "stages"], never> | undefined;
|
|
1026
|
+
} & {
|
|
1027
|
+
queryKey: readonly ["notifications", "reminder-rules", string, "stages"] & {
|
|
1028
|
+
[dataTagSymbol]: {
|
|
1029
|
+
id: string;
|
|
1030
|
+
reminderRuleId: string;
|
|
1031
|
+
orderIndex: number;
|
|
1032
|
+
name: string | null;
|
|
1033
|
+
anchor: "due_date" | "booking_created_at" | "departure_date" | "invoice_issued_at" | "last_send_at";
|
|
1034
|
+
windowStartDays: number;
|
|
1035
|
+
windowEndDays: number;
|
|
1036
|
+
cadenceKind: "once" | "every_n_days" | "escalating";
|
|
1037
|
+
cadenceEveryDays: number | null;
|
|
1038
|
+
cadenceIntervals: {
|
|
1039
|
+
repeatEveryDays: number;
|
|
1040
|
+
whenDaysUntilDueGT?: number | null | undefined;
|
|
1041
|
+
whenDaysUntilDueLT?: number | null | undefined;
|
|
1042
|
+
}[] | null;
|
|
1043
|
+
maxSendsInStage: number | null;
|
|
1044
|
+
respectQuietHours: boolean;
|
|
1045
|
+
metadata: Record<string, unknown> | null;
|
|
1046
|
+
createdAt: string;
|
|
1047
|
+
updatedAt: string;
|
|
1048
|
+
}[];
|
|
1049
|
+
[dataTagErrorSymbol]: Error;
|
|
1050
|
+
};
|
|
1051
|
+
};
|
|
1052
|
+
export declare function getReminderStageChannelsQueryOptions(client: FetchWithValidationOptions, reminderRuleId: string, stageId: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
1053
|
+
id: string;
|
|
1054
|
+
stageId: string;
|
|
1055
|
+
orderIndex: number;
|
|
1056
|
+
channel: "email" | "sms";
|
|
1057
|
+
provider: string | null;
|
|
1058
|
+
templateId: string | null;
|
|
1059
|
+
templateSlug: string | null;
|
|
1060
|
+
recipientKind: "primary" | "cc" | "bcc";
|
|
1061
|
+
recipientRole: string | null;
|
|
1062
|
+
metadata: Record<string, unknown> | null;
|
|
1063
|
+
createdAt: string;
|
|
1064
|
+
updatedAt: string;
|
|
1065
|
+
}[], Error, {
|
|
1066
|
+
id: string;
|
|
1067
|
+
stageId: string;
|
|
1068
|
+
orderIndex: number;
|
|
1069
|
+
channel: "email" | "sms";
|
|
1070
|
+
provider: string | null;
|
|
1071
|
+
templateId: string | null;
|
|
1072
|
+
templateSlug: string | null;
|
|
1073
|
+
recipientKind: "primary" | "cc" | "bcc";
|
|
1074
|
+
recipientRole: string | null;
|
|
1075
|
+
metadata: Record<string, unknown> | null;
|
|
1076
|
+
createdAt: string;
|
|
1077
|
+
updatedAt: string;
|
|
1078
|
+
}[], readonly ["notifications", "stage-channels", string]>, "queryFn"> & {
|
|
1079
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
1080
|
+
id: string;
|
|
1081
|
+
stageId: string;
|
|
1082
|
+
orderIndex: number;
|
|
1083
|
+
channel: "email" | "sms";
|
|
1084
|
+
provider: string | null;
|
|
1085
|
+
templateId: string | null;
|
|
1086
|
+
templateSlug: string | null;
|
|
1087
|
+
recipientKind: "primary" | "cc" | "bcc";
|
|
1088
|
+
recipientRole: string | null;
|
|
1089
|
+
metadata: Record<string, unknown> | null;
|
|
1090
|
+
createdAt: string;
|
|
1091
|
+
updatedAt: string;
|
|
1092
|
+
}[], readonly ["notifications", "stage-channels", string], never> | undefined;
|
|
1093
|
+
} & {
|
|
1094
|
+
queryKey: readonly ["notifications", "stage-channels", string] & {
|
|
1095
|
+
[dataTagSymbol]: {
|
|
1096
|
+
id: string;
|
|
1097
|
+
stageId: string;
|
|
1098
|
+
orderIndex: number;
|
|
1099
|
+
channel: "email" | "sms";
|
|
1100
|
+
provider: string | null;
|
|
1101
|
+
templateId: string | null;
|
|
1102
|
+
templateSlug: string | null;
|
|
1103
|
+
recipientKind: "primary" | "cc" | "bcc";
|
|
1104
|
+
recipientRole: string | null;
|
|
1105
|
+
metadata: Record<string, unknown> | null;
|
|
1106
|
+
createdAt: string;
|
|
1107
|
+
updatedAt: string;
|
|
1108
|
+
}[];
|
|
1109
|
+
[dataTagErrorSymbol]: Error;
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
export declare function getNotificationSettingsQueryOptions(client: FetchWithValidationOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
1113
|
+
id: string;
|
|
1114
|
+
scope: string;
|
|
1115
|
+
quietHoursLocal: {
|
|
1116
|
+
start: string;
|
|
1117
|
+
end: string;
|
|
1118
|
+
tz: string;
|
|
1119
|
+
} | null;
|
|
1120
|
+
blackoutDates: string[] | null;
|
|
1121
|
+
skipWeekends: boolean;
|
|
1122
|
+
holidayCalendar: string | null;
|
|
1123
|
+
recipientRateLimitPerDay: number | null;
|
|
1124
|
+
suppressionWindowHours: number;
|
|
1125
|
+
metadata: Record<string, unknown> | null;
|
|
1126
|
+
createdAt: string;
|
|
1127
|
+
updatedAt: string;
|
|
1128
|
+
}, Error, {
|
|
1129
|
+
id: string;
|
|
1130
|
+
scope: string;
|
|
1131
|
+
quietHoursLocal: {
|
|
1132
|
+
start: string;
|
|
1133
|
+
end: string;
|
|
1134
|
+
tz: string;
|
|
1135
|
+
} | null;
|
|
1136
|
+
blackoutDates: string[] | null;
|
|
1137
|
+
skipWeekends: boolean;
|
|
1138
|
+
holidayCalendar: string | null;
|
|
1139
|
+
recipientRateLimitPerDay: number | null;
|
|
1140
|
+
suppressionWindowHours: number;
|
|
1141
|
+
metadata: Record<string, unknown> | null;
|
|
1142
|
+
createdAt: string;
|
|
1143
|
+
updatedAt: string;
|
|
1144
|
+
}, readonly ["notifications", "settings"]>, "queryFn"> & {
|
|
1145
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
1146
|
+
id: string;
|
|
1147
|
+
scope: string;
|
|
1148
|
+
quietHoursLocal: {
|
|
1149
|
+
start: string;
|
|
1150
|
+
end: string;
|
|
1151
|
+
tz: string;
|
|
1152
|
+
} | null;
|
|
1153
|
+
blackoutDates: string[] | null;
|
|
1154
|
+
skipWeekends: boolean;
|
|
1155
|
+
holidayCalendar: string | null;
|
|
1156
|
+
recipientRateLimitPerDay: number | null;
|
|
1157
|
+
suppressionWindowHours: number;
|
|
1158
|
+
metadata: Record<string, unknown> | null;
|
|
1159
|
+
createdAt: string;
|
|
1160
|
+
updatedAt: string;
|
|
1161
|
+
}, readonly ["notifications", "settings"], never> | undefined;
|
|
1162
|
+
} & {
|
|
1163
|
+
queryKey: readonly ["notifications", "settings"] & {
|
|
1164
|
+
[dataTagSymbol]: {
|
|
1165
|
+
id: string;
|
|
1166
|
+
scope: string;
|
|
1167
|
+
quietHoursLocal: {
|
|
1168
|
+
start: string;
|
|
1169
|
+
end: string;
|
|
1170
|
+
tz: string;
|
|
1171
|
+
} | null;
|
|
1172
|
+
blackoutDates: string[] | null;
|
|
1173
|
+
skipWeekends: boolean;
|
|
1174
|
+
holidayCalendar: string | null;
|
|
1175
|
+
recipientRateLimitPerDay: number | null;
|
|
1176
|
+
suppressionWindowHours: number;
|
|
1177
|
+
metadata: Record<string, unknown> | null;
|
|
1178
|
+
createdAt: string;
|
|
1179
|
+
updatedAt: string;
|
|
1180
|
+
};
|
|
1181
|
+
[dataTagErrorSymbol]: Error;
|
|
1182
|
+
};
|
|
1183
|
+
};
|
|
1184
|
+
export declare function getRemindersPreviewQueryOptions(client: FetchWithValidationOptions, filters?: RemindersPreviewFilters): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
1185
|
+
ruleId: string;
|
|
1186
|
+
ruleName: string;
|
|
1187
|
+
ruleSlug: string;
|
|
1188
|
+
targetType: string;
|
|
1189
|
+
targetId: string;
|
|
1190
|
+
bookingId: string | null;
|
|
1191
|
+
stageId: string;
|
|
1192
|
+
stageName: string | null;
|
|
1193
|
+
stageOrderIndex: number;
|
|
1194
|
+
anchor: string;
|
|
1195
|
+
anchorDate: string;
|
|
1196
|
+
scheduledAt: string;
|
|
1197
|
+
sendCountAtFire: number;
|
|
1198
|
+
reasoning: string;
|
|
1199
|
+
}[], Error, {
|
|
1200
|
+
ruleId: string;
|
|
1201
|
+
ruleName: string;
|
|
1202
|
+
ruleSlug: string;
|
|
1203
|
+
targetType: string;
|
|
1204
|
+
targetId: string;
|
|
1205
|
+
bookingId: string | null;
|
|
1206
|
+
stageId: string;
|
|
1207
|
+
stageName: string | null;
|
|
1208
|
+
stageOrderIndex: number;
|
|
1209
|
+
anchor: string;
|
|
1210
|
+
anchorDate: string;
|
|
1211
|
+
scheduledAt: string;
|
|
1212
|
+
sendCountAtFire: number;
|
|
1213
|
+
reasoning: string;
|
|
1214
|
+
}[], readonly ["notifications", "preview", RemindersPreviewFilters]>, "queryFn"> & {
|
|
1215
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
1216
|
+
ruleId: string;
|
|
1217
|
+
ruleName: string;
|
|
1218
|
+
ruleSlug: string;
|
|
1219
|
+
targetType: string;
|
|
1220
|
+
targetId: string;
|
|
1221
|
+
bookingId: string | null;
|
|
1222
|
+
stageId: string;
|
|
1223
|
+
stageName: string | null;
|
|
1224
|
+
stageOrderIndex: number;
|
|
1225
|
+
anchor: string;
|
|
1226
|
+
anchorDate: string;
|
|
1227
|
+
scheduledAt: string;
|
|
1228
|
+
sendCountAtFire: number;
|
|
1229
|
+
reasoning: string;
|
|
1230
|
+
}[], readonly ["notifications", "preview", RemindersPreviewFilters], never> | undefined;
|
|
1231
|
+
} & {
|
|
1232
|
+
queryKey: readonly ["notifications", "preview", RemindersPreviewFilters] & {
|
|
1233
|
+
[dataTagSymbol]: {
|
|
1234
|
+
ruleId: string;
|
|
1235
|
+
ruleName: string;
|
|
1236
|
+
ruleSlug: string;
|
|
1237
|
+
targetType: string;
|
|
1238
|
+
targetId: string;
|
|
1239
|
+
bookingId: string | null;
|
|
1240
|
+
stageId: string;
|
|
1241
|
+
stageName: string | null;
|
|
1242
|
+
stageOrderIndex: number;
|
|
1243
|
+
anchor: string;
|
|
1244
|
+
anchorDate: string;
|
|
1245
|
+
scheduledAt: string;
|
|
1246
|
+
sendCountAtFire: number;
|
|
1247
|
+
reasoning: string;
|
|
1248
|
+
}[];
|
|
1249
|
+
[dataTagErrorSymbol]: Error;
|
|
1250
|
+
};
|
|
1251
|
+
};
|
|
979
1252
|
//# sourceMappingURL=query-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aA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AAE,0BAA0B,EAClC,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAahB;AAED,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYrF;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,uBAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBtC"}
|
package/dist/query-options.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { queryOptions } from "@tanstack/react-query";
|
|
3
3
|
import { fetchWithValidation } from "./client.js";
|
|
4
4
|
import { notificationsQueryKeys } from "./query-keys.js";
|
|
5
|
-
import { notificationDeliveryListResponse, notificationDeliverySingleResponse, notificationReminderRuleListResponse, notificationReminderRuleSingleResponse, notificationReminderRunListResponse, notificationReminderRunSingleResponse, notificationTemplateListResponse, notificationTemplateSingleResponse, } from "./schemas.js";
|
|
5
|
+
import { notificationDeliveryListResponse, notificationDeliverySingleResponse, notificationReminderRuleListResponse, notificationReminderRuleSingleResponse, notificationReminderRunListResponse, notificationReminderRunSingleResponse, notificationSettingsResponse, notificationTemplateListResponse, notificationTemplateSingleResponse, reminderRuleStagesListResponse, reminderStageChannelsListResponse, remindersPreviewResponse, } from "./schemas.js";
|
|
6
6
|
function toQueryString(filters) {
|
|
7
7
|
const params = new URLSearchParams();
|
|
8
8
|
for (const [key, value] of Object.entries(filters)) {
|
|
@@ -77,3 +77,44 @@ export function getNotificationReminderRunQueryOptions(client, id) {
|
|
|
77
77
|
},
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
export function getReminderRuleStagesQueryOptions(client, reminderRuleId) {
|
|
81
|
+
return queryOptions({
|
|
82
|
+
queryKey: notificationsQueryKeys.reminderRuleStages(reminderRuleId),
|
|
83
|
+
queryFn: async () => {
|
|
84
|
+
const { data } = await fetchWithValidation(`/v1/admin/notifications/reminder-rules/${reminderRuleId}/stages`, reminderRuleStagesListResponse, client);
|
|
85
|
+
return data;
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export function getReminderStageChannelsQueryOptions(client, reminderRuleId, stageId) {
|
|
90
|
+
return queryOptions({
|
|
91
|
+
queryKey: notificationsQueryKeys.reminderStageChannels(stageId),
|
|
92
|
+
queryFn: async () => {
|
|
93
|
+
const { data } = await fetchWithValidation(`/v1/admin/notifications/reminder-rules/${reminderRuleId}/stages/${stageId}/channels`, reminderStageChannelsListResponse, client);
|
|
94
|
+
return data;
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export function getNotificationSettingsQueryOptions(client) {
|
|
99
|
+
return queryOptions({
|
|
100
|
+
queryKey: notificationsQueryKeys.notificationSettings(),
|
|
101
|
+
queryFn: async () => {
|
|
102
|
+
const { data } = await fetchWithValidation(`/v1/admin/notifications/notification-settings`, notificationSettingsResponse, client);
|
|
103
|
+
return data;
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
export function getRemindersPreviewQueryOptions(client, filters = {}) {
|
|
108
|
+
const queryParams = {
|
|
109
|
+
date: filters.date,
|
|
110
|
+
ruleId: filters.ruleId,
|
|
111
|
+
targetId: filters.targetId,
|
|
112
|
+
};
|
|
113
|
+
return queryOptions({
|
|
114
|
+
queryKey: notificationsQueryKeys.remindersPreview(filters),
|
|
115
|
+
queryFn: async () => {
|
|
116
|
+
const { data } = await fetchWithValidation(`/v1/admin/notifications/reminders/preview${toQueryString(queryParams)}`, remindersPreviewResponse, client);
|
|
117
|
+
return data;
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
}
|