cal/packages/features/bookings/types.ts
Peer Richelsen 200ce6932d
feat: Instant Meeting (#12345)
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
2023-12-19 11:01:42 -08:00

39 lines
1.2 KiB
TypeScript

import type { ErrorOption, FieldPath } from "react-hook-form";
import type { BookingCreateBody } from "@calcom/prisma/zod-utils";
import type { RouterOutputs } from "@calcom/trpc/react";
import type { AppsStatus } from "@calcom/types/Calendar";
export type PublicEvent = NonNullable<RouterOutputs["viewer"]["public"]["event"]>;
export type ValidationErrors<T extends object> = { key: FieldPath<T>; error: ErrorOption }[];
export type EventPrice = { currency: string; price: number; displayAlternateSymbol?: boolean };
export enum EventDetailBlocks {
// Includes duration select when event has multiple durations.
DURATION,
LOCATION,
REQUIRES_CONFIRMATION,
// Includes input to select # of occurences.
OCCURENCES,
PRICE,
}
export type { BookingCreateBody };
export type RecurringBookingCreateBody = BookingCreateBody & {
noEmail?: boolean;
recurringCount?: number;
appsStatus?: AppsStatus[] | undefined;
allRecurringDates?: string[];
currentRecurringIndex?: number;
};
export type BookingResponse = Awaited<
ReturnType<typeof import("@calcom/features/bookings/lib/handleNewBooking").default>
>;
export type InstatBookingResponse = Awaited<
ReturnType<typeof import("@calcom/features/instant-meeting/handleInstantMeeting").default>
>;