fix typeof schemaEventTypeReadPublic

pull/9078/head
Agusti Fernandez Pardo 2022-05-18 22:03:36 +02:00
parent ba4abacb1a
commit 26888a3630
1 changed files with 5 additions and 9 deletions

View File

@ -1,10 +1,8 @@
import { import {
User, User,
ApiKey,
Team, Team,
Credential, Credential,
SelectedCalendar, SelectedCalendar,
EventType,
EventTypeCustomInput, EventTypeCustomInput,
Attendee, Attendee,
Availability, Availability,
@ -19,6 +17,8 @@ import {
ReminderMail, ReminderMail,
} from "@calcom/prisma/client"; } from "@calcom/prisma/client";
import { schemaEventTypeReadPublic } from "@lib/validations/event-type";
// Base response, used for all responses // Base response, used for all responses
export type BaseResponse = { export type BaseResponse = {
message?: string; message?: string;
@ -124,17 +124,13 @@ export type EventTypeCustomInputResponse = BaseResponse & {
export type EventTypeCustomInputsResponse = BaseResponse & { export type EventTypeCustomInputsResponse = BaseResponse & {
event_type_custom_inputs?: Partial<EventTypeCustomInput>[]; event_type_custom_inputs?: Partial<EventTypeCustomInput>[];
}; };
export interface EventTypeMeta extends Omit<EventType, "locations" | "metadata" | "recurringEvent"> {
locations: object | null;
metadata: object | null;
recurringEvent: object | null;
}
// EventType // EventType
export type EventTypeResponse = BaseResponse & { export type EventTypeResponse = BaseResponse & {
event_type?: Partial<EventTypeMeta>; event_type?: Partial<typeof schemaEventTypeReadPublic>;
}; };
export type EventTypesResponse = BaseResponse & { export type EventTypesResponse = BaseResponse & {
event_types?: Partial<EventTypeMeta>[]; event_types?: Partial<typeof schemaEventTypeReadPublic>[];
}; };
// Payment // Payment