Files
calendar/packages/features/bookings/lib/create-instant-booking.ts
3bcce02b92 chore: [Booking flow refactor - 2] Integrate Booking services (#23156)
* Integrate booking services

* Fix imports

---------

Co-authored-by: Volnei Munhoz <[email protected]>
2025-10-09 18:21:55 -03:00

14 lines
559 B
TypeScript

import { post } from "@calcom/lib/fetch-wrapper";
import type { BookingCreateBody } from "../types";
import type { InstantBookingCreateResult } from "./dto/types";
export const createInstantBooking = async (data: BookingCreateBody) => {
const response = await post<
BookingCreateBody,
// TODO: Fetch response can't have a Date type, it must be a string. We need to type expires as a string here but it breaks types down the line, fix it in a follow-up PR.
InstantBookingCreateResult
>("/api/book/instant-event", data);
return response;
};