mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* Integrate booking services * Fix imports --------- Co-authored-by: Volnei Munhoz <[email protected]>
14 lines
559 B
TypeScript
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;
|
|
};
|