Feature/field prefills (#1249)
* Needs more testing, but looks functional * Add metadata feature to booking create payload * Forward URL parameters given in link * Moved stringifying of custom inputs to backend
This commit is contained in:
1 parent
8d1d3fcc7a
commit
8c1b69cc0f
5 files changed
+310
-237
No files matched your search
@@ -1,6 +1,4 @@
|
||||
import { Booking } from "@prisma/client";
|
||||
|
||||
import { LocationType } from "@lib/location";
|
||||
import { Attendee, Booking } from "@prisma/client";
|
||||
|
||||
export type BookingConfirmBody = {
|
||||
confirmed: boolean;
|
||||
@@ -11,18 +9,23 @@ export type BookingCreateBody = {
|
||||
email: string;
|
||||
end: string;
|
||||
eventTypeId: number;
|
||||
guests: string[];
|
||||
location: LocationType;
|
||||
guests?: string[];
|
||||
location: string;
|
||||
name: string;
|
||||
notes: string;
|
||||
notes?: string;
|
||||
rescheduleUid?: string;
|
||||
start: string;
|
||||
timeZone: string;
|
||||
users?: string[];
|
||||
user?: string;
|
||||
language: string;
|
||||
customInputs: { label: string; value: string }[];
|
||||
metadata: {
|
||||
[key: string]: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type BookingResponse = Booking & {
|
||||
paymentUid?: string;
|
||||
attendees: Attendee[];
|
||||
};
|
||||
@@ -25,7 +25,7 @@ const sendPayload = async (
|
||||
triggerEvent: string,
|
||||
createdAt: string,
|
||||
subscriberUrl: string,
|
||||
data: Omit<CalendarEvent, "language">,
|
||||
data: Omit<CalendarEvent, "language"> & { metadata?: { [key: string]: string } },
|
||||
template?: string | null
|
||||
) => {
|
||||
if (!subscriberUrl || !data) {
|
||||
|
||||
Reference in new issue
Block a user