2021-11-18 01:03:19 +00:00
|
|
|
import { EventType, SchedulingType } from "@prisma/client";
|
2021-09-14 08:45:28 +00:00
|
|
|
|
2021-11-18 01:03:19 +00:00
|
|
|
import { WorkingHours } from "./schedule";
|
2021-08-27 12:11:24 +00:00
|
|
|
|
|
|
|
export type AdvancedOptions = {
|
|
|
|
eventName?: string;
|
|
|
|
periodType?: string;
|
|
|
|
periodDays?: number;
|
|
|
|
periodStartDate?: Date | string;
|
|
|
|
periodEndDate?: Date | string;
|
|
|
|
periodCountCalendarDays?: boolean;
|
|
|
|
requiresConfirmation?: boolean;
|
2021-09-26 21:49:16 +00:00
|
|
|
disableGuests?: boolean;
|
|
|
|
minimumBookingNotice?: number;
|
|
|
|
price?: number;
|
|
|
|
currency?: string;
|
|
|
|
schedulingType?: SchedulingType;
|
2021-11-24 17:07:49 +00:00
|
|
|
users?: string[];
|
2021-11-18 01:03:19 +00:00
|
|
|
availability?: { openingHours: WorkingHours[]; dateOverrides: WorkingHours[] };
|
2021-10-12 08:17:25 +00:00
|
|
|
customInputs?: EventTypeCustomInput[];
|
2021-11-24 17:07:49 +00:00
|
|
|
timeZone?: string;
|
2021-08-27 12:11:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export type EventTypeCustomInput = {
|
|
|
|
id: number;
|
|
|
|
label: string;
|
|
|
|
placeholder: string;
|
|
|
|
required: boolean;
|
|
|
|
type: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type CreateEventType = {
|
|
|
|
title: string;
|
|
|
|
slug: string;
|
|
|
|
description: string;
|
|
|
|
length: number;
|
2021-10-15 19:07:00 +00:00
|
|
|
teamId?: number;
|
2021-09-14 08:45:28 +00:00
|
|
|
schedulingType?: SchedulingType;
|
2021-08-27 12:11:24 +00:00
|
|
|
};
|
|
|
|
|
2021-10-15 19:07:00 +00:00
|
|
|
export type CreateEventTypeResponse = {
|
|
|
|
eventType: EventType;
|
|
|
|
};
|
|
|
|
|
2021-08-27 12:11:24 +00:00
|
|
|
export type EventTypeInput = AdvancedOptions & {
|
|
|
|
id: number;
|
|
|
|
title: string;
|
|
|
|
slug: string;
|
|
|
|
description: string;
|
|
|
|
length: number;
|
|
|
|
hidden: boolean;
|
|
|
|
locations: unknown;
|
2021-11-18 01:03:19 +00:00
|
|
|
availability?: { openingHours: WorkingHours[]; dateOverrides: WorkingHours[] };
|
2021-08-27 12:11:24 +00:00
|
|
|
};
|