@voyantjs/notifications-react 0.6.8
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/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +71 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +12 -0
- package/dist/hooks/use-notification-deliveries.d.ts +39 -0
- package/dist/hooks/use-notification-deliveries.d.ts.map +1 -0
- package/dist/hooks/use-notification-deliveries.js +12 -0
- package/dist/hooks/use-notification-delivery.d.ts +32 -0
- package/dist/hooks/use-notification-delivery.d.ts.map +1 -0
- package/dist/hooks/use-notification-delivery.js +12 -0
- package/dist/hooks/use-notification-reminder-rule-mutation.d.ts +54 -0
- package/dist/hooks/use-notification-reminder-rule-mutation.d.ts.map +1 -0
- package/dist/hooks/use-notification-reminder-rule-mutation.js +31 -0
- package/dist/hooks/use-notification-reminder-rule.d.ts +20 -0
- package/dist/hooks/use-notification-reminder-rule.d.ts.map +1 -0
- package/dist/hooks/use-notification-reminder-rule.js +12 -0
- package/dist/hooks/use-notification-reminder-rules.d.ts +26 -0
- package/dist/hooks/use-notification-reminder-rules.d.ts.map +1 -0
- package/dist/hooks/use-notification-reminder-rules.js +12 -0
- package/dist/hooks/use-notification-reminder-runs.d.ts +57 -0
- package/dist/hooks/use-notification-reminder-runs.d.ts.map +1 -0
- package/dist/hooks/use-notification-reminder-runs.js +12 -0
- package/dist/hooks/use-notification-template-authoring.d.ts +5 -0
- package/dist/hooks/use-notification-template-authoring.d.ts.map +1 -0
- package/dist/hooks/use-notification-template-authoring.js +8 -0
- package/dist/hooks/use-notification-template-mutation.d.ts +54 -0
- package/dist/hooks/use-notification-template-mutation.d.ts.map +1 -0
- package/dist/hooks/use-notification-template-mutation.js +31 -0
- package/dist/hooks/use-notification-template-tools.d.ts +80 -0
- package/dist/hooks/use-notification-template-tools.d.ts.map +1 -0
- package/dist/hooks/use-notification-template-tools.js +21 -0
- package/dist/hooks/use-notification-template.d.ts +20 -0
- package/dist/hooks/use-notification-template.d.ts.map +1 -0
- package/dist/hooks/use-notification-template.js +12 -0
- package/dist/hooks/use-notification-templates.d.ts +26 -0
- package/dist/hooks/use-notification-templates.d.ts.map +1 -0
- package/dist/hooks/use-notification-templates.js +12 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +63 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +15 -0
- package/dist/query-options.d.ts +979 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +79 -0
- package/dist/schemas.d.ts +515 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +89 -0
- package/package.json +79 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EACV,gCAAgC,EAChC,mCAAmC,EACnC,kCAAkC,EAClC,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,kBAAkB,CAAA;AAuBzB,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,+BAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY9C;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,EACV,QAAQ,GAAE,8BAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa9C;AAED,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,gCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/C;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaX;AAED,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,mCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYlD;AAED,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaX;AAED,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,kCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYjD;AAED,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaX"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { queryOptions } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "./client.js";
|
|
4
|
+
import { notificationsQueryKeys } from "./query-keys.js";
|
|
5
|
+
import { notificationDeliveryListResponse, notificationDeliverySingleResponse, notificationReminderRuleListResponse, notificationReminderRuleSingleResponse, notificationReminderRunListResponse, notificationReminderRunSingleResponse, notificationTemplateListResponse, notificationTemplateSingleResponse, } from "./schemas.js";
|
|
6
|
+
function toQueryString(filters) {
|
|
7
|
+
const params = new URLSearchParams();
|
|
8
|
+
for (const [key, value] of Object.entries(filters)) {
|
|
9
|
+
if (value === undefined || value === null || value === "" || value === "all")
|
|
10
|
+
continue;
|
|
11
|
+
params.set(key, String(value));
|
|
12
|
+
}
|
|
13
|
+
const qs = params.toString();
|
|
14
|
+
return qs ? `?${qs}` : "";
|
|
15
|
+
}
|
|
16
|
+
export function getNotificationTemplatesQueryOptions(client, options = {}) {
|
|
17
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
18
|
+
return queryOptions({
|
|
19
|
+
queryKey: notificationsQueryKeys.templatesList(filters),
|
|
20
|
+
queryFn: () => fetchWithValidation(`/v1/admin/notifications/templates${toQueryString(filters)}`, notificationTemplateListResponse, client),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export function getNotificationTemplateQueryOptions(client, id, _options = {}) {
|
|
24
|
+
return queryOptions({
|
|
25
|
+
queryKey: notificationsQueryKeys.template(id),
|
|
26
|
+
queryFn: async () => {
|
|
27
|
+
const { data } = await fetchWithValidation(`/v1/admin/notifications/templates/${id}`, notificationTemplateSingleResponse, client);
|
|
28
|
+
return data;
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export function getNotificationDeliveriesQueryOptions(client, options = {}) {
|
|
33
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
34
|
+
return queryOptions({
|
|
35
|
+
queryKey: notificationsQueryKeys.deliveriesList(filters),
|
|
36
|
+
queryFn: () => fetchWithValidation(`/v1/admin/notifications/deliveries${toQueryString(filters)}`, notificationDeliveryListResponse, client),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export function getNotificationDeliveryQueryOptions(client, id) {
|
|
40
|
+
return queryOptions({
|
|
41
|
+
queryKey: notificationsQueryKeys.delivery(id),
|
|
42
|
+
queryFn: async () => {
|
|
43
|
+
const { data } = await fetchWithValidation(`/v1/admin/notifications/deliveries/${id}`, notificationDeliverySingleResponse, client);
|
|
44
|
+
return data;
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export function getNotificationReminderRulesQueryOptions(client, options = {}) {
|
|
49
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
50
|
+
return queryOptions({
|
|
51
|
+
queryKey: notificationsQueryKeys.reminderRulesList(filters),
|
|
52
|
+
queryFn: () => fetchWithValidation(`/v1/admin/notifications/reminder-rules${toQueryString(filters)}`, notificationReminderRuleListResponse, client),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export function getNotificationReminderRuleQueryOptions(client, id) {
|
|
56
|
+
return queryOptions({
|
|
57
|
+
queryKey: notificationsQueryKeys.reminderRule(id),
|
|
58
|
+
queryFn: async () => {
|
|
59
|
+
const { data } = await fetchWithValidation(`/v1/admin/notifications/reminder-rules/${id}`, notificationReminderRuleSingleResponse, client);
|
|
60
|
+
return data;
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export function getNotificationReminderRunsQueryOptions(client, options = {}) {
|
|
65
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
66
|
+
return queryOptions({
|
|
67
|
+
queryKey: notificationsQueryKeys.reminderRunsList(filters),
|
|
68
|
+
queryFn: () => fetchWithValidation(`/v1/admin/notifications/reminder-runs${toQueryString(filters)}`, notificationReminderRunListResponse, client),
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export function getNotificationReminderRunQueryOptions(client, id) {
|
|
72
|
+
return queryOptions({
|
|
73
|
+
queryKey: notificationsQueryKeys.reminderRun(id),
|
|
74
|
+
queryFn: async () => {
|
|
75
|
+
const { data } = await fetchWithValidation(`/v1/admin/notifications/reminder-runs/${id}`, notificationReminderRunSingleResponse, client);
|
|
76
|
+
return data;
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { notificationReminderRunRecordSchema, previewNotificationTemplateResultSchema as notificationTemplatePreviewRecordSchema } from "@voyantjs/notifications";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
4
|
+
data: z.ZodArray<T>;
|
|
5
|
+
total: z.ZodNumber;
|
|
6
|
+
limit: z.ZodNumber;
|
|
7
|
+
offset: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
10
|
+
data: T;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const successEnvelope: z.ZodObject<{
|
|
13
|
+
success: z.ZodBoolean;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const notificationTemplateRecordSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
slug: z.ZodString;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
channel: z.ZodEnum<{
|
|
20
|
+
email: "email";
|
|
21
|
+
sms: "sms";
|
|
22
|
+
}>;
|
|
23
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
24
|
+
status: z.ZodEnum<{
|
|
25
|
+
draft: "draft";
|
|
26
|
+
active: "active";
|
|
27
|
+
archived: "archived";
|
|
28
|
+
}>;
|
|
29
|
+
subjectTemplate: z.ZodNullable<z.ZodString>;
|
|
30
|
+
htmlTemplate: z.ZodNullable<z.ZodString>;
|
|
31
|
+
textTemplate: z.ZodNullable<z.ZodString>;
|
|
32
|
+
fromAddress: z.ZodNullable<z.ZodString>;
|
|
33
|
+
isSystem: z.ZodBoolean;
|
|
34
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
35
|
+
createdAt: z.ZodString;
|
|
36
|
+
updatedAt: z.ZodString;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type NotificationTemplateRecord = z.infer<typeof notificationTemplateRecordSchema>;
|
|
39
|
+
export declare const notificationDeliveryRecordSchema: z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
42
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
43
|
+
targetType: z.ZodEnum<{
|
|
44
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
45
|
+
invoice: "invoice";
|
|
46
|
+
booking: "booking";
|
|
47
|
+
booking_guarantee: "booking_guarantee";
|
|
48
|
+
payment_session: "payment_session";
|
|
49
|
+
person: "person";
|
|
50
|
+
organization: "organization";
|
|
51
|
+
other: "other";
|
|
52
|
+
}>;
|
|
53
|
+
targetId: z.ZodNullable<z.ZodString>;
|
|
54
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
55
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
56
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
57
|
+
invoiceId: z.ZodNullable<z.ZodString>;
|
|
58
|
+
paymentSessionId: z.ZodNullable<z.ZodString>;
|
|
59
|
+
channel: z.ZodEnum<{
|
|
60
|
+
email: "email";
|
|
61
|
+
sms: "sms";
|
|
62
|
+
}>;
|
|
63
|
+
provider: z.ZodString;
|
|
64
|
+
providerMessageId: z.ZodNullable<z.ZodString>;
|
|
65
|
+
status: z.ZodEnum<{
|
|
66
|
+
pending: "pending";
|
|
67
|
+
sent: "sent";
|
|
68
|
+
failed: "failed";
|
|
69
|
+
cancelled: "cancelled";
|
|
70
|
+
}>;
|
|
71
|
+
toAddress: z.ZodString;
|
|
72
|
+
fromAddress: z.ZodNullable<z.ZodString>;
|
|
73
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
74
|
+
htmlBody: z.ZodNullable<z.ZodString>;
|
|
75
|
+
textBody: z.ZodNullable<z.ZodString>;
|
|
76
|
+
payloadData: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
77
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
78
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
79
|
+
scheduledFor: z.ZodNullable<z.ZodString>;
|
|
80
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
81
|
+
failedAt: z.ZodNullable<z.ZodString>;
|
|
82
|
+
createdAt: z.ZodString;
|
|
83
|
+
updatedAt: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type NotificationDeliveryRecord = z.infer<typeof notificationDeliveryRecordSchema>;
|
|
86
|
+
export declare const notificationReminderRuleRecordSchema: z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
slug: z.ZodString;
|
|
89
|
+
name: z.ZodString;
|
|
90
|
+
status: z.ZodEnum<{
|
|
91
|
+
draft: "draft";
|
|
92
|
+
active: "active";
|
|
93
|
+
archived: "archived";
|
|
94
|
+
}>;
|
|
95
|
+
targetType: z.ZodEnum<{
|
|
96
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
97
|
+
invoice: "invoice";
|
|
98
|
+
}>;
|
|
99
|
+
channel: z.ZodEnum<{
|
|
100
|
+
email: "email";
|
|
101
|
+
sms: "sms";
|
|
102
|
+
}>;
|
|
103
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
104
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
105
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
106
|
+
relativeDaysFromDueDate: z.ZodNumber;
|
|
107
|
+
isSystem: z.ZodBoolean;
|
|
108
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
109
|
+
createdAt: z.ZodString;
|
|
110
|
+
updatedAt: z.ZodString;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
export type NotificationReminderRuleRecord = z.infer<typeof notificationReminderRuleRecordSchema>;
|
|
113
|
+
export type NotificationReminderRunRecord = z.infer<typeof notificationReminderRunRecordSchema>;
|
|
114
|
+
export type NotificationTemplatePreviewRecord = z.infer<typeof notificationTemplatePreviewRecordSchema>;
|
|
115
|
+
export declare const notificationTemplateListResponse: z.ZodObject<{
|
|
116
|
+
data: z.ZodArray<z.ZodObject<{
|
|
117
|
+
id: z.ZodString;
|
|
118
|
+
slug: z.ZodString;
|
|
119
|
+
name: z.ZodString;
|
|
120
|
+
channel: z.ZodEnum<{
|
|
121
|
+
email: "email";
|
|
122
|
+
sms: "sms";
|
|
123
|
+
}>;
|
|
124
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
125
|
+
status: z.ZodEnum<{
|
|
126
|
+
draft: "draft";
|
|
127
|
+
active: "active";
|
|
128
|
+
archived: "archived";
|
|
129
|
+
}>;
|
|
130
|
+
subjectTemplate: z.ZodNullable<z.ZodString>;
|
|
131
|
+
htmlTemplate: z.ZodNullable<z.ZodString>;
|
|
132
|
+
textTemplate: z.ZodNullable<z.ZodString>;
|
|
133
|
+
fromAddress: z.ZodNullable<z.ZodString>;
|
|
134
|
+
isSystem: z.ZodBoolean;
|
|
135
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
136
|
+
createdAt: z.ZodString;
|
|
137
|
+
updatedAt: z.ZodString;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
total: z.ZodNumber;
|
|
140
|
+
limit: z.ZodNumber;
|
|
141
|
+
offset: z.ZodNumber;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export declare const notificationTemplateSingleResponse: z.ZodObject<{
|
|
144
|
+
data: z.ZodObject<{
|
|
145
|
+
id: z.ZodString;
|
|
146
|
+
slug: z.ZodString;
|
|
147
|
+
name: z.ZodString;
|
|
148
|
+
channel: z.ZodEnum<{
|
|
149
|
+
email: "email";
|
|
150
|
+
sms: "sms";
|
|
151
|
+
}>;
|
|
152
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
153
|
+
status: z.ZodEnum<{
|
|
154
|
+
draft: "draft";
|
|
155
|
+
active: "active";
|
|
156
|
+
archived: "archived";
|
|
157
|
+
}>;
|
|
158
|
+
subjectTemplate: z.ZodNullable<z.ZodString>;
|
|
159
|
+
htmlTemplate: z.ZodNullable<z.ZodString>;
|
|
160
|
+
textTemplate: z.ZodNullable<z.ZodString>;
|
|
161
|
+
fromAddress: z.ZodNullable<z.ZodString>;
|
|
162
|
+
isSystem: z.ZodBoolean;
|
|
163
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
164
|
+
createdAt: z.ZodString;
|
|
165
|
+
updatedAt: z.ZodString;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
export declare const notificationDeliveryListResponse: z.ZodObject<{
|
|
169
|
+
data: z.ZodArray<z.ZodObject<{
|
|
170
|
+
id: z.ZodString;
|
|
171
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
172
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
173
|
+
targetType: z.ZodEnum<{
|
|
174
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
175
|
+
invoice: "invoice";
|
|
176
|
+
booking: "booking";
|
|
177
|
+
booking_guarantee: "booking_guarantee";
|
|
178
|
+
payment_session: "payment_session";
|
|
179
|
+
person: "person";
|
|
180
|
+
organization: "organization";
|
|
181
|
+
other: "other";
|
|
182
|
+
}>;
|
|
183
|
+
targetId: z.ZodNullable<z.ZodString>;
|
|
184
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
185
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
186
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
187
|
+
invoiceId: z.ZodNullable<z.ZodString>;
|
|
188
|
+
paymentSessionId: z.ZodNullable<z.ZodString>;
|
|
189
|
+
channel: z.ZodEnum<{
|
|
190
|
+
email: "email";
|
|
191
|
+
sms: "sms";
|
|
192
|
+
}>;
|
|
193
|
+
provider: z.ZodString;
|
|
194
|
+
providerMessageId: z.ZodNullable<z.ZodString>;
|
|
195
|
+
status: z.ZodEnum<{
|
|
196
|
+
pending: "pending";
|
|
197
|
+
sent: "sent";
|
|
198
|
+
failed: "failed";
|
|
199
|
+
cancelled: "cancelled";
|
|
200
|
+
}>;
|
|
201
|
+
toAddress: z.ZodString;
|
|
202
|
+
fromAddress: z.ZodNullable<z.ZodString>;
|
|
203
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
204
|
+
htmlBody: z.ZodNullable<z.ZodString>;
|
|
205
|
+
textBody: z.ZodNullable<z.ZodString>;
|
|
206
|
+
payloadData: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
207
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
208
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
209
|
+
scheduledFor: z.ZodNullable<z.ZodString>;
|
|
210
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
211
|
+
failedAt: z.ZodNullable<z.ZodString>;
|
|
212
|
+
createdAt: z.ZodString;
|
|
213
|
+
updatedAt: z.ZodString;
|
|
214
|
+
}, z.core.$strip>>;
|
|
215
|
+
total: z.ZodNumber;
|
|
216
|
+
limit: z.ZodNumber;
|
|
217
|
+
offset: z.ZodNumber;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
export declare const notificationDeliverySingleResponse: z.ZodObject<{
|
|
220
|
+
data: z.ZodObject<{
|
|
221
|
+
id: z.ZodString;
|
|
222
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
223
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
224
|
+
targetType: z.ZodEnum<{
|
|
225
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
226
|
+
invoice: "invoice";
|
|
227
|
+
booking: "booking";
|
|
228
|
+
booking_guarantee: "booking_guarantee";
|
|
229
|
+
payment_session: "payment_session";
|
|
230
|
+
person: "person";
|
|
231
|
+
organization: "organization";
|
|
232
|
+
other: "other";
|
|
233
|
+
}>;
|
|
234
|
+
targetId: z.ZodNullable<z.ZodString>;
|
|
235
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
236
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
237
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
238
|
+
invoiceId: z.ZodNullable<z.ZodString>;
|
|
239
|
+
paymentSessionId: z.ZodNullable<z.ZodString>;
|
|
240
|
+
channel: z.ZodEnum<{
|
|
241
|
+
email: "email";
|
|
242
|
+
sms: "sms";
|
|
243
|
+
}>;
|
|
244
|
+
provider: z.ZodString;
|
|
245
|
+
providerMessageId: z.ZodNullable<z.ZodString>;
|
|
246
|
+
status: z.ZodEnum<{
|
|
247
|
+
pending: "pending";
|
|
248
|
+
sent: "sent";
|
|
249
|
+
failed: "failed";
|
|
250
|
+
cancelled: "cancelled";
|
|
251
|
+
}>;
|
|
252
|
+
toAddress: z.ZodString;
|
|
253
|
+
fromAddress: z.ZodNullable<z.ZodString>;
|
|
254
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
255
|
+
htmlBody: z.ZodNullable<z.ZodString>;
|
|
256
|
+
textBody: z.ZodNullable<z.ZodString>;
|
|
257
|
+
payloadData: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
258
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
259
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
260
|
+
scheduledFor: z.ZodNullable<z.ZodString>;
|
|
261
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
262
|
+
failedAt: z.ZodNullable<z.ZodString>;
|
|
263
|
+
createdAt: z.ZodString;
|
|
264
|
+
updatedAt: z.ZodString;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
}, z.core.$strip>;
|
|
267
|
+
export declare const notificationReminderRuleListResponse: z.ZodObject<{
|
|
268
|
+
data: z.ZodArray<z.ZodObject<{
|
|
269
|
+
id: z.ZodString;
|
|
270
|
+
slug: z.ZodString;
|
|
271
|
+
name: z.ZodString;
|
|
272
|
+
status: z.ZodEnum<{
|
|
273
|
+
draft: "draft";
|
|
274
|
+
active: "active";
|
|
275
|
+
archived: "archived";
|
|
276
|
+
}>;
|
|
277
|
+
targetType: z.ZodEnum<{
|
|
278
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
279
|
+
invoice: "invoice";
|
|
280
|
+
}>;
|
|
281
|
+
channel: z.ZodEnum<{
|
|
282
|
+
email: "email";
|
|
283
|
+
sms: "sms";
|
|
284
|
+
}>;
|
|
285
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
286
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
287
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
288
|
+
relativeDaysFromDueDate: z.ZodNumber;
|
|
289
|
+
isSystem: z.ZodBoolean;
|
|
290
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
291
|
+
createdAt: z.ZodString;
|
|
292
|
+
updatedAt: z.ZodString;
|
|
293
|
+
}, z.core.$strip>>;
|
|
294
|
+
total: z.ZodNumber;
|
|
295
|
+
limit: z.ZodNumber;
|
|
296
|
+
offset: z.ZodNumber;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
export declare const notificationReminderRuleSingleResponse: z.ZodObject<{
|
|
299
|
+
data: z.ZodObject<{
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
slug: z.ZodString;
|
|
302
|
+
name: z.ZodString;
|
|
303
|
+
status: z.ZodEnum<{
|
|
304
|
+
draft: "draft";
|
|
305
|
+
active: "active";
|
|
306
|
+
archived: "archived";
|
|
307
|
+
}>;
|
|
308
|
+
targetType: z.ZodEnum<{
|
|
309
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
310
|
+
invoice: "invoice";
|
|
311
|
+
}>;
|
|
312
|
+
channel: z.ZodEnum<{
|
|
313
|
+
email: "email";
|
|
314
|
+
sms: "sms";
|
|
315
|
+
}>;
|
|
316
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
317
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
318
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
319
|
+
relativeDaysFromDueDate: z.ZodNumber;
|
|
320
|
+
isSystem: z.ZodBoolean;
|
|
321
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
322
|
+
createdAt: z.ZodString;
|
|
323
|
+
updatedAt: z.ZodString;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
export declare const notificationReminderRunListResponse: z.ZodObject<{
|
|
327
|
+
data: z.ZodArray<z.ZodObject<{
|
|
328
|
+
id: z.ZodString;
|
|
329
|
+
reminderRuleId: z.ZodString;
|
|
330
|
+
targetType: z.ZodEnum<{
|
|
331
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
332
|
+
invoice: "invoice";
|
|
333
|
+
}>;
|
|
334
|
+
targetId: z.ZodString;
|
|
335
|
+
dedupeKey: z.ZodString;
|
|
336
|
+
status: z.ZodEnum<{
|
|
337
|
+
sent: "sent";
|
|
338
|
+
failed: "failed";
|
|
339
|
+
queued: "queued";
|
|
340
|
+
processing: "processing";
|
|
341
|
+
skipped: "skipped";
|
|
342
|
+
}>;
|
|
343
|
+
recipient: z.ZodNullable<z.ZodString>;
|
|
344
|
+
scheduledFor: z.ZodString;
|
|
345
|
+
processedAt: z.ZodString;
|
|
346
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
347
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
348
|
+
createdAt: z.ZodString;
|
|
349
|
+
updatedAt: z.ZodString;
|
|
350
|
+
links: z.ZodObject<{
|
|
351
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
352
|
+
bookingPaymentScheduleId: z.ZodNullable<z.ZodString>;
|
|
353
|
+
invoiceId: z.ZodNullable<z.ZodString>;
|
|
354
|
+
paymentSessionId: z.ZodNullable<z.ZodString>;
|
|
355
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
356
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
357
|
+
notificationDeliveryId: z.ZodNullable<z.ZodString>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
reminderRule: z.ZodObject<{
|
|
360
|
+
id: z.ZodString;
|
|
361
|
+
slug: z.ZodString;
|
|
362
|
+
name: z.ZodString;
|
|
363
|
+
status: z.ZodEnum<{
|
|
364
|
+
draft: "draft";
|
|
365
|
+
active: "active";
|
|
366
|
+
archived: "archived";
|
|
367
|
+
}>;
|
|
368
|
+
targetType: z.ZodEnum<{
|
|
369
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
370
|
+
invoice: "invoice";
|
|
371
|
+
}>;
|
|
372
|
+
channel: z.ZodEnum<{
|
|
373
|
+
email: "email";
|
|
374
|
+
sms: "sms";
|
|
375
|
+
}>;
|
|
376
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
377
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
378
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
379
|
+
relativeDaysFromDueDate: z.ZodNumber;
|
|
380
|
+
}, z.core.$strip>;
|
|
381
|
+
delivery: z.ZodNullable<z.ZodObject<{
|
|
382
|
+
id: z.ZodString;
|
|
383
|
+
status: z.ZodEnum<{
|
|
384
|
+
pending: "pending";
|
|
385
|
+
sent: "sent";
|
|
386
|
+
failed: "failed";
|
|
387
|
+
cancelled: "cancelled";
|
|
388
|
+
}>;
|
|
389
|
+
channel: z.ZodEnum<{
|
|
390
|
+
email: "email";
|
|
391
|
+
sms: "sms";
|
|
392
|
+
}>;
|
|
393
|
+
provider: z.ZodString;
|
|
394
|
+
toAddress: z.ZodString;
|
|
395
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
396
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
397
|
+
failedAt: z.ZodNullable<z.ZodString>;
|
|
398
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
399
|
+
}, z.core.$strip>>;
|
|
400
|
+
}, z.core.$strip>>;
|
|
401
|
+
total: z.ZodNumber;
|
|
402
|
+
limit: z.ZodNumber;
|
|
403
|
+
offset: z.ZodNumber;
|
|
404
|
+
}, z.core.$strip>;
|
|
405
|
+
export declare const notificationReminderRunSingleResponse: z.ZodObject<{
|
|
406
|
+
data: z.ZodObject<{
|
|
407
|
+
id: z.ZodString;
|
|
408
|
+
reminderRuleId: z.ZodString;
|
|
409
|
+
targetType: z.ZodEnum<{
|
|
410
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
411
|
+
invoice: "invoice";
|
|
412
|
+
}>;
|
|
413
|
+
targetId: z.ZodString;
|
|
414
|
+
dedupeKey: z.ZodString;
|
|
415
|
+
status: z.ZodEnum<{
|
|
416
|
+
sent: "sent";
|
|
417
|
+
failed: "failed";
|
|
418
|
+
queued: "queued";
|
|
419
|
+
processing: "processing";
|
|
420
|
+
skipped: "skipped";
|
|
421
|
+
}>;
|
|
422
|
+
recipient: z.ZodNullable<z.ZodString>;
|
|
423
|
+
scheduledFor: z.ZodString;
|
|
424
|
+
processedAt: z.ZodString;
|
|
425
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
426
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
427
|
+
createdAt: z.ZodString;
|
|
428
|
+
updatedAt: z.ZodString;
|
|
429
|
+
links: z.ZodObject<{
|
|
430
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
431
|
+
bookingPaymentScheduleId: z.ZodNullable<z.ZodString>;
|
|
432
|
+
invoiceId: z.ZodNullable<z.ZodString>;
|
|
433
|
+
paymentSessionId: z.ZodNullable<z.ZodString>;
|
|
434
|
+
personId: z.ZodNullable<z.ZodString>;
|
|
435
|
+
organizationId: z.ZodNullable<z.ZodString>;
|
|
436
|
+
notificationDeliveryId: z.ZodNullable<z.ZodString>;
|
|
437
|
+
}, z.core.$strip>;
|
|
438
|
+
reminderRule: z.ZodObject<{
|
|
439
|
+
id: z.ZodString;
|
|
440
|
+
slug: z.ZodString;
|
|
441
|
+
name: z.ZodString;
|
|
442
|
+
status: z.ZodEnum<{
|
|
443
|
+
draft: "draft";
|
|
444
|
+
active: "active";
|
|
445
|
+
archived: "archived";
|
|
446
|
+
}>;
|
|
447
|
+
targetType: z.ZodEnum<{
|
|
448
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
449
|
+
invoice: "invoice";
|
|
450
|
+
}>;
|
|
451
|
+
channel: z.ZodEnum<{
|
|
452
|
+
email: "email";
|
|
453
|
+
sms: "sms";
|
|
454
|
+
}>;
|
|
455
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
456
|
+
templateId: z.ZodNullable<z.ZodString>;
|
|
457
|
+
templateSlug: z.ZodNullable<z.ZodString>;
|
|
458
|
+
relativeDaysFromDueDate: z.ZodNumber;
|
|
459
|
+
}, z.core.$strip>;
|
|
460
|
+
delivery: z.ZodNullable<z.ZodObject<{
|
|
461
|
+
id: z.ZodString;
|
|
462
|
+
status: z.ZodEnum<{
|
|
463
|
+
pending: "pending";
|
|
464
|
+
sent: "sent";
|
|
465
|
+
failed: "failed";
|
|
466
|
+
cancelled: "cancelled";
|
|
467
|
+
}>;
|
|
468
|
+
channel: z.ZodEnum<{
|
|
469
|
+
email: "email";
|
|
470
|
+
sms: "sms";
|
|
471
|
+
}>;
|
|
472
|
+
provider: z.ZodString;
|
|
473
|
+
toAddress: z.ZodString;
|
|
474
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
475
|
+
sentAt: z.ZodNullable<z.ZodString>;
|
|
476
|
+
failedAt: z.ZodNullable<z.ZodString>;
|
|
477
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
478
|
+
}, z.core.$strip>>;
|
|
479
|
+
}, z.core.$strip>;
|
|
480
|
+
}, z.core.$strip>;
|
|
481
|
+
export declare const notificationTemplatePreviewResponse: z.ZodObject<{
|
|
482
|
+
data: z.ZodObject<{
|
|
483
|
+
channel: z.ZodEnum<{
|
|
484
|
+
email: "email";
|
|
485
|
+
sms: "sms";
|
|
486
|
+
}>;
|
|
487
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
488
|
+
fromAddress: z.ZodNullable<z.ZodString>;
|
|
489
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
490
|
+
html: z.ZodNullable<z.ZodString>;
|
|
491
|
+
text: z.ZodNullable<z.ZodString>;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
}, z.core.$strip>;
|
|
494
|
+
export declare const notificationProviderOptionSchema: z.ZodEnum<{
|
|
495
|
+
automatic: "automatic";
|
|
496
|
+
resend: "resend";
|
|
497
|
+
twilio: "twilio";
|
|
498
|
+
}>;
|
|
499
|
+
export declare const notificationTemplateEditorChannelSchema: z.ZodEnum<{
|
|
500
|
+
email: "email";
|
|
501
|
+
sms: "sms";
|
|
502
|
+
}>;
|
|
503
|
+
export declare const notificationReminderRuleStatusFilterSchema: z.ZodEnum<{
|
|
504
|
+
draft: "draft";
|
|
505
|
+
active: "active";
|
|
506
|
+
archived: "archived";
|
|
507
|
+
}>;
|
|
508
|
+
export declare const notificationReminderRunStatusFilterSchema: z.ZodEnum<{
|
|
509
|
+
sent: "sent";
|
|
510
|
+
failed: "failed";
|
|
511
|
+
queued: "queued";
|
|
512
|
+
processing: "processing";
|
|
513
|
+
skipped: "skipped";
|
|
514
|
+
}>;
|
|
515
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +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,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAC3F,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;iBAe3C,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4B3C,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAEzF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;iBAe/C,CAAA;AAEF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA;AACjG,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAC/F,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAA;AAED,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAsD,CAAA;AACnG,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;iBAAmD,CAAA;AAClG,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAsD,CAAA;AACnG,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAmD,CAAA;AAClG,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEhD,CAAA;AACD,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAElD,CAAA;AACD,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK9C,CAAA;AACF,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEjD,CAAA;AACD,eAAO,MAAM,mCAAmC;;;;;;;;;;;;iBAE/C,CAAA;AAED,eAAO,MAAM,gCAAgC;;;;EAA4C,CAAA;AACzF,eAAO,MAAM,uCAAuC;;;EAA4B,CAAA;AAChF,eAAO,MAAM,0CAA0C;;;;EAAmC,CAAA;AAC1F,eAAO,MAAM,yCAAyC;;;;;;EAAsC,CAAA"}
|