fix: No type errors in build (#20075)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Prisma } from "@prisma/client";
|
||||
import { Prisma } from "@prisma/client";
|
||||
import type { GetServerSidePropsContext } from "next";
|
||||
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
|
||||
import { z } from "zod";
|
||||
@@ -78,7 +78,7 @@ const getAppBySlug = async (appSlug: string) => {
|
||||
};
|
||||
|
||||
const getEventTypes = async (userId: number, teamIds?: number[]) => {
|
||||
const eventTypeSelect: Prisma.EventTypeSelect = {
|
||||
const eventTypeSelect = Prisma.validator<Prisma.EventTypeSelect>()({
|
||||
id: true,
|
||||
description: true,
|
||||
durationLimits: true,
|
||||
@@ -99,7 +99,7 @@ const getEventTypes = async (userId: number, teamIds?: number[]) => {
|
||||
userId: true,
|
||||
destinationCalendar: true,
|
||||
bookingFields: true,
|
||||
};
|
||||
});
|
||||
let eventTypeGroups: TEventTypeGroup[] | null = [];
|
||||
|
||||
if (teamIds && teamIds.length > 0) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import prisma from "@calcom/prisma";
|
||||
import type { EventType, Prisma, User, WorkflowReminder, WorkflowStep } from "@calcom/prisma/client";
|
||||
import type { EventType, User, WorkflowReminder, WorkflowStep } from "@calcom/prisma/client";
|
||||
import { Prisma } from "@calcom/prisma/client";
|
||||
import { WorkflowMethods } from "@calcom/prisma/enums";
|
||||
|
||||
type PartialWorkflowStep =
|
||||
@@ -118,7 +119,7 @@ export async function getAllRemindersToCancel(): Promise<RemindersToCancelType[]
|
||||
return remindersToCancel;
|
||||
}
|
||||
|
||||
export const select: Prisma.WorkflowReminderSelect = {
|
||||
export const select = Prisma.validator<Prisma.WorkflowReminderSelect>()({
|
||||
id: true,
|
||||
scheduledDate: true,
|
||||
isMandatoryReminder: true,
|
||||
@@ -193,7 +194,7 @@ export const select: Prisma.WorkflowReminderSelect = {
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
export async function getAllUnscheduledReminders(): Promise<PartialWorkflowReminder[]> {
|
||||
const whereFilter: Prisma.WorkflowReminderWhereInput = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Prisma } from "@prisma/client";
|
||||
import { Prisma } from "@prisma/client";
|
||||
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
|
||||
@@ -201,7 +201,8 @@ export class SelectedCalendarRepository {
|
||||
}
|
||||
|
||||
static async findMany({ where, select, orderBy }: FindManyArgs) {
|
||||
return await prisma.selectedCalendar.findMany({ where, select, orderBy });
|
||||
const args = Prisma.validator<Prisma.SelectedCalendarFindManyArgs>()({ where, select, orderBy });
|
||||
return await prisma.selectedCalendar.findMany(args);
|
||||
}
|
||||
|
||||
static async findUniqueOrThrow({ where }: { where: Prisma.SelectedCalendarWhereInput }) {
|
||||
|
||||
Reference in New Issue
Block a user