perf: move to disable prisma client extension inference (#23692)

* perf: move to disable prisma client extension inference

* Prisma doesn't like it when you pass Record<string, unknown>

* API v1 type fixes

* Missed one

* Fix unit test fail due to faulty expect

* Assigning to prisma InputJsonValue/Array must be done as object, not interface

* Fix @calcom/web ts error, teams not defined

* Run eslint formatter

* fixed the routingFormHelpers file causing a failing app store e2e test
This commit is contained in:
Alex van Andel authored and GitHub committed 2025-09-09 10:56:58 +00:00
1 parent 38bc5fb71e
commit aa51218428
24 files changed
+295 -253

No files matched your search

@@ -36,7 +36,6 @@ export class FeaturesRepository implements IFeaturesRepository {
const features = await this.prismaClient.feature.findMany({
orderBy: { slug: "asc" },
cacheStrategy: { swr: 300, ttl: 300 },
});
FeaturesRepository.featuresCache = {
@@ -12,7 +12,7 @@ import {
} from "@calcom/features/insights/server/raw-data.schema";
import { getInsightsBookingService } from "@calcom/lib/di/containers/InsightsBooking";
import { getInsightsRoutingService } from "@calcom/lib/di/containers/InsightsRouting";
import type { readonlyPrisma } from "@calcom/prisma";
import type { PrismaClient } from "@calcom/prisma";
import { BookingStatus } from "@calcom/prisma/enums";
import authedProcedure from "@calcom/trpc/server/procedures/authedProcedure";
import { router } from "@calcom/trpc/server/trpc";
@@ -31,7 +31,7 @@ const UserBelongsToTeamInput = z.object({
type BuildBaseWhereConditionCtxType = {
userIsOwnerAdminOfParentTeam: boolean;
userOrganizationId: number | null;
insightsDb: typeof readonlyPrisma;
insightsDb: PrismaClient;
};
interface BuildBaseWhereConditionType {
@@ -341,7 +341,7 @@ function createInsightsBookingService(
}
function createInsightsRoutingService(
ctx: { insightsDb: typeof readonlyPrisma; user: { id: number; organizationId: number | null } },
ctx: { insightsDb: PrismaClient; user: { id: number; organizationId: number | null } },
input: z.infer<typeof routingRepositoryBaseInputSchema>
) {
return getInsightsRoutingService({
@@ -1037,7 +1037,7 @@ export async function getEventTypeList({
isAll,
user,
}: {
prisma: typeof readonlyPrisma;
prisma: PrismaClient;
teamId: number | null | undefined;
userId: number | null | undefined;
isAll: boolean | undefined;