calcom/lib/types/event-type.ts
Syed Ali Shahbaz d8b3c42c28
Improvement/cal 639 turn edit location dialog into radix uu ()
* replaced disclosure with collapsible

* added radix radio-group

* removed radix-UI radio group

* more fix

* --WIP

* --WIP

* react-hook-formify --WIP

* radix ui radio replaces headless ui radio

* further fixes --WIP

* --WIP

* form handling and availability wrapping

* minuteField fix

* availability fix

* fixed react-select menu overflow in dialog

* --WIP

* added default value for custom inputs

* fixed locations

* fixed daterangepicker

* fixed team eventType

* basic cleanup --wip

* fixed locations removal bug

* removed old locations state remnants

* some cleanup --wip

* rebase conflict resolution

* removed debug rem and fixed radio text size

* further requested changes

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
Co-authored-by: Omar López <zomars@me.com>
2021-11-24 10:07:49 -07:00

54 lines
1.2 KiB
TypeScript

import { EventType, SchedulingType } from "@prisma/client";
import { WorkingHours } from "./schedule";
export type AdvancedOptions = {
eventName?: string;
periodType?: string;
periodDays?: number;
periodStartDate?: Date | string;
periodEndDate?: Date | string;
periodCountCalendarDays?: boolean;
requiresConfirmation?: boolean;
disableGuests?: boolean;
minimumBookingNotice?: number;
price?: number;
currency?: string;
schedulingType?: SchedulingType;
users?: string[];
availability?: { openingHours: WorkingHours[]; dateOverrides: WorkingHours[] };
customInputs?: EventTypeCustomInput[];
timeZone?: string;
};
export type EventTypeCustomInput = {
id: number;
label: string;
placeholder: string;
required: boolean;
type: string;
};
export type CreateEventType = {
title: string;
slug: string;
description: string;
length: number;
teamId?: number;
schedulingType?: SchedulingType;
};
export type CreateEventTypeResponse = {
eventType: EventType;
};
export type EventTypeInput = AdvancedOptions & {
id: number;
title: string;
slug: string;
description: string;
length: number;
hidden: boolean;
locations: unknown;
availability?: { openingHours: WorkingHours[]; dateOverrides: WorkingHours[] };
};