fix: removes daily-event-reference endpoints and types

This commit is contained in:
Agusti Fernandez Pardo committed 2022-09-06 19:04:16 +02:00
1 parent ddc084044a
commit 3caee6c697
7 files changed
+7 -302

No files matched your search

+5 -12
View File
@@ -1,4 +1,4 @@
import { AppStoreLocationType, DefaultLocationType } from "@calcom/app-store/locations";
import { AppStoreLocationType, DefaultEventLocationType } from "@calcom/app-store/locations";
import {
User,
Team,
@@ -9,7 +9,6 @@ import {
Availability,
BookingReference,
Booking,
DailyEventReference,
Webhook,
DestinationCalendar,
Membership,
@@ -93,14 +92,6 @@ export type CredentialsResponse = BaseResponse & {
credentials?: Partial<Credential>[];
};
// DailyEventReference
export type DailyEventReferenceResponse = BaseResponse & {
daily_event_reference?: Partial<DailyEventReference>;
};
export type DailyEventReferencesResponse = BaseResponse & {
daily_event_references?: Partial<DailyEventReference>[];
};
// DestinationCalendar
export type DestinationCalendarResponse = BaseResponse & {
destination_calendar?: Partial<DestinationCalendar>;
@@ -148,9 +139,11 @@ interface EventTypeExtended extends Omit<EventType, "recurringEvent" | "location
link?: string | undefined;
address?: string | undefined;
hostPhoneNumber?: string | undefined;
type: DefaultLocationType | AppStoreLocationType;
type: DefaultEventLocationType | typeof AppStoreLocationType;
}[]
| null;
| null
// eslint-disable-next-line @typescript-eslint/no-explicit-any
| any;
}
// EventType
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Webhook } from "@prisma/client";
import { compile } from "handlebars";
-38
View File
@@ -1,38 +0,0 @@
import { z } from "zod";
import { _DailyEventReferenceModel as DailyEventReference } from "@calcom/prisma/zod";
export const schemaDailyEventReferenceBaseBodyParams = DailyEventReference.pick({
dailytoken: true,
dailyurl: true,
bookingId: true,
}).partial();
const schemaDailyEventReferenceCreateParams = z
.object({
dailytoken: z.string(),
dailyurl: z.string(),
bookingId: z.number(),
})
.strict();
export const schemaDailyEventReferenceCreateBodyParams = schemaDailyEventReferenceBaseBodyParams.merge(
schemaDailyEventReferenceCreateParams
);
const schemaDailyEventReferenceEditParams = z
.object({
dailytoken: z.string().optional(),
dailyurl: z.string().optional(),
})
.strict();
export const schemaDailyEventReferenceEditBodyParams = schemaDailyEventReferenceBaseBodyParams.merge(
schemaDailyEventReferenceEditParams
);
export const schemaDailyEventReferenceReadPublic = DailyEventReference.pick({
id: true,
dailytoken: true,
dailyurl: true,
bookingId: true,
});
+1 -2
View File
@@ -1,6 +1,5 @@
import { z } from "zod";
import { AppStoreLocationType, DefaultLocationType } from "@calcom/app-store/locations";
import { _EventTypeModel as EventType } from "@calcom/prisma/zod";
import { Frequency } from "@lib/types";
@@ -110,7 +109,7 @@ export const schemaEventTypeReadPublic = EventType.pick({
link: z.string().optional(),
address: z.string().optional(),
hostPhoneNumber: z.string().optional(),
type: z.nativeEnum(DefaultLocationType).or(z.nativeEnum(AppStoreLocationType)),
type: z.any().optional(),
})
)
.nullable(),
-2
View File
@@ -4,8 +4,6 @@ import { _UserModel as User } from "@calcom/prisma/zod";
import { timeZone } from "@lib/validations/shared/timeZone";
import { jsonSchema } from "./shared/jsonSchema";
// @note: These are the ONLY values allowed as weekStart. So user don't introduce bad data.
enum weekdays {
MONDAY = "Monday",