Merge pull request #82 from calcom/fix/schema-event-type
fix typeof schemaEventTypeReadPublicpull/9078/head
commit
7d8ed47268
14
lib/types.ts
14
lib/types.ts
|
@ -1,10 +1,8 @@
|
|||
import {
|
||||
User,
|
||||
ApiKey,
|
||||
Team,
|
||||
Credential,
|
||||
SelectedCalendar,
|
||||
EventType,
|
||||
EventTypeCustomInput,
|
||||
Attendee,
|
||||
Availability,
|
||||
|
@ -19,6 +17,8 @@ import {
|
|||
ReminderMail,
|
||||
} from "@calcom/prisma/client";
|
||||
|
||||
import { schemaEventTypeReadPublic } from "@lib/validations/event-type";
|
||||
|
||||
// Base response, used for all responses
|
||||
export type BaseResponse = {
|
||||
message?: string;
|
||||
|
@ -124,17 +124,13 @@ export type EventTypeCustomInputResponse = BaseResponse & {
|
|||
export type EventTypeCustomInputsResponse = BaseResponse & {
|
||||
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
|
||||
export type EventTypeResponse = BaseResponse & {
|
||||
event_type?: Partial<EventTypeMeta>;
|
||||
event_type?: Partial<typeof schemaEventTypeReadPublic>;
|
||||
};
|
||||
export type EventTypesResponse = BaseResponse & {
|
||||
event_types?: Partial<EventTypeMeta>[];
|
||||
event_types?: Partial<typeof schemaEventTypeReadPublic>[];
|
||||
};
|
||||
|
||||
// Payment
|
||||
|
|
Loading…
Reference in New Issue